diff --git a/bot.js b/bot.js index 49cc091..3bd4d32 100644 --- a/bot.js +++ b/bot.js @@ -122,6 +122,8 @@ function onMessageHandler (channel, userstate, message, self) { break; case "pity": if (isNumeric(value)) { + if (value < 0) + value = 0; config.pity = parseInt(value); configurations[channel] = config; fs.writeFileSync('buttsbot.config', JSON.stringify(configurations));