aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bot_discord.js24
1 files changed, 12 insertions, 12 deletions
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.');
});