1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-02-23 19:59:44 +00:00
musix-oss/commands/status.js

26 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-02-09 11:53:30 +02:00
const { EmbedBuilder } = require("discord.js");
const { getVoiceConnections } = require("@discordjs/voice");
2019-09-15 09:18:33 +03:00
module.exports = {
name: 'status',
description: 'Status command.',
alias: 'status',
2019-09-15 09:18:33 +03:00
cooldown: 5,
2024-03-06 02:32:44 +02:00
async execute(message, args, client, prefix) {
2019-12-24 15:21:34 +02:00
const uptime = client.funcs.msToTime(client.uptime);
2024-02-09 11:53:30 +02:00
const ping = Math.floor(client.ws.ping * 10) / 10;
2019-09-15 09:18:33 +03:00
2024-02-09 11:53:30 +02:00
const embed = new EmbedBuilder()
2019-09-15 09:18:33 +03:00
.setTitle(`Status for ${client.user.username}`)
2024-02-09 11:53:30 +02:00
.addFields(
2024-03-06 02:32:44 +02:00
{ name: ':signal_strength: Ping', value: ping + ' ms', inline: true },
2024-02-09 11:53:30 +02:00
{ name: ':stopwatch: Uptime', value: uptime, inline: true },
2024-03-06 02:32:44 +02: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 11:53:30 +02:00
)
.setAuthor({ name: client.user.username, iconURL: client.user.avatarURL()})
2019-12-05 15:17:15 +02:00
.setColor(client.config.embedColor)
2024-02-09 11:53:30 +02:00
return message.channel.send({ embeds: [embed] });
2019-09-15 09:18:33 +03:00
}
2019-10-10 16:43:04 +03:00
};