2019-09-15 06:18:33 +00:00
|
|
|
module.exports = {
|
|
|
|
name: 'status',
|
|
|
|
description: 'Status command.',
|
2019-10-31 18:29:26 +00:00
|
|
|
alias: 'status',
|
2019-09-15 06:18:33 +00:00
|
|
|
cooldown: 5,
|
2019-10-10 13:43:04 +00:00
|
|
|
execute(message, args, client, Discord, prefix) {
|
2019-09-15 06:18:33 +00:00
|
|
|
let rawUptime = client.uptime;
|
|
|
|
let uptime = {};
|
|
|
|
uptime['d'] = rawUptime / 86400000;
|
|
|
|
uptime['h'] = rawUptime / 3600000;
|
|
|
|
uptime['m'] = rawUptime / 60000;
|
|
|
|
let finalUptime;
|
|
|
|
if (uptime.d < 1) {
|
|
|
|
finalUptime = `${Math.round(uptime.h * 10) / 10} hours`;
|
|
|
|
} else {
|
|
|
|
finalUptime = `${Math.round(uptime.d * 10) / 10} days`;
|
|
|
|
}
|
|
|
|
let ping = Math.floor(client.ping * 10) / 10;
|
|
|
|
|
2019-10-10 13:43:04 +00:00
|
|
|
const embed = new Discord.RichEmbed()
|
2019-09-15 06:18:33 +00:00
|
|
|
.setTitle(`Status for ${client.user.username}`)
|
|
|
|
.addField(':signal_strength: Ping', ping, true)
|
|
|
|
.addField(':stopwatch: Uptime', finalUptime, true)
|
2019-10-10 13:43:04 +00:00
|
|
|
.addField(`:play_pause: Currently playing music on`, `${client.voiceConnections.size} guild(s)`, true)
|
2019-09-15 06:18:33 +00:00
|
|
|
.addField(`💿 Operating system`, process.platform, true)
|
|
|
|
.setAuthor(client.user.username, client.user.displayAvatarURL)
|
|
|
|
.setColor('#b50002')
|
|
|
|
return message.channel.send(embed);
|
|
|
|
}
|
2019-10-10 13:43:04 +00:00
|
|
|
};
|