diff options
| author | Alee <alee14498@gmail.com> | 2018-04-15 00:07:40 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-04-15 00:07:40 -0400 |
| commit | 89b1f4aaae47bf7acd0454d5da50c617e16e1f76 (patch) | |
| tree | 5f24b502d7797fb9386731fd1227f7a5a0819bef | |
| parent | 14f82c6c54252ce19943ae174e3557d7ba56026d (diff) | |
| download | AleeBot-89b1f4aaae47bf7acd0454d5da50c617e16e1f76.tar.gz AleeBot-89b1f4aaae47bf7acd0454d5da50c617e16e1f76.tar.bz2 AleeBot-89b1f4aaae47bf7acd0454d5da50c617e16e1f76.zip | |
Debugging
| -rw-r--r-- | bot_discord.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bot_discord.js b/bot_discord.js index 8700573..b9d7f2f 100644 --- a/bot_discord.js +++ b/bot_discord.js @@ -144,6 +144,17 @@ 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.');
|
