aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2022-03-11 17:53:55 -0700
committerBryson Steck <steck.bryson@gmail.com>2022-03-11 17:53:55 -0700
commit0ab741be0376eb718b4f4960a04b2a632d466acc (patch)
tree12c543624d73885c5e02a938364259ad2c090f38
parent60886d7010f4a56a67aeaeed753b4e23a9739008 (diff)
downloadlset-0ab741be0376eb718b4f4960a04b2a632d466acc.tar
lset-0ab741be0376eb718b4f4960a04b2a632d466acc.tar.gz
lset-0ab741be0376eb718b4f4960a04b2a632d466acc.tar.bz2
fix broken declarations
-rw-r--r--twitch-bot/bot.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/twitch-bot/bot.js b/twitch-bot/bot.js
index 1fb79b1..7de7a5d 100644
--- a/twitch-bot/bot.js
+++ b/twitch-bot/bot.js
@@ -1,6 +1,8 @@
const tmi = require('tmi.js');
const fs = require('fs');
+var settings, reacts, commands, mod_commands;
+
// read settings and reactions json files
fs.readFile('./settings.json', 'utf8', (err, data) => {
if (err) {
@@ -8,7 +10,7 @@ fs.readFile('./settings.json', 'utf8', (err, data) => {
process.exit(1);
} else {
// parse JSON string to JSON object
- const settings = JSON.parse(data);
+ settings = JSON.parse(data);
}
});
@@ -18,7 +20,7 @@ fs.readFile('./reacts.json', 'utf8', (err, data) => {
process.exit(1);
} else {
// parse JSON string to JSON object
- const reacts = JSON.parse(data);
+ reacts = JSON.parse(data);
}
});
@@ -28,7 +30,7 @@ fs.readFile('./commands.json', 'utf8', (err, data) => {
process.exit(1);
} else {
// parse JSON string to JSON object
- const commands = JSON.parse(data);
+ commands = JSON.parse(data);
}
});
@@ -38,7 +40,7 @@ fs.readFile('./mod_commands.json', 'utf8', (err, data) => {
process.exit(1);
} else {
// parse JSON string to JSON object
- const mod_commands = JSON.parse(data);
+ mod_commands = JSON.parse(data);
}
});