diff --git a/bot.js b/bot.js index 1b989f4..a67cd9b 100644 --- a/bot.js +++ b/bot.js @@ -110,6 +110,9 @@ function onMessageHandler (channel, userstate, message, self) { configurations[channel] = config; fs.writeFileSync('buttsbot.config', JSON.stringify(configurations)); client.say(channel, "Chance set to " + value + "%"); + + messageCounter[channel] = { total: 0, converted: 0 }; + fs.writeFileSync('counter', JSON.stringify(messageCounter)); } else { client.say(channel, "Expected a number, got " + value); }