aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlee <alee14498@gmail.com>2018-02-25 10:35:54 -0500
committerAlee <alee14498@gmail.com>2018-02-25 10:35:54 -0500
commitecadc6dbba2e67f260a46435a632323177ba1b8f (patch)
tree58c9692663d4d4e4f3bfe959942342710f0cb642
parent0764799f89f60c755b6184f5fa21bc91b5887311 (diff)
downloadAstralQuote-ATC-ecadc6dbba2e67f260a46435a632323177ba1b8f.tar.gz
AstralQuote-ATC-ecadc6dbba2e67f260a46435a632323177ba1b8f.tar.bz2
AstralQuote-ATC-ecadc6dbba2e67f260a46435a632323177ba1b8f.zip
Added asyncPowerOff
-rw-r--r--bot.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/bot.js b/bot.js
index 112cdc5..ff0cd81 100644
--- a/bot.js
+++ b/bot.js
@@ -2,7 +2,7 @@ const Discord = require('discord.js');
const moment = require('moment');
const client = new Discord.Client();
const config = require('./config.json');
-const aqVersion = '1.2.2';
+const aqVersion = '1.2.3';
const prefix = 'aq:';
const log = message => {
@@ -128,13 +128,17 @@ client.on('message', message => {
} else {
message.channel.send("Access Denied");
}*/
+ const asyncPowerOff = async () => {
+ await message.reply(getBoshyTime(message.guild) + 'AstralQuote is now powering off!');
+ console.log('[i] AstralQuote is now powering off...');
+ process.exit(0);
+ }
+
if (message.author.id !== config.ownerID)
{message.reply('Heh you can\'t turn me off :P');}
else {
- message.reply(getBoshyTime(message.guild) + 'AstralQuote is now powering off!');
- console.log('[i] AstralQuote is now powering off...');
- process.exit(0);
- }
+ asyncPowerOff();
+ };
} else if (command === 'help') {
// This is the new help