diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 1bdf29d7..dd3906c0 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -1136,7 +1136,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload< * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export interface GatewayGuildMemberUpdateDispatchData - extends APIGuildMemberJoined, + extends + APIGuildMemberJoined, APIBaseGuildMember, Partial, Partial, @@ -1623,7 +1624,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload< export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {} export interface APIGuildMemberNoUser - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, NonNullable, diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index b42f43ea..dcec51ca 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -1135,7 +1135,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload< * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export interface GatewayGuildMemberUpdateDispatchData - extends APIGuildMemberJoined, + extends + APIGuildMemberJoined, APIBaseGuildMember, Partial, Partial, @@ -1622,7 +1623,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload< export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {} export interface APIGuildMemberNoUser - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, NonNullable, diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts index 0b28dc6d..85058815 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts @@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel.ts'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; import type { ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandChannelOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase { channel_types?: Exclude[]; } diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts index 846d3196..268c145a 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts @@ -6,8 +6,7 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandIntegerOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataIntegerOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Integer, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataIntegerOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Integer, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts index d8c435ee..75d8ae94 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts @@ -6,8 +6,7 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandNumberOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataNumberOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Number, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataNumberOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Number, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts index 80f9d263..0a062981 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,7 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandStringOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase { /** * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). */ @@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataStringOption - extends APIInteractionDataOptionBase { +export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.String, + string +> { focused?: boolean; } diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts index 1e5de4cd..e502fdee 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts @@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction import type { APIApplicationCommandOptionBase } from './base.ts'; import type { ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandSubcommandOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandBasicOption[]; } diff --git a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts index db0c4187..4602baca 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts @@ -6,8 +6,7 @@ import type { APIApplicationCommandSubcommandOption, } from './subcommand.ts'; -export interface APIApplicationCommandSubcommandGroupOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandSubcommandOption[]; } diff --git a/deno/payloads/v10/_interactions/_applicationCommands/chatInput.ts b/deno/payloads/v10/_interactions/_applicationCommands/chatInput.ts index 6ede6820..52ab42af 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/chatInput.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/chatInput.ts @@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption { +export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } @@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIAutocompleteApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } diff --git a/deno/payloads/v10/_interactions/_applicationCommands/contextMenu.ts b/deno/payloads/v10/_interactions/_applicationCommands/contextMenu.ts index eba23d5f..9c979d92 100644 --- a/deno/payloads/v10/_interactions/_applicationCommands/contextMenu.ts +++ b/deno/payloads/v10/_interactions/_applicationCommands/contextMenu.ts @@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIUserApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIUserInteractionDataResolved; } @@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIMessageApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIMessageApplicationCommandInteractionDataResolved; } diff --git a/deno/payloads/v10/_interactions/base.ts b/deno/payloads/v10/_interactions/base.ts index fcd38a1a..9d5a32d4 100644 --- a/deno/payloads/v10/_interactions/base.ts +++ b/deno/payloads/v10/_interactions/base.ts @@ -48,8 +48,7 @@ export interface APIBaseInteractionMetadata { /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure} */ -export interface APIApplicationCommandInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata { /** * The user the command was run on, present only on user commands interactions */ @@ -64,8 +63,7 @@ export interface APIApplicationCommandInteractionMetadata /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure} */ -export interface APIMessageComponentInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata { /** * ID of the message that contained the interactive component */ @@ -254,10 +252,7 @@ export type APIInteractionDataResolvedChannel = * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionDataResolvedGuildMember - extends APIBaseGuildMember, - APIFlaggedGuildMember, - APIGuildMemberAvatar, - APIGuildMemberJoined { + extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined { permissions: Permissions; } diff --git a/deno/payloads/v10/_interactions/messageComponents.ts b/deno/payloads/v10/_interactions/messageComponents.ts index 28bbb65a..0c7c494b 100644 --- a/deno/payloads/v10/_interactions/messageComponents.ts +++ b/deno/payloads/v10/_interactions/messageComponents.ts @@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData; -export interface APIMessageStringSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData { values: string[]; } -export interface APIMessageUserSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: APIUserInteractionDataResolved; } -export interface APIMessageRoleSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } -export interface APIMessageMentionableSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Pick; } -export interface APIMessageChannelSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } diff --git a/deno/payloads/v10/_interactions/modalSubmit.ts b/deno/payloads/v10/_interactions/modalSubmit.ts index 2aaccab2..f3341945 100644 --- a/deno/payloads/v10/_interactions/modalSubmit.ts +++ b/deno/payloads/v10/_interactions/modalSubmit.ts @@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom values: string[]; } -export interface APIModalSubmitMentionableSelectComponent - extends APIBaseModalSubmitComponent { +export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent { values: string[]; } diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index 1c452a50..135d9db4 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -138,10 +138,7 @@ export interface APIGuildChannel export type GuildTextChannelType = Exclude; export interface APIGuildTextChannel - extends APITextBasedChannel, - APIGuildChannel, - APISortableChannel, - APIPinChannel { + extends APITextBasedChannel, APIGuildChannel, APISortableChannel, APIPinChannel { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ @@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel - extends APIGuildChannel, - APISortableChannel, - APITextBasedChannel, - APISlowmodeChannel { + extends APIGuildChannel, APISortableChannel, APITextBasedChannel, APISlowmodeChannel { /** * The bitrate (in bits) of the voice or stage channel */ @@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread; export interface APIThreadChannel - extends APITextBasedChannel, - APIGuildChannel, - APIPinChannel { + extends APITextBasedChannel, APIGuildChannel, APIPinChannel { /** * The client users member for the thread, only included in select endpoints */ @@ -358,8 +350,7 @@ export enum ForumLayoutType { } export interface APIThreadOnlyChannel - extends APIGuildChannel, - APISortableChannel { + extends APIGuildChannel, APISortableChannel { /** * The channel topic (0-4096 characters) */ diff --git a/deno/payloads/v10/guild.ts b/deno/payloads/v10/guild.ts index f76f86b1..cc8105f7 100644 --- a/deno/payloads/v10/guild.ts +++ b/deno/payloads/v10/guild.ts @@ -765,7 +765,8 @@ export interface APIGuildMemberUser { * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMember - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, diff --git a/deno/payloads/v10/guildScheduledEvent.ts b/deno/payloads/v10/guildScheduledEvent.ts index 32efc745..ab75673a 100644 --- a/deno/payloads/v10/guildScheduledEvent.ts +++ b/deno/payloads/v10/guildScheduledEvent.ts @@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday { */ export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday; -export interface APIStageInstanceGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: Snowflake; entity_metadata: null; } @@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase< entity_metadata: null; } -export interface APIExternalGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: null; entity_metadata: Required; } diff --git a/deno/payloads/v10/message.ts b/deno/payloads/v10/message.ts index 651510e6..6616c62c 100644 --- a/deno/payloads/v10/message.ts +++ b/deno/payloads/v10/message.ts @@ -1046,8 +1046,9 @@ export enum ComponentType { * * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ -export interface APIActionRowComponent - extends APIBaseComponent { +export interface APIActionRowComponent< + T extends APIComponentInActionRow, +> extends APIBaseComponent { /** * The components in the ActionRow */ @@ -1097,10 +1098,9 @@ export interface APIMessageComponentEmoji { /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ -export interface APIButtonComponentWithCustomId - extends APIButtonComponentBase< - ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success - > { +export interface APIButtonComponentWithCustomId extends APIButtonComponentBase< + ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success +> { /** * The custom_id to be sent in the interaction when clicked */ @@ -1312,8 +1312,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon * * @see {@link https://discord.com/developers/docs/components/reference#channel-select} */ -export interface APIChannelSelectComponent - extends APIBaseAutoPopulatedSelectMenuComponent { +export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent< + ComponentType.ChannelSelect, + SelectMenuDefaultValueType.Channel +> { /** * List of channel types to include in the ChannelSelect component */ diff --git a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts index 0b28dc6d..85058815 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts @@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel.ts'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; import type { ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandChannelOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase { channel_types?: Exclude[]; } diff --git a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts index 846d3196..268c145a 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts @@ -6,8 +6,7 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandIntegerOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataIntegerOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Integer, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataIntegerOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Integer, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts index d8c435ee..75d8ae94 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts @@ -6,8 +6,7 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandNumberOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataNumberOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Number, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataNumberOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Number, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts index 80f9d263..0a062981 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,7 @@ import type { } from './base.ts'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandStringOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase { /** * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). */ @@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataStringOption - extends APIInteractionDataOptionBase { +export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.String, + string +> { focused?: boolean; } diff --git a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts index 1e5de4cd..e502fdee 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts @@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction import type { APIApplicationCommandOptionBase } from './base.ts'; import type { ApplicationCommandOptionType } from './shared.ts'; -export interface APIApplicationCommandSubcommandOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandBasicOption[]; } diff --git a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts index db0c4187..4602baca 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts @@ -6,8 +6,7 @@ import type { APIApplicationCommandSubcommandOption, } from './subcommand.ts'; -export interface APIApplicationCommandSubcommandGroupOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandSubcommandOption[]; } diff --git a/deno/payloads/v9/_interactions/_applicationCommands/chatInput.ts b/deno/payloads/v9/_interactions/_applicationCommands/chatInput.ts index 6ede6820..52ab42af 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/chatInput.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/chatInput.ts @@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption { +export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } @@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIAutocompleteApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } diff --git a/deno/payloads/v9/_interactions/_applicationCommands/contextMenu.ts b/deno/payloads/v9/_interactions/_applicationCommands/contextMenu.ts index eba23d5f..9c979d92 100644 --- a/deno/payloads/v9/_interactions/_applicationCommands/contextMenu.ts +++ b/deno/payloads/v9/_interactions/_applicationCommands/contextMenu.ts @@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIUserApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIUserInteractionDataResolved; } @@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIMessageApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIMessageApplicationCommandInteractionDataResolved; } diff --git a/deno/payloads/v9/_interactions/base.ts b/deno/payloads/v9/_interactions/base.ts index af5259b6..c934d36b 100644 --- a/deno/payloads/v9/_interactions/base.ts +++ b/deno/payloads/v9/_interactions/base.ts @@ -51,8 +51,7 @@ export interface APIBaseInteractionMetadata { /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure} */ -export interface APIApplicationCommandInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata { /** * The user the command was run on, present only on user commands interactions */ @@ -67,8 +66,7 @@ export interface APIApplicationCommandInteractionMetadata /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure} */ -export interface APIMessageComponentInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata { /** * ID of the message that contained the interactive component */ @@ -257,10 +255,7 @@ export type APIInteractionDataResolvedChannel = * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionDataResolvedGuildMember - extends APIBaseGuildMember, - APIFlaggedGuildMember, - APIGuildMemberAvatar, - APIGuildMemberJoined { + extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined { permissions: Permissions; } diff --git a/deno/payloads/v9/_interactions/messageComponents.ts b/deno/payloads/v9/_interactions/messageComponents.ts index 28bbb65a..0c7c494b 100644 --- a/deno/payloads/v9/_interactions/messageComponents.ts +++ b/deno/payloads/v9/_interactions/messageComponents.ts @@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData; -export interface APIMessageStringSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData { values: string[]; } -export interface APIMessageUserSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: APIUserInteractionDataResolved; } -export interface APIMessageRoleSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } -export interface APIMessageMentionableSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Pick; } -export interface APIMessageChannelSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } diff --git a/deno/payloads/v9/_interactions/modalSubmit.ts b/deno/payloads/v9/_interactions/modalSubmit.ts index 2aaccab2..f3341945 100644 --- a/deno/payloads/v9/_interactions/modalSubmit.ts +++ b/deno/payloads/v9/_interactions/modalSubmit.ts @@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom values: string[]; } -export interface APIModalSubmitMentionableSelectComponent - extends APIBaseModalSubmitComponent { +export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent { values: string[]; } diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 42de87a6..68edf4c8 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -138,10 +138,7 @@ export interface APIGuildChannel export type GuildTextChannelType = Exclude; export interface APIGuildTextChannel - extends APITextBasedChannel, - APISortableChannel, - APIGuildChannel, - APIPinChannel { + extends APITextBasedChannel, APISortableChannel, APIGuildChannel, APIPinChannel { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ @@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel - extends APIGuildChannel, - APISortableChannel, - APITextBasedChannel, - APISlowmodeChannel { + extends APIGuildChannel, APISortableChannel, APITextBasedChannel, APISlowmodeChannel { /** * The bitrate (in bits) of the voice or stage channel */ @@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread; export interface APIThreadChannel - extends APITextBasedChannel, - APIGuildChannel, - APIPinChannel { + extends APITextBasedChannel, APIGuildChannel, APIPinChannel { /** * The client users member for the thread, only included in select endpoints */ @@ -358,8 +350,7 @@ export enum ForumLayoutType { } export interface APIThreadOnlyChannel - extends APIGuildChannel, - APISortableChannel { + extends APIGuildChannel, APISortableChannel { /** * The channel topic (0-4096 characters) */ diff --git a/deno/payloads/v9/guild.ts b/deno/payloads/v9/guild.ts index ae3e6d3c..0616ae7d 100644 --- a/deno/payloads/v9/guild.ts +++ b/deno/payloads/v9/guild.ts @@ -757,7 +757,8 @@ export interface APIGuildMemberUser { * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMember - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, diff --git a/deno/payloads/v9/guildScheduledEvent.ts b/deno/payloads/v9/guildScheduledEvent.ts index 32efc745..ab75673a 100644 --- a/deno/payloads/v9/guildScheduledEvent.ts +++ b/deno/payloads/v9/guildScheduledEvent.ts @@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday { */ export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday; -export interface APIStageInstanceGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: Snowflake; entity_metadata: null; } @@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase< entity_metadata: null; } -export interface APIExternalGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: null; entity_metadata: Required; } diff --git a/deno/payloads/v9/message.ts b/deno/payloads/v9/message.ts index 8bae7895..2d4c42d6 100644 --- a/deno/payloads/v9/message.ts +++ b/deno/payloads/v9/message.ts @@ -1041,8 +1041,9 @@ export enum ComponentType { * * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ -export interface APIActionRowComponent - extends APIBaseComponent { +export interface APIActionRowComponent< + T extends APIComponentInActionRow, +> extends APIBaseComponent { /** * The components in the ActionRow */ @@ -1092,10 +1093,9 @@ export interface APIMessageComponentEmoji { /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ -export interface APIButtonComponentWithCustomId - extends APIButtonComponentBase< - ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success - > { +export interface APIButtonComponentWithCustomId extends APIButtonComponentBase< + ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success +> { /** * The custom_id to be sent in the interaction when clicked */ @@ -1307,8 +1307,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon * * @see {@link https://discord.com/developers/docs/components/reference#channel-select} */ -export interface APIChannelSelectComponent - extends APIBaseAutoPopulatedSelectMenuComponent { +export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent< + ComponentType.ChannelSelect, + SelectMenuDefaultValueType.Channel +> { /** * List of channel types to include in the ChannelSelect component */ diff --git a/deno/rest/v10/guild.ts b/deno/rest/v10/guild.ts index fa522b95..207d942e 100644 --- a/deno/rest/v10/guild.ts +++ b/deno/rest/v10/guild.ts @@ -1004,7 +1004,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined }; export interface RESTAPIGuildOnboardingPrompt - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { @@ -1020,7 +1021,8 @@ export interface RESTAPIGuildOnboardingPrompt export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt; export interface RESTAPIGuildOnboardingPromptOption - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { diff --git a/deno/rest/v10/guildScheduledEvent.ts b/deno/rest/v10/guildScheduledEvent.ts index 32d0530d..f15cb7a9 100644 --- a/deno/rest/v10/guildScheduledEvent.ts +++ b/deno/rest/v10/guildScheduledEvent.ts @@ -95,9 +95,8 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent; * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export interface RESTPatchAPIGuildScheduledEventJSONBody - extends _Nullable< - Pick - >, + extends + _Nullable>, _StrictPartial< Omit > { diff --git a/deno/rest/v10/interactions.ts b/deno/rest/v10/interactions.ts index 7e05bfd7..a0f8eb74 100644 --- a/deno/rest/v10/interactions.ts +++ b/deno/rest/v10/interactions.ts @@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[]; export type RESTGetAPIApplicationCommandResult = APIApplicationCommand; export interface RESTPostAPIBaseApplicationCommandsJSONBody - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Omit< APIApplicationCommand, | 'application_id' @@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ -export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody - extends RESTPostAPIBaseApplicationCommandsJSONBody { +export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.PrimaryEntryPoint; } diff --git a/deno/rest/v9/guild.ts b/deno/rest/v9/guild.ts index b9e1176a..82ea8297 100644 --- a/deno/rest/v9/guild.ts +++ b/deno/rest/v9/guild.ts @@ -1005,7 +1005,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined }; export interface RESTAPIGuildOnboardingPrompt - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { @@ -1021,7 +1022,8 @@ export interface RESTAPIGuildOnboardingPrompt export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt; export interface RESTAPIGuildOnboardingPromptOption - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { diff --git a/deno/rest/v9/guildScheduledEvent.ts b/deno/rest/v9/guildScheduledEvent.ts index be0bb5b5..6c00e773 100644 --- a/deno/rest/v9/guildScheduledEvent.ts +++ b/deno/rest/v9/guildScheduledEvent.ts @@ -95,9 +95,8 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent; * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export interface RESTPatchAPIGuildScheduledEventJSONBody - extends _Nullable< - Pick - >, + extends + _Nullable>, _StrictPartial< Omit > { diff --git a/deno/rest/v9/interactions.ts b/deno/rest/v9/interactions.ts index 82ab96fd..f43c1703 100644 --- a/deno/rest/v9/interactions.ts +++ b/deno/rest/v9/interactions.ts @@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[]; export type RESTGetAPIApplicationCommandResult = APIApplicationCommand; export interface RESTPostAPIBaseApplicationCommandsJSONBody - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Omit< APIApplicationCommand, | 'application_id' @@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ -export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody - extends RESTPostAPIBaseApplicationCommandsJSONBody { +export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.PrimaryEntryPoint; } diff --git a/deno/rpc/v10.ts b/deno/rpc/v10.ts index d81318a3..bd3040cb 100644 --- a/deno/rpc/v10.ts +++ b/deno/rpc/v10.ts @@ -1923,8 +1923,7 @@ export interface RPCCommandActivityInviteUserPayload extends RPCCommandMessage { +export interface RPCCommandBraintreePopupBridgeCallbackPayload extends RPCCommandMessage { args: RPCBraintreePopupBridgeCallbackArgs; } @@ -1932,8 +1931,7 @@ export interface RPCCommandBrowserPayload extends RPCCommandMessage { +export interface RPCCommandCloseActivityJoinRequestPayload extends RPCCommandMessage { args: RPCCloseActivityJoinRequestArgs; } @@ -1973,8 +1971,7 @@ export interface RPCCommandGetRelationshipsPayload extends RPCCommandMessage { +export interface RPCCommandGetSelectedVoiceChannelPayload extends RPCCommandMessage { args: RPCGetSelectedVoiceChannelArgs; } @@ -2002,13 +1999,11 @@ export interface RPCCommandNetworkingPeerMetricsPayload extends RPCCommandMessag args: RPCNetworkingPeerMetricsArgs; } -export interface RPCCommandNetworkingSystemMetricsPayload - extends RPCCommandMessage { +export interface RPCCommandNetworkingSystemMetricsPayload extends RPCCommandMessage { args: RPCNetworkingSystemMetricsArgs; } -export interface RPCCommandOpenOverlayActivityInvitePayload - extends RPCCommandMessage { +export interface RPCCommandOpenOverlayActivityInvitePayload extends RPCCommandMessage { args: RPCOpenOverlayActivityInviteArgs; } @@ -2016,8 +2011,7 @@ export interface RPCCommandOpenOverlayGuildInvitePayload extends RPCCommandMessa args: RPCOpenOverlayGuildInviteArgs; } -export interface RPCCommandOpenOverlayVoiceSettingsPayload - extends RPCCommandMessage { +export interface RPCCommandOpenOverlayVoiceSettingsPayload extends RPCCommandMessage { args: RPCOpenOverlayVoiceSettingsArgs; } @@ -2261,8 +2255,7 @@ export interface RPCActivityInviteUserResult extends RPCCommandMessage { +export interface RPCBraintreePopupBridgeCallbackResult extends RPCCommandMessage { data: RPCBraintreePopupBridgeCallbackResultData; } diff --git a/gateway/v10.ts b/gateway/v10.ts index 8ef45f94..27f3d648 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -1136,7 +1136,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload< * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export interface GatewayGuildMemberUpdateDispatchData - extends APIGuildMemberJoined, + extends + APIGuildMemberJoined, APIBaseGuildMember, Partial, Partial, @@ -1623,7 +1624,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload< export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {} export interface APIGuildMemberNoUser - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, NonNullable, diff --git a/gateway/v9.ts b/gateway/v9.ts index b0fc6727..679ed737 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -1135,7 +1135,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload< * @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update} */ export interface GatewayGuildMemberUpdateDispatchData - extends APIGuildMemberJoined, + extends + APIGuildMemberJoined, APIBaseGuildMember, Partial, Partial, @@ -1622,7 +1623,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload< export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {} export interface APIGuildMemberNoUser - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, NonNullable, diff --git a/package.json b/package.json index 504934b8..72f820f0 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "lint-staged": "^16.1.0", "lodash.merge": "^4.6.2", "npm-run-all2": "^8.0.4", - "prettier": "^3.5.3", + "prettier": "^3.7.4", "pretty-quick": "^4.1.1", "rimraf": "^6.0.1", "ts-morph": "^27.0.0", diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts index 320324d4..048a0e63 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts @@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandChannelOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase { channel_types?: Exclude[]; } diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts index 0e13d505..634233ee 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts @@ -6,8 +6,7 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandIntegerOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataIntegerOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Integer, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataIntegerOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Integer, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts index e1e2ed55..c927bf5f 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts @@ -6,8 +6,7 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandNumberOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataNumberOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Number, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataNumberOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Number, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts index 7535f8f0..88b45896 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,7 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandStringOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase { /** * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). */ @@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataStringOption - extends APIInteractionDataOptionBase { +export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.String, + string +> { focused?: boolean; } diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts index 4da2b11e..5d647434 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts @@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandSubcommandOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandBasicOption[]; } diff --git a/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts b/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts index b8fb8923..bebaa048 100644 --- a/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts +++ b/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts @@ -6,8 +6,7 @@ import type { APIApplicationCommandSubcommandOption, } from './subcommand'; -export interface APIApplicationCommandSubcommandGroupOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandSubcommandOption[]; } diff --git a/payloads/v10/_interactions/_applicationCommands/chatInput.ts b/payloads/v10/_interactions/_applicationCommands/chatInput.ts index a7803051..33763840 100644 --- a/payloads/v10/_interactions/_applicationCommands/chatInput.ts +++ b/payloads/v10/_interactions/_applicationCommands/chatInput.ts @@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption { +export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } @@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIAutocompleteApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } diff --git a/payloads/v10/_interactions/_applicationCommands/contextMenu.ts b/payloads/v10/_interactions/_applicationCommands/contextMenu.ts index fde92f33..13712555 100644 --- a/payloads/v10/_interactions/_applicationCommands/contextMenu.ts +++ b/payloads/v10/_interactions/_applicationCommands/contextMenu.ts @@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIUserApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIUserInteractionDataResolved; } @@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIMessageApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIMessageApplicationCommandInteractionDataResolved; } diff --git a/payloads/v10/_interactions/base.ts b/payloads/v10/_interactions/base.ts index 776a33e0..7de6ac6a 100644 --- a/payloads/v10/_interactions/base.ts +++ b/payloads/v10/_interactions/base.ts @@ -48,8 +48,7 @@ export interface APIBaseInteractionMetadata { /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure} */ -export interface APIApplicationCommandInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata { /** * The user the command was run on, present only on user commands interactions */ @@ -64,8 +63,7 @@ export interface APIApplicationCommandInteractionMetadata /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure} */ -export interface APIMessageComponentInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata { /** * ID of the message that contained the interactive component */ @@ -254,10 +252,7 @@ export type APIInteractionDataResolvedChannel = * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionDataResolvedGuildMember - extends APIBaseGuildMember, - APIFlaggedGuildMember, - APIGuildMemberAvatar, - APIGuildMemberJoined { + extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined { permissions: Permissions; } diff --git a/payloads/v10/_interactions/messageComponents.ts b/payloads/v10/_interactions/messageComponents.ts index 2b00396e..ef9d0271 100644 --- a/payloads/v10/_interactions/messageComponents.ts +++ b/payloads/v10/_interactions/messageComponents.ts @@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData; -export interface APIMessageStringSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData { values: string[]; } -export interface APIMessageUserSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: APIUserInteractionDataResolved; } -export interface APIMessageRoleSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } -export interface APIMessageMentionableSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Pick; } -export interface APIMessageChannelSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } diff --git a/payloads/v10/_interactions/modalSubmit.ts b/payloads/v10/_interactions/modalSubmit.ts index b23daec8..b2b1b90d 100644 --- a/payloads/v10/_interactions/modalSubmit.ts +++ b/payloads/v10/_interactions/modalSubmit.ts @@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom values: string[]; } -export interface APIModalSubmitMentionableSelectComponent - extends APIBaseModalSubmitComponent { +export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent { values: string[]; } diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index 46000922..d8aa42ad 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -138,10 +138,7 @@ export interface APIGuildChannel export type GuildTextChannelType = Exclude; export interface APIGuildTextChannel - extends APITextBasedChannel, - APIGuildChannel, - APISortableChannel, - APIPinChannel { + extends APITextBasedChannel, APIGuildChannel, APISortableChannel, APIPinChannel { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ @@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel - extends APIGuildChannel, - APISortableChannel, - APITextBasedChannel, - APISlowmodeChannel { + extends APIGuildChannel, APISortableChannel, APITextBasedChannel, APISlowmodeChannel { /** * The bitrate (in bits) of the voice or stage channel */ @@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread; export interface APIThreadChannel - extends APITextBasedChannel, - APIGuildChannel, - APIPinChannel { + extends APITextBasedChannel, APIGuildChannel, APIPinChannel { /** * The client users member for the thread, only included in select endpoints */ @@ -358,8 +350,7 @@ export enum ForumLayoutType { } export interface APIThreadOnlyChannel - extends APIGuildChannel, - APISortableChannel { + extends APIGuildChannel, APISortableChannel { /** * The channel topic (0-4096 characters) */ diff --git a/payloads/v10/guild.ts b/payloads/v10/guild.ts index f9be43a3..ca229cac 100644 --- a/payloads/v10/guild.ts +++ b/payloads/v10/guild.ts @@ -765,7 +765,8 @@ export interface APIGuildMemberUser { * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMember - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, diff --git a/payloads/v10/guildScheduledEvent.ts b/payloads/v10/guildScheduledEvent.ts index 2610238d..5df0eea6 100644 --- a/payloads/v10/guildScheduledEvent.ts +++ b/payloads/v10/guildScheduledEvent.ts @@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday { */ export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday; -export interface APIStageInstanceGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: Snowflake; entity_metadata: null; } @@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase< entity_metadata: null; } -export interface APIExternalGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: null; entity_metadata: Required; } diff --git a/payloads/v10/message.ts b/payloads/v10/message.ts index 244bf368..3e012630 100644 --- a/payloads/v10/message.ts +++ b/payloads/v10/message.ts @@ -1046,8 +1046,9 @@ export enum ComponentType { * * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ -export interface APIActionRowComponent - extends APIBaseComponent { +export interface APIActionRowComponent< + T extends APIComponentInActionRow, +> extends APIBaseComponent { /** * The components in the ActionRow */ @@ -1097,10 +1098,9 @@ export interface APIMessageComponentEmoji { /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ -export interface APIButtonComponentWithCustomId - extends APIButtonComponentBase< - ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success - > { +export interface APIButtonComponentWithCustomId extends APIButtonComponentBase< + ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success +> { /** * The custom_id to be sent in the interaction when clicked */ @@ -1312,8 +1312,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon * * @see {@link https://discord.com/developers/docs/components/reference#channel-select} */ -export interface APIChannelSelectComponent - extends APIBaseAutoPopulatedSelectMenuComponent { +export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent< + ComponentType.ChannelSelect, + SelectMenuDefaultValueType.Channel +> { /** * List of channel types to include in the ChannelSelect component */ diff --git a/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts b/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts index 320324d4..048a0e63 100644 --- a/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts +++ b/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts @@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandChannelOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase { channel_types?: Exclude[]; } diff --git a/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts b/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts index 0e13d505..634233ee 100644 --- a/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts +++ b/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts @@ -6,8 +6,7 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandIntegerOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataIntegerOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Integer, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataIntegerOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Integer, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts b/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts index e1e2ed55..c927bf5f 100644 --- a/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts +++ b/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts @@ -6,8 +6,7 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandNumberOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase { /** * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. */ @@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataNumberOption - extends APIInteractionDataOptionBase< - ApplicationCommandOptionType.Number, - Type extends InteractionType.ApplicationCommandAutocomplete ? string : number - > { +export interface APIApplicationCommandInteractionDataNumberOption< + Type extends InteractionType = InteractionType, +> extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.Number, + Type extends InteractionType.ApplicationCommandAutocomplete ? string : number +> { focused?: boolean; } diff --git a/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts b/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts index 7535f8f0..88b45896 100644 --- a/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts +++ b/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts @@ -5,8 +5,7 @@ import type { } from './base'; import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandStringOptionBase - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase { /** * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). */ @@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA APIApplicationCommandOptionChoice >; -export interface APIApplicationCommandInteractionDataStringOption - extends APIInteractionDataOptionBase { +export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase< + ApplicationCommandOptionType.String, + string +> { focused?: boolean; } diff --git a/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts b/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts index 4da2b11e..5d647434 100644 --- a/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts +++ b/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts @@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction import type { APIApplicationCommandOptionBase } from './base'; import type { ApplicationCommandOptionType } from './shared'; -export interface APIApplicationCommandSubcommandOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandBasicOption[]; } diff --git a/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts b/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts index b8fb8923..bebaa048 100644 --- a/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts +++ b/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts @@ -6,8 +6,7 @@ import type { APIApplicationCommandSubcommandOption, } from './subcommand'; -export interface APIApplicationCommandSubcommandGroupOption - extends APIApplicationCommandOptionBase { +export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase { options?: APIApplicationCommandSubcommandOption[]; } diff --git a/payloads/v9/_interactions/_applicationCommands/chatInput.ts b/payloads/v9/_interactions/_applicationCommands/chatInput.ts index a7803051..33763840 100644 --- a/payloads/v9/_interactions/_applicationCommands/chatInput.ts +++ b/payloads/v9/_interactions/_applicationCommands/chatInput.ts @@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption { +export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } @@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIAutocompleteApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { options?: APIApplicationCommandInteractionDataOption[]; resolved?: APIInteractionDataResolved; } diff --git a/payloads/v9/_interactions/_applicationCommands/contextMenu.ts b/payloads/v9/_interactions/_applicationCommands/contextMenu.ts index fde92f33..13712555 100644 --- a/payloads/v9/_interactions/_applicationCommands/contextMenu.ts +++ b/payloads/v9/_interactions/_applicationCommands/contextMenu.ts @@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals'; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIUserApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIUserInteractionDataResolved; } @@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} */ -export interface APIMessageApplicationCommandInteractionData - extends APIBaseApplicationCommandInteractionData { +export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData { target_id: Snowflake; resolved: APIMessageApplicationCommandInteractionDataResolved; } diff --git a/payloads/v9/_interactions/base.ts b/payloads/v9/_interactions/base.ts index 28ff3835..1716b97c 100644 --- a/payloads/v9/_interactions/base.ts +++ b/payloads/v9/_interactions/base.ts @@ -51,8 +51,7 @@ export interface APIBaseInteractionMetadata { /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure} */ -export interface APIApplicationCommandInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata { /** * The user the command was run on, present only on user commands interactions */ @@ -67,8 +66,7 @@ export interface APIApplicationCommandInteractionMetadata /** * @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure} */ -export interface APIMessageComponentInteractionMetadata - extends APIBaseInteractionMetadata { +export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata { /** * ID of the message that contained the interactive component */ @@ -257,10 +255,7 @@ export type APIInteractionDataResolvedChannel = * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIInteractionDataResolvedGuildMember - extends APIBaseGuildMember, - APIFlaggedGuildMember, - APIGuildMemberAvatar, - APIGuildMemberJoined { + extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined { permissions: Permissions; } diff --git a/payloads/v9/_interactions/messageComponents.ts b/payloads/v9/_interactions/messageComponents.ts index 2b00396e..ef9d0271 100644 --- a/payloads/v9/_interactions/messageComponents.ts +++ b/payloads/v9/_interactions/messageComponents.ts @@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData; -export interface APIMessageStringSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData { values: string[]; } -export interface APIMessageUserSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: APIUserInteractionDataResolved; } -export interface APIMessageRoleSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } -export interface APIMessageMentionableSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Pick; } -export interface APIMessageChannelSelectInteractionData - extends APIMessageComponentBaseInteractionData { +export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData { values: Snowflake[]; resolved: Required>; } diff --git a/payloads/v9/_interactions/modalSubmit.ts b/payloads/v9/_interactions/modalSubmit.ts index b23daec8..b2b1b90d 100644 --- a/payloads/v9/_interactions/modalSubmit.ts +++ b/payloads/v9/_interactions/modalSubmit.ts @@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom values: string[]; } -export interface APIModalSubmitMentionableSelectComponent - extends APIBaseModalSubmitComponent { +export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent { values: string[]; } diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index 5b68368f..f7919c13 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -138,10 +138,7 @@ export interface APIGuildChannel export type GuildTextChannelType = Exclude; export interface APIGuildTextChannel - extends APITextBasedChannel, - APISortableChannel, - APIGuildChannel, - APIPinChannel { + extends APITextBasedChannel, APISortableChannel, APIGuildChannel, APIPinChannel { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ @@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel - extends APIGuildChannel, - APISortableChannel, - APITextBasedChannel, - APISlowmodeChannel { + extends APIGuildChannel, APISortableChannel, APITextBasedChannel, APISlowmodeChannel { /** * The bitrate (in bits) of the voice or stage channel */ @@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread; export interface APIThreadChannel - extends APITextBasedChannel, - APIGuildChannel, - APIPinChannel { + extends APITextBasedChannel, APIGuildChannel, APIPinChannel { /** * The client users member for the thread, only included in select endpoints */ @@ -358,8 +350,7 @@ export enum ForumLayoutType { } export interface APIThreadOnlyChannel - extends APIGuildChannel, - APISortableChannel { + extends APIGuildChannel, APISortableChannel { /** * The channel topic (0-4096 characters) */ diff --git a/payloads/v9/guild.ts b/payloads/v9/guild.ts index 44fd4caf..92ac3918 100644 --- a/payloads/v9/guild.ts +++ b/payloads/v9/guild.ts @@ -757,7 +757,8 @@ export interface APIGuildMemberUser { * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ export interface APIGuildMember - extends APIBaseGuildMember, + extends + APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, diff --git a/payloads/v9/guildScheduledEvent.ts b/payloads/v9/guildScheduledEvent.ts index 2610238d..5df0eea6 100644 --- a/payloads/v9/guildScheduledEvent.ts +++ b/payloads/v9/guildScheduledEvent.ts @@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday { */ export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday; -export interface APIStageInstanceGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: Snowflake; entity_metadata: null; } @@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase< entity_metadata: null; } -export interface APIExternalGuildScheduledEvent - extends APIGuildScheduledEventBase { +export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase { channel_id: null; entity_metadata: Required; } diff --git a/payloads/v9/message.ts b/payloads/v9/message.ts index 957368ce..d507ea02 100644 --- a/payloads/v9/message.ts +++ b/payloads/v9/message.ts @@ -1041,8 +1041,9 @@ export enum ComponentType { * * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ -export interface APIActionRowComponent - extends APIBaseComponent { +export interface APIActionRowComponent< + T extends APIComponentInActionRow, +> extends APIBaseComponent { /** * The components in the ActionRow */ @@ -1092,10 +1093,9 @@ export interface APIMessageComponentEmoji { /** * @see {@link https://discord.com/developers/docs/components/reference#button} */ -export interface APIButtonComponentWithCustomId - extends APIButtonComponentBase< - ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success - > { +export interface APIButtonComponentWithCustomId extends APIButtonComponentBase< + ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success +> { /** * The custom_id to be sent in the interaction when clicked */ @@ -1307,8 +1307,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon * * @see {@link https://discord.com/developers/docs/components/reference#channel-select} */ -export interface APIChannelSelectComponent - extends APIBaseAutoPopulatedSelectMenuComponent { +export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent< + ComponentType.ChannelSelect, + SelectMenuDefaultValueType.Channel +> { /** * List of channel types to include in the ChannelSelect component */ diff --git a/rest/v10/guild.ts b/rest/v10/guild.ts index 6689d20d..a87eabe7 100644 --- a/rest/v10/guild.ts +++ b/rest/v10/guild.ts @@ -1004,7 +1004,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined }; export interface RESTAPIGuildOnboardingPrompt - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { @@ -1020,7 +1021,8 @@ export interface RESTAPIGuildOnboardingPrompt export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt; export interface RESTAPIGuildOnboardingPromptOption - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { diff --git a/rest/v10/guildScheduledEvent.ts b/rest/v10/guildScheduledEvent.ts index dfb103c6..b5a7a7cc 100644 --- a/rest/v10/guildScheduledEvent.ts +++ b/rest/v10/guildScheduledEvent.ts @@ -95,9 +95,8 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent; * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export interface RESTPatchAPIGuildScheduledEventJSONBody - extends _Nullable< - Pick - >, + extends + _Nullable>, _StrictPartial< Omit > { diff --git a/rest/v10/interactions.ts b/rest/v10/interactions.ts index 11dd62f9..a421ff0b 100644 --- a/rest/v10/interactions.ts +++ b/rest/v10/interactions.ts @@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[]; export type RESTGetAPIApplicationCommandResult = APIApplicationCommand; export interface RESTPostAPIBaseApplicationCommandsJSONBody - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Omit< APIApplicationCommand, | 'application_id' @@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ -export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody - extends RESTPostAPIBaseApplicationCommandsJSONBody { +export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.PrimaryEntryPoint; } diff --git a/rest/v9/guild.ts b/rest/v9/guild.ts index fa34ed90..b931910c 100644 --- a/rest/v9/guild.ts +++ b/rest/v9/guild.ts @@ -1005,7 +1005,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined }; export interface RESTAPIGuildOnboardingPrompt - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { @@ -1021,7 +1022,8 @@ export interface RESTAPIGuildOnboardingPrompt export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt; export interface RESTAPIGuildOnboardingPromptOption - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Partial> >, Pick { diff --git a/rest/v9/guildScheduledEvent.ts b/rest/v9/guildScheduledEvent.ts index 5dd88eac..42ab6041 100644 --- a/rest/v9/guildScheduledEvent.ts +++ b/rest/v9/guildScheduledEvent.ts @@ -95,9 +95,8 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent; * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} */ export interface RESTPatchAPIGuildScheduledEventJSONBody - extends _Nullable< - Pick - >, + extends + _Nullable>, _StrictPartial< Omit > { diff --git a/rest/v9/interactions.ts b/rest/v9/interactions.ts index 4c3b03e1..53e4b584 100644 --- a/rest/v9/interactions.ts +++ b/rest/v9/interactions.ts @@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[]; export type RESTGetAPIApplicationCommandResult = APIApplicationCommand; export interface RESTPostAPIBaseApplicationCommandsJSONBody - extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< + extends + _AddUndefinedToPossiblyUndefinedPropertiesOfInterface< Omit< APIApplicationCommand, | 'application_id' @@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} */ -export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody - extends RESTPostAPIBaseApplicationCommandsJSONBody { +export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody { type: ApplicationCommandType.PrimaryEntryPoint; } diff --git a/rpc/v10.ts b/rpc/v10.ts index f23e9e40..bc91a910 100644 --- a/rpc/v10.ts +++ b/rpc/v10.ts @@ -1923,8 +1923,7 @@ export interface RPCCommandActivityInviteUserPayload extends RPCCommandMessage { +export interface RPCCommandBraintreePopupBridgeCallbackPayload extends RPCCommandMessage { args: RPCBraintreePopupBridgeCallbackArgs; } @@ -1932,8 +1931,7 @@ export interface RPCCommandBrowserPayload extends RPCCommandMessage { +export interface RPCCommandCloseActivityJoinRequestPayload extends RPCCommandMessage { args: RPCCloseActivityJoinRequestArgs; } @@ -1973,8 +1971,7 @@ export interface RPCCommandGetRelationshipsPayload extends RPCCommandMessage { +export interface RPCCommandGetSelectedVoiceChannelPayload extends RPCCommandMessage { args: RPCGetSelectedVoiceChannelArgs; } @@ -2002,13 +1999,11 @@ export interface RPCCommandNetworkingPeerMetricsPayload extends RPCCommandMessag args: RPCNetworkingPeerMetricsArgs; } -export interface RPCCommandNetworkingSystemMetricsPayload - extends RPCCommandMessage { +export interface RPCCommandNetworkingSystemMetricsPayload extends RPCCommandMessage { args: RPCNetworkingSystemMetricsArgs; } -export interface RPCCommandOpenOverlayActivityInvitePayload - extends RPCCommandMessage { +export interface RPCCommandOpenOverlayActivityInvitePayload extends RPCCommandMessage { args: RPCOpenOverlayActivityInviteArgs; } @@ -2016,8 +2011,7 @@ export interface RPCCommandOpenOverlayGuildInvitePayload extends RPCCommandMessa args: RPCOpenOverlayGuildInviteArgs; } -export interface RPCCommandOpenOverlayVoiceSettingsPayload - extends RPCCommandMessage { +export interface RPCCommandOpenOverlayVoiceSettingsPayload extends RPCCommandMessage { args: RPCOpenOverlayVoiceSettingsArgs; } @@ -2261,8 +2255,7 @@ export interface RPCActivityInviteUserResult extends RPCCommandMessage { +export interface RPCBraintreePopupBridgeCallbackResult extends RPCCommandMessage { data: RPCBraintreePopupBridgeCallbackResultData; } diff --git a/yarn.lock b/yarn.lock index 068b72fb..4203dcf7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4423,7 +4423,7 @@ __metadata: lint-staged: "npm:^16.1.0" lodash.merge: "npm:^4.6.2" npm-run-all2: "npm:^8.0.4" - prettier: "npm:^3.5.3" + prettier: "npm:^3.7.4" pretty-quick: "npm:^4.1.1" rimraf: "npm:^6.0.1" ts-morph: "npm:^27.0.0" @@ -8579,7 +8579,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.0.0, prettier@npm:^3.5.3": +"prettier@npm:^3.0.0": version: 3.6.2 resolution: "prettier@npm:3.6.2" bin: @@ -8588,6 +8588,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3.7.4": + version: 3.7.4 + resolution: "prettier@npm:3.7.4" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/9675d2cd08eacb1faf1d1a2dbfe24bfab6a912b059fc9defdb380a408893d88213e794a40a2700bd29b140eb3172e0b07c852853f6e22f16f3374659a1a13389 + languageName: node + linkType: hard + "pretty-quick@npm:^4.1.1": version: 4.2.2 resolution: "pretty-quick@npm:4.2.2"