Uptime now show hours/minutes/seconds
This commit is contained in:
parent
baf48644db
commit
ab75cc5f92
1 changed files with 7 additions and 1 deletions
|
@ -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}\``);
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue