1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 07:41:56 +00:00
musix-oss/commands/status.js

26 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-02-09 09:53:30 +00:00
const { EmbedBuilder } = require("discord.js");
const { getVoiceConnections } = require("@discordjs/voice");
2019-09-15 06:18:33 +00:00
module.exports = {
name: 'status',
description: 'Status command.',
alias: 'status',
2019-09-15 06:18:33 +00:00
cooldown: 5,
2024-03-06 00:32:44 +00:00
async execute(message, args, client, prefix) {
2019-12-24 13:21:34 +00:00
const uptime = client.funcs.msToTime(client.uptime);
2024-02-09 09:53:30 +00:00
const ping = Math.floor(client.ws.ping * 10) / 10;
2019-09-15 06:18:33 +00:00
2024-02-09 09:53:30 +00:00
const embed = new EmbedBuilder()
2019-09-15 06:18:33 +00:00
.setTitle(`Status for ${client.user.username}`)
2024-02-09 09:53:30 +00:00
.addFields(
2024-03-06 00:32:44 +00:00
{ name: ':signal_strength: Ping', value: ping + ' ms', inline: true },
2024-02-09 09:53:30 +00:00
{ name: ':stopwatch: Uptime', value: uptime, inline: true },
2024-03-06 00:32:44 +00:00
{ name: ':play_pause: Currently playing music on', value: `${getVoiceConnections.size ?? 0} guild(s)`, inline: true },
{ name: ':cd: Operating system', value: process.platform, inline: true }
2024-02-09 09:53:30 +00:00
)
.setAuthor({ name: client.user.username, iconURL: client.user.avatarURL()})
2019-12-05 13:17:15 +00:00
.setColor(client.config.embedColor)
2024-02-09 09:53:30 +00:00
return message.channel.send({ embeds: [embed] });
2019-09-15 06:18:33 +00:00
}
2019-10-10 13:43:04 +00:00
};