From d37c1ce1cf30dbd1be9e2436e6e84bf91d09eb74 Mon Sep 17 00:00:00 2001 From: Alee Date: Wed, 11 Jul 2018 22:44:14 -0400 Subject: Added some bot events and exit the process if AB can't find token --- bot_discord.js | 16 +++++++++++----- 1 file 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 -- cgit v1.2.3 From 6eb4466840c41e0e120c69fd98f6eee963aaf9e2 Mon Sep 17 00:00:00 2001 From: Alee Date: Wed, 11 Jul 2018 22:47:53 -0400 Subject: Travis stuff --- .travis.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.travis.yml b/.travis.yml index 59d3cb3..f94acd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,25 @@ +sudo: required + +services: +- docker + +arch: + repos: + - papyros=http://dash.papyros.io/repos/$repo/$arch + packages: + # pacman packages + - perl + - nodejs + - npm + # aur packages + - go-git + # packages from papyros repo + - papyros-shell + script: + - "./build_script.sh" + +script: +- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash" language: node_js node_js: - "node" -- cgit v1.2.3 From 8f583b6daa99887c0e4deaecb8f501cd01c8a752 Mon Sep 17 00:00:00 2001 From: Alee Date: Wed, 11 Jul 2018 22:53:33 -0400 Subject: Reverted changed --- .travis.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index f94acd8..59d3cb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,3 @@ -sudo: required - -services: -- docker - -arch: - repos: - - papyros=http://dash.papyros.io/repos/$repo/$arch - packages: - # pacman packages - - perl - - nodejs - - npm - # aur packages - - go-git - # packages from papyros repo - - papyros-shell - script: - - "./build_script.sh" - -script: -- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash" language: node_js node_js: - "node" -- cgit v1.2.3 From 9461d76ff095d08a042b54ad05ecf47d21e61c2e Mon Sep 17 00:00:00 2001 From: Alee Date: Tue, 24 Jul 2018 21:24:55 -0400 Subject: FINAL COMMIT. --- commands/help.js | 2 +- storage/settings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/help.js b/commands/help.js index 4b19a57..8552c84 100644 --- a/commands/help.js +++ b/commands/help.js @@ -41,7 +41,7 @@ module.exports.run = async (client, message) => { if (!message.guild.member(client.user).hasPermission('EMBED_LINKS')) return message.reply('ERROR: AleeBot doesn\'t have the permission to send embed links please enable them to use the full help.'); const embed = new Discord.RichEmbed() .setAuthor('AleeBot ' + require('../storage/settings.json').abVersion + ` Help and on ${client.guilds.size} servers`, client.user.avatarURL) - .setDescription('Every command you input into AleeBot is `' + prefix + '`') + .setDescription('Every command you input into AleeBot is `' + prefix + '`\n\nATTENTION ALL: ALEEBOT WILL MERGE WITH GALAXY AND NO LONGER RECIEVE UPDATES AFTER 2.11.3. SERVICE WILL GO DOWN IN NOVEMBER 1ST 2018.\n\nInvite link here: https://discordapp.com/oauth2/authorize?client_id=417096530596724737&permissions=2146954487&scope=bot') .setColor('#1fd619') .setFooter('AleeCorp Copyright 2018, Licensed with GPL-3.0'); diff --git a/storage/settings.json b/storage/settings.json index 8440772..46bf845 100644 --- a/storage/settings.json +++ b/storage/settings.json @@ -1,4 +1,4 @@ { - "abVersion": "2.11.2", + "abVersion": "2.11.3", "prefix": "abb:" } -- cgit v1.2.3 From 74c0a1cfb3613e7037a34bc730cb4d35c6c213fc Mon Sep 17 00:00:00 2001 From: Alee Date: Tue, 24 Jul 2018 21:27:20 -0400 Subject: oh wait this isn't a final commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 61c14b5..cda962e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Discord Badge Travis CI Build Status

AleeBot: A bot that's made for the discord app

+
+

PROJECT MERGE: WE ARE GOING TO MERGE WITH GALAXY REPO HERE


What features does AleeBot have?

-- cgit v1.2.3