Skip to content

Commit a307dd1

Browse files
committed
refactor(APIModalInteractionResponseCallbackData): single component type
1 parent 83e2945 commit a307dd1

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

deno/payloads/v10/_interactions/responses.ts

Lines changed: 5 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: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

payloads/v10/_interactions/responses.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
126126
choices?: APIApplicationCommandOptionChoice[];
127127
}
128128

129+
export type APIModalInteractionResponseCallbackComponent =
130+
| APIActionRowComponent<APIComponentInModalActionRow>
131+
| APILabelComponent;
132+
129133
/**
130134
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
131135
*/
@@ -143,5 +147,5 @@ export interface APIModalInteractionResponseCallbackData {
143147
*
144148
* @remarks Using action rows inside modals is deprecated.
145149
*/
146-
components: (APIActionRowComponent<APIComponentInModalActionRow> | APILabelComponent)[];
150+
components: APIModalInteractionResponseCallbackComponent[];
147151
}

payloads/v9/_interactions/responses.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
126126
choices?: APIApplicationCommandOptionChoice[];
127127
}
128128

129+
export type APIModalInteractionResponseCallbackComponent =
130+
| APIActionRowComponent<APIComponentInModalActionRow>
131+
| APILabelComponent;
132+
129133
/**
130134
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
131135
*/
@@ -143,5 +147,5 @@ export interface APIModalInteractionResponseCallbackData {
143147
*
144148
* @remarks Using action rows inside modals is deprecated.
145149
*/
146-
components: (APIActionRowComponent<APIComponentInModalActionRow> | APILabelComponent)[];
150+
components: APIModalInteractionResponseCallbackComponent[];
147151
}

0 commit comments

Comments
 (0)