Check if bot before executing triggers.

This commit is contained in:
chris062689 2017-01-29 15:50:10 -05:00
parent 8034d2667c
commit 2a868860f7

View File

@ -90,7 +90,7 @@ client.on('message', message => {
} else { } else {
// Not a valid command. // Not a valid command.
} }
} else { } else if (message.author.bot == false) {
// This is a normal channel message. // This is a normal channel message.
cachedTriggers.forEach(function(trigger) { cachedTriggers.forEach(function(trigger) {
if (trigger.roles == undefined || findArray(message.member.roles.map(function(x) { return x.name; }), trigger.roles)) { if (trigger.roles == undefined || findArray(message.member.roles.map(function(x) { return x.name; }), trigger.roles)) {