diff --git a/deno/payloads/v8/_interactions/modalSubmit.ts b/deno/payloads/v8/_interactions/modalSubmit.ts index b8537f2f..b1e0251b 100644 --- a/deno/payloads/v8/_interactions/modalSubmit.ts +++ b/deno/payloads/v8/_interactions/modalSubmit.ts @@ -1,4 +1,4 @@ -import type { APIActionRowComponent, APIModalComponent } from '../channel.ts'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts'; import type { APIBaseInteraction, InteractionType, @@ -13,7 +13,8 @@ export interface ModalSubmitComponent { value: string; } -export interface ModalSubmitActionRowComponent extends Omit, 'components'> { +export interface ModalSubmitActionRowComponent + extends Omit, 'components'> { components: ModalSubmitComponent[]; } diff --git a/deno/payloads/v8/_interactions/responses.ts b/deno/payloads/v8/_interactions/responses.ts index 160af94b..631d5e72 100644 --- a/deno/payloads/v8/_interactions/responses.ts +++ b/deno/payloads/v8/_interactions/responses.ts @@ -1,7 +1,7 @@ import type { MessageFlags } from '../mod.ts'; import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v8.ts'; import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts'; -import type { APIActionRowComponent, APIModalComponent } from '../channel.ts'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts'; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type @@ -119,5 +119,5 @@ export interface APIModalInteractionResponseCallbackData { /** * Between 1 and 5 (inclusive) components that make up the modal */ - components: APIActionRowComponent[]; + components: APIActionRowComponent[]; } diff --git a/deno/payloads/v8/channel.ts b/deno/payloads/v8/channel.ts index cd7e1768..df624ff5 100644 --- a/deno/payloads/v8/channel.ts +++ b/deno/payloads/v8/channel.ts @@ -406,7 +406,7 @@ export interface APIMessage { /** * Sent if the message contains components like buttons, action rows, or other interactive components */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Sent if the message contains stickers * @@ -1013,7 +1013,7 @@ export interface APIActionRowComponent /** * The components in the ActionRow */ - components: Exclude>[]; + components: T[]; } /** @@ -1191,19 +1191,18 @@ export interface APITextInputComponent extends APIBaseComponent; +export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent; + +export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent; /** * https://discord.com/developers/docs/interactions/message-components#message-components */ -export type APIMessageComponent = - | APIActionRowComponent - | APIButtonComponent - | APISelectMenuComponent; - -export type APIMessageActionRowComponent = APIActionRowComponent; +export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent; // Modal components -export type APIModalComponent = APIActionRowComponent | APITextInputComponent; - -export type APIModalActionRowComponent = APIActionRowComponent; +export type APIModalActionRowComponent = APITextInputComponent; diff --git a/deno/payloads/v9/_interactions/modalSubmit.ts b/deno/payloads/v9/_interactions/modalSubmit.ts index b8537f2f..b1e0251b 100644 --- a/deno/payloads/v9/_interactions/modalSubmit.ts +++ b/deno/payloads/v9/_interactions/modalSubmit.ts @@ -1,4 +1,4 @@ -import type { APIActionRowComponent, APIModalComponent } from '../channel.ts'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts'; import type { APIBaseInteraction, InteractionType, @@ -13,7 +13,8 @@ export interface ModalSubmitComponent { value: string; } -export interface ModalSubmitActionRowComponent extends Omit, 'components'> { +export interface ModalSubmitActionRowComponent + extends Omit, 'components'> { components: ModalSubmitComponent[]; } diff --git a/deno/payloads/v9/_interactions/responses.ts b/deno/payloads/v9/_interactions/responses.ts index 9a8b63fb..88e2ad38 100644 --- a/deno/payloads/v9/_interactions/responses.ts +++ b/deno/payloads/v9/_interactions/responses.ts @@ -1,7 +1,7 @@ import type { MessageFlags } from '../mod.ts'; import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts'; import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts'; -import type { APIActionRowComponent, APIModalComponent } from '../channel.ts'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts'; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type @@ -119,5 +119,5 @@ export interface APIModalInteractionResponseCallbackData { /** * Between 1 and 5 (inclusive) components that make up the modal */ - components: APIActionRowComponent[]; + components: APIActionRowComponent[]; } diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index f98c49d4..8667433c 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -483,7 +483,7 @@ export interface APIMessage { /** * Sent if the message contains components like buttons, action rows, or other interactive components */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Sent if the message contains stickers * @@ -1182,7 +1182,7 @@ export interface APIActionRowComponent /** * The components in the ActionRow */ - components: Exclude>[]; + components: T[]; } /** @@ -1360,19 +1360,18 @@ export interface APITextInputComponent extends APIBaseComponent; +export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent; + +export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent; /** * https://discord.com/developers/docs/interactions/message-components#message-components */ -export type APIMessageComponent = - | APIActionRowComponent - | APIButtonComponent - | APISelectMenuComponent; - -export type APIMessageActionRowComponent = APIActionRowComponent; +export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent; // Modal components -export type APIModalComponent = APIActionRowComponent | APITextInputComponent; - -export type APIModalActionRowComponent = APIActionRowComponent; +export type APIModalActionRowComponent = APITextInputComponent; diff --git a/deno/rest/v8/channel.ts b/deno/rest/v8/channel.ts index 5250efc3..3549fda4 100644 --- a/deno/rest/v8/channel.ts +++ b/deno/rest/v8/channel.ts @@ -1,7 +1,6 @@ import type { Permissions, Snowflake } from '../../globals.ts'; import type { APIActionRowComponent, - APIMessageComponent, APIAllowedMentions, APIAttachment, APIChannel, @@ -16,6 +15,7 @@ import type { MessageFlags, OverwriteType, VideoQualityMode, + APIMessageActionRowComponent, } from '../../payloads/v8/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; @@ -214,7 +214,7 @@ export type RESTPostAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefinedP * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * IDs of up to 3 stickers in the server to send in the message * @@ -348,7 +348,7 @@ export type RESTPatchAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefined * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[] | null; + components?: APIActionRowComponent[] | null; }>; /** diff --git a/deno/rest/v8/webhook.ts b/deno/rest/v8/webhook.ts index 776e110f..dc3d926c 100644 --- a/deno/rest/v8/webhook.ts +++ b/deno/rest/v8/webhook.ts @@ -7,7 +7,7 @@ import type { APIWebhook, APIAttachment, MessageFlags, - APIMessageComponent, + APIMessageActionRowComponent, } from '../../payloads/v8/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts'; @@ -136,7 +136,7 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Attachment objects with filename and description */ diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index 167aec75..7d9d27b3 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -1,6 +1,5 @@ import type { Permissions, Snowflake } from '../../globals.ts'; import type { - APIMessageComponent, APIActionRowComponent, APIAllowedMentions, APIAttachment, @@ -19,6 +18,7 @@ import type { OverwriteType, ThreadAutoArchiveDuration, VideoQualityMode, + APIMessageActionRowComponent, } from '../../payloads/v9/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; @@ -247,7 +247,7 @@ export type RESTPostAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefinedP * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * IDs of up to 3 stickers in the server to send in the message * @@ -381,7 +381,7 @@ export type RESTPatchAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefined * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[] | null; + components?: APIActionRowComponent[] | null; }>; /** diff --git a/deno/rest/v9/webhook.ts b/deno/rest/v9/webhook.ts index 7266b6fe..6e9325ed 100644 --- a/deno/rest/v9/webhook.ts +++ b/deno/rest/v9/webhook.ts @@ -7,10 +7,9 @@ import type { APIWebhook, APIAttachment, MessageFlags, - APIMessageComponent, + APIMessageActionRowComponent, } from '../../payloads/v9/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts'; - /** * https://discord.com/developers/docs/resources/webhook#create-webhook */ @@ -136,7 +135,7 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Attachment objects with filename and description */ diff --git a/payloads/v8/_interactions/modalSubmit.ts b/payloads/v8/_interactions/modalSubmit.ts index 394c0a0e..285f4056 100644 --- a/payloads/v8/_interactions/modalSubmit.ts +++ b/payloads/v8/_interactions/modalSubmit.ts @@ -1,4 +1,4 @@ -import type { APIActionRowComponent, APIModalComponent } from '../channel'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel'; import type { APIBaseInteraction, InteractionType, @@ -13,7 +13,8 @@ export interface ModalSubmitComponent { value: string; } -export interface ModalSubmitActionRowComponent extends Omit, 'components'> { +export interface ModalSubmitActionRowComponent + extends Omit, 'components'> { components: ModalSubmitComponent[]; } diff --git a/payloads/v8/_interactions/responses.ts b/payloads/v8/_interactions/responses.ts index 0a46f5ab..c0fb25d4 100644 --- a/payloads/v8/_interactions/responses.ts +++ b/payloads/v8/_interactions/responses.ts @@ -1,7 +1,7 @@ import type { MessageFlags } from '../index'; import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v8'; import type { APIApplicationCommandOptionChoice } from './applicationCommands'; -import type { APIActionRowComponent, APIModalComponent } from '../channel'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel'; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type @@ -119,5 +119,5 @@ export interface APIModalInteractionResponseCallbackData { /** * Between 1 and 5 (inclusive) components that make up the modal */ - components: APIActionRowComponent[]; + components: APIActionRowComponent[]; } diff --git a/payloads/v8/channel.ts b/payloads/v8/channel.ts index 5be0ce1f..225ea294 100644 --- a/payloads/v8/channel.ts +++ b/payloads/v8/channel.ts @@ -406,7 +406,7 @@ export interface APIMessage { /** * Sent if the message contains components like buttons, action rows, or other interactive components */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Sent if the message contains stickers * @@ -1013,7 +1013,7 @@ export interface APIActionRowComponent /** * The components in the ActionRow */ - components: Exclude>[]; + components: T[]; } /** @@ -1191,19 +1191,18 @@ export interface APITextInputComponent extends APIBaseComponent; +export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent; + +export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent; /** * https://discord.com/developers/docs/interactions/message-components#message-components */ -export type APIMessageComponent = - | APIActionRowComponent - | APIButtonComponent - | APISelectMenuComponent; - -export type APIMessageActionRowComponent = APIActionRowComponent; +export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent; // Modal components -export type APIModalComponent = APIActionRowComponent | APITextInputComponent; - -export type APIModalActionRowComponent = APIActionRowComponent; +export type APIModalActionRowComponent = APITextInputComponent; diff --git a/payloads/v9/_interactions/modalSubmit.ts b/payloads/v9/_interactions/modalSubmit.ts index 394c0a0e..285f4056 100644 --- a/payloads/v9/_interactions/modalSubmit.ts +++ b/payloads/v9/_interactions/modalSubmit.ts @@ -1,4 +1,4 @@ -import type { APIActionRowComponent, APIModalComponent } from '../channel'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel'; import type { APIBaseInteraction, InteractionType, @@ -13,7 +13,8 @@ export interface ModalSubmitComponent { value: string; } -export interface ModalSubmitActionRowComponent extends Omit, 'components'> { +export interface ModalSubmitActionRowComponent + extends Omit, 'components'> { components: ModalSubmitComponent[]; } diff --git a/payloads/v9/_interactions/responses.ts b/payloads/v9/_interactions/responses.ts index 3f92fcf8..927e56bc 100644 --- a/payloads/v9/_interactions/responses.ts +++ b/payloads/v9/_interactions/responses.ts @@ -1,7 +1,7 @@ import type { MessageFlags } from '../index'; import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9'; import type { APIApplicationCommandOptionChoice } from './applicationCommands'; -import type { APIActionRowComponent, APIModalComponent } from '../channel'; +import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel'; /** * https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type @@ -119,5 +119,5 @@ export interface APIModalInteractionResponseCallbackData { /** * Between 1 and 5 (inclusive) components that make up the modal */ - components: APIActionRowComponent[]; + components: APIActionRowComponent[]; } diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index ad6f22da..9e0d14e3 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -483,7 +483,7 @@ export interface APIMessage { /** * Sent if the message contains components like buttons, action rows, or other interactive components */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Sent if the message contains stickers * @@ -1182,7 +1182,7 @@ export interface APIActionRowComponent /** * The components in the ActionRow */ - components: Exclude>[]; + components: T[]; } /** @@ -1360,19 +1360,18 @@ export interface APITextInputComponent extends APIBaseComponent; +export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent; + +export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent; /** * https://discord.com/developers/docs/interactions/message-components#message-components */ -export type APIMessageComponent = - | APIActionRowComponent - | APIButtonComponent - | APISelectMenuComponent; - -export type APIMessageActionRowComponent = APIActionRowComponent; +export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent; // Modal components -export type APIModalComponent = APIActionRowComponent | APITextInputComponent; - -export type APIModalActionRowComponent = APIActionRowComponent; +export type APIModalActionRowComponent = APITextInputComponent; diff --git a/rest/v8/channel.ts b/rest/v8/channel.ts index f53131d8..4980ac27 100644 --- a/rest/v8/channel.ts +++ b/rest/v8/channel.ts @@ -1,7 +1,6 @@ import type { Permissions, Snowflake } from '../../globals'; import type { APIActionRowComponent, - APIMessageComponent, APIAllowedMentions, APIAttachment, APIChannel, @@ -16,6 +15,7 @@ import type { MessageFlags, OverwriteType, VideoQualityMode, + APIMessageActionRowComponent, } from '../../payloads/v8/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; @@ -214,7 +214,7 @@ export type RESTPostAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefinedP * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * IDs of up to 3 stickers in the server to send in the message * @@ -348,7 +348,7 @@ export type RESTPatchAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefined * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[] | null; + components?: APIActionRowComponent[] | null; }>; /** diff --git a/rest/v8/webhook.ts b/rest/v8/webhook.ts index 69e33547..da1df135 100644 --- a/rest/v8/webhook.ts +++ b/rest/v8/webhook.ts @@ -7,7 +7,7 @@ import type { APIWebhook, APIAttachment, MessageFlags, - APIMessageComponent, + APIMessageActionRowComponent, } from '../../payloads/v8/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals'; @@ -136,7 +136,7 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Attachment objects with filename and description */ diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index a30547bb..866a028b 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -1,6 +1,5 @@ import type { Permissions, Snowflake } from '../../globals'; import type { - APIMessageComponent, APIActionRowComponent, APIAllowedMentions, APIAttachment, @@ -19,6 +18,7 @@ import type { OverwriteType, ThreadAutoArchiveDuration, VideoQualityMode, + APIMessageActionRowComponent, } from '../../payloads/v9/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; @@ -247,7 +247,7 @@ export type RESTPostAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefinedP * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * IDs of up to 3 stickers in the server to send in the message * @@ -381,7 +381,7 @@ export type RESTPatchAPIChannelMessageJSONBody = AddUndefinedToPossiblyUndefined * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[] | null; + components?: APIActionRowComponent[] | null; }>; /** diff --git a/rest/v9/webhook.ts b/rest/v9/webhook.ts index cf402514..b3ad1f4f 100644 --- a/rest/v9/webhook.ts +++ b/rest/v9/webhook.ts @@ -7,10 +7,9 @@ import type { APIWebhook, APIAttachment, MessageFlags, - APIMessageComponent, + APIMessageActionRowComponent, } from '../../payloads/v9/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals'; - /** * https://discord.com/developers/docs/resources/webhook#create-webhook */ @@ -136,7 +135,7 @@ export type RESTPostAPIWebhookWithTokenJSONBody = AddUndefinedToPossiblyUndefine * * See https://discord.com/developers/docs/interactions/message-components#component-object */ - components?: APIActionRowComponent[]; + components?: APIActionRowComponent[]; /** * Attachment objects with filename and description */