Browse Source

Don't automorph if bot is pinged

denikson 6 năm trước cách đây
mục cha
commit
2450670070
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      commands/facemorph.js

+ 3 - 0
commands/facemorph.js

@@ -124,6 +124,9 @@ const onMessage = (msg, contents, actionsDone) => {
     if (actionsDone)
     if (actionsDone)
         return false;
         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));
     let imageAttachment = msg.attachments.find(v => util.isValidImage(v.filename));
 
 
     if (imageAttachment) {
     if (imageAttachment) {