From ab75cc5f922fe8749fba7cec029a18bdbd4cd3e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Sep 2018 01:49:50 +0200 Subject: [PATCH] Uptime now show hours/minutes/seconds --- commands/utility/stats.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/utility/stats.js b/commands/utility/stats.js index 28d05c72..1f1b10bc 100644 --- a/commands/utility/stats.js +++ b/commands/utility/stats.js @@ -10,6 +10,12 @@ module.exports = class MeowCommand extends Command { } async run(message) { - return message.channel.send(`Servers: \`${this.client.guilds.size}\`\nChannels: \`${this.client.channels.size}\`\nUsers: \`${this.client.users.size}\`\nBot uptime: \`${process.uptime()}\``); + let totalSeconds = (this.client.uptime / 1000); + let hours = Math.floor(totalSeconds / 3600); + totalSeconds %= 3600; + let minutes = Math.floor(totalSeconds / 60); + let seconds = totalSeconds % 60; + let uptime = `${hours} hours, ${minutes} minutes and ${seconds} seconds`; + return message.channel.send(`Servers: \`${this.client.guilds.size}\`\nChannels: \`${this.client.channels.size}\`\nUsers: \`${this.client.users.size}\`\nBot uptime: \`${uptime}\``); } }; \ No newline at end of file