diff options
Diffstat (limited to 'commands/Utility/uptime.js')
| -rw-r--r-- | commands/Utility/uptime.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js index 8492df2..dd072a4 100644 --- a/commands/Utility/uptime.js +++ b/commands/Utility/uptime.js @@ -15,22 +15,28 @@ exports.run = (bot, msg, args) => { let hours = 0; while (uptimeMinutes >= 60) { hours++; - uptimeMinutes = uptimeMinutes - 60; + uptimeMinutes -= 60; } const uptimeSeconds = minutes % 60; - if (args[0] === 'ms') return msg.channel.send(bot.uptime + ' ms.'); - if (args[0] === 's') return msg.channel.send(uptimeSeconds + ' seconds.'); - if (args[0] === 'min') return msg.channel.send(Math.floor(uptime / 60) + ' minutes ' + uptimeSeconds + ' seconds.'); - msg.channel.send(':clock3: Pokebot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.'); + if (args[0] === 'ms') { + return msg.channel.send(`${bot.uptime } ms.`); + } + if (args[0] === 's') { + return msg.channel.send(`${uptimeSeconds } seconds.`); + } + if (args[0] === 'min') { + return msg.channel.send(`${Math.floor(uptime / 60) } minutes ${ uptimeSeconds } seconds.`); + } + msg.channel.send(`:clock3: Pokebot has been up for ${ hours } hours, ${ uptimeMinutes } minutes, and ${ uptimeSeconds } seconds.`); }; exports.conf = { aliases: [], - guildOnly: true, + guildOnly: true }; exports.help = { name: 'uptime', - description: 'Get the uptime of the bot.', + description: 'Get the uptime of the bot.' }; |
