1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 08:10:18 +00:00
musix-oss/commands/status.js
2020-03-14 18:38:02 +02:00

27 lines
1.1 KiB
JavaScript

module.exports = {
name: 'status',
alias: 'stats',
usage: '',
description: 'See the current status for Musix.',
onlyDev: false,
permission: 'none',
category: 'info',
execute(msg, args, client, Discord, prefix, command) {
const uptime = client.funcs.msToTime(client.uptime, "dd:hh:mm:ss");
msg.channel.send(client.messages.pinging).then(m => {
const latency = m.createdTimestamp - msg.createdTimestamp;
const embed = new Discord.MessageEmbed()
.setTitle(client.messages.statusTitle)
.addField(client.messages.statusField1, client.ws.ping, true)
.addField(client.messages.statusField2, latency, true)
.addField(client.messages.statusField3, uptime, true)
.addField(client.messages.statusField4, client.shard.ids)
.setAuthor(client.user.username, client.user.displayAvatarURL)
.setColor(client.config.embedColor)
m.delete();
return msg.channel.send(embed);
});
}
};