@discordjs/structures 0.2.0-dev.1769558523-b0e413c11 → 0.2.0-dev.1769601701-c71228aab

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as discord_api_types_v10 from 'discord-api-types/v10';
2
- import { APIAutoModerationAction, APIAutoModerationActionMetadata, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AttachmentFlags, ChannelFlags, MessageFlags, PermissionFlagsBits, GuildChannelType, ChannelType, ThreadChannelType, GuildTextChannelType, TextChannelType, APIChannel, APIPartialChannel, APIGuildForumTag, APIOverwrite, APIThreadMetadata, APINewsChannel, APIAnnouncementThreadChannel, APIGuildCategoryChannel, APIDMChannel, APIGuildForumChannel, APIGroupDMChannel, APIGuildMediaChannel, APIPrivateThreadChannel, APIPublicThreadChannel, APIGuildStageVoiceChannel, APITextChannel, APIGuildVoiceChannel, APIEmoji, APIEntitlement, APIInteractionDataResolved, APIInvite, APIExtendedInvite, APIMessageComponent, APIModalComponent, ComponentType, APIBaseComponent, APIComponentInActionRow, APIActionRowComponent, ButtonStyle, APIButtonComponentWithCustomId, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIContainerComponent, APIFileComponent, APIFileUploadComponent, APIButtonComponentWithURL, APIMediaGalleryComponent, APIMentionableSelectComponent, APIButtonComponentWithSKUId, APIRoleSelectComponent, APISectionComponent, APISeparatorComponent, APIStringSelectComponent, APITextDisplayComponent, APITextInputComponent, APIThumbnailComponent, APIUserSelectComponent, APIMessageComponentEmoji, APIMediaGalleryItem, SelectMenuDefaultValueType, APISelectMenuDefaultValue, APISelectMenuOption, APIUnfurledMediaItem, APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIEmbedProvider, APIEmbedThumbnail, APIEmbedVideo, InteractionType, APIMessageInteractionMetadata, APIApplicationCommandInteractionMetadata, APIAttachment, APIChannelMention, APIMessage, APIMessageActivity, APIMessageCall, APIMessageComponentInteractionMetadata, APIMessageReference, MessageReferenceType, APIModalSubmitInteractionMetadata, APIReaction, APIReactionCountDetails, APIMessageRoleSubscriptionData, APIPoll, APIPollAnswer, APIPollAnswerCount, APIPollMedia, APIPollResults, APISoundboardSound, APIStageInstance, APISticker, APIStickerPack, APITeam, APITeamMember, APIAvatarDecorationData, APIUser, APIConnection, APIVoiceState, APIVoiceRegion, APISubscription } from 'discord-api-types/v10';
2
+ import { APIAutoModerationAction, APIAutoModerationActionMetadata, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AttachmentFlags, ChannelFlags, MessageFlags, PermissionFlagsBits, SKUFlags, GuildChannelType, ChannelType, ThreadChannelType, GuildTextChannelType, TextChannelType, APIChannel, APIPartialChannel, APIGuildForumTag, APIOverwrite, APIThreadMetadata, APINewsChannel, APIAnnouncementThreadChannel, APIGuildCategoryChannel, APIDMChannel, APIGuildForumChannel, APIGroupDMChannel, APIGuildMediaChannel, APIPrivateThreadChannel, APIPublicThreadChannel, APIGuildStageVoiceChannel, APITextChannel, APIGuildVoiceChannel, APIEmoji, APIEntitlement, APIInteractionDataResolved, APIInvite, APIExtendedInvite, APIMessageComponent, APIModalComponent, ComponentType, APIBaseComponent, APIComponentInActionRow, APIActionRowComponent, ButtonStyle, APIButtonComponentWithCustomId, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIContainerComponent, APIFileComponent, APIFileUploadComponent, APIButtonComponentWithURL, APIMediaGalleryComponent, APIMentionableSelectComponent, APIButtonComponentWithSKUId, APIRoleSelectComponent, APISectionComponent, APISeparatorComponent, APIStringSelectComponent, APITextDisplayComponent, APITextInputComponent, APIThumbnailComponent, APIUserSelectComponent, APIMessageComponentEmoji, APIMediaGalleryItem, SelectMenuDefaultValueType, APISelectMenuDefaultValue, APISelectMenuOption, APIUnfurledMediaItem, APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIEmbedProvider, APIEmbedThumbnail, APIEmbedVideo, InteractionType, APIMessageInteractionMetadata, APIApplicationCommandInteractionMetadata, APIAttachment, APIChannelMention, APIMessage, APIMessageActivity, APIMessageCall, APIMessageComponentInteractionMetadata, APIMessageReference, MessageReferenceType, APIModalSubmitInteractionMetadata, APIReaction, APIReactionCountDetails, APIMessageRoleSubscriptionData, APIPoll, APIPollAnswer, APIPollAnswerCount, APIPollMedia, APIPollResults, APISKU, APISoundboardSound, APIStageInstance, APISticker, APIStickerPack, APITeam, APITeamMember, APIAvatarDecorationData, APIUser, APIConnection, APIVoiceState, APIVoiceRegion, APISubscription } from 'discord-api-types/v10';
3
3
 
4
4
  declare const kData: unique symbol;
5
5
  declare const kClone: unique symbol;
@@ -164,7 +164,9 @@ declare class AutoModerationAction<Omitted extends keyof APIAutoModerationAction
164
164
  */
