@discordjs/structures 0.2.0-dev.1769385723-323d8e757 → 0.2.0-dev.1769558523-b0e413c11

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, APISticker, APIAvatarDecorationData, APIUser, APIConnection } 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';
3
3
 
4
4
  declare const kData: unique symbol;
5
5
  declare const kClone: unique symbol;
@@ -11,6 +11,9 @@ declare const kEditedTimestamp: unique symbol;
11
11
  declare const kArchiveTimestamp: unique symbol;
12
12
  declare const kStartsTimestamp: unique symbol;
13
13
  declare const kEndsTimestamp: unique symbol;
14
+ declare const kCurrentPeriodStartTimestamp: unique symbol;
15
+ declare const kCurrentPeriodEndTimestamp: unique symbol;
16
+ declare const kCanceledTimestamp: unique symbol;
14
17
  declare const kAllow: unique symbol;
15
18
  declare const kDeny: unique symbol;
16
19
  declare const kBurstColors: unique symbol;
@@ -3031,6 +3034,111 @@ declare class PollResults<Omitted extends keyof APIPollResults | '' = ''> extend
3031
3034
  get isFinalized(): "is_finalized" extends infer T ? T extends "is_finalized" ? T extends Omitted ? unknown : APIPollResults[T] : never : never;
3032
3035
  }
3033
3036
 
3037
+ /**
3038
+ * Represents any soundboard sound on Discord.
3039
+ *
3040
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3041
+ * @remarks has substructure `User` which needs to be instantiated and stored by an extending class using it
3042
+ */
3043
+ declare class SoundboardSound<Omitted extends keyof APISoundboardSound | '' = ''> extends Structure<APISoundboardSound, Omitted> {
3044
+ /**
3045
+ * The template used for removing data from the raw data stored for each soundboard sound.
3046
+ */
3047
+ static readonly DataTemplate: Partial<APISoundboardSound>;
3048
+ /**
3049
+ * @param data - The raw data received from the API for the soundboard sound
3050
+ */
3051
+ constructor(data: Partialize<APISoundboardSound, Omitted>);
3052
+ /**
3053
+ * The name of this sound
3054
+ */
3055
+ get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APISoundboardSound[T] : never : never;
3056
+ /**
3057
+ * The id of this sound
3058
+ */
3059
+ get soundId(): "sound_id" extends infer T ? T extends "sound_id" ? T extends Omitted ? unknown : APISoundboardSound[T] : never : never;
3060
+ /**
3061
+ * The volume of this sound, from 0 to 1
3062
+ */
3063
+ get volume(): "volume" extends infer T ? T extends "volume" ? T extends Omitted ? unknown : APISoundboardSound[T] : never : never;
3064
+ /**
3065
+ * The id of this sound's custom emoji
3066
+ */
3067
+ get emojiId(): "emoji_id" extends infer T ? T extends "emoji_id" ? T extends Omitted ? unknown : APISoundboardSound[T] : never : never;
3068
+ /**
3069
+ * The unicode character of this sound's standard emoji
3070
+ */
3071
+ get emojiName(): "emoji_name" extends infer T ? T extends "emoji_name" ? T extends Omitted ? unknown : APISoundboardSound[T] : never : never;
3072
+ /**
3073
+ * The id of the guild this sound is in
3074
+ */
3075
+ get guildId(): ("guild_id" extends infer T ? T extends "guild_id" ? T extends Omitted ? unknown : APISoundboardSound[T] : never : never) | undefined;
3076
+ /**
3077
+ * Whether this sound can be used, may be false due to loss of server boosts
3078
+ */
3079
+ get available(): "available" extends infer T ? T extends "available" ? T extends Omitted ? unknown : APISoundboardSound[T] : never : never;
3080
+ /**
3081
+ * The timestamp this sound was created at
3082
+ *
3083
+ * @remarks only available for guild soundboard sounds
3084
+ */
3085
+ get createdTimestamp(): number | null;
3086
+ /**
3087
+ * The time this sound was created at
3088
+ *
3089
+ * @remarks only available for guild soundboard sounds
3090
+ */
3091
+ get createdAt(): Date | null;
3092
+ }
3093
+
3094
+ /**
3095
+ * Represents any stage instance on Discord.
3096
+ *
3097
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3098
+ */
3099
+ declare class StageInstance<Omitted extends keyof APIStageInstance | '' = ''> extends Structure<APIStageInstance, Omitted> {
3100
+ /**
3101
+ * The template used for removing data from the raw data stored for each stage instance
3102
+ */
3103
+ static readonly DataTemplate: Partial<APIStageInstance>;
3104
+ /**
3105
+ * @param data - The raw data received from the API for the stage instance
3106
+ */
3107
+ constructor(data: Partialize<APIStageInstance, Omitted>);
3108
+ /**
3109
+ * The stage instance's id
3110
+ */
3111
+ get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIStageInstance[T] : never : never;
3112
+ /**
3113
+ * The guild id of the associated stage channel
3114
+ */
3115
+ get guildId(): "guild_id" extends infer T ? T extends "guild_id" ? T extends Omitted ? unknown : APIStageInstance[T] : never : never;
3116
+ /**
3117
+ * The id of the associated stage channel
3118
+ */
3119
+ get channelId(): "channel_id" extends infer T ? T extends "channel_id" ? T extends Omitted ? unknown : APIStageInstance[T] : never : never;
3120
+ /**
3121
+ * The topic of the stage instance (1-120 characters)
3122
+ */
3123
+ get topic(): "topic" extends infer T ? T extends "topic" ? T extends Omitted ? unknown : APIStageInstance[T] : never : never;
3124
+ /**
3125
+ * The privacy level of the stage instance
3126
+ */
3127
+ get privacyLevel(): "privacy_level" extends infer T ? T extends "privacy_level" ? T extends Omitted ? unknown : APIStageInstance[T] : never : never;
3128
+ /**
3129
+ * The id of the scheduled event for this stage instance
3130
+ */
3131
+ get guildScheduledEventId(): ("guild_scheduled_event_id" extends infer T ? T extends "guild_scheduled_event_id" ? T extends Omitted ? unknown : APIStageInstance[T] : never : never) | undefined;
3132
+ /**
3133
+ * The timestamp the stage instance was created at
3134
+ */
3135
+ get createdTimestamp(): number | null;
3136
+ /**
3137
+ * The time the stage instance was created at
3138
+ */
3139
+ get createdAt(): Date | null;
3140
+ }
3141
+
3034
3142
  /**
3035
3143
  * Represents a sticker on Discord.
3036
3144
  *
@@ -3073,6 +3181,139 @@ declare class Sticker<Omitted extends keyof APISticker | '' = ''> extends Struct
3073
3181
  * The type of this sticker
3074
3182
  */
