mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-08-23 09:37:27 +00:00
fix for mentions
This commit is contained in:
parent
d16cdde103
commit
38d65b408c
1 changed files with 4 additions and 3 deletions
|
@ -44,7 +44,7 @@ bot.on('ready', function() {
|
||||||
require('./plugins.js').init();
|
require('./plugins.js').init();
|
||||||
console.log('type ' + config.prefix + 'help in Discord for a commands list.');
|
console.log('type ' + config.prefix + 'help in Discord for a commands list.');
|
||||||
bot.user.setActivity(config.prefix + 'help', { type: 'LISTENING' });
|
bot.user.setActivity(config.prefix + 'help', { type: 'LISTENING' });
|
||||||
|
|
||||||
//initialize the commandsBot
|
//initialize the commandsBot
|
||||||
commandsV2.init(bot);
|
commandsV2.init(bot);
|
||||||
});
|
});
|
||||||
|
@ -163,9 +163,10 @@ function checkMessageForCommand(msg, isEdit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (msg.author !== bot.user && msg.mentions.has(bot.user.id)) {
|
if (msg.author !== bot.user && msg.mentions.has(bot.user.id)) {
|
||||||
if (!msg.content.includes("@here") || !msg.content.includes("@everyone")) {
|
if (msg.content.includes('@here') || msg.content.includes('@everyone')) {
|
||||||
msg.channel.send('yes?'); //using a mention here can lead to looping
|
return;
|
||||||
}
|
}
|
||||||
|
msg.channel.send('yes?'); //using a mention here can lead to looping
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue