From 2cade98ed0a0a074254fbc1580fc56d0e0b3dc9c Mon Sep 17 00:00:00 2001 From: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com> Date: Sat, 2 Jul 2022 05:54:15 -0500 Subject: [PATCH] feat(APIApplicationCommandStringOption): add `min_length` and `max_length` (#513) --- .../_applicationCommands/_chatInput/string.ts | 14 +++++++++++++- .../_applicationCommands/_chatInput/string.ts | 14 +++++++++++++- .../_applicationCommands/_chatInput/string.ts | 14 +++++++++++++- .../_applicationCommands/_chatInput/string.ts | 14 +++++++++++++- 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts index 5c6853ace..0d64d28c2 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,20 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; +interface APIApplicationCommandStringOptionBase + extends APIApplicationCommandOptionBase { + /** + * For option type `STRING`, the minimum allowed length (minimum of 0). + */ + min_length?: number; + /** + * For option type `STRING`, the maximum allowed length (minimum of 1). + */ + max_length?: number; +} + export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< - APIApplicationCommandOptionBase, + APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice >; diff --git a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts index 5c6853ace..0d64d28c2 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,20 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; +interface APIApplicationCommandStringOptionBase + extends APIApplicationCommandOptionBase { + /** + * For option type `STRING`, the minimum allowed length (minimum of 0). + */ + min_length?: number; + /** + * For option type `STRING`, the maximum allowed length (minimum of 1). + */ + max_length?: number; +} + export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< - APIApplicationCommandOptionBase, + APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice >; diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts index 33b5d8240..5dc0e3cfd 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,20 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; +interface APIApplicationCommandStringOptionBase + extends APIApplicationCommandOptionBase { + /** + * For option type `STRING`, the minimum allowed length (minimum of 0). + */ + min_length?: number; + /** + * For option type `STRING`, the maximum allowed length (minimum of 1). + */ + max_length?: number; +} + export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< - APIApplicationCommandOptionBase, + APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice >; diff --git a/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts b/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts index 33b5d8240..5dc0e3cfd 100644 --- a/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts +++ b/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,20 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; +interface APIApplicationCommandStringOptionBase + extends APIApplicationCommandOptionBase { + /** + * For option type `STRING`, the minimum allowed length (minimum of 0). + */ + min_length?: number; + /** + * For option type `STRING`, the maximum allowed length (minimum of 1). + */ + max_length?: number; +} + export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< - APIApplicationCommandOptionBase, + APIApplicationCommandStringOptionBase, APIApplicationCommandOptionChoice >;