From ca40f7bf2547964ba3824b131e427e5df57e357b Mon Sep 17 00:00:00 2001 From: Alee Date: Sun, 15 Apr 2018 10:09:31 -0400 Subject: debug mode changes --- bot_discord.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'bot_discord.js') diff --git a/bot_discord.js b/bot_discord.js index 18d3958..5034885 100644 --- a/bot_discord.js +++ b/bot_discord.js @@ -37,6 +37,18 @@ console.log('This program comes with ABSOLUTELY NO WARRANTY; for details type `s console.log ('This is free software, and you are welcome to redistribute it'); console.log ('under certain conditions; type `show c\' for details.\n') +if (process.argv.indexOf("--debug") == -1) { + log("Running AleeBot without --debug command line flag. Debug output disabled."); +} else { + console.log('[!] Entering debug mode...') + client.on('debug', function(info) { + log(info); + }); + client.on('warn', function(info) { + log(info); + }); +} + client.commands = new Discord.Collection(); client.aliases = new Discord.Collection(); @@ -144,18 +156,6 @@ client.on("error", error => { log(error); }); -if (process.argv.indexOf("--debug") == -1) { - log("Running AleeBot without --debug command line flag. Debug output disabled."); -} else { - - client.on('debug', function(info) { - log(info); - }); - client.on('warn', function(info) { - log(info); - }); -} - client.login(config.abtoken).catch(function() { log('[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.'); }); -- cgit v1.2.3