165
165
  constructor(data: Partialize<APIAutoModerationAction, Omitted>);
166
166
  /**
167
- * The {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types | action type}
167
+ * The action type
168
+ *
169
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
168
170
  */
169
171
  get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIAutoModerationAction[T] : never : never;
170
172
  }
@@ -240,11 +242,15 @@ declare class AutoModerationRule<Omitted extends keyof APIAutoModerationRule | '
240
242
  */
241
243
  get creatorId(): "creator_id" extends infer T ? T extends "creator_id" ? T extends Omitted ? unknown : APIAutoModerationRule[T] : never : never;
242
244
  /**
243
- * The rule {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types | event type}
245
+ * The rule event type
246
+ *
247
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
244
248
  */
245
249
  get eventType(): "event_type" extends infer T ? T extends "event_type" ? T extends Omitted ? unknown : APIAutoModerationRule[T] : never : never;
246
250
  /**
247
- * The rule {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types | trigger type}
251
+ * The rule trigger type
252
+ *
253
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
248
254
  */
249
255
  get triggerType(): "trigger_type" extends infer T ? T extends "trigger_type" ? T extends Omitted ? unknown : APIAutoModerationRule[T] : never : never;
250
256
  /**
@@ -434,7 +440,7 @@ declare abstract class BitField<Flags extends string> {
434
440
  /**
435
441
  * Data structure that makes it easy to interact with a {@link Attachment#flags} bitfield.
436
442
  */
