diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index a816c138d138..06a8c497ab11 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3824,11 +3824,39 @@ export interface ApplicationCommandAttachmentOption extends BaseApplicationComma type: ApplicationCommandOptionType.Attachment; } -export interface ApplicationCommandAutocompleteOption extends Omit { - type: - | ApplicationCommandOptionType.String - | ApplicationCommandOptionType.Number - | ApplicationCommandOptionType.Integer; +export interface ApplicationCommandAutocompleteNumericOption + extends Omit { + type: CommandOptionNumericResolvableType; + minValue?: number; + maxValue?: number; + autocomplete: true; +} + +export interface ApplicationCommandAutocompleteStringOption + extends Omit { + type: ApplicationCommandOptionType.String; + minLength?: number; + maxLength?: number; + autocomplete: true; +} + +export interface ApplicationCommandAutocompleteNumericOptionData + extends Omit { + type: CommandOptionNumericResolvableType; + minValue?: number; + min_value?: number; + maxValue?: number; + max_value?: number; + autocomplete: true; +} + +export interface ApplicationCommandAutocompleteStringOptionData + extends Omit { + type: ApplicationCommandOptionType.String; + minLength?: number; + min_length?: number; + maxLength?: number; + max_length?: number; autocomplete: true; } @@ -3892,35 +3920,12 @@ export interface ApplicationCommandSubGroup extends Omit { type: ApplicationCommandOptionType.Subcommand; - options?: ( - | ApplicationCommandChoicesData - | ApplicationCommandNonOptionsData - | ApplicationCommandChannelOptionData - | ApplicationCommandAutocompleteOption - | ApplicationCommandNumericOptionData - | ApplicationCommandRoleOptionData - | ApplicationCommandUserOptionData - | ApplicationCommandMentionableOptionData - | ApplicationCommandStringOptionData - | ApplicationCommandBooleanOption - )[]; + options?: Exclude[]; } export interface ApplicationCommandSubCommand extends Omit { type: ApplicationCommandOptionType.Subcommand; - options?: ( - | ApplicationCommandNonOptions - | ApplicationCommandChannelOption - | ApplicationCommandChoicesOption - | ApplicationCommandAutocompleteOption - | ApplicationCommandNumericOption - | ApplicationCommandStringOption - | ApplicationCommandRoleOption - | ApplicationCommandUserOption - | ApplicationCommandMentionableOption - | ApplicationCommandBooleanOption - | ApplicationCommandAttachmentOption - )[]; + options?: Exclude[]; } export interface ApplicationCommandNonOptionsData extends BaseApplicationCommandOptionsData { @@ -3936,7 +3941,8 @@ export type ApplicationCommandOptionData = | ApplicationCommandNonOptionsData | ApplicationCommandChannelOptionData | ApplicationCommandChoicesData - | ApplicationCommandAutocompleteOption + | ApplicationCommandAutocompleteNumericOptionData + | ApplicationCommandAutocompleteStringOptionData | ApplicationCommandNumericOptionData | ApplicationCommandStringOptionData | ApplicationCommandRoleOptionData @@ -3947,6 +3953,8 @@ export type ApplicationCommandOptionData = export type ApplicationCommandOption = | ApplicationCommandSubGroup + | ApplicationCommandAutocompleteNumericOption + | ApplicationCommandAutocompleteStringOption | ApplicationCommandNonOptions | ApplicationCommandChannelOption | ApplicationCommandChoicesOption