feat: add role menu
This commit is contained in:
parent
3367443e32
commit
8bcdddccae
3 changed files with 131 additions and 26 deletions
22
src/commands/rolemenu.ts
Normal file
22
src/commands/rolemenu.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import {
|
||||
ActionRowBuilder,
|
||||
ButtonBuilder,
|
||||
ButtonStyle,
|
||||
CacheType,
|
||||
ChatInputCommandInteraction,
|
||||
} from 'discord.js';
|
||||
|
||||
export const roleMenuCommand = async (
|
||||
i: ChatInputCommandInteraction<CacheType>
|
||||
) => {
|
||||
const row = new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId('showRoleMenu')
|
||||
.setLabel('Show role menu')
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
);
|
||||
|
||||
await i.channel?.send({ content: '**Role menu**', components: [row] });
|
||||
|
||||
await i.reply({ content: 'Done!', ephemeral: true });
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue