aboutsummaryrefslogtreecommitdiff
path: root/commands/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'commands/Utility')
-rw-r--r--commands/Utility/uptime.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js
index 63bd6a4..bc9b1fa 100644
--- a/commands/Utility/uptime.js
+++ b/commands/Utility/uptime.js
@@ -1,4 +1,4 @@
-exports.run = (bot, msg) => {
+exports.run = (bot, msg, args) => {
let uptime = parseInt(bot.uptime);
uptime = Math.floor(uptime / 1000);
let uptimeMinutes = Math.floor(uptime / 60);
@@ -9,6 +9,9 @@ exports.run = (bot, msg) => {
uptimeMinutes = 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.');
};