mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-07 10:40:49 +00:00
Fix code to work on this decade 1/x
This commit is contained in:
@ -1,26 +1,29 @@
|
||||
const { EmbedBuilder } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: 'status',
|
||||
alias: ["stats", "info"],
|
||||
usage: '',
|
||||
description: 'See the current status for Musix.',
|
||||
onlyDev: false,
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
execute(msg, args, client, Discord, command) {
|
||||
execute(msg, args, client, 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()
|
||||
const embed = new EmbedBuilder()
|
||||
.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)
|
||||
.addFields(
|
||||
{ name: client.messages.statusField1, value: client.ws.ping, inline: true },
|
||||
{ name: client.messages.statusField2, value: latency, inline: true },
|
||||
{ name: client.messages.statusField3, value: uptime, inline: true },
|
||||
{ name: client.messages.statusField4, value: client.shard.ids },
|
||||
)
|
||||
.setAuthor({ name: client.user.username, iconURL: client.user.avatarURL() })
|
||||
.setColor(client.config.embedColor)
|
||||
m.delete();
|
||||
return msg.channel.send(embed);
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user