Some fixes
This commit is contained in:
parent
c566d3e9f3
commit
f3fca52be4
4
bot.js
4
bot.js
|
|
@ -49,14 +49,14 @@ function onMessageHandler (channel, userstate, message, self) {
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "config":
|
case "config":
|
||||||
client.say(channel, "Chance: " + config.chance + "% - Limit: " + config.limit + " - Ignored Users: " + config.ignoredUsers.join(', '));
|
client.say(channel, "Chance: " + config.chance + "% - Limit: " + config.limit + " - Word: " + config.word + " - Ignored Users: " + config.ignoredUsers.join(', '));
|
||||||
break;
|
break;
|
||||||
case "word":
|
case "word":
|
||||||
config.word = value;
|
config.word = value;
|
||||||
fs.writeFileSync('buttsbot.config', JSON.stringify(config));
|
fs.writeFileSync('buttsbot.config', JSON.stringify(config));
|
||||||
client.say(channel, "Word set to " + value);
|
client.say(channel, "Word set to " + value);
|
||||||
break;
|
break;
|
||||||
case "timer":
|
case "chance":
|
||||||
if (isNumeric(value)) {
|
if (isNumeric(value)) {
|
||||||
if (value > 100)
|
if (value > 100)
|
||||||
value = 100;
|
value = 100;
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"word": "butt","timer":120,"chance":20,"ignoredUsers":["StreamElements","Nightbot"]}
|
{"word":"butt","chance":20,"limit":10,"ignoredUsers":["StreamElements","Nightbot"]}
|
||||||
Loading…
Reference in New Issue
Block a user