mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 02:20:18 +00:00
Removed comments in help.js
This commit is contained in:
parent
4ba582295b
commit
bd70f2bedc
@ -13,44 +13,25 @@ module.exports = {
|
|||||||
execute(interaction, client, Discord, command) {
|
execute(interaction, client, Discord, command) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
|
||||||
/*if (args[1]) {
|
const categories = [];
|
||||||
if (!client.commands.has(args[1]) || (client.commands.has(args[1]) && client.commands.get(args[1]).omitFromHelp === true)) return interaction.reply('That command does not exist');
|
for (let i = 0; i < client.commands.size; i++) {
|
||||||
const command = client.commands.get(args[1]);
|
if (!categories.includes([...client.commands.values()][i].category)) categories.push([...client.commands.values()][i].category);
|
||||||
|
}
|
||||||
|
let commands = '';
|
||||||
|
for (let i = 0; i < categories.length; i++) {
|
||||||
|
commands += `**» ${categories[i].toUpperCase()}**\n${client.commands.filter(x => x.category === categories[i] && !x.omitFromHelp).map(x => `\`${x.name}\``).join(', ')}\n`;
|
||||||
|
}
|
||||||
|
|
||||||
message.helpCommandTitle = client.messages.helpCommandTitle.replace("%client.config.prefix%", client.config.prefix);
|
message.helpTitle = client.messages.helpTitle.replace("%client.user.username%", client.user.username);
|
||||||
message.helpCommandTitle = message.helpCommandTitle.replace("%command.name%", command.name);
|
message.helpDescription = client.messages.helpDescription.replace("%commands%", commands);
|
||||||
message.helpCommandTitle = message.helpCommandTitle.replace("%command.usage%", command.usage);
|
message.helpDescription = message.helpDescription.replace("%client.config.prefix%", client.config.prefix);
|
||||||
message.helpCommandDescription = client.messages.helpCommandDescription.replace("%command.description%", command.description);
|
|
||||||
message.helpCommandDescription = message.helpCommandDescription.replace("%command.alias%", command.alias);
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setTitle(message.helpCommandTitle)
|
.setTitle(message.helpTitle)
|
||||||
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, ''))
|
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, ''))
|
||||||
.setColor(client.config.embedColor)
|
.setColor(client.config.embedColor)
|
||||||
.setDescription(message.helpCommandDescription)
|
.setDescription(message.helpDescription)
|
||||||
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||||
interaction.reply({ embeds: [embed] });
|
interaction.reply({ embeds: [embed] });
|
||||||
} else {*/
|
|
||||||
const categories = [];
|
|
||||||
for (let i = 0; i < client.commands.size; i++) {
|
|
||||||
if (!categories.includes([...client.commands.values()][i].category)) categories.push([...client.commands.values()][i].category);
|
|
||||||
}
|
|
||||||
let commands = '';
|
|
||||||
for (let i = 0; i < categories.length; i++) {
|
|
||||||
commands += `**» ${categories[i].toUpperCase()}**\n${client.commands.filter(x => x.category === categories[i] && !x.omitFromHelp).map(x => `\`${x.name}\``).join(', ')}\n`;
|
|
||||||
}
|
|
||||||
|
|
||||||
message.helpTitle = client.messages.helpTitle.replace("%client.user.username%", client.user.username);
|
|
||||||
message.helpDescription = client.messages.helpDescription.replace("%commands%", commands);
|
|
||||||
message.helpDescription = message.helpDescription.replace("%client.config.prefix%", client.config.prefix);
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
|
||||||
.setTitle(message.helpTitle)
|
|
||||||
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, ''))
|
|
||||||
.setColor(client.config.embedColor)
|
|
||||||
.setDescription(message.helpDescription)
|
|
||||||
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
|
||||||
interaction.reply({ embeds: [embed] });
|
|
||||||
/*}*/
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user