buttsbot should not ignore its own commands
This commit is contained in:
parent
f3fca52be4
commit
0fa257237e
4
bot.js
4
bot.js
|
|
@ -36,8 +36,6 @@ function isNumeric(n) {
|
|||
|
||||
// Event handlers
|
||||
function onMessageHandler (channel, userstate, message, self) {
|
||||
if (self) { return; }
|
||||
|
||||
var trimmedMessage = message.trim();
|
||||
|
||||
if (trimmedMessage.startsWith("!buttsbot")) {
|
||||
|
|
@ -116,6 +114,8 @@ function onMessageHandler (channel, userstate, message, self) {
|
|||
console.log(`* buttsbot: User not authorized`);
|
||||
}
|
||||
} else {
|
||||
if (self) return;
|
||||
|
||||
if (trimmedMessage.startsWith("!"))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user