Discord Bot BaseCommands
Context menu
How to create discord context menu commands
Creating context menus
You can set some command options in the setupCreators function!
Context menus do not have a description and the name of these commands can contain capital letters and spaces.
To create a user context menu command, you need to set name and type.
createCommand({
name: "Profile",
type: ApplicationCommandType.User,
async run(interaction) {
const { targetUser } = interaction;
await interaction.reply({
flags: ["Ephemeral"],
content: `${targetUser}"s profile`
});
},
});