mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
feat(ApplicationCommand): add min_length and max_length for string option (v13) (#8217)
This commit is contained in:
21
typings/index.d.ts
vendored
21
typings/index.d.ts
vendored
@@ -3877,7 +3877,7 @@ export interface ApplicationCommandChoicesData extends Omit<BaseApplicationComma
|
||||
}
|
||||
|
||||
export interface ApplicationCommandChoicesOption extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
||||
type: Exclude<CommandOptionChoiceResolvableType, ApplicationCommandOptionTypes>;
|
||||
type: CommandOptionChoiceResolvableType;
|
||||
choices?: ApplicationCommandOptionChoiceData[];
|
||||
autocomplete?: false;
|
||||
}
|
||||
@@ -3890,12 +3890,26 @@ export interface ApplicationCommandNumericOptionData extends ApplicationCommandC
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
export interface ApplicationCommandStringOptionData extends ApplicationCommandChoicesData {
|
||||
type: ApplicationCommandOptionTypes.STRING;
|
||||
minLength?: number;
|
||||
min_length?: number;
|
||||
maxLength?: number;
|
||||
max_length?: number;
|
||||
}
|
||||
|
||||
export interface ApplicationCommandNumericOption extends ApplicationCommandChoicesOption {
|
||||
type: Exclude<CommandOptionNumericResolvableType, ApplicationCommandOptionTypes>;
|
||||
type: CommandOptionNumericResolvableType;
|
||||
minValue?: number;
|
||||
maxValue?: number;
|
||||
}
|
||||
|
||||
export interface ApplicationCommandStringOption extends ApplicationCommandChoicesOption {
|
||||
type: ApplicationCommandOptionTypes.STRING;
|
||||
minLength?: number;
|
||||
maxLength?: number;
|
||||
}
|
||||
|
||||
export interface ApplicationCommandSubGroupData extends Omit<BaseApplicationCommandOptionsData, 'required'> {
|
||||
type: 'SUB_COMMAND_GROUP' | ApplicationCommandOptionTypes.SUB_COMMAND_GROUP;
|
||||
options?: ApplicationCommandSubCommandData[];
|
||||
@@ -3914,6 +3928,7 @@ export interface ApplicationCommandSubCommandData extends Omit<BaseApplicationCo
|
||||
| ApplicationCommandChannelOptionData
|
||||
| ApplicationCommandAutocompleteOption
|
||||
| ApplicationCommandNumericOptionData
|
||||
| ApplicationCommandStringOptionData
|
||||
)[];
|
||||
}
|
||||
|
||||
@@ -3937,6 +3952,7 @@ export type ApplicationCommandOptionData =
|
||||
| ApplicationCommandChoicesData
|
||||
| ApplicationCommandAutocompleteOption
|
||||
| ApplicationCommandNumericOptionData
|
||||
| ApplicationCommandStringOptionData
|
||||
| ApplicationCommandSubCommandData;
|
||||
|
||||
export type ApplicationCommandOption =
|
||||
@@ -3945,6 +3961,7 @@ export type ApplicationCommandOption =
|
||||
| ApplicationCommandChannelOption
|
||||
| ApplicationCommandChoicesOption
|
||||
| ApplicationCommandNumericOption
|
||||
| ApplicationCommandStringOption
|
||||
| ApplicationCommandSubCommand;
|
||||
|
||||
export interface ApplicationCommandOptionChoiceData {
|
||||
|
||||
Reference in New Issue
Block a user