Update Mention Check

This commit is contained in:
Ralph 2021-04-05 11:43:43 -04:00 committed by GitHub
parent cbe3f032fb
commit 7baefbf774
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,10 +167,10 @@ function checkMessageForCommand(msg, isEdit) {
} else { } else {
//message isn't a command or is from us //message isn't a command or is from us
//drop our own messages to prevent feedback loops //drop our own messages to prevent feedback loops
if (msg.author == bot.user) { if (msg.author === bot.user) {
return; return;
} }
if (msg.author !== bot.user && msg.isMentioned(bot.user)) { if (msg.author !== bot.user && msg.MessageMentions.equals(bot.user)) {
msg.channel.send('yes?'); //using a mention here can lead to looping msg.channel.send('yes?'); //using a mention here can lead to looping
} else { } else {
} }