Skip to content

Commit

Permalink
feat(APIApplicationCommandStringOption): add min_length and `max_le…
Browse files Browse the repository at this point in the history
…ngth` (#513)
  • Loading branch information
Mateo-tem committed Jul 2, 2022
1 parent d3535d6 commit 2cade98
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 4 deletions.
Expand Up @@ -5,8 +5,20 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';

interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* 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<ApplicationCommandOptionType.String>,
APIApplicationCommandStringOptionBase,
APIApplicationCommandOptionChoice<string>
>;

Expand Down
Expand Up @@ -5,8 +5,20 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';

interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* 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<ApplicationCommandOptionType.String>,
APIApplicationCommandStringOptionBase,
APIApplicationCommandOptionChoice<string>
>;

Expand Down
Expand Up @@ -5,8 +5,20 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';

interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* 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<ApplicationCommandOptionType.String>,
APIApplicationCommandStringOptionBase,
APIApplicationCommandOptionChoice<string>
>;

Expand Down
Expand Up @@ -5,8 +5,20 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';

interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* 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<ApplicationCommandOptionType.String>,
APIApplicationCommandStringOptionBase,
APIApplicationCommandOptionChoice<string>
>;

Expand Down

1 comment on commit 2cade98

@vercel
Copy link

@vercel vercel bot commented on 2cade98 Jul 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.