Skip to content

Commit 42bfca7

Browse files
committed
fix: update APIModalComponent
1 parent 992b596 commit 42bfca7

File tree

8 files changed

+76
-16
lines changed

8 files changed

+76
-16
lines changed

deno/payloads/v10/_interactions/modalSubmit.ts

Lines changed: 2 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: 17 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: 2 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: 17 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { APIBaseComponent, APIStringSelectComponentInModal, APITextInputComponentInModal } from '../channel';
1+
import type { APIBaseComponent, APIComponentInModalLabel } from '../channel';
22
import type {
33
APIBaseInteraction,
44
APIDMInteractionWrapper,
@@ -18,7 +18,7 @@ export interface ModalSubmitActionRowComponent extends APIBaseComponent<Componen
1818
}
1919

2020
export interface ModalSubmitLabelComponent extends APIBaseComponent<ComponentType.Label> {
21-
component: APIStringSelectComponentInModal | APITextInputComponentInModal;
21+
component: APIComponentInModalLabel;
2222
}
2323

2424
/**

payloads/v10/channel.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,7 @@ export interface APIContainerComponent extends APIBaseComponent<ComponentType.Co
23482348
export interface APILabelComponent extends APIBaseComponent<ComponentType.Label> {
23492349
label: string;
23502350
description?: string;
2351-
component: APIStringSelectComponentInModal | APITextInputComponentInModal;
2351+
component: APIComponentInModalLabel;
23522352
}
23532353

23542354
/**
@@ -2449,7 +2449,11 @@ export type APIMessageTopLevelComponent =
24492449
/**
24502450
* @see {@link https://discord.com/developers/docs/components/reference}
24512451
*/
2452-
export type APIModalComponent = APIActionRowComponent<APIComponentInModalActionRow> | APIComponentInModalActionRow;
2452+
export type APIModalComponent =
2453+
| APIActionRowComponent<APIComponentInModalActionRow>
2454+
| APIComponentInModalActionRow
2455+
| APIComponentInModalLabel
2456+
| APILabelComponent;
24532457

24542458
/**
24552459
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
@@ -2464,8 +2468,19 @@ export type APIComponentInMessageActionRow = APIButtonComponent | APISelectMenuC
24642468
/**
24652469
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
24662470
*/
2471+
export type APIComponentInModal = APIComponentInModalActionRow | APIComponentInModalLabel;
2472+
2473+
/**
2474+
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
2475+
* @deprecated
2476+
*/
24672477
export type APIComponentInModalActionRow = APITextInputComponentInActionRow;
24682478

2479+
/**
2480+
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
2481+
*/
2482+
export type APIComponentInModalLabel = APIStringSelectComponentInModal | APITextInputComponentInModal;
2483+
24692484
/**
24702485
* @see {@link https://discord.com/developers/docs/components/reference#section}
24712486
*/

payloads/v9/_interactions/modalSubmit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { APIBaseComponent, APIStringSelectComponentInModal, APITextInputComponentInModal } from '../channel';
1+
import type { APIBaseComponent, APIComponentInModalLabel } from '../channel';
22
import type {
33
APIBaseInteraction,
44
APIDMInteractionWrapper,
@@ -18,7 +18,7 @@ export interface ModalSubmitActionRowComponent extends APIBaseComponent<Componen
1818
}
1919

2020
export interface ModalSubmitLabelComponent extends APIBaseComponent<ComponentType.Label> {
21-
component: APIStringSelectComponentInModal | APITextInputComponentInModal;
21+
component: APIComponentInModalLabel;
2222
}
2323

2424
/**

payloads/v9/channel.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,7 +2347,7 @@ export interface APIContainerComponent extends APIBaseComponent<ComponentType.Co
23472347
export interface APILabelComponent extends APIBaseComponent<ComponentType.Label> {
23482348
label: string;
23492349
description?: string;
2350-
component: APIStringSelectComponentInModal | APITextInputComponentInModal;
2350+
component: APIComponentInModalLabel;
23512351
}
23522352

23532353
/**
@@ -2448,7 +2448,11 @@ export type APIMessageTopLevelComponent =
24482448
/**
24492449
* @see {@link https://discord.com/developers/docs/components/reference}
24502450
*/
2451-
export type APIModalComponent = APIActionRowComponent<APIComponentInModalActionRow> | APIComponentInModalActionRow;
2451+
export type APIModalComponent =
2452+
| APIActionRowComponent<APIComponentInModalActionRow>
2453+
| APIComponentInModalActionRow
2454+
| APIComponentInModalLabel
2455+
| APILabelComponent;
24522456

24532457
/**
24542458
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
@@ -2463,8 +2467,19 @@ export type APIComponentInMessageActionRow = APIButtonComponent | APISelectMenuC
24632467
/**
24642468
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
24652469
*/
2470+
export type APIComponentInModal = APIComponentInModalActionRow | APIComponentInModalLabel;
2471+
2472+
/**
2473+
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
2474+
* @deprecated
2475+
*/
24662476
export type APIComponentInModalActionRow = APITextInputComponentInActionRow;
24672477

2478+
/**
2479+
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
2480+
*/
2481+
export type APIComponentInModalLabel = APIStringSelectComponentInModal | APITextInputComponentInModal;
2482+
24682483
/**
24692484
* @see {@link https://discord.com/developers/docs/components/reference#section}
24702485
*/

0 commit comments

Comments
 (0)