fix(expandMessage): check for webhookId correctly
This commit is contained in:
parent
8e279ae5cf
commit
e451c1df4c
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +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;
|
if (message.author.bot && !message.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