Procházet zdrojové kódy

Fix facemorph not getting triggered on mentiod

denikson před 6 roky
rodič
revize
311f69411e
4 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 1 1
      commands/facemorph.js
  2. 1 1
      commands/guide.js
  3. 0 1
      commands/react.js
  4. 1 1
      main.js

+ 1 - 1
commands/facemorph.js

@@ -151,7 +151,7 @@ const onDirectMention = (msg, content, actionsDone) => {
 
     let todayQuota = db.get("faceEditInfo.todayRequests").value();
     let maxQuota = db.get("faceEditInfo.customRequestsPerDay").value();
-
+    
     if (todayQuota >= maxQuota) {
         msg.channel.send(`${msg.author.toString()} Nice image, but I can't do anything to it! (Daily quota hit)`);
         return true;

+ 1 - 1
commands/guide.js

@@ -79,7 +79,7 @@ const onDirectMention = (msg, content, actionsDone) => {
     if (actionsDone)
         return false;
 
-    if(msg.attachments.size > 0)
+    if(msg.attachments.size > 0 || content.length == 0)
         return false;
 
     let parts = content.trim().split(" ");

+ 0 - 1
commands/react.js

@@ -92,7 +92,6 @@ const onIndirectMention = (msg, actionsDone) => {
         .get(emoteType)
         .randomElement()
         .value();
-    console.log(id);
     msg.channel.send(client.emojis.find(e => e.id == id).toString());
     return true;
 };

+ 1 - 1
main.js

@@ -56,7 +56,7 @@ client.on("message", m => {
                 }
             }
 
-            if (lowerCaseContent.length > 0 && trigger(directMessageActions, m, lowerCaseContent))
+            if (trigger(directMessageActions, m, lowerCaseContent))
                 return;
         }