summaryrefslogtreecommitdiff
path: root/commands/uptime.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/uptime.js')
-rw-r--r--commands/uptime.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/commands/uptime.js b/commands/uptime.js
index 90afc81..7453ad5 100644
--- a/commands/uptime.js
+++ b/commands/uptime.js
@@ -1,7 +1,7 @@
/** **************************************
*
* Uptime: Command for AleeBot
- * Copyright (C) 2017-2020 Alee Productions & OfficialRain
+ * Copyright (C) 2017-2021 Alee Productions & OfficialRain
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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 = {