mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-22 05:23:47 +00:00
Update
This commit is contained in:
parent
75a080a399
commit
09c6d5b117
@ -1,30 +0,0 @@
|
||||
const { EmbedBuilder } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: 'cmduses',
|
||||
usage: '',
|
||||
description: 'Command usage statistics',
|
||||
uses: 0,
|
||||
async execute(msg, args, client) {
|
||||
const cmduses = [];
|
||||
client.commands.forEach((value, key) => {
|
||||
cmduses.push([key, value.uses]);
|
||||
});
|
||||
cmduses.sort((a, b) => {
|
||||
return b[1] - a[1];
|
||||
});
|
||||
const cmdnamelength = Math.max(...cmduses.map(x => x[0].length)) + 4;
|
||||
const numberlength = Math.max(...cmduses.map(x => x[1].toString().length), 4);
|
||||
const markdownrows = ['Command' + ' '.repeat(cmdnamelength - 'command'.length) + ' '.repeat(numberlength - 'uses'.length) + 'Uses'];
|
||||
cmduses.forEach(x => {
|
||||
if (x[1] > 0) markdownrows.push(x[0] + '.'.repeat(cmdnamelength - x[0].length) + ' '.repeat(numberlength - x[1].toString().length) + x[1].toString());
|
||||
});
|
||||
const embed = new EmbedBuilder();
|
||||
embed
|
||||
.setTitle('Musix Command Usage During Current Uptime')
|
||||
.setDescription('```ml\n' + markdownrows.join('\n') + '\n```')
|
||||
.setFooter({ text: 'These statistics are from the current uptime.' })
|
||||
.setColor(client.config.embedColor);
|
||||
msg.channel.send({ embeds: [embed] });
|
||||
},
|
||||
};
|
@ -43,7 +43,7 @@ module.exports = {
|
||||
}
|
||||
let song = {
|
||||
id: video.id,
|
||||
title: video.title,
|
||||
title: he.decode(video.title),
|
||||
url: `https://www.youtube.com/watch?v=${video.id}`
|
||||
}
|
||||
client.global.db.playlists[message.guild.id].songs.push(song);
|
||||
|
@ -17,9 +17,9 @@ module.exports = {
|
||||
{ name: 'announcesongs', value: 'Whether to announce songs that start playing or not.' },
|
||||
{ name: 'songselection', value: 'Will i ask to select a song from the top 10 queries or start playing the first result instantly.' }
|
||||
)
|
||||
.setFooter({ text: `how to use: ${prefix}settings <Setting name> <value>` })
|
||||
.setAuthor({ name: client.user.username, iconURL: client.user.avatarURL()})
|
||||
.setColor(client.embedColor)
|
||||
.setFooter({ text: `how to use: ${prefix}settings <name> <value>` })
|
||||
.setAuthor({ name: client.user.username, iconURL: client.user.avatarURL() })
|
||||
.setColor(client.config.embedColor)
|
||||
const permissions = message.channel.permissionsFor(message.author);
|
||||
if (!permissions.has(PermissionFlagsBits.ManageGuild)) return message.channel.send(':x: You need the `MANAGE_SERVER` permission to change the settings!');
|
||||
if (args[1]) {
|
||||
|
@ -6,17 +6,17 @@ module.exports = {
|
||||
description: 'Status command.',
|
||||
alias: 'status',
|
||||
cooldown: 5,
|
||||
execute(message, args, client, prefix) {
|
||||
async execute(message, args, client, prefix) {
|
||||
const uptime = client.funcs.msToTime(client.uptime);
|
||||
const ping = Math.floor(client.ws.ping * 10) / 10;
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle(`Status for ${client.user.username}`)
|
||||
.addFields(
|
||||
{ name: ':signal_strength: Ping', value: ping, inline: true },
|
||||
{ name: ':signal_strength: Ping', value: ping + ' ms', 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 }
|
||||
{ name: ':play_pause: Currently playing music on', value: `${getVoiceConnections.size ?? 0} guild(s)`, inline: true },
|
||||
{ name: ':cd: Operating system', value: process.platform, inline: true }
|
||||
)
|
||||
.setAuthor({ name: client.user.username, iconURL: client.user.avatarURL()})
|
||||
.setColor(client.config.embedColor)
|
||||
|
@ -3,7 +3,7 @@ const { createAudioPlayer, getVoiceConnection, joinVoiceChannel, NoSubscriberBeh
|
||||
module.exports = async function (video, message, voiceChannel, client, playlist = false) {
|
||||
let song = {
|
||||
id: video.id,
|
||||
title: video.title,
|
||||
title: he.decode(video.title),
|
||||
url: `https://www.youtube.com/watch?v=${video.id}`,
|
||||
author: message.author
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user