Another small fix for the pity system
This commit is contained in:
parent
6edfdc59f6
commit
0b3a4f4ad0
2
bot.js
2
bot.js
|
|
@ -122,6 +122,8 @@ function onMessageHandler (channel, userstate, message, self) {
|
||||||
break;
|
break;
|
||||||
case "pity":
|
case "pity":
|
||||||
if (isNumeric(value)) {
|
if (isNumeric(value)) {
|
||||||
|
if (value < 0)
|
||||||
|
value = 0;
|
||||||
config.pity = parseInt(value);
|
config.pity = parseInt(value);
|
||||||
configurations[channel] = config;
|
configurations[channel] = config;
|
||||||
fs.writeFileSync('buttsbot.config', JSON.stringify(configurations));
|
fs.writeFileSync('buttsbot.config', JSON.stringify(configurations));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user