From 0b3a4f4ad0a12f88c9f1d17e4f37ccc6fa4e620b Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Sep 2021 21:04:52 +0200 Subject: [PATCH] Another small fix for the pity system --- bot.js | 2 ++ 1 file changed, 2 insertions(+) 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));