mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-09-02 18:25:18 +00:00
move treating command
moves treating command message down to valid command to avoid logging all messages with activator !
This commit is contained in:
parent
5198918ed4
commit
1f92b7b663
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,6 @@ function checkMessageForCommand(msg, isEdit) {
|
|||
return;
|
||||
});
|
||||
}
|
||||
console.log('treating ' + msg.content + ' from UserID:' + msg.author + ' || UserName: ' + msg.author.username + ' as command');
|
||||
var cmdTxt = msg.content.split(' ')[0].substring(config.prefix.length);
|
||||
var suffix = msg.content.substring(cmdTxt.length + config.prefix.length + 1); //add one for the ! and one for the space
|
||||
if (msg.isMentioned(bot.user)) {
|
||||
|
@ -166,6 +165,7 @@ function checkMessageForCommand(msg, isEdit) {
|
|||
}
|
||||
} else if (cmd) {
|
||||
// Add permission check here later on ;)
|
||||
console.log('treating ' + msg.content + ' from UserID:' + msg.author + ' || UserName: ' + msg.author.username + ' as command');
|
||||
try {
|
||||
cmd.process(bot, msg, suffix, isEdit);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue