diff options
| author | Alee <alee14498@gmail.com> | 2018-07-24 21:28:03 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-07-24 21:28:03 -0400 |
| commit | 46e29cca2b398ec311952a088baa4d523eea9004 (patch) | |
| tree | dc9db0cfaaf12971c867cee6e579594b8b172aae /bot_discord.js | |
| parent | 79218a500c682ad7ae27991755567ffd6e9c9ae3 (diff) | |
| parent | 74c0a1cfb3613e7037a34bc730cb4d35c6c213fc (diff) | |
| download | AleeBot-46e29cca2b398ec311952a088baa4d523eea9004.tar.gz AleeBot-46e29cca2b398ec311952a088baa4d523eea9004.tar.bz2 AleeBot-46e29cca2b398ec311952a088baa4d523eea9004.zip | |
FINAL COMMIT.v2.11.3
Diffstat (limited to 'bot_discord.js')
| -rw-r--r-- | bot_discord.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bot_discord.js b/bot_discord.js index 775a1e7..3b6f0fa 100644 --- a/bot_discord.js +++ b/bot_discord.js @@ -64,12 +64,14 @@ if (process.argv.indexOf("--debug") == -1) { if (process.argv.indexOf("--beta") == -1) {
client.login(api.abtoken).catch(function() {
- log('[X] Login failed. The token that you put in is invalid, please put in a new one...'.red);
+ console.log('[X] Login failed. The token that you put in is invalid, please put in a new one...'.red);
+ process.exit(0);
});
} else {
client.login(api.abbtoken).catch(function() {
- log('[X] Login failed. The token that you put in is invalid, please put in a new one...'.red);
+ console.log('[X] Login failed. The token that you put in is invalid, please put in a new one...'.red);
+ process.exit(0);
});
}
@@ -315,7 +317,11 @@ process.on('unhandledRejection', function(err, p) { log("[X | UNCAUGHT PROMISE] " + err.stack.red);
});
-
-process.on('uncaughtException', function (exception) {
- log("[X | UNCAUGHT EXCEPTION]" + exception.red);
+client.on('reconnecting', function() {
+ log("[!] AleeBot has disconnected from Discord and is now attempting to reconnect.".yellow);
});
+
+client.on('disconnect', function() {
+ log("[X] AleeBot has disconnected from Discord and will not attempt to reconnect.".red);
+ console.log("At this point, you'll need to restart AleeBot.".red);
+});
\ No newline at end of file |