3075
3183
  get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APISticker[T] : never : never;
3184
+ /**
3185
+ * The timestamp the sticker was created at
3186
+ */
3187
+ get createdTimestamp(): number | null;
3188
+ /**
3189
+ * The time the sticker was created at
3190
+ */
3191
+ get createdAt(): Date | null;
3192
+ }
3193
+
3194
+ /**
3195
+ * Represents a sticker pack on Discord.
3196
+ *
3197
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3198
+ * @remarks has substructure `Sticker` which needs to be instantiated and stored by an extending class using it
3199
+ */
3200
+ declare class StickerPack<Omitted extends keyof APIStickerPack | '' = ''> extends Structure<APIStickerPack, Omitted> {
3201
+ /**
3202
+ * The template used for removing data from the raw data stored for each sticker pack
3203
+ */
3204
+ static DataTemplate: Partial<APIStickerPack>;
3205
+ /**
3206
+ * @param data - The raw data received from the API for the sticker pack
3207
+ */
3208
+ constructor(data: Partialize<APIStickerPack, Omitted>);
3209
+ /**
3210
+ * The id of the sticker pack
3211
+ */
3212
+ get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIStickerPack[T] : never : never;
3213
+ /**
3214
+ * The name of the sticker pack
3215
+ */
3216
+ get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIStickerPack[T] : never : never;
3217
+ /**
3218
+ * The id of the pack's SKU
3219
+ */
3220
+ get skuId(): "sku_id" extends infer T ? T extends "sku_id" ? T extends Omitted ? unknown : APIStickerPack[T] : never : never;
3221
+ /**
3222
+ * The id of a sticker in the pack which is shown as the pack's icon
3223
+ */
3224
+ get coverStickerId(): ("cover_sticker_id" extends infer T ? T extends "cover_sticker_id" ? T extends Omitted ? unknown : APIStickerPack[T] : never : never) | undefined;
3225
+ /**
3226
+ * The description of the sticker pack
3227
+ */
3228
+ get description(): "description" extends infer T ? T extends "description" ? T extends Omitted ? unknown : APIStickerPack[T] : never : never;
3229
+ /**
3230
+ * The id of the sticker pack's banner image
3231
+ *
3232
+ * @see {@link https://discord.com/developers/docs/reference#image-formatting}
3233
+ */
3234
+ get bannerAssetId(): ("banner_asset_id" extends infer T ? T extends "banner_asset_id" ? T extends Omitted ? unknown : APIStickerPack[T] : never : never) | undefined;
3235
+ /**
3236
+ * The timestamp the sticker pack was created at
3237
+ */
3238
+ get createdTimestamp(): number | null;
3239
+ /**
3240
+ * The time the sticker pack was created at
3241
+ */
3242
+ get createdAt(): Date | null;
3243
+ }
3244
+
3245
+ /**
3246
+ * Represents any team on Discord.
3247
+ *
3248
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3249
+ * @remarks has substructure `TeamMember` which needs to be instantiated and stored by an extending class using it
3250
+ */
3251
+ declare class Team<Omitted extends keyof APITeam | '' = ''> extends Structure<APITeam, Omitted> {
3252
+ /**
3253
+ * The template used for removing data from the raw data stored for each team.
3254
+ */
3255
+ static readonly DataTemplate: Partial<APITeam>;
3256
+ /**
3257
+ * @param data - The raw data received from the API for the team.
3258
+ */
3259
+ constructor(data: Partialize<APITeam, Omitted>);
3260
+ /**
3261
+ * Hash of the image of the team's icon
3262
+ */
3263
+ get icon(): "icon" extends infer T ? T extends "icon" ? T extends Omitted ? unknown : APITeam[T] : never : never;
3264
+ /**
3265
+ * The unique id of the team
3266
+ */
3267
+ get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APITeam[T] : never : never;
3268
+ /**
3269
+ * Name of the team
3270
+ */
3271
+ get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APITeam[T] : never : never;
3272
+ /**
3273
+ * User ID of the current team owner
3274
+ */
3275
+ get ownerUserId(): "owner_user_id" extends infer T ? T extends "owner_user_id" ? T extends Omitted ? unknown : APITeam[T] : never : never;
3276
+ /**
3277
+ * The timestamp the team was created at
3278
+ */
3279
+ get createdTimestamp(): number | null;
3280
+ /**
3281
+ * The time the team was created at
3282
+ */
3283
+ get createdAt(): Date | null;
3284
+ }
3285
+
3286
+ /**
3287
+ * Represents any team member on Discord.
3288
+ *
3289
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3290
+ * @remarks has substructure `User` which needs to be instantiated and stored by an extending class using it
3291
+ */
3292
+ declare class TeamMember<Omitted extends keyof APITeamMember | '' = ''> extends Structure<APITeamMember, Omitted> {
3293
+ /**
3294
+ * The template used for removing data from the raw data stored for each team member
3295
+ */
3296
+ static readonly DataTemplate: Partial<APITeamMember>;
3297
+ /**
3298
+ * @param data - The raw data received from the API for the team member
3299
+ */
3300
+ constructor(data: Partialize<APITeamMember, Omitted>);
3301
+ /**
3302
+ * User's membership state on the team
3303
+ *
3304
+ * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
3305
+ */
3306
+ get membershipState(): "membership_state" extends infer T ? T extends "membership_state" ? T extends Omitted ? unknown : APITeamMember[T] : never : never;
3307
+ /**
3308
+ * Id of the parent team of which they are a member
3309
+ */
3310
+ get teamId(): "team_id" extends infer T ? T extends "team_id" ? T extends Omitted ? unknown : APITeamMember[T] : never : never;
3311
+ /**
3312
+ * Role of the team member
3313
+ *
3314
+ * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types}
3315
+ */
3316
+ get role(): "role" extends infer T ? T extends "role" ? T extends Omitted ? unknown : APITeamMember[T] : never : never;
3076
3317
  }
