From: Matthieu Pignolet Date: Sun, 7 Jul 2024 14:42:40 +0000 (+0400) Subject: add everyone gif X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3e39f490a0d760b0d3cbe625ecd17d0e8fb8953d;p=matthieu%2Fgru.git add everyone gif --- diff --git a/discordjs/src/index.mjs b/discordjs/src/index.mjs index faa94f3..caee4b2 100644 --- a/discordjs/src/index.mjs +++ b/discordjs/src/index.mjs @@ -40,8 +40,8 @@ const sanitizeWord = (sentence) => { .replaceAll(/([^A-z])/g, ""); return lastWord; }; -const re = /([a-z]|[A-Z])+/g; -const countChars = (str) => ((str || '').match(re) || []).length; +const anyTrivialCharRegex = /([a-z]|[A-Z])+/g; +const countChars = (str) => ((str || '').match(anyTrivialCharRegex) || []).length; const specialChannels = [ "1248226018406301696" @@ -59,6 +59,10 @@ const messageAction = async (message) => { message.reply(response); } } + + if (message.content.includes("@everyone")) { + message.reply("https://tenor.com/fr/view/muppetwiki-muppet-wiki-muppets-muppet-angry-gif-4979240094074316588"); + } }; client.on("messageCreate", messageAction);