Update Help command

This commit is contained in:
Christer Warén 2023-12-04 22:26:07 +02:00
parent c0d0cf23dc
commit d1632f4f49
2 changed files with 3 additions and 14 deletions

View File

@ -13,15 +13,6 @@ export default {
ephemeral: true
});
const categories: string[] = [];
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]).map((x: command) => `\`${x.name}\``).join(', ')}\n`;
}
const embed = new EmbedBuilder()
.setTitle(client.messages.replace(client.messages.helpTitle, {
"%client.user.username%": client.user.username
@ -29,7 +20,7 @@ export default {
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messages.emojis["logo"].replace(/[^0-9]+/g, ''))
.setColor(client.config.embedColor)
.setDescription(client.messages.replace(client.messages.helpDescription, {
"%commands%": commands
"%client.config.supportGuild%": client.config.supportGuild
}))
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
.setFooter({

View File

@ -16,10 +16,8 @@ export const messages = {
notPlaying: "There is nothing playing!",
runningCommandFailed: "Running this command failed!",
noPermsEmbed: "I cannot send embeds (Embed links).",
bugTitle: "Found a bug with %client.user.username%?",
bugDescription: "Join the support server" + "\n" + "%client.config.supportGuild%",
helpTitle: "%client.user.username% help:",
helpDescription: "%commands%",
helpTitle: "%client.user.username% - Help",
helpDescription: "Join to our support server" + "\n" + "%client.config.supportGuild%",
inviteTitle: "Invite %client.user.username% to your Discord server!",
listTitle: "Radio Stations",
playTitle1: ":radio: Channel",