Skip to content

Commit

Permalink
Added registerApplicationCommands method
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpenguin committed Jul 5, 2022
1 parent b109f23 commit d3b70bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/codeyCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Command as SapphireCommand, container, SapphireClient } from '@sapphire/framework';
import { ChatInputCommand, Command as SapphireCommand, container, SapphireClient } from '@sapphire/framework';
import { Message, MessagePayload, WebhookEditMessageOptions } from 'discord.js';
import { APIMessage } from 'discord-api-types/v9';
import { isMessageInstance } from '@sapphire/discord.js-utilities';
Expand Down Expand Up @@ -31,6 +31,11 @@ export class CodeyCommand extends SapphireCommand {

commandOptions!: CodeyCommandOptions;

// Register application commands
public override registerApplicationCommands(registry: ChatInputCommand.Registry) {
registry.registerChatInputCommand((builder) => builder.setName(this.name).setDescription(this.description));
}

// Regular command
public async messageRun(message: Message): Promise<Message<boolean>> {
const { client } = container;
Expand Down

0 comments on commit d3b70bf

Please sign in to comment.