3077
3318
 
3078
3319
  /**
@@ -3256,6 +3497,194 @@ declare class Connection<Omitted extends keyof APIConnection | '' = ''> extends
3256
3497
  get visibility(): "visibility" extends infer T ? T extends "visibility" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
3257
3498
  }
3258
3499
 
3500
+ /**
3501
+ * Represents any voice state on Discord.
3502
+ *
3503
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3504
+ * @remarks has substructure `GuildMember` which needs to be instantiated and stored by an extending class using it
3505
+ */
3506
+ declare class VoiceState<Omitted extends keyof APIVoiceState | '' = ''> extends Structure<APIVoiceState, Omitted> {
3507
+ /**
3508
+ * The template used for removing data from the raw data stored for each voice state
3509
+ */
3510
+ static readonly DataTemplate: Partial<APIVoiceState>;
3511
+ /**
3512
+ * @param data - The raw data received from the API for the voice state
3513
+ */
3514
+ constructor(data: Partialize<APIVoiceState, Omitted>);
3515
+ /**
3516
+ * The guild id this voice state is for
3517
+ */
3518
+ get guildId(): ("guild_id" extends infer T ? T extends "guild_id" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never) | undefined;
3519
+ /**
3520
+ * The channel id this user is connected to
3521
+ */
3522
+ get channelId(): "channel_id" extends infer T ? T extends "channel_id" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3523
+ /**
3524
+ * The user id this voice state is for
3525
+ */
3526
+ get userId(): "user_id" extends infer T ? T extends "user_id" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3527
+ /**
3528
+ * The session id for this voice state
3529
+ */
3530
+ get sessionId(): "session_id" extends infer T ? T extends "session_id" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3531
+ /**
3532
+ * Whether this user is deafened by the server
3533
+ */
3534
+ get deaf(): "deaf" extends infer T ? T extends "deaf" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3535
+ /**
3536
+ * Whether this user is muted by the server
3537
+ */
3538
+ get mute(): "mute" extends infer T ? T extends "mute" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3539
+ /**
3540
+ * Whether this user is locally deafened
3541
+ */
3542
+ get selfDeaf(): "self_deaf" extends infer T ? T extends "self_deaf" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3543
+ /**
3544
+ * Whether this user is locally muted
3545
+ */
3546
+ get selfMute(): "self_mute" extends infer T ? T extends "self_mute" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3547
+ /**
3548
+ * Whether this user is streaming using "Go Live"
3549
+ */
3550
+ get selfStream(): ("self_stream" extends infer T ? T extends "self_stream" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never) | undefined;
3551
+ /**
3552
+ * Whether this user's camera is enabled
3553
+ */
3554
+ get selfVideo(): "self_video" extends infer T ? T extends "self_video" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3555
+ /**
3556
+ * Whether this user's permission to speak is denied
3557
+ */
3558
+ get suppress(): "suppress" extends infer T ? T extends "suppress" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3559
+ /**
3560
+ * The time at which the user requested to speak
3561
+ */
3562
+ get requestToSpeakTimestamp(): "request_to_speak_timestamp" extends infer T ? T extends "request_to_speak_timestamp" ? T extends Omitted ? unknown : APIVoiceState[T] : never : never;
3563
+ }
3564
+
3565
+ /**
3566
+ * Represents any voice region on Discord.
3567
+ *
3568
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3569
+ */
3570
+ declare class VoiceRegion<Omitted extends keyof APIVoiceRegion | '' = ''> extends Structure<APIVoiceRegion, Omitted> {
3571
+ /**
3572
+ * The template used for removing data from the raw data stored for each voice region
3573
+ */
3574
+ static readonly DataTemplate: Partial<APIVoiceRegion>;
3575
+ /**
3576
+ * @param data - The raw data received from the API for the voice region
3577
+ */
3578
+ constructor(data: Partialize<APIVoiceRegion, Omitted>);
3579
+ /**
3580
+ * Unique id for the region
3581
+ */
3582
+ get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIVoiceRegion[T] : never : never;
3583
+ /**
3584
+ * Name of the region
3585
+ */
3586
+ get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIVoiceRegion[T] : never : never;
3587
+ /**
3588
+ * `true` for a single server that is closest to the current user's client
3589
+ */
3590
+ get optimal(): "optimal" extends infer T ? T extends "optimal" ? T extends Omitted ? unknown : APIVoiceRegion[T] : never : never;
3591
+ /**
3592
+ * Whether this is a deprecated voice region (avoid switching to these)
3593
+ */
3594
+ get deprecated(): "deprecated" extends infer T ? T extends "deprecated" ? T extends Omitted ? unknown : APIVoiceRegion[T] : never : never;
3595
+ /**
3596
+ * Whether this is a custom voice region (used for events/etc)
3597
+ */
3598
+ get custom(): "custom" extends infer T ? T extends "custom" ? T extends Omitted ? unknown : APIVoiceRegion[T] : never : never;
3599
+ }
3600
+
3601
+ /**
3602
+ * Represents any subscription on Discord.
3603
+ *
3604
+ * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
3605
+ */
3606
+ declare class Subscription<Omitted extends keyof APISubscription | '' = 'canceled_at' | 'current_period_end' | 'current_period_start'> extends Structure<APISubscription, Omitted> {
3607
+ /**
3608
+ * The template used for removing data from the raw data stored for each subscription
3609
+ */
3610
+ static readonly DataTemplate: Partial<APISubscription>;
3611
+ protected [kCurrentPeriodStartTimestamp]: number | null;
3612
+ protected [kCurrentPeriodEndTimestamp]: number | null;
3613
+ protected [kCanceledTimestamp]: number | null;
3614
+ /**
3615
+ * @param data - The raw data received from the API for the subscription
3616
+ */
3617
+ constructor(data: Partialize<APISubscription, Omitted>);
3618
+ /**
3619
+ * {@inheritDoc Structure.optimizeData}
3620
+ */
3621
+ protected optimizeData(data: Partial<APISubscription>): void;
3622
+ /**
3623
+ * The subscription's id
3624
+ *
3625
+ * @remarks The start of a subscription is determined by its id. When the subscription renews, its current period is updated.
3626
+ */
3627
+ get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APISubscription[T] : never : never;
3628
+ /**
3629
+ * Id of the user who is subscribed
3630
+ */
3631
+ get userId(): "user_id" extends infer T ? T extends "user_id" ? T extends Omitted ? unknown : APISubscription[T] : never : never;
3632
+ /**
3633
+ * List of SKUs subscribed to
3634
+ */
3635
+ get skuIds(): "sku_ids" extends infer T ? T extends "sku_ids" ? T extends Omitted ? unknown : APISubscription[T] : never : never;
3636
+ /**
3637
+ * List of entitlements granted for this subscription
3638
+ */
3639
+ get entitlementIds(): "entitlement_ids" extends infer T ? T extends "entitlement_ids" ? T extends Omitted ? unknown : APISubscription[T] : never : never;
3640
+ /**
3641
+ * List of SKUs that this user will be subscribed to at renewal
3642
+ */
3643
+ get renewalSkuIds(): "renewal_sku_ids" extends infer T ? T extends "renewal_sku_ids" ? T extends Omitted ? unknown : APISubscription[T] : never : never;
3644
+ /**
3645
+ * Timestamp of start of the current subscription period
3646
+ */
3647
+ get currentPeriodStartTimestamp(): number | null;
3648
+ /**
3649
+ * The time at which the current subscription period will start
3650
+ */
3651
+ get currentPeriodStartAt(): Date | null;
3652
+ /**
3653
+ * Timestamp of end of the current subscription period
3654
+ */
3655
+ get currentPeriodEndTimestamp(): number | null;
3656
+ /**
3657
+ * The time at which the current subscription period will end
3658
+ */
3659
+ get currentPeriodEndsAt(): Date | null;
3660
+ /**
3661
+ * The {@link SubscriptionStatus} of the current subscription
3662
+ */
3663
+ get status(): "status" extends infer T ? T extends "status" ? T extends Omitted ? unknown : APISubscription[T] : never : never;
3664
+ /**
3665
+ * Timestamp when the subscription was canceled
3666
+ */
3667
+ get canceledTimestamp(): number | null;
3668
+ /**
3669
+ * The time when the subscription was canceled
3670
+ *
3671
+ * @remarks This is populated when the {@link Subscription#status} transitions to {@link SubscriptionStatus.Ending}.
3672
+ */
3673
+ get canceledAt(): Date | null;
3674
+ /**
3675
+ * ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope.
3676
+ */
3677
+ get country(): ("country" extends infer T ? T extends "country" ? T extends Omitted ? unknown : APISubscription[T] : never : never) | undefined;
3678
+ /**
3679
+ * The timestamp the subscription was created at
3680
+ */
3681
+ get createdTimestamp(): number | null;
3682
+ /**
3683
+ * The time the subscription was created at
3684
+ */
3685
+ get createdAt(): Date | null;
3686
+ }
3687
+
3259
3688
  declare function extendTemplate<SuperTemplate extends Record<string, unknown>>(superTemplate: SuperTemplate, additions: Record<string, unknown>): Record<string, unknown> & SuperTemplate;
3260
3689
  /**
3261
3690
  * Turns a JavaScript Date object into the timestamp format used by Discord in payloads.
@@ -3267,4 +3696,4 @@ declare function extendTemplate<SuperTemplate extends Record<string, unknown>>(s
3267
3696
  */
3268
3697
  declare function dateToDiscordISOTimestamp(date: Date): string;
3269
3698
 
3270
- 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, StageChannel, Sticker, StringSelectMenuComponent, StringSelectMenuOption, Structure, TextChannel, TextChannelMixin, TextDisplayComponent, TextInputComponent, ThreadChannelMixin, ThreadMetadata, ThreadOnlyChannelMixin, ThumbnailComponent, UnfurledMediaItem, User, UserSelectMenuComponent, VoiceChannel, VoiceChannelMixin, dateToDiscordISOTimestamp, extendTemplate };
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 };