import { Command } from '@sapphire/framework';
import { ApplicationCommandType } from 'discord.js';
export class RequestDeleteCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) {
super(context, { ...options, description: 'Request message be deleted.' });
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerContextMenuCommand((builder) =>
builder //
.setName('Request Delete')
.setType(ApplicationCommandType.Message)
);
}
public async contextMenuRun(interaction: Command.ContextMenuCommandInteraction) {
return interaction.reply('Pong');
}
}
import { Command } from '@sapphire/framework';
import { ApplicationCommandType } from 'discord.js';
export class RequestDeleteCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) {
super(context, { ...options, description: 'Request message be deleted.' });
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerContextMenuCommand((builder) =>
builder //
.setName('Request Delete')
.setType(ApplicationCommandType.Message)
);
}
public async contextMenuRun(interaction: Command.ContextMenuCommandInteraction) {
return interaction.reply('Pong');
}
}