Explorar el Código

Add more triggers to dead chat

ghorsington hace 5 años
padre
commit
ec2bfd5cb1
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      commands/dead_chat.js

+ 9 - 1
commands/dead_chat.js

@@ -1,11 +1,19 @@
 const db = require("../db.js");
 
+const triggers = [
+    "dead server",
+    "dead chat",
+    "ded chat",
+    "ded server"
+];
+
 const onMessage = (msg, content, actionsDone) => {
     if (actionsDone)
         return false;
 
     let lowerContent = content.toLowerCase();
-    if(!lowerContent.includes("dead server") && !lowerContent.includes("dead chat"))
+    
+    if(!triggers.some(s => lowerContent.includes(s)))
         return false;
 
     msg.channel.send(db.get("deadChatReplies").randomElement().value());