Skip to content

Commit

Permalink
Update HelpInteraction.js
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielaGC authored Nov 13, 2024
1 parent f058216 commit 6baa691
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions apps/discord/src/interactionFunctions/utils/HelpInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,42 +111,42 @@ export default class HelpInteraction extends InteractionFunction {
switch (state) {
case 'economy':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.economy.title', { 0: filterByCategory('economy').length }), filterByCategory('economy').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.economy.title', { 0: filterByCategory('economy').length }), filterByCategory('economy').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed] })
break;
case 'fun':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.fun.title', { 0: filterByCategory('fun').length }), filterByCategory('fun').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.fun.title', { 0: filterByCategory('fun').length }), filterByCategory('fun').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed], components: [{ type: 1, components: [select_menu] }, { type: 1, components: [home_button.build()] }] })
break;
case 'image':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.image.title', { 0: filterByCategory('image').length }), filterByCategory('image').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.image.title', { 0: filterByCategory('image').length }), filterByCategory('image').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed], components: [{ type: 1, components: [select_menu] }, { type: 1, components: [home_button.build()] }] })
break;
case 'minecraft':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.minecraft.title', { 0: filterByCategory('minecraft').length }), filterByCategory('minecraft').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.minecraft.title', { 0: filterByCategory('minecraft').length }), filterByCategory('minecraft').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed], components: [{ type: 1, components: [select_menu] }, { type: 1, components: [home_button.build()] }] })
break;
case 'misc':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.misc.title', { 0: filterByCategory('misc').length }), filterByCategory('misc').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.misc.title', { 0: filterByCategory('misc').length }), filterByCategory('misc').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed], components: [{ type: 1, components: [select_menu] }, { type: 1, components: [home_button.build()] }] })
break;
case 'mod':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.mod.title', { 0: filterByCategory('mod').length }), filterByCategory('mod').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.mod.title', { 0: filterByCategory('mod').length }), filterByCategory('mod').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed], components: [{ type: 1, components: [select_menu] }, { type: 1, components: [home_button.build()] }] })
break;
case 'social':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.social.title', { 0: filterByCategory('social').length }), filterByCategory('social').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.social.title', { 0: filterByCategory('social').length }), filterByCategory('social').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed], components: [{ type: 1, components: [select_menu] }, { type: 1, components: [home_button.build()] }] })
break;
case 'utils':
embed.setColor('DEFAULT')
embed.addField(ctx._locale('commands:help.utils.title', { 0: filterByCategory('utils').length }), filterByCategory('utils').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
embed.addField(ctx._locale('commands:help.utils.title', { 0: filterByCategory('utils').length }), filterByCategory('utils').map(cmd => `${slashCommands.find((command) => command.name === cmd.name)?.mention ?? `\`/${cmd.name}\``} » ${slashCommands.find((command) => command.name === cmd.name)?.description ?? cmd?.description}`).join('\n'))
editMessage({ embeds: [embed], components: [{ type: 1, components: [select_menu] }, { type: 1, components: [home_button.build()] }] })
break;
case 'home_button':
Expand Down

0 comments on commit 6baa691

Please sign in to comment.