-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhelp.ts
36 lines (32 loc) · 1001 Bytes
/
help.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
import { command, helpSelectComponent, reply } from 'utils';
import { COLORS } from 'utils';
const meta = new SlashCommandBuilder()
.setName('help')
.setDescription('Get a list of all commands for the bot.');
export default command({
meta,
exec: async ({ interaction }) => {
const embed = new EmbedBuilder()
.setTitle('Help Menu')
.setDescription(
'Browse through all available commands by selecting a category below.',
)
.setColor(COLORS.embed);
const helpSelectMenu = helpSelectComponent(interaction);
if (!helpSelectMenu) {
embed.setDescription(
'There are no commands available for you to use in this server.',
);
return await reply(interaction, {
embeds: [embed],
ephemeral: true,
});
}
return await reply(interaction, {
embeds: [embed],
components: [helpSelectMenu],
ephemeral: true,
});
},
});