From 38d65b408c570d470d3687bbad427646061e24db Mon Sep 17 00:00:00 2001 From: Ralph S Date: Mon, 3 Jan 2022 11:05:35 -0500 Subject: [PATCH] fix for mentions --- bot/bot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot/bot.js b/bot/bot.js index 14069e5..4007748 100644 --- a/bot/bot.js +++ b/bot/bot.js @@ -44,7 +44,7 @@ bot.on('ready', function() { require('./plugins.js').init(); console.log('type ' + config.prefix + 'help in Discord for a commands list.'); bot.user.setActivity(config.prefix + 'help', { type: 'LISTENING' }); - + //initialize the commandsBot commandsV2.init(bot); }); @@ -163,9 +163,10 @@ function checkMessageForCommand(msg, isEdit) { return; } if (msg.author !== bot.user && msg.mentions.has(bot.user.id)) { - if (!msg.content.includes("@here") || !msg.content.includes("@everyone")) { - msg.channel.send('yes?'); //using a mention here can lead to looping + if (msg.content.includes('@here') || msg.content.includes('@everyone')) { + return; } + msg.channel.send('yes?'); //using a mention here can lead to looping } else { } }