Skip to content

Commit 2cade98

Browse files
authored
feat(APIApplicationCommandStringOption): add min_length and max_length (#513)
1 parent d3535d6 commit 2cade98

File tree

4 files changed

+52
-4
lines changed
  • deno/payloads
    • v10/_interactions/_applicationCommands/_chatInput
    • v9/_interactions/_applicationCommands/_chatInput
  • payloads
    • v10/_interactions/_applicationCommands/_chatInput
    • v9/_interactions/_applicationCommands/_chatInput

4 files changed

+52
-4
lines changed

deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@ import type {
55
} from './base.ts';
66
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
77

8+
interface APIApplicationCommandStringOptionBase
9+
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
10+
/**
11+
* For option type `STRING`, the minimum allowed length (minimum of 0).
12+
*/
13+
min_length?: number;
14+
/**
15+
* For option type `STRING`, the maximum allowed length (minimum of 1).
16+
*/
17+
max_length?: number;
18+
}
19+
820
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
9-
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
21+
APIApplicationCommandStringOptionBase,
1022
APIApplicationCommandOptionChoice<string>
1123
>;
1224

deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@ import type {
55
} from './base.ts';
66
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
77

8+
interface APIApplicationCommandStringOptionBase
9+
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
10+
/**
11+
* For option type `STRING`, the minimum allowed length (minimum of 0).
12+
*/
13+
min_length?: number;
14+
/**
15+
* For option type `STRING`, the maximum allowed length (minimum of 1).
16+
*/
17+
max_length?: number;
18+
}
19+
820
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
9-
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
21+
APIApplicationCommandStringOptionBase,
1022
APIApplicationCommandOptionChoice<string>
1123
>;
1224

payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@ import type {
55
} from './base';
66
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
77

8+
interface APIApplicationCommandStringOptionBase
9+
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
10+
/**
11+
* For option type `STRING`, the minimum allowed length (minimum of 0).
12+
*/
13+
min_length?: number;
14+
/**
15+
* For option type `STRING`, the maximum allowed length (minimum of 1).
16+
*/
17+
max_length?: number;
18+
}
19+
820
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
9-
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
21+
APIApplicationCommandStringOptionBase,
1022
APIApplicationCommandOptionChoice<string>
1123
>;
1224

payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@ import type {
55
} from './base';
66
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
77

8+
interface APIApplicationCommandStringOptionBase
9+
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
10+
/**
11+
* For option type `STRING`, the minimum allowed length (minimum of 0).
12+
*/
13+
min_length?: number;
14+
/**
15+
* For option type `STRING`, the maximum allowed length (minimum of 1).
16+
*/
17+
max_length?: number;
18+
}
19+
820
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
9-
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
21+
APIApplicationCommandStringOptionBase,
1022
APIApplicationCommandOptionChoice<string>
1123
>;
1224

0 commit comments

Comments
 (0)