diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-02-25 11:52:53 -0500 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-02-25 11:52:53 -0500 |
| commit | 846f59ecc018704b78f0b33d6dda081fc5a5cf05 (patch) | |
| tree | dd3866ea1aa28a7bb8d03032ff6fb646c853c2df /commands/Utility | |
| parent | fb24fdcadd13beee78f8e89d293e31764a7c059d (diff) | |
| parent | 815230a264de36f692a5754ccd00054ff48347d9 (diff) | |
| download | PokeBot-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.js | 5 |
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.'); }; |
