all repos — kitten @ 76d8fb0bdcaf8f5f8404dd930691e52756e68f01

fix type errors
vi did:web:vt3e.cat
Fri, 12 Jun 2026 04:25:59 +0100
commit

76d8fb0bdcaf8f5f8404dd930691e52756e68f01

parent

2f9ac75e21a898fba92010820bd8b6df696bc368

1 files changed, 6 insertions(+), 5 deletions(-)

jump to
M pkgs/core/src/kitten.tspkgs/core/src/kitten.ts

@@ -5,7 +5,8 @@ type AutocompleteInteraction,

type ButtonInteraction, type AnySelectMenuInteraction, type ModalSubmitInteraction, - type ApplicationCommandNonOptionsData, + type APIApplicationCommandOption, + type APIApplicationCommandBasicOption, type CommandInteraction, type UserContextMenuCommandInteraction, type MessageContextMenuCommandInteraction,

@@ -351,14 +352,14 @@

// chat input commands for (const cmd of this.commands.values()) { if (cmd instanceof SubcommandGroupBuilder) { - const subcommandOptions = Object.values(cmd.subcommands).map((sub) => ({ + const subcommandOptions: APIApplicationCommandOption[] = Object.values(cmd.subcommands).map((sub) => ({ type: OPTION_TYPES.subcommand, name: sub.name, description: sub.config.description, options: this.transformOptionsForDiscord(sub.config.options), })); - const groupOptions = Object.values(cmd.groups).map((group) => ({ + const groupOptions: APIApplicationCommandOption[] = Object.values(cmd.groups).map((group) => ({ type: OPTION_TYPES.subcommandGroup, name: group.name, description: group.description,

@@ -441,7 +442,7 @@ }

private transformOptionsForDiscord( options?: Record<string, Option<any, any>>, - ): ApplicationCommandNonOptionsData[] { + ): APIApplicationCommandBasicOption[] { if (!options) return []; return Object.entries(options).map(([name, opt]) => {

@@ -456,7 +457,7 @@ if (opt.autocomplete) {

payload.autocomplete = true; } - return payload as ApplicationCommandNonOptionsData; + return payload as APIApplicationCommandBasicOption; }); } }