buttsbot should not ignore its own commands

This commit is contained in:
root 2021-08-29 20:18:06 +02:00
parent f3fca52be4
commit 0fa257237e

4
bot.js
View File

@ -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;