From 261be4eddc26b31224be6045dbece6de122e5d30 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Thu, 8 Jun 2023 12:53:31 +0500 Subject: [PATCH] Support for ptb and canary links --- events/MessageHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/MessageHandler.js b/events/MessageHandler.js index 9ebebb16..78170e55 100644 --- a/events/MessageHandler.js +++ b/events/MessageHandler.js @@ -48,7 +48,7 @@ class MessageCreate extends BaseEvent { await updateXp(client, message, data); if (message.content.includes("discord.com/channels/")) { - const link = message.content.match(/(https|http):\/\/(discord.com)\/(channels)\/\d+\/\d+\/\d+/g)[0], + const link = message.content.match(/(https|http):\/\/(ptb\.|canary\.)?(discord.com)\/(channels)\/\d+\/\d+\/\d+/g)[0], ids = link.match(/\d+/g), channelId = ids[1], messageId = ids[2];