19 lines
642 B
TypeScript
19 lines
642 B
TypeScript
import { ApplyOptions } from '@sapphire/decorators';
|
|
import { Command } from '@sapphire/framework';
|
|
|
|
@ApplyOptions<Command.Options>({
|
|
description: 'A basic slash command'
|
|
})
|
|
export class UserCommand extends Command {
|
|
public override registerApplicationCommands(registry: Command.Registry) {
|
|
registry.registerChatInputCommand((builder) =>
|
|
builder //
|
|
.setName(this.name)
|
|
.setDescription(this.description)
|
|
);
|
|
}
|
|
|
|
public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
|
|
return interaction.reply({ content: 'Hello world!' });
|
|
}
|
|
} |