From afff3b5b3eaf7454c9f5e0e098d21e9fb9143522 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 20 Jan 2023 03:40:59 +0100 Subject: [PATCH] fix regex --- src/events/message/messageCreate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/message/messageCreate.ts b/src/events/message/messageCreate.ts index 4e0b97a..5322979 100644 --- a/src/events/message/messageCreate.ts +++ b/src/events/message/messageCreate.ts @@ -23,7 +23,7 @@ export default async (message: Message, client: Client) => { /* Citation */ const regex = - "https://(?:canary\\.|ptb\\.)?discord(?:app)?\\.com/channels/(\\d{17,19})/(\\d{17,19})/(\\d{17,19})"; + /https:\/\/(?:canary\.|ptb\.)?discord(?:app)?\.com\/channels\/(\d{17,19})\/(\d{17,19})\/(\d{17,19})/g; const urls = message.content.match(new RegExp(regex, "g")); // Ignore message if there is no URLs