import { ApplyOptions } from '@sapphire/decorators'; import { Command } from '@sapphire/framework'; import { ApplicationCommandType } from 'discord.js'; @ApplyOptions({ description: 'A basic contextMenu command' }) export class UserCommand extends Command { public override registerApplicationCommands(registry: Command.Registry) { registry.registerContextMenuCommand((builder) => builder // .setName(this.name) .setType(ApplicationCommandType.Message) ); } public override async contextMenuRun(interaction: Command.ContextMenuCommandInteraction) { return interaction.reply({ content: 'Hello world!' }); } }