From e451c1df4cd94d753fa973ee37691e674bc9a395 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sun, 14 May 2023 17:50:56 +0800 Subject: [PATCH] fix(expandMessage): check for webhookId correctly --- src/utils/resolveMessage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/resolveMessage.ts b/src/utils/resolveMessage.ts index 4540898..2d37e24 100644 --- a/src/utils/resolveMessage.ts +++ b/src/utils/resolveMessage.ts @@ -20,8 +20,8 @@ function findFirstImage(message: Message): string | undefined { } export async function expandDiscordLink(message: Message): Promise { - if (message.author.bot && !message.author.webhookId) return; - + if (message.author.bot && !message.webhookId) return; + const re = /(https?:\/\/)?(?:canary\.|ptb\.)?discord(?:app)?\.com\/channels\/(?\d+)\/(?\d+)\/(?\d+)/g;