diff options
| author | pokesudenk <thisis@notarealema.il> | 2018-02-25 00:48:48 -0500 |
|---|---|---|
| committer | pokesudenk <thisis@notarealema.il> | 2018-02-25 00:48:48 -0500 |
| commit | 3122617fb4230202dad1b4e521e6b0d54ea9865f (patch) | |
| tree | 458ab39bac8835a08bcce7198987a9abe08d991a /commands/Utility | |
| parent | 5c2843435f589d2962135052e9f8be6f18830291 (diff) | |
| download | PokeBot-3122617fb4230202dad1b4e521e6b0d54ea9865f.tar.gz PokeBot-3122617fb4230202dad1b4e521e6b0d54ea9865f.tar.bz2 PokeBot-3122617fb4230202dad1b4e521e6b0d54ea9865f.zip | |
new uptime args + new cures for boredom
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..1d8529c 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 === 'ms') return msg.channel.send(bot.uptime + ' ms.'); + if (args === 's') return msg.channel.send(uptimeSeconds); + if (args === 'min') return msg.channel.send(uptime / 60 + ':' + uptimeSeconds) msg.channel.send(':clock3: Pokebot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.'); }; |
