2018-12-30 01:20:24 +01:00
|
|
|
const { Command } = require('discord-akairo');
|
2018-12-25 19:17:07 +01:00
|
|
|
|
2018-12-30 01:20:24 +01:00
|
|
|
class StatsCommand extends Command {
|
|
|
|
constructor() {
|
|
|
|
super('stats', {
|
|
|
|
aliases: ['stats'],
|
|
|
|
category: 'utility',
|
|
|
|
description: {
|
|
|
|
content: 'Show some stats about the bot',
|
|
|
|
usage: '',
|
|
|
|
examples: ['']
|
|
|
|
}
|
2018-09-08 16:10:28 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-12-30 01:20:24 +01:00
|
|
|
async exec(message) {
|
2018-09-18 01:49:50 +02:00
|
|
|
let totalSeconds = (this.client.uptime / 1000);
|
2018-09-18 01:52:03 +02:00
|
|
|
let days = Math.floor(totalSeconds / 86400);
|
2018-09-18 01:49:50 +02:00
|
|
|
let hours = Math.floor(totalSeconds / 3600);
|
|
|
|
totalSeconds %= 3600;
|
|
|
|
let minutes = Math.floor(totalSeconds / 60);
|
2018-09-29 17:59:04 +02:00
|
|
|
let seconds = totalSeconds.toFixed(0) % 60;
|
2018-09-18 01:52:03 +02:00
|
|
|
let uptime = `${days} days, ${hours} hours, ${minutes} minutes and ${seconds} seconds`;
|
2018-09-18 01:49:50 +02:00
|
|
|
return message.channel.send(`Servers: \`${this.client.guilds.size}\`\nChannels: \`${this.client.channels.size}\`\nUsers: \`${this.client.users.size}\`\nBot uptime: \`${uptime}\``);
|
2018-09-08 16:10:28 +02:00
|
|
|
}
|
2018-12-30 01:20:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = StatsCommand;
|