From cae46fc0db4bb4ea6a91ef768175d03779dc3059 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 19 Nov 2020 17:24:19 -0500 Subject: [PATCH] Fix shutdown --- commands/util/shutdown.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/commands/util/shutdown.js b/commands/util/shutdown.js index 3b896fc5..bda76994 100644 --- a/commands/util/shutdown.js +++ b/commands/util/shutdown.js @@ -27,26 +27,18 @@ module.exports = class ShutdownCommand extends Command { async run(msg, { code }) { const games = this.client.games.size; const calls = this.client.phone.size; - const timers = this.client.registry.commands.get('timer').timers.size; let areIs = 'are'; - if (games > 0 || calls > 0 || timers > 0) { + if (games > 0 || calls > 0) { let currentString = ''; if (games > 0) { currentString += `${games} game${games > 1 ? 's' : ''}`; - if ((calls > 0 && timers < 1) || (calls < 1 && timers > 0)) currentString += ' and '; - else if (calls > 0 && timers > 0) currentString += ', '; + if (calls < 1) currentString += ' and '; if (games === 1) areIs = 'is'; } if (calls > 0) { currentString += `${calls} phone call${calls > 1 ? 's' : ''}`; - if (games < 1 && timers > 0) currentString += ' and '; - if (timers > 0) currentString += ', and '; if (calls === 1 && (games > 0 ? games === 1 : true)) areIs = 'is'; } - if (timers > 0) { - currentString += `${timers} timer${timers > 1 ? 's' : ''}`; - if (timers === 1 && (games > 0 ? games === 1 : true) && (calls > 0 ? calls === 1 : true)) areIs = 'is'; - } await msg.reply(`There ${areIs} currently **${currentString}**. Are you sure?`); const verification = await verify(msg.channel, msg.author); if (!verification) return msg.say('Aborted restart.');