diff options
| author | Alee <alee14498@gmail.com> | 2018-02-25 10:35:54 -0500 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-02-25 10:35:54 -0500 |
| commit | ecadc6dbba2e67f260a46435a632323177ba1b8f (patch) | |
| tree | 58c9692663d4d4e4f3bfe959942342710f0cb642 | |
| parent | 0764799f89f60c755b6184f5fa21bc91b5887311 (diff) | |
| download | AstralQuote-ATC-ecadc6dbba2e67f260a46435a632323177ba1b8f.tar.gz AstralQuote-ATC-ecadc6dbba2e67f260a46435a632323177ba1b8f.tar.bz2 AstralQuote-ATC-ecadc6dbba2e67f260a46435a632323177ba1b8f.zip | |
Added asyncPowerOff
| -rw-r--r-- | bot.js | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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
|
