1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 06:43:17 +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-02-09 09:53:30 +00:00
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(
{ 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()})
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
};