diff --git a/src/index.js b/src/index.js index 270e1eb..929386c 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import "dotenv/config"; import { Client, GatewayIntentBits } from "discord.js"; const TARGET_USER_ID = "541298246971162636"; -const LINK_PATTERN = /(?:https?:\/\/|www\.)\S+/i; +const LINK_PATTERN = /(?:https?:\/\/|www\.|discord\.gg\/|discord\.com\/invite\/|\[[^\]]+\]\([^\)]+\))/i; const WARNING_MESSAGE = "Alerte: Ce lien a été envoyé par Nesta. Ne cliquez SURTOUT PAS s'il y a des gens autour de vous."; @@ -15,6 +15,7 @@ const client = new Client({ }); client.on("messageCreate", async (message) => { + console.log(`Received message from ${message.author.tag}: ${message.content}`); if (message.author.bot) { return; }