mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-16 12:36:01 +00:00
Fix code to work on this decade 1/x
This commit is contained in:
@ -1,21 +1,25 @@
|
||||
const { EmbedBuilder } = require("discord.js");
|
||||
const { getVoiceConnections } = require("@discordjs/voice");
|
||||
|
||||
module.exports = {
|
||||
name: 'status',
|
||||
description: 'Status command.',
|
||||
alias: 'status',
|
||||
cooldown: 5,
|
||||
onlyDev: false,
|
||||
execute(message, args, client, Discord, prefix) {
|
||||
execute(message, args, client, prefix) {
|
||||
const uptime = client.funcs.msToTime(client.uptime);
|
||||
const ping = Math.floor(client.ping * 10) / 10;
|
||||
const ping = Math.floor(client.ws.ping * 10) / 10;
|
||||
|
||||
const embed = new Discord.RichEmbed()
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle(`Status for ${client.user.username}`)
|
||||
.addField(':signal_strength: Ping', ping, true)
|
||||
.addField(':stopwatch: Uptime', uptime, true)
|
||||
.addField(`:play_pause: Currently playing music on`, `${client.voiceConnections.size} guild(s)`, true)
|
||||
.addField(`💿 Operating system`, process.platform, true)
|
||||
.setAuthor(client.user.username, client.user.displayAvatarURL)
|
||||
.addFields(
|
||||
{ name: ':signal_strength: Ping', value: ping, inline: true },
|
||||
{ name: ':stopwatch: Uptime', value: uptime, inline: true },
|
||||
{ name: ':play_pause: Currently playing music on', value: `${getVoiceConnections.size} guild(s)`, inline: true },
|
||||
{ name: '💿 Operating system', value: process.platform, inline: true }
|
||||
)
|
||||
.setAuthor({ name: client.user.username, iconURL: client.user.avatarURL()})
|
||||
.setColor(client.config.embedColor)
|
||||
return message.channel.send(embed);
|
||||
return message.channel.send({ embeds: [embed] });
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user