aboutsummaryrefslogtreecommitdiff
path: root/commands/Utility
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-02-25 11:52:53 -0500
committerUnknown <jtsshieh@outlook.com>2018-02-25 11:52:53 -0500
commit846f59ecc018704b78f0b33d6dda081fc5a5cf05 (patch)
treedd3866ea1aa28a7bb8d03032ff6fb646c853c2df /commands/Utility
parentfb24fdcadd13beee78f8e89d293e31764a7c059d (diff)
parent815230a264de36f692a5754ccd00054ff48347d9 (diff)
downloadPokeBot-846f59ecc018704b78f0b33d6dda081fc5a5cf05.tar.gz
PokeBot-846f59ecc018704b78f0b33d6dda081fc5a5cf05.tar.bz2
PokeBot-846f59ecc018704b78f0b33d6dda081fc5a5cf05.zip
Merge remote-tracking branch 'origin/master'
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.');
};