From ab29cd51d17c3044dde1bb1c954275f2761c4a13 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Fri, 11 Mar 2022 17:59:00 -0700 Subject: fix undefined issue --- twitch-bot/bot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'twitch-bot') diff --git a/twitch-bot/bot.js b/twitch-bot/bot.js index 7de7a5d..d0220f7 100644 --- a/twitch-bot/bot.js +++ b/twitch-bot/bot.js @@ -4,7 +4,7 @@ const fs = require('fs'); var settings, reacts, commands, mod_commands; // read settings and reactions json files -fs.readFile('./settings.json', 'utf8', (err, data) => { +fs.readFileSync('./settings.json', 'utf8', (err, data) => { if (err) { console.log(`Error reading settings file from disk: ${err}`); process.exit(1); @@ -14,7 +14,7 @@ fs.readFile('./settings.json', 'utf8', (err, data) => { } }); -fs.readFile('./reacts.json', 'utf8', (err, data) => { +fs.readFileSync('./reacts.json', 'utf8', (err, data) => { if (err) { console.log(`Error reading reacts file from disk: ${err}`); process.exit(1); @@ -24,7 +24,7 @@ fs.readFile('./reacts.json', 'utf8', (err, data) => { } }); -fs.readFile('./commands.json', 'utf8', (err, data) => { +fs.readFileSync('./commands.json', 'utf8', (err, data) => { if (err) { console.log(`Error reading commands file from disk: ${err}`); process.exit(1); @@ -34,7 +34,7 @@ fs.readFile('./commands.json', 'utf8', (err, data) => { } }); -fs.readFile('./mod_commands.json', 'utf8', (err, data) => { +fs.readFileSync('./mod_commands.json', 'utf8', (err, data) => { if (err) { console.log(`Error reading mod commands file from disk: ${err}`); process.exit(1); -- cgit v1.2.3