diff --git a/deno/payloads/v10/_interactions/modalSubmit.ts b/deno/payloads/v10/_interactions/modalSubmit.ts index 80d95c43..9eeae2c4 100644 --- a/deno/payloads/v10/_interactions/modalSubmit.ts +++ b/deno/payloads/v10/_interactions/modalSubmit.ts @@ -3,6 +3,7 @@ import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, + APIInteractionDataResolved, ComponentType, InteractionType, } from '../mod.ts'; @@ -20,7 +21,30 @@ export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitC values: string[]; } -export type ModalSubmitComponent = APIModalSubmitStringSelectComponent | APIModalSubmitTextInputComponent; +export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitMentionableSelectComponent + extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export type ModalSubmitComponent = + | APIModalSubmitChannelSelectComponent + | APIModalSubmitMentionableSelectComponent + | APIModalSubmitRoleSelectComponent + | APIModalSubmitStringSelectComponent + | APIModalSubmitTextInputComponent + | APIModalSubmitUserSelectComponent; export interface ModalSubmitActionRowComponent extends APIBaseComponent { components: APIModalSubmitTextInputComponent[]; @@ -36,6 +60,12 @@ export type APIModalSubmissionComponent = ModalSubmitActionRowComponent | ModalS * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure} */ export interface APIModalSubmission { + /** + * Data for users, members, channels, and roles in the modal's auto-populated select menus + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} + */ + resolved?: APIInteractionDataResolved; /** * A developer-defined identifier for the component, max 100 characters */ diff --git a/deno/payloads/v10/_interactions/responses.ts b/deno/payloads/v10/_interactions/responses.ts index 5068bf08..68a3d7e8 100644 --- a/deno/payloads/v10/_interactions/responses.ts +++ b/deno/payloads/v10/_interactions/responses.ts @@ -1,5 +1,10 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts'; -import type { APIActionRowComponent, APIComponentInModalActionRow, APILabelComponent } from '../channel.ts'; +import type { + APIActionRowComponent, + APIComponentInModalActionRow, + APILabelComponent, + APITextDisplayComponent, +} from '../channel.ts'; import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts'; /** @@ -128,7 +133,8 @@ export interface APICommandAutocompleteInteractionResponseCallbackData { export type APIModalInteractionResponseCallbackComponent = | APIActionRowComponent - | APILabelComponent; + | APILabelComponent + | APITextDisplayComponent; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal} diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index ca337f0b..8113fb81 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -1898,6 +1898,12 @@ export interface APIBaseSelectMenuComponent< * @defaultValue `false` */ disabled?: boolean; + /** + * Whether the component is required to answer in a modal. + * + * @defaultValue `true` + */ + required?: boolean; } /** @@ -1931,10 +1937,6 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent { + values: string[]; +} + +export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitMentionableSelectComponent + extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export type ModalSubmitComponent = + | APIModalSubmitChannelSelectComponent + | APIModalSubmitMentionableSelectComponent + | APIModalSubmitRoleSelectComponent + | APIModalSubmitStringSelectComponent + | APIModalSubmitTextInputComponent + | APIModalSubmitUserSelectComponent; export interface ModalSubmitActionRowComponent extends APIBaseComponent { components: APIModalSubmitTextInputComponent[]; @@ -36,6 +60,12 @@ export type APIModalSubmissionComponent = ModalSubmitActionRowComponent | ModalS * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure} */ export interface APIModalSubmission { + /** + * Data for users, members, channels, and roles in the modal's auto-populated select menus + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} + */ + resolved?: APIInteractionDataResolved; /** * A developer-defined identifier for the component, max 100 characters */ diff --git a/deno/payloads/v9/_interactions/responses.ts b/deno/payloads/v9/_interactions/responses.ts index 570fecfe..dde5fee0 100644 --- a/deno/payloads/v9/_interactions/responses.ts +++ b/deno/payloads/v9/_interactions/responses.ts @@ -1,5 +1,10 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts'; -import type { APIActionRowComponent, APIComponentInModalActionRow, APILabelComponent } from '../channel.ts'; +import type { + APIActionRowComponent, + APIComponentInModalActionRow, + APILabelComponent, + APITextDisplayComponent, +} from '../channel.ts'; import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts'; /** @@ -128,7 +133,8 @@ export interface APICommandAutocompleteInteractionResponseCallbackData { export type APIModalInteractionResponseCallbackComponent = | APIActionRowComponent - | APILabelComponent; + | APILabelComponent + | APITextDisplayComponent; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal} diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 23b4c78a..f800f0d3 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -1897,6 +1897,12 @@ export interface APIBaseSelectMenuComponent< * @defaultValue `false` */ disabled?: boolean; + /** + * Whether the component is required to answer in a modal. + * + * @defaultValue `true` + */ + required?: boolean; } /** @@ -1930,10 +1936,6 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent { + values: string[]; +} + +export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitMentionableSelectComponent + extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export type ModalSubmitComponent = + | APIModalSubmitChannelSelectComponent + | APIModalSubmitMentionableSelectComponent + | APIModalSubmitRoleSelectComponent + | APIModalSubmitStringSelectComponent + | APIModalSubmitTextInputComponent + | APIModalSubmitUserSelectComponent; export interface ModalSubmitActionRowComponent extends APIBaseComponent { components: APIModalSubmitTextInputComponent[]; @@ -36,6 +60,12 @@ export type APIModalSubmissionComponent = ModalSubmitActionRowComponent | ModalS * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure} */ export interface APIModalSubmission { + /** + * Data for users, members, channels, and roles in the modal's auto-populated select menus + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} + */ + resolved?: APIInteractionDataResolved; /** * A developer-defined identifier for the component, max 100 characters */ diff --git a/payloads/v10/_interactions/responses.ts b/payloads/v10/_interactions/responses.ts index 2b40daba..1d36f4bb 100644 --- a/payloads/v10/_interactions/responses.ts +++ b/payloads/v10/_interactions/responses.ts @@ -1,5 +1,10 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10'; -import type { APIActionRowComponent, APIComponentInModalActionRow, APILabelComponent } from '../channel'; +import type { + APIActionRowComponent, + APIComponentInModalActionRow, + APILabelComponent, + APITextDisplayComponent, +} from '../channel'; import type { APIApplicationCommandOptionChoice } from './applicationCommands'; /** @@ -128,7 +133,8 @@ export interface APICommandAutocompleteInteractionResponseCallbackData { export type APIModalInteractionResponseCallbackComponent = | APIActionRowComponent - | APILabelComponent; + | APILabelComponent + | APITextDisplayComponent; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal} diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 9705cdbf..19c7a14a 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -1898,6 +1898,12 @@ export interface APIBaseSelectMenuComponent< * @defaultValue `false` */ disabled?: boolean; + /** + * Whether the component is required to answer in a modal. + * + * @defaultValue `true` + */ + required?: boolean; } /** @@ -1931,10 +1937,6 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent { + values: string[]; +} + +export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitMentionableSelectComponent + extends APIBaseModalSubmitComponent { + values: string[]; +} + +export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent { + values: string[]; +} + +export type ModalSubmitComponent = + | APIModalSubmitChannelSelectComponent + | APIModalSubmitMentionableSelectComponent + | APIModalSubmitRoleSelectComponent + | APIModalSubmitStringSelectComponent + | APIModalSubmitTextInputComponent + | APIModalSubmitUserSelectComponent; export interface ModalSubmitActionRowComponent extends APIBaseComponent { components: APIModalSubmitTextInputComponent[]; @@ -36,6 +60,12 @@ export type APIModalSubmissionComponent = ModalSubmitActionRowComponent | ModalS * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure} */ export interface APIModalSubmission { + /** + * Data for users, members, channels, and roles in the modal's auto-populated select menus + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} + */ + resolved?: APIInteractionDataResolved; /** * A developer-defined identifier for the component, max 100 characters */ diff --git a/payloads/v9/_interactions/responses.ts b/payloads/v9/_interactions/responses.ts index 7f59f32e..70630742 100644 --- a/payloads/v9/_interactions/responses.ts +++ b/payloads/v9/_interactions/responses.ts @@ -1,5 +1,10 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9'; -import type { APIActionRowComponent, APIComponentInModalActionRow, APILabelComponent } from '../channel'; +import type { + APIActionRowComponent, + APIComponentInModalActionRow, + APILabelComponent, + APITextDisplayComponent, +} from '../channel'; import type { APIApplicationCommandOptionChoice } from './applicationCommands'; /** @@ -128,7 +133,8 @@ export interface APICommandAutocompleteInteractionResponseCallbackData { export type APIModalInteractionResponseCallbackComponent = | APIActionRowComponent - | APILabelComponent; + | APILabelComponent + | APITextDisplayComponent; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal} diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index 50dd9336..11e2bec9 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -1897,6 +1897,12 @@ export interface APIBaseSelectMenuComponent< * @defaultValue `false` */ disabled?: boolean; + /** + * Whether the component is required to answer in a modal. + * + * @defaultValue `true` + */ + required?: boolean; } /** @@ -1930,10 +1936,6 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent