Skip to content

Commit 3b55211

Browse files
committed
feat: phase 2
1 parent d3dc8c1 commit 3b55211

File tree

12 files changed

+168
-20
lines changed

12 files changed

+168
-20
lines changed

deno/payloads/v10/_interactions/modalSubmit.ts

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v10/_interactions/responses.ts

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v10/channel.ts

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v9/_interactions/modalSubmit.ts

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v9/_interactions/responses.ts

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v9/channel.ts

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

payloads/v10/_interactions/modalSubmit.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,30 @@ export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitC
2020
values: string[];
2121
}
2222

23-
export type ModalSubmitComponent = APIModalSubmitStringSelectComponent | APIModalSubmitTextInputComponent;
23+
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
24+
values: string[];
25+
}
26+
27+
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
28+
values: string[];
29+
}
30+
31+
export interface APIModalSubmitMentionableSelectComponent
32+
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
33+
values: string[];
34+
}
35+
36+
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
37+
values: string[];
38+
}
39+
40+
export type ModalSubmitComponent =
41+
| APIModalSubmitChannelSelectComponent
42+
| APIModalSubmitMentionableSelectComponent
43+
| APIModalSubmitRoleSelectComponent
44+
| APIModalSubmitStringSelectComponent
45+
| APIModalSubmitTextInputComponent
46+
| APIModalSubmitUserSelectComponent;
2447

2548
export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> {
2649
components: APIModalSubmitTextInputComponent[];

payloads/v10/_interactions/responses.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10';
2-
import type { APIActionRowComponent, APIComponentInModalActionRow, APILabelComponent } from '../channel';
2+
import type {
3+
APIActionRowComponent,
4+
APIComponentInModalActionRow,
5+
APILabelComponent,
6+
APITextDisplayComponent,
7+
} from '../channel';
38
import type { APIApplicationCommandOptionChoice } from './applicationCommands';
49

510
/**
@@ -128,7 +133,8 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
128133

129134
export type APIModalInteractionResponseCallbackComponent =
130135
| APIActionRowComponent<APIComponentInModalActionRow>
131-
| APILabelComponent;
136+
| APILabelComponent
137+
| APITextDisplayComponent;
132138

133139
/**
134140
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}

payloads/v10/channel.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,12 @@ export interface APIBaseAutoPopulatedSelectMenuComponent<
19151915
* List of default values for auto-populated select menu components
19161916
*/
19171917
default_values?: APISelectMenuDefaultValue<D>[];
1918+
/**
1919+
* Whether the component is required to answer in a modal.
1920+
*
1921+
* @defaultValue `true`
1922+
*/
1923+
required?: boolean;
19181924
}
19191925

19201926
/**
@@ -1932,7 +1938,9 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
19321938
*/
19331939
options: APISelectMenuOption[];
19341940
/**
1935-
* Whether this component is required in modals.
1941+
* Whether the string select is required to answer in a modal.
1942+
*
1943+
* @defaultValue `true`
19361944
*/
19371945
required?: boolean;
19381946
}
@@ -2457,7 +2465,7 @@ export type APIComponentInModalActionRow = APITextInputComponent;
24572465
/**
24582466
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
24592467
*/
2460-
export type APIComponentInLabel = APIStringSelectComponent | APITextInputComponent;
2468+
export type APIComponentInLabel = APISelectMenuComponent | APITextInputComponent;
24612469

24622470
/**
24632471
* @see {@link https://discord.com/developers/docs/components/reference#section}

payloads/v9/_interactions/modalSubmit.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,30 @@ export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitC
2020
values: string[];
2121
}
2222

23-
export type ModalSubmitComponent = APIModalSubmitStringSelectComponent | APIModalSubmitTextInputComponent;
23+
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
24+
values: string[];
25+
}
26+
27+
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
28+
values: string[];
29+
}
30+
31+
export interface APIModalSubmitMentionableSelectComponent
32+
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
33+
values: string[];
34+
}
35+
36+
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
37+
values: string[];
38+
}
39+
40+
export type ModalSubmitComponent =
41+
| APIModalSubmitChannelSelectComponent
42+
| APIModalSubmitMentionableSelectComponent
43+
| APIModalSubmitRoleSelectComponent
44+
| APIModalSubmitStringSelectComponent
45+
| APIModalSubmitTextInputComponent
46+
| APIModalSubmitUserSelectComponent;
2447

2548
export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> {
2649
components: APIModalSubmitTextInputComponent[];

0 commit comments

Comments
 (0)