fix: don't expand message links for bots (#164)
Signed-off-by: PandaNinjas <admin@malwarefight.wip.la>
This commit is contained in:
parent
968e911ded
commit
e5b85e454d
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ function findFirstImage(message: Message): string | undefined {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function expandDiscordLink(message: Message): Promise<void> {
|
export async function expandDiscordLink(message: Message): Promise<void> {
|
||||||
|
if (message.author.bot && !message.author.webhookId) return;
|
||||||
|
|
||||||
const re =
|
const re =
|
||||||
/(https?:\/\/)?(?:canary\.|ptb\.)?discord(?:app)?\.com\/channels\/(?<server_id>\d+)\/(?<channel_id>\d+)\/(?<message_id>\d+)/g;
|
/(https?:\/\/)?(?:canary\.|ptb\.)?discord(?:app)?\.com\/channels\/(?<server_id>\d+)\/(?<channel_id>\d+)\/(?<message_id>\d+)/g;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue