]> git.puffer.fish Git - matthieu/gru.git/commitdiff
hotfix: disable shouldReply on ignored channels
authorMax Charrier <max@puffer.fish>
Sat, 9 Nov 2024 08:43:53 +0000 (09:43 +0100)
committerMax Charrier <max@puffer.fish>
Sat, 9 Nov 2024 08:43:53 +0000 (09:43 +0100)
Signed-off-by: Max Charrier <max@puffer.fish>
discordjs/src/index.mjs

index f1c942c451f8659509bedf96aaecdc484efefba6..43ae9f2bec01570ac4de821b1c26bdbde184fe5b 100644 (file)
@@ -59,7 +59,7 @@ const specialChannels = [
   "995243987948544090"
 ]
 
-const ignoredEveryoneChannels = [
+const ignoredChannels = [
   "1055130476395909210"
 ]
 
@@ -92,7 +92,7 @@ const messageAction = async (message, ctx) => {
     message.mentions.has(client.user)
   );
 
-  if (shouldReply) {
+  if (shouldReply && !ignoredChannels.includes(message.channelId)) {
     let oldCounter = messageReplyCounter;
     if (shouldReplyByTimestamp || shouldReplyByCounter) {
       messageReplyCounter = 0;
@@ -110,7 +110,7 @@ const messageAction = async (message, ctx) => {
     }
   }
   
-  if (message.content.includes("@everyone") && !ignoredEveryoneChannels.includes(message.channelId)) {
+  if (message.content.includes("@everyone") && !ignoredChannels.includes(message.channelId)) {
     message.reply("https://cdn.mpgn.dev/pascontent-gabe.gif");
   }
   if (message.content.includes(" allo ")) {