Removed comments in help.js

This commit is contained in:
Christer Warén 2021-08-26 17:02:11 +03:00
parent 4ba582295b
commit bd70f2bedc

View File

@ -13,24 +13,6 @@ module.exports = {
execute(interaction, client, Discord, command) { execute(interaction, client, Discord, command) {
let message = {}; let message = {};
/*if (args[1]) {
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');
const command = client.commands.get(args[1]);
message.helpCommandTitle = client.messages.helpCommandTitle.replace("%client.config.prefix%", client.config.prefix);
message.helpCommandTitle = message.helpCommandTitle.replace("%command.name%", command.name);
message.helpCommandTitle = message.helpCommandTitle.replace("%command.usage%", command.usage);
message.helpCommandDescription = client.messages.helpCommandDescription.replace("%command.description%", command.description);
message.helpCommandDescription = message.helpCommandDescription.replace("%command.alias%", command.alias);
const embed = new Discord.MessageEmbed()
.setTitle(message.helpCommandTitle)
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["logo"].replace(/[^0-9]+/g, ''))
.setColor(client.config.embedColor)
.setDescription(message.helpCommandDescription)
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
interaction.reply({ embeds: [embed] });
} else {*/
const categories = []; const categories = [];
for (let i = 0; i < client.commands.size; i++) { for (let i = 0; i < client.commands.size; i++) {
if (!categories.includes([...client.commands.values()][i].category)) categories.push([...client.commands.values()][i].category); if (!categories.includes([...client.commands.values()][i].category)) categories.push([...client.commands.values()][i].category);
@ -51,6 +33,5 @@ module.exports = {
.setDescription(message.helpDescription) .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] });
/*}*/
} }
}; };