diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2023-03-25 21:25:43 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2023-03-25 21:27:41 -0400 |
| commit | 1a7a627446edfeb270850f0ed15c9c8d604380b2 (patch) | |
| tree | 8435e5323ce8a81976cafe297a6c730b4f0695da /commands/uptime.js | |
| parent | 85a8f11507c0fb74b67914090bdfe10c361b775e (diff) | |
| download | AleeBot-1a7a627446edfeb270850f0ed15c9c8d604380b2.tar.gz AleeBot-1a7a627446edfeb270850f0ed15c9c8d604380b2.tar.bz2 AleeBot-1a7a627446edfeb270850f0ed15c9c8d604380b2.zip | |
Now using sequelize; Minor tweaks; New activities
Diffstat (limited to 'commands/uptime.js')
| -rw-r--r-- | commands/uptime.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/commands/uptime.js b/commands/uptime.js index 4753f70..7453ad5 100644 --- a/commands/uptime.js +++ b/commands/uptime.js @@ -23,12 +23,17 @@ module.exports.run = async (client, message) => { let uptimeMinutes = Math.floor(uptime / 60); const minutes = uptime % 60; let hours = 0; + let days = 0; while (uptimeMinutes >= 60) { - hours++; - uptimeMinutes = uptimeMinutes - 60; + hours++; + uptimeMinutes = uptimeMinutes - 60; + } + while (hours >= 24) { + days++; + hours = hours - 24; } const uptimeSeconds = minutes % 60; - message.channel.send(':clock3: AleeBot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.'); + message.channel.send(`:clock3: AleeBot has been up for ${days} days, ${hours} hours, ${uptimeMinutes} minutes, and ${uptimeSeconds} seconds.`); }; exports.conf = { |
