diff options
| author | Matthieu Pignolet <matthieu@matthieu-dev.xyz> | 2024-07-07 18:42:40 +0400 |
|---|---|---|
| committer | Matthieu Pignolet <matthieu@matthieu-dev.xyz> | 2024-07-07 18:42:40 +0400 |
| commit | 3e39f490a0d760b0d3cbe625ecd17d0e8fb8953d (patch) | |
| tree | 0173c8175e2d9fa99cec5fe420ada97316352c1d | |
| parent | 756ef3f2b3d677a265584117121d01754f3c1e62 (diff) | |
add everyone gif
| -rw-r--r-- | discordjs/src/index.mjs | 8 |
1 files changed, 6 insertions, 2 deletions
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); |
