1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 11:20:19 +00:00
musix-oss/commands/status.js

27 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-02-05 20:02:53 +00:00
module.exports = {
name: 'status',
alias: 'stats',
2020-02-24 18:41:40 +00:00
usage: '',
2020-02-05 20:02:53 +00:00
description: 'See the current status for Musix.',
onlyDev: false,
permission: 'none',
category: 'info',
2020-03-14 16:38:02 +00:00
execute(msg, args, client, Discord, prefix, command) {
2020-02-10 19:07:09 +00:00
const uptime = client.funcs.msToTime(client.uptime, "dd:hh:mm:ss");
2020-03-12 11:56:31 +00:00
msg.channel.send(client.messages.pinging).then(m => {
2020-02-05 20:02:53 +00:00
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)
2020-03-13 20:31:04 +00:00
.addField(client.messages.statusField4, client.shard.ids)
2020-02-05 20:02:53 +00:00
.setAuthor(client.user.username, client.user.displayAvatarURL)
.setColor(client.config.embedColor)
m.delete();
return msg.channel.send(embed);
});
}
};