aboutsummaryrefslogtreecommitdiff
path: root/twitch-bot
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2022-03-11 18:28:05 -0700
committerBryson Steck <steck.bryson@gmail.com>2022-03-11 18:28:05 -0700
commitae99c19866beffa409a513bbc21516bc10f07256 (patch)
tree8dc2ff087e48e760b61a0af4784c22315dc4f840 /twitch-bot
parent0a95dea1b6d2cae582ed8ef65eb6efcb656816ac (diff)
downloadlset-ae99c19866beffa409a513bbc21516bc10f07256.tar
lset-ae99c19866beffa409a513bbc21516bc10f07256.tar.gz
lset-ae99c19866beffa409a513bbc21516bc10f07256.tar.bz2
forgot parsing
Diffstat (limited to 'twitch-bot')
-rw-r--r--twitch-bot/bot.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/twitch-bot/bot.js b/twitch-bot/bot.js
index f119771..e1c0db2 100644
--- a/twitch-bot/bot.js
+++ b/twitch-bot/bot.js
@@ -1,13 +1,12 @@
const tmi = require('tmi.js');
const fs = require('fs');
-
// read settings and reactions json files
try {
- const settings = fs.readFileSync('./settings.json', 'utf8');
- const reacts = fs.readFileSync('./reacts.json', 'utf8');
- const commands = fs.readFileSync('./commands.json', 'utf8');
- const mod_commands = fs.readFileSync('./mod_commands.json', 'utf8');
+ const settings = JSON.parse(fs.readFileSync('./settings.json', 'utf8'));
+ const reacts = JSON.parse(fs.readFileSync('./reacts.json', 'utf8'));
+ const commands = JSON.parse(fs.readFileSync('./commands.json', 'utf8'));
+ const mod_commands = JSON.parse(fs.readFileSync('./mod_commands.json', 'utf8'));
} catch (err) {
console.error("An error occured trying to read the files for the Twitch bot: " + err);
}