From 8b7eb29866dc358b6de3e39c8b967eb3d8e12094 Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Wed, 1 Apr 2020 03:37:17 +1100 Subject: [PATCH] Added dev mode --- index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.js b/index.js index e23c650..e31d882 100644 --- a/index.js +++ b/index.js @@ -51,6 +51,14 @@ if (fs.existsSync('./config.js') === false) { require('dotenv').config() client.config = require('./config') +if (process.env.DEV_MODE === 'true') { + client.devmode = true + client.logger.warn('Running in development mode.') +} else { + client.devmode = false + // load botlist stuff here eventually +} + // Collections that client.commands = new Discord.Collection() client.cooldown = new Discord.Collection() @@ -104,6 +112,12 @@ const init = async () => { // Login into Discord client.login(process.env.TOKEN) + + if(client.devmode === true) { + client.login(process.env.DEVTOKEN) + } else { + client.login(process.env.TOKEN) + } } init()