From 130fd98d0c1546899a3377a4ab4ddad2ca88c8f8 Mon Sep 17 00:00:00 2001 From: DJj123dj <80536295+DJj123dj@users.noreply.github.com> Date: Wed, 4 May 2022 15:26:40 +0200 Subject: [PATCH] bug fix fixed not starting up because of a temporary config file --- index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 5cb6e3e..d3013cb 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,14 @@ client.setMaxListeners(20) const isDev = true //!!!!!!!!!!! -if (isDev){var config = require('./devConfig.json')}else{var config = require('./config.json')} +if (isDev){ + try { + var config = require('./devConfig.json') + }catch{ + console.log("devConfig.json not found! Trying the normal config...") + var config = require("./config.json") + } +}else{var config = require('./config.json')} exports.config = config client.on('ready',async () => {