mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-07 10:40:49 +00:00
Init
This commit is contained in:
28
src/commands/status.js
Normal file
28
src/commands/status.js
Normal file
@ -0,0 +1,28 @@
|
||||
module.exports = {
|
||||
name: 'status',
|
||||
alias: 'stats',
|
||||
usage: 'status',
|
||||
description: 'See the current status for Musix.',
|
||||
onlyDev: false,
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
execute(msg, args, client, Discord, prefix) {
|
||||
const uptime = client.funcs.msToTime(client.uptime);
|
||||
const ping = Math.floor(client.ping * 10) / 10;
|
||||
msg.channel.send('<a:loading:674284196700618783> Pinging...').then(m => {
|
||||
const latency = m.createdTimestamp - msg.createdTimestamp;
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle(`Status for ${client.user.username}`)
|
||||
.addField(':signal_strength: Ping', client.ws.ping, true)
|
||||
.addField('Latency', latency, true)
|
||||
.addField(':stopwatch: Uptime', uptime, true)
|
||||
.addField(`:play_pause: Currently playing music on`, `${client.voice.connections.size} guild(s)`, true)
|
||||
.addField(`💿 Operating system`, process.platform, true)
|
||||
.setAuthor(client.user.username, client.user.displayAvatarURL)
|
||||
.setColor(client.config.embedColor)
|
||||
m.delete();
|
||||
return msg.channel.send(embed);
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user