437
- declare class AttachmentFlagsBitField extends BitField<keyof AttachmentFlags> {
443
+ declare class AttachmentFlagsBitField extends BitField<keyof typeof AttachmentFlags> {
438
444
  /**
439
445
  * Numeric attachment flags.
440
446
  */
@@ -445,7 +451,7 @@ declare class AttachmentFlagsBitField extends BitField<keyof AttachmentFlags> {
445
451
  /**
446
452
  * Data structure that makes it easy to interact with a {@link (Channel:class).flags} bitfield.
447
453
  */
448
- declare class ChannelFlagsBitField extends BitField<keyof ChannelFlags> {
454
+ declare class ChannelFlagsBitField extends BitField<keyof typeof ChannelFlags> {
449
455
  /**
450
456
  * Numeric guild channel flags.
451
457
  */
@@ -456,7 +462,7 @@ declare class ChannelFlagsBitField extends BitField<keyof ChannelFlags> {
456
462
  /**
457
463
  * Data structure that makes it easy to interact with a {@link Message#flags} bitfield.
458
464
  */
459
- declare class MessageFlagsBitField extends BitField<keyof MessageFlags> {
465
+ declare class MessageFlagsBitField extends BitField<keyof typeof MessageFlags> {
460
466
  /**
461
467
  * Numeric message flags.
462
468
  */
@@ -573,6 +579,17 @@ declare class PermissionsBitField extends BitField<keyof typeof PermissionFlagsB
573
579
  toArray(): ("CreateInstantInvite" | "KickMembers" | "BanMembers" | "Administrator" | "ManageChannels" | "ManageGuild" | "AddReactions" | "ViewAuditLog" | "PrioritySpeaker" | "Stream" | "ViewChannel" | "SendMessages" | "SendTTSMessages" | "ManageMessages" | "EmbedLinks" | "AttachFiles" | "ReadMessageHistory" | "MentionEveryone" | "UseExternalEmojis" | "ViewGuildInsights" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "UseVAD" | "ChangeNickname" | "ManageNicknames" | "ManageRoles" | "ManageWebhooks" | "ManageEmojisAndStickers" | "ManageGuildExpressions" | "UseApplicationCommands" | "RequestToSpeak" | "ManageEvents" | "ManageThreads" | "CreatePublicThreads" | "CreatePrivateThreads" | "UseExternalStickers" | "SendMessagesInThreads" | "UseEmbeddedActivities" | "ModerateMembers" | "ViewCreatorMonetizationAnalytics" | "UseSoundboard" | "CreateGuildExpressions" | "CreateEvents" | "UseExternalSounds" | "SendVoiceMessages" | "SendPolls" | "UseExternalApps" | "PinMessages" | "BypassSlowmode")[];
574
580
  }
575
581
 
582
+ /**
583
+ * Data structure that makes it easy to interact with an {@link SKUFlags} bitfield.
584
+ */
585
+ declare class SKUFlagsBitField extends BitField<keyof typeof SKUFlags> {
586
+ /**
587
+ * Numeric SKU flags.
588
+ */
589
+ static readonly Flags: typeof SKUFlags;
590
+ toJSON(): string | number;
591
+ }
592
+
576
593
  interface ChannelPermissionMixin<Type extends Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType> = Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType>> extends Channel<Type> {
577
594
  }
578
595
  /**
@@ -3034,6 +3051,48 @@ declare class PollResults<Omitted extends keyof APIPollResults | '' = ''> extend
3034
3051
  get isFinalized(): "is_finalized" extends infer T ? T extends "is_finalized" ? T extends Omitted ? unknown : APIPollResults[T] : never : never;
3035
3052
  }
3036
3053
 
3054
+ /**
3055
+ * Represents any SKU (stock-keeping units) on Discord.
3056
+ *
3057
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3058
+ */
3059
+ declare class SKU<Omitted extends keyof APISKU | '' = ''> extends Structure<APISKU, Omitted> {
3060
+ /**
3061
+ * The template used for removing data from the raw data stored for each SKU
3062
+ */
3063
+ static readonly DataTemplate: Partial<APISKU>;
3064
+ /**
3065
+ * @param data - The raw data received from the API for the SKU
3066
+ */
3067
+ constructor(data: Partialize<APISKU, Omitted>);
3068
+ /**
3069
+ * Id of the SKU
3070
+ */
3071
+ get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3072
+ /**
3073
+ * Type of SKU
3074
+ *
3075
+ * @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types}
3076
+ */
3077
+ get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3078
+ /**
3079
+ * Id of the parent application
3080
+ */
3081
+ get applicationId(): "application_id" extends infer T ? T extends "application_id" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3082
+ /**
3083
+ * Customer-facing name of your premium offering
3084
+ */
3085
+ get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3086
+ /**
3087
+ * System-generated URL slug based on the SKU's name
3088
+ */
3089
+ get slug(): "slug" extends infer T ? T extends "slug" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3090
+ /**
3091
+ * SKU flags combined as a bitfield
3092
+ */
3093
+ get flags(): SKUFlagsBitField | null;
3094
+ }
3095
+
3037
3096
  /**
3038
3097
  * Represents any soundboard sound on Discord.
3039
3098
  *
@@ -3696,4 +3755,4 @@ declare function extendTemplate<SuperTemplate extends Record<string, unknown>>(s
3696
3755
  */
3697
3756
  declare function dateToDiscordISOTimestamp(date: Date): string;
3698
3757
 
3699
- export { type APIActualInvite, ActionRowComponent, AnnouncementChannel, AnnouncementThreadChannel, ApplicationCommandInteractionMetadata, AppliedTagsMixin, Attachment, AttachmentFlagsBitField, AutoModerationAction, AutoModerationActionMetadata, AutoModerationRule, AutoModerationRuleTriggerMetadata, AvatarDecorationData, BitField, type BitFieldResolvable, ButtonComponent, type ButtonDataType, CategoryChannel, Channel, type ChannelDataType, ChannelFlagsBitField, ChannelMention, ChannelOwnerMixin, ChannelParentMixin, ChannelPermissionMixin, ChannelPinMixin, ChannelSelectMenuComponent, ChannelSlowmodeMixin, ChannelTopicMixin, ChannelWebhookMixin, type CollapseUnion, Component, type ComponentDataType, ComponentEmoji, Connection, ContainerComponent, DMChannel, DMChannelMixin, DataTemplatePropertyName, Embed, EmbedAuthor, EmbedField, EmbedFooter, EmbedImage, EmbedProvider, EmbedThumbnail, EmbedVideo, Emoji, Entitlement, type EnumLike, FileComponent, FileUploadComponent, ForumChannel, ForumTag, GroupDMChannel, GroupDMMixin, GuildChannelMixin, type If, InteractionMetadata, type InteractionMetadataType, InteractiveButtonComponent, Invite, LabeledButtonComponent, LinkButtonComponent, MediaChannel, MediaGalleryComponent, MediaGalleryItem, MentionableSelectMenuComponent, type MergePrototype, type MergePrototypes, Message, MessageActivity, MessageCall, MessageComponentInteractionMetadata, MessageFlagsBitField, MessageReference, Mixin, type MixinBase, type MixinTypes, type Mixinable, ModalSubmitInteractionMetadata, type NonAbstract, OptimizeDataPropertyName, type OptionalPropertyNames, type PartialChannel, type Partialize, PermissionOverwrite, PermissionsBitField, Poll, PollAnswer, PollAnswerCount, PollMedia, PollResults, PremiumButtonComponent, PrivateThreadChannel, PublicThreadChannel, Reaction, ReactionCountDetails, type RecursiveReadonlyArray, type ReplaceOmittedWithUnknown, ResolvedInteractionData, RoleSelectMenuComponent, RoleSubscriptionData, SectionComponent, SelectMenuComponent, SelectMenuDefaultValue, SeparatorComponent, SoundboardSound, StageChannel, StageInstance, Sticker, StickerPack, StringSelectMenuComponent, StringSelectMenuOption, Structure, Subscription, Team, TeamMember, TextChannel, TextChannelMixin, TextDisplayComponent, TextInputComponent, ThreadChannelMixin, ThreadMetadata, ThreadOnlyChannelMixin, ThumbnailComponent, UnfurledMediaItem, User, UserSelectMenuComponent, VoiceChannel, VoiceChannelMixin, VoiceRegion, VoiceState, dateToDiscordISOTimestamp, extendTemplate };
3758
+ export { type APIActualInvite, ActionRowComponent, AnnouncementChannel, AnnouncementThreadChannel, ApplicationCommandInteractionMetadata, AppliedTagsMixin, Attachment, AttachmentFlagsBitField, AutoModerationAction, AutoModerationActionMetadata, AutoModerationRule, AutoModerationRuleTriggerMetadata, AvatarDecorationData, BitField, type BitFieldResolvable, ButtonComponent, type ButtonDataType, CategoryChannel, Channel, type ChannelDataType, ChannelFlagsBitField, ChannelMention, ChannelOwnerMixin, ChannelParentMixin, ChannelPermissionMixin, ChannelPinMixin, ChannelSelectMenuComponent, ChannelSlowmodeMixin, ChannelTopicMixin, ChannelWebhookMixin, type CollapseUnion, Component, type ComponentDataType, ComponentEmoji, Connection, ContainerComponent, DMChannel, DMChannelMixin, DataTemplatePropertyName, Embed, EmbedAuthor, EmbedField, EmbedFooter, EmbedImage, EmbedProvider, EmbedThumbnail, EmbedVideo, Emoji, Entitlement, type EnumLike, FileComponent, FileUploadComponent, ForumChannel, ForumTag, GroupDMChannel, GroupDMMixin, GuildChannelMixin, type If, InteractionMetadata, type InteractionMetadataType, InteractiveButtonComponent, Invite, LabeledButtonComponent, LinkButtonComponent, MediaChannel, MediaGalleryComponent, MediaGalleryItem, MentionableSelectMenuComponent, type MergePrototype, type MergePrototypes, Message, MessageActivity, MessageCall, MessageComponentInteractionMetadata, MessageFlagsBitField, MessageReference, Mixin, type MixinBase, type MixinTypes, type Mixinable, ModalSubmitInteractionMetadata, type NonAbstract, OptimizeDataPropertyName, type OptionalPropertyNames, type PartialChannel, type Partialize, PermissionOverwrite, PermissionsBitField, Poll, PollAnswer, PollAnswerCount, PollMedia, PollResults, PremiumButtonComponent, PrivateThreadChannel, PublicThreadChannel, Reaction, ReactionCountDetails, type RecursiveReadonlyArray, type ReplaceOmittedWithUnknown, ResolvedInteractionData, RoleSelectMenuComponent, RoleSubscriptionData, SKU, SKUFlagsBitField, SectionComponent, SelectMenuComponent, SelectMenuDefaultValue, SeparatorComponent, SoundboardSound, StageChannel, StageInstance, Sticker, StickerPack, StringSelectMenuComponent, StringSelectMenuOption, Structure, Subscription, Team, TeamMember, TextChannel, TextChannelMixin, TextDisplayComponent, TextInputComponent, ThreadChannelMixin, ThreadMetadata, ThreadOnlyChannelMixin, ThumbnailComponent, UnfurledMediaItem, User, UserSelectMenuComponent, VoiceChannel, VoiceChannelMixin, VoiceRegion, VoiceState, dateToDiscordISOTimestamp, extendTemplate };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as discord_api_types_v10 from 'discord-api-types/v10';
2
- import { APIAutoModerationAction, APIAutoModerationActionMetadata, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AttachmentFlags, ChannelFlags, MessageFlags, PermissionFlagsBits, GuildChannelType, ChannelType, ThreadChannelType, GuildTextChannelType, TextChannelType, APIChannel, APIPartialChannel, APIGuildForumTag, APIOverwrite, APIThreadMetadata, APINewsChannel, APIAnnouncementThreadChannel, APIGuildCategoryChannel, APIDMChannel, APIGuildForumChannel, APIGroupDMChannel, APIGuildMediaChannel, APIPrivateThreadChannel, APIPublicThreadChannel, APIGuildStageVoiceChannel, APITextChannel, APIGuildVoiceChannel, APIEmoji, APIEntitlement, APIInteractionDataResolved, APIInvite, APIExtendedInvite, APIMessageComponent, APIModalComponent, ComponentType, APIBaseComponent, APIComponentInActionRow, APIActionRowComponent, ButtonStyle, APIButtonComponentWithCustomId, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIContainerComponent, APIFileComponent, APIFileUploadComponent, APIButtonComponentWithURL, APIMediaGalleryComponent, APIMentionableSelectComponent, APIButtonComponentWithSKUId, APIRoleSelectComponent, APISectionComponent, APISeparatorComponent, APIStringSelectComponent, APITextDisplayComponent, APITextInputComponent, APIThumbnailComponent, APIUserSelectComponent, APIMessageComponentEmoji, APIMediaGalleryItem, SelectMenuDefaultValueType, APISelectMenuDefaultValue, APISelectMenuOption, APIUnfurledMediaItem, APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIEmbedProvider, APIEmbedThumbnail, APIEmbedVideo, InteractionType, APIMessageInteractionMetadata, APIApplicationCommandInteractionMetadata, APIAttachment, APIChannelMention, APIMessage, APIMessageActivity, APIMessageCall, APIMessageComponentInteractionMetadata, APIMessageReference, MessageReferenceType, APIModalSubmitInteractionMetadata, APIReaction, APIReactionCountDetails, APIMessageRoleSubscriptionData, APIPoll, APIPollAnswer, APIPollAnswerCount, APIPollMedia, APIPollResults, APISoundboardSound, APIStageInstance, APISticker, APIStickerPack, APITeam, APITeamMember, APIAvatarDecorationData, APIUser, APIConnection, APIVoiceState, APIVoiceRegion, APISubscription } from 'discord-api-types/v10';
2
+ import { APIAutoModerationAction, APIAutoModerationActionMetadata, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AttachmentFlags, ChannelFlags, MessageFlags, PermissionFlagsBits, SKUFlags, GuildChannelType, ChannelType, ThreadChannelType, GuildTextChannelType, TextChannelType, APIChannel, APIPartialChannel, APIGuildForumTag, APIOverwrite, APIThreadMetadata, APINewsChannel, APIAnnouncementThreadChannel, APIGuildCategoryChannel, APIDMChannel, APIGuildForumChannel, APIGroupDMChannel, APIGuildMediaChannel, APIPrivateThreadChannel, APIPublicThreadChannel, APIGuildStageVoiceChannel, APITextChannel, APIGuildVoiceChannel, APIEmoji, APIEntitlement, APIInteractionDataResolved, APIInvite, APIExtendedInvite, APIMessageComponent, APIModalComponent, ComponentType, APIBaseComponent, APIComponentInActionRow, APIActionRowComponent, ButtonStyle, APIButtonComponentWithCustomId, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIContainerComponent, APIFileComponent, APIFileUploadComponent, APIButtonComponentWithURL, APIMediaGalleryComponent, APIMentionableSelectComponent, APIButtonComponentWithSKUId, APIRoleSelectComponent, APISectionComponent, APISeparatorComponent, APIStringSelectComponent, APITextDisplayComponent, APITextInputComponent, APIThumbnailComponent, APIUserSelectComponent, APIMessageComponentEmoji, APIMediaGalleryItem, SelectMenuDefaultValueType, APISelectMenuDefaultValue, APISelectMenuOption, APIUnfurledMediaItem, APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIEmbedProvider, APIEmbedThumbnail, APIEmbedVideo, InteractionType, APIMessageInteractionMetadata, APIApplicationCommandInteractionMetadata, APIAttachment, APIChannelMention, APIMessage, APIMessageActivity, APIMessageCall, APIMessageComponentInteractionMetadata, APIMessageReference, MessageReferenceType, APIModalSubmitInteractionMetadata, APIReaction, APIReactionCountDetails, APIMessageRoleSubscriptionData, APIPoll, APIPollAnswer, APIPollAnswerCount, APIPollMedia, APIPollResults, APISKU, APISoundboardSound, APIStageInstance, APISticker, APIStickerPack, APITeam, APITeamMember, APIAvatarDecorationData, APIUser, APIConnection, APIVoiceState, APIVoiceRegion, APISubscription } from 'discord-api-types/v10';
3
3
 
4
4
  declare const kData: unique symbol;
5
5
  declare const kClone: unique symbol;
@@ -164,7 +164,9 @@ declare class AutoModerationAction<Omitted extends keyof APIAutoModerationAction
164
164
  */
165
165
  constructor(data: Partialize<APIAutoModerationAction, Omitted>);
166
166
  /**
167
- * The {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types | action type}
167
+ * The action type
168
+ *
169
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
168
170
  */
169
171
  get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIAutoModerationAction[T] : never : never;
170
172
  }
@@ -240,11 +242,15 @@ declare class AutoModerationRule<Omitted extends keyof APIAutoModerationRule | '
240
242
  */
241
243
  get creatorId(): "creator_id" extends infer T ? T extends "creator_id" ? T extends Omitted ? unknown : APIAutoModerationRule[T] : never : never;
242
244
  /**
243
- * The rule {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types | event type}
245
+ * The rule event type
246
+ *
247
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
244
248
  */
245
249
  get eventType(): "event_type" extends infer T ? T extends "event_type" ? T extends Omitted ? unknown : APIAutoModerationRule[T] : never : never;
246
250
  /**
247
- * The rule {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types | trigger type}
251
+ * The rule trigger type
252
+ *
253
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
248
254
  */
249
255
  get triggerType(): "trigger_type" extends infer T ? T extends "trigger_type" ? T extends Omitted ? unknown : APIAutoModerationRule[T] : never : never;
250
256
  /**
@@ -434,7 +440,7 @@ declare abstract class BitField<Flags extends string> {
434
440
  /**
435
441
  * Data structure that makes it easy to interact with a {@link Attachment#flags} bitfield.
436
442
  */
437
- declare class AttachmentFlagsBitField extends BitField<keyof AttachmentFlags> {
443
+ declare class AttachmentFlagsBitField extends BitField<keyof typeof AttachmentFlags> {
438
444
  /**
439
445
  * Numeric attachment flags.
440
446
  */
@@ -445,7 +451,7 @@ declare class AttachmentFlagsBitField extends BitField<keyof AttachmentFlags> {
445
451
  /**
446
452
  * Data structure that makes it easy to interact with a {@link (Channel:class).flags} bitfield.
447
453
  */
448
- declare class ChannelFlagsBitField extends BitField<keyof ChannelFlags> {
454
+ declare class ChannelFlagsBitField extends BitField<keyof typeof ChannelFlags> {
449
455
  /**
450
456
  * Numeric guild channel flags.
451
457
  */
@@ -456,7 +462,7 @@ declare class ChannelFlagsBitField extends BitField<keyof ChannelFlags> {
456
462
  /**
457
463
  * Data structure that makes it easy to interact with a {@link Message#flags} bitfield.
458
464
  */
459
- declare class MessageFlagsBitField extends BitField<keyof MessageFlags> {
465
+ declare class MessageFlagsBitField extends BitField<keyof typeof MessageFlags> {
460
466
  /**
461
467
  * Numeric message flags.
462
468
  */
@@ -573,6 +579,17 @@ declare class PermissionsBitField extends BitField<keyof typeof PermissionFlagsB
573
579
  toArray(): ("CreateInstantInvite" | "KickMembers" | "BanMembers" | "Administrator" | "ManageChannels" | "ManageGuild" | "AddReactions" | "ViewAuditLog" | "PrioritySpeaker" | "Stream" | "ViewChannel" | "SendMessages" | "SendTTSMessages" | "ManageMessages" | "EmbedLinks" | "AttachFiles" | "ReadMessageHistory" | "MentionEveryone" | "UseExternalEmojis" | "ViewGuildInsights" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "UseVAD" | "ChangeNickname" | "ManageNicknames" | "ManageRoles" | "ManageWebhooks" | "ManageEmojisAndStickers" | "ManageGuildExpressions" | "UseApplicationCommands" | "RequestToSpeak" | "ManageEvents" | "ManageThreads" | "CreatePublicThreads" | "CreatePrivateThreads" | "UseExternalStickers" | "SendMessagesInThreads" | "UseEmbeddedActivities" | "ModerateMembers" | "ViewCreatorMonetizationAnalytics" | "UseSoundboard" | "CreateGuildExpressions" | "CreateEvents" | "UseExternalSounds" | "SendVoiceMessages" | "SendPolls" | "UseExternalApps" | "PinMessages" | "BypassSlowmode")[];
574
580
  }
575
581
 
582
+ /**
583
+ * Data structure that makes it easy to interact with an {@link SKUFlags} bitfield.
584
+ */
585
+ declare class SKUFlagsBitField extends BitField<keyof typeof SKUFlags> {
586
+ /**
587
+ * Numeric SKU flags.
588
+ */
589
+ static readonly Flags: typeof SKUFlags;
590
+ toJSON(): string | number;
591
+ }
592
+
576
593
  interface ChannelPermissionMixin<Type extends Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType> = Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType>> extends Channel<Type> {
577
594
  }
578
595
  /**
@@ -3034,6 +3051,48 @@ declare class PollResults<Omitted extends keyof APIPollResults | '' = ''> extend
3034
3051
  get isFinalized(): "is_finalized" extends infer T ? T extends "is_finalized" ? T extends Omitted ? unknown : APIPollResults[T] : never : never;
3035
3052
  }
3036
3053
 
3054
+ /**
3055
+ * Represents any SKU (stock-keeping units) on Discord.
3056
+ *
3057
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3058
+ */
3059
+ declare class SKU<Omitted extends keyof APISKU | '' = ''> extends Structure<APISKU, Omitted> {
3060
+ /**
3061
+ * The template used for removing data from the raw data stored for each SKU
3062
+ */
3063
+ static readonly DataTemplate: Partial<APISKU>;
3064
+ /**
3065
+ * @param data - The raw data received from the API for the SKU
3066
+ */
3067
+ constructor(data: Partialize<APISKU, Omitted>);
3068
+ /**
3069
+ * Id of the SKU
3070
+ */
3071
+ get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3072
+ /**
3073
+ * Type of SKU
3074
+ *
3075
+ * @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types}
3076
+ */
3077
+ get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3078
+ /**
3079
+ * Id of the parent application
3080
+ */
3081
+ get applicationId(): "application_id" extends infer T ? T extends "application_id" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3082
+ /**
3083
+ * Customer-facing name of your premium offering
3084
+ */
3085
+ get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3086
+ /**
3087
+ * System-generated URL slug based on the SKU's name
3088
+ */
3089
+ get slug(): "slug" extends infer T ? T extends "slug" ? T extends Omitted ? unknown : APISKU[T] : never : never;
3090
+ /**
3091
+ * SKU flags combined as a bitfield
3092
+ */
3093
+ get flags(): SKUFlagsBitField | null;
3094
+ }
3095
+
3037
3096
  /**
3038
3097
  * Represents any soundboard sound on Discord.
3039
3098
  *
@@ -3696,4 +3755,4 @@ declare function extendTemplate<SuperTemplate extends Record<string, unknown>>(s
3696
3755
  */
3697
3756
  declare function dateToDiscordISOTimestamp(date: Date): string;
3698
3757
 
3699
- export { type APIActualInvite, ActionRowComponent, AnnouncementChannel, AnnouncementThreadChannel, ApplicationCommandInteractionMetadata, AppliedTagsMixin, Attachment, AttachmentFlagsBitField, AutoModerationAction, AutoModerationActionMetadata, AutoModerationRule, AutoModerationRuleTriggerMetadata, AvatarDecorationData, BitField, type BitFieldResolvable, ButtonComponent, type ButtonDataType, CategoryChannel, Channel, type ChannelDataType, ChannelFlagsBitField, ChannelMention, ChannelOwnerMixin, ChannelParentMixin, ChannelPermissionMixin, ChannelPinMixin, ChannelSelectMenuComponent, ChannelSlowmodeMixin, ChannelTopicMixin, ChannelWebhookMixin, type CollapseUnion, Component, type ComponentDataType, ComponentEmoji, Connection, ContainerComponent, DMChannel, DMChannelMixin, DataTemplatePropertyName, Embed, EmbedAuthor, EmbedField, EmbedFooter, EmbedImage, EmbedProvider, EmbedThumbnail, EmbedVideo, Emoji, Entitlement, type EnumLike, FileComponent, FileUploadComponent, ForumChannel, ForumTag, GroupDMChannel, GroupDMMixin, GuildChannelMixin, type If, InteractionMetadata, type InteractionMetadataType, InteractiveButtonComponent, Invite, LabeledButtonComponent, LinkButtonComponent, MediaChannel, MediaGalleryComponent, MediaGalleryItem, MentionableSelectMenuComponent, type MergePrototype, type MergePrototypes, Message, MessageActivity, MessageCall, MessageComponentInteractionMetadata, MessageFlagsBitField, MessageReference, Mixin, type MixinBase, type MixinTypes, type Mixinable, ModalSubmitInteractionMetadata, type NonAbstract, OptimizeDataPropertyName, type OptionalPropertyNames, type PartialChannel, type Partialize, PermissionOverwrite, PermissionsBitField, Poll, PollAnswer, PollAnswerCount, PollMedia, PollResults, PremiumButtonComponent, PrivateThreadChannel, PublicThreadChannel, Reaction, ReactionCountDetails, type RecursiveReadonlyArray, type ReplaceOmittedWithUnknown, ResolvedInteractionData, RoleSelectMenuComponent, RoleSubscriptionData, SectionComponent, SelectMenuComponent, SelectMenuDefaultValue, SeparatorComponent, SoundboardSound, StageChannel, StageInstance, Sticker, StickerPack, StringSelectMenuComponent, StringSelectMenuOption, Structure, Subscription, Team, TeamMember, TextChannel, TextChannelMixin, TextDisplayComponent, TextInputComponent, ThreadChannelMixin, ThreadMetadata, ThreadOnlyChannelMixin, ThumbnailComponent, UnfurledMediaItem, User, UserSelectMenuComponent, VoiceChannel, VoiceChannelMixin, VoiceRegion, VoiceState, dateToDiscordISOTimestamp, extendTemplate };
3758
+ export { type APIActualInvite, ActionRowComponent, AnnouncementChannel, AnnouncementThreadChannel, ApplicationCommandInteractionMetadata, AppliedTagsMixin, Attachment, AttachmentFlagsBitField, AutoModerationAction, AutoModerationActionMetadata, AutoModerationRule, AutoModerationRuleTriggerMetadata, AvatarDecorationData, BitField, type BitFieldResolvable, ButtonComponent, type ButtonDataType, CategoryChannel, Channel, type ChannelDataType, ChannelFlagsBitField, ChannelMention, ChannelOwnerMixin, ChannelParentMixin, ChannelPermissionMixin, ChannelPinMixin, ChannelSelectMenuComponent, ChannelSlowmodeMixin, ChannelTopicMixin, ChannelWebhookMixin, type CollapseUnion, Component, type ComponentDataType, ComponentEmoji, Connection, ContainerComponent, DMChannel, DMChannelMixin, DataTemplatePropertyName, Embed, EmbedAuthor, EmbedField, EmbedFooter, EmbedImage, EmbedProvider, EmbedThumbnail, EmbedVideo, Emoji, Entitlement, type EnumLike, FileComponent, FileUploadComponent, ForumChannel, ForumTag, GroupDMChannel, GroupDMMixin, GuildChannelMixin, type If, InteractionMetadata, type InteractionMetadataType, InteractiveButtonComponent, Invite, LabeledButtonComponent, LinkButtonComponent, MediaChannel, MediaGalleryComponent, MediaGalleryItem, MentionableSelectMenuComponent, type MergePrototype, type MergePrototypes, Message, MessageActivity, MessageCall, MessageComponentInteractionMetadata, MessageFlagsBitField, MessageReference, Mixin, type MixinBase, type MixinTypes, type Mixinable, ModalSubmitInteractionMetadata, type NonAbstract, OptimizeDataPropertyName, type OptionalPropertyNames, type PartialChannel, type Partialize, PermissionOverwrite, PermissionsBitField, Poll, PollAnswer, PollAnswerCount, PollMedia, PollResults, PremiumButtonComponent, PrivateThreadChannel, PublicThreadChannel, Reaction, ReactionCountDetails, type RecursiveReadonlyArray, type ReplaceOmittedWithUnknown, ResolvedInteractionData, RoleSelectMenuComponent, RoleSubscriptionData, SKU, SKUFlagsBitField, SectionComponent, SelectMenuComponent, SelectMenuDefaultValue, SeparatorComponent, SoundboardSound, StageChannel, StageInstance, Sticker, StickerPack, StringSelectMenuComponent, StringSelectMenuOption, Structure, Subscription, Team, TeamMember, TextChannel, TextChannelMixin, TextDisplayComponent, TextInputComponent, ThreadChannelMixin, ThreadMetadata, ThreadOnlyChannelMixin, ThumbnailComponent, UnfurledMediaItem, User, UserSelectMenuComponent, VoiceChannel, VoiceChannelMixin, VoiceRegion, VoiceState, dateToDiscordISOTimestamp, extendTemplate };
package/dist/index.js CHANGED
@@ -104,6 +104,8 @@ __export(index_exports, {
104
104
  ResolvedInteractionData: () => ResolvedInteractionData,
105
105
  RoleSelectMenuComponent: () => RoleSelectMenuComponent,
106
106
  RoleSubscriptionData: () => RoleSubscriptionData,
107
+ SKU: () => SKU,
108
+ SKUFlagsBitField: () => SKUFlagsBitField,
107
109
  SectionComponent: () => SectionComponent,
108
110
  SelectMenuComponent: () => SelectMenuComponent,
109
111
  SelectMenuDefaultValue: () => SelectMenuDefaultValue,
@@ -275,7 +277,9 @@ var AutoModerationAction = class extends Structure {
275
277
  super(data);
276
278
  }
277
279
  /**
278
- * The {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types | action type}
280
+ * The action type
281
+ *
282
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
279
283
  */
280
284
  get type() {
281
285
  return this[kData].type;
@@ -367,13 +371,17 @@ var AutoModerationRule = class extends Structure {
367
371
  return this[kData].creator_id;
368
372
  }
369
373
  /**
370
- * The rule {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types | event type}
374
+ * The rule event type
375
+ *
376
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
371
377
  */
372
378
  get eventType() {
373
379
  return this[kData].event_type;
374
380
  }
375
381
  /**
376
- * The rule {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types | trigger type}
382
+ * The rule trigger type
383
+ *
384
+ * @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
377
385
  */
378
386
  get triggerType() {
379
387
  return this[kData].trigger_type;
@@ -744,6 +752,21 @@ var PermissionsBitField = class extends BitField {
744
752
  }
745
753
  };
746
754
 
755
+ // src/bitfields/SKUFlagsBitField.ts
756
+ var import_v105 = require("discord-api-types/v10");
757
+ var SKUFlagsBitField = class extends BitField {
758
+ static {
759
+ __name(this, "SKUFlagsBitField");
760
+ }
761
+ /**
762
+ * Numeric SKU flags.
763
+ */
764
+ static Flags = import_v105.SKUFlags;
765
+ toJSON() {
766
+ return super.toJSON(true);
767
+ }
768
+ };
769
+
747
770
  // src/channels/mixins/AppliedTagsMixin.ts
748
771
  var AppliedTagsMixin = class {
749
772
  static {
@@ -2014,7 +2037,7 @@ var ResolvedInteractionData = class extends Structure {
2014
2037
  };
2015
2038
 
2016
2039
  // src/invites/Invite.ts
2017
- var import_v105 = require("discord-api-types/v10");
2040
+ var import_v106 = require("discord-api-types/v10");
2018
2041
  var Invite = class extends Structure {
2019
2042
  static {
2020
2043
  __name(this, "Invite");
@@ -2159,7 +2182,7 @@ var Invite = class extends Structure {
2159
2182
  * The URL to the invite
2160
2183
  */
2161
2184
  get url() {
2162
- return this.code ? `${import_v105.RouteBases.invite}/${this.code}` : null;
2185
+ return this.code ? `${import_v106.RouteBases.invite}/${this.code}` : null;
2163
2186
  }
2164
2187
  /**
2165
2188
  * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.
@@ -3728,7 +3751,7 @@ var MessageComponentInteractionMetadata = class extends InteractionMetadata {
3728
3751
  };
3729
3752
 
3730
3753
  // src/messages/MessageReference.ts
3731
- var import_v106 = require("discord-api-types/v10");
3754
+ var import_v107 = require("discord-api-types/v10");
3732
3755
  var MessageReference = class extends Structure {
3733
3756
  static {
3734
3757
  __name(this, "MessageReference");
@@ -3747,7 +3770,7 @@ var MessageReference = class extends Structure {
3747
3770
  * The type of this reference
3748
3771
  */
3749
3772
  get type() {
3750
- return "type" in this[kData] ? this[kData].type : import_v106.MessageReferenceType.Default;
3773
+ return "type" in this[kData] ? this[kData].type : import_v107.MessageReferenceType.Default;
3751
3774
  }
3752
3775
  /**
3753
3776
  * The id of the referenced message
@@ -4094,6 +4117,61 @@ var PollResults = class extends Structure {
4094
4117
  }
4095
4118
  };
4096
4119
 
4120
+ // src/skus/SKU.ts
4121
+ var SKU = class extends Structure {
4122
+ static {
4123
+ __name(this, "SKU");
4124
+ }
4125
+ /**
4126
+ * The template used for removing data from the raw data stored for each SKU
4127
+ */
4128
+ static DataTemplate = {};
4129
+ /**
4130
+ * @param data - The raw data received from the API for the SKU
4131
+ */
4132
+ constructor(data) {
4133
+ super(data);
4134
+ }
4135
+ /**
4136
+ * Id of the SKU
4137
+ */
4138
+ get id() {
4139
+ return this[kData].id;
4140
+ }
4141
+ /**
4142
+ * Type of SKU
4143
+ *
4144
+ * @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types}
4145
+ */
4146
+ get type() {
4147
+ return this[kData].type;
4148
+ }
4149
+ /**
4150
+ * Id of the parent application
4151
+ */
4152
+ get applicationId() {
4153
+ return this[kData].application_id;
4154
+ }
4155
+ /**
4156
+ * Customer-facing name of your premium offering
4157
+ */
4158
+ get name() {
4159
+ return this[kData].name;
4160
+ }
4161
+ /**
4162
+ * System-generated URL slug based on the SKU's name
4163
+ */
4164
+ get slug() {
4165
+ return this[kData].slug;
4166
+ }
4167
+ /**
4168
+ * SKU flags combined as a bitfield
4169
+ */
4170
+ get flags() {
4171
+ return isFieldSet(this[kData], "flags", "number") ? new SKUFlagsBitField(this[kData].flags) : null;
4172
+ }
4173
+ };
4174
+
4097
4175
  // src/soundboards/SoundboardSound.ts
4098
4176
  var import_snowflake5 = require("@sapphire/snowflake");
4099
4177
  var SoundboardSound = class extends Structure {
@@ -5083,6 +5161,8 @@ var Subscription = class extends Structure {
5083
5161
  ResolvedInteractionData,
5084
5162
  RoleSelectMenuComponent,
5085
5163
  RoleSubscriptionData,
5164
+ SKU,
5165
+ SKUFlagsBitField,
5086
5166
  SectionComponent,
5087
5167
  SelectMenuComponent,
5088
5168
  SelectMenuDefaultValue,