Explorar o código

Don't automorph if bot is pinged

denikson %!s(int64=6) %!d(string=hai) anos
pai
achega
2450670070
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      commands/facemorph.js

+ 3 - 0
commands/facemorph.js

@@ -124,6 +124,9 @@ const onMessage = (msg, contents, actionsDone) => {
     if (actionsDone)
         return false;
 
+    if(msg.mentions.users.size > 0 && msg.mentions.users.first().id == client.user.id)
+        return false;
+
     let imageAttachment = msg.attachments.find(v => util.isValidImage(v.filename));
 
     if (imageAttachment) {