@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.js CHANGED
@@ -108,11 +108,17 @@ __export(index_exports, {
108
108
  SelectMenuComponent: () => SelectMenuComponent,
109
109
  SelectMenuDefaultValue: () => SelectMenuDefaultValue,
110
110
  SeparatorComponent: () => SeparatorComponent,
111
+ SoundboardSound: () => SoundboardSound,
111
112
  StageChannel: () => StageChannel,
113
+ StageInstance: () => StageInstance,
112
114
  Sticker: () => Sticker,
115
+ StickerPack: () => StickerPack,
113
116
  StringSelectMenuComponent: () => StringSelectMenuComponent,
114
117
  StringSelectMenuOption: () => StringSelectMenuOption,
115
118
  Structure: () => Structure,
119
+ Subscription: () => Subscription,
120
+ Team: () => Team,
121
+ TeamMember: () => TeamMember,
116
122
  TextChannel: () => TextChannel,
117
123
  TextChannelMixin: () => TextChannelMixin,
118
124
  TextDisplayComponent: () => TextDisplayComponent,
@@ -126,6 +132,8 @@ __export(index_exports, {
126
132
  UserSelectMenuComponent: () => UserSelectMenuComponent,
127
133
  VoiceChannel: () => VoiceChannel,
128
134
  VoiceChannelMixin: () => VoiceChannelMixin,
135
+ VoiceRegion: () => VoiceRegion,
136
+ VoiceState: () => VoiceState,
129
137
  dateToDiscordISOTimestamp: () => dateToDiscordISOTimestamp,
130
138
  extendTemplate: () => extendTemplate
131
139
  });
@@ -142,6 +150,9 @@ var kEditedTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.editedTimestam
142
150
  var kArchiveTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.archiveTimestamp");
143
151
  var kStartsTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.startsTimestamp");
144
152
  var kEndsTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.endsTimestamp");
153
+ var kCurrentPeriodStartTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.currentPeriodStartTimestamp");
154
+ var kCurrentPeriodEndTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.currentPeriodEndTimestamp");
155
+ var kCanceledTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.canceledTimestamp");
145
156
  var kAllow = /* @__PURE__ */ Symbol.for("djs.structures.allow");
146
157
  var kDeny = /* @__PURE__ */ Symbol.for("djs.structures.deny");
147
158
  var kBurstColors = /* @__PURE__ */ Symbol.for("djs.structures.burstColors");
@@ -1317,6 +1328,14 @@ function isIdSet(id) {
1317
1328
  return typeof id === "string" || typeof id === "bigint";
1318
1329
  }
1319
1330
  __name(isIdSet, "isIdSet");
1331
+ function hasProperty(data, fieldName) {
1332
+ return fieldName in data;
1333
+ }
1334
+ __name(hasProperty, "hasProperty");
1335
+ function isFieldSet(data, fieldName, type) {
1336
+ return hasProperty(data, fieldName) && typeof data[fieldName] === type;
1337
+ }
1338
+ __name(isFieldSet, "isFieldSet");
1320
1339
 
1321
1340
  // src/channels/Channel.ts
1322
1341
  var Channel = class extends Structure {
@@ -1364,8 +1383,7 @@ var Channel = class extends Structure {
1364
1383
  * to null, respecting Omit behaviors
1365
1384
  */
1366
1385
  get flags() {
1367
- const flags = "flags" in this[kData] && typeof this[kData].flags === "number" ? this[kData].flags : null;
1368
- return flags ? new ChannelFlagsBitField(flags) : null;
1386
+ return isFieldSet(this[kData], "flags", "number") ? new ChannelFlagsBitField(this[kData].flags) : null;
1369
1387
  }
1370
1388
  /**
1371
1389
  * The timestamp the channel was created at
@@ -3413,8 +3431,7 @@ var Attachment = class extends Structure {
3413
3431
  * Attachment flags combined as a bitfield
3414
3432
  */
3415
3433
  get flags() {
3416
- const flags = this[kData].flags;
3417
- return flags ? new AttachmentFlagsBitField(this[kData].flags) : null;
3434
+ return isFieldSet(this[kData], "flags", "number") ? new AttachmentFlagsBitField(this[kData].flags) : null;
3418
3435
  }
3419
3436
  };
3420
3437
 
@@ -3546,8 +3563,7 @@ var Message = class extends Structure {
3546
3563
  * The flags of this message as a bit field
3547
3564
  */
3548
3565
  get flags() {
3549
- const flags = this[kData].flags;
3550
- return flags ? new MessageFlagsBitField(this[kData].flags) : null;
3566
+ return isFieldSet(this[kData], "flags", "number") ? new MessageFlagsBitField(this[kData].flags) : null;
3551
3567
  }
3552
3568
  /**
3553
3569
  * The nonce used when sending this message.
@@ -4078,7 +4094,152 @@ var PollResults = class extends Structure {
4078
4094
  }
4079
4095
  };
4080
4096
 
4097
+ // src/soundboards/SoundboardSound.ts
4098
+ var import_snowflake5 = require("@sapphire/snowflake");
4099
+ var SoundboardSound = class extends Structure {
4100
+ static {
4101
+ __name(this, "SoundboardSound");
4102
+ }
4103
+ /**
4104
+ * The template used for removing data from the raw data stored for each soundboard sound.
4105
+ */
4106
+ static DataTemplate = {};
4107
+ /**
4108
+ * @param data - The raw data received from the API for the soundboard sound
4109
+ */
4110
+ constructor(data) {
4111
+ super(data);
4112
+ }
4113
+ /**
4114
+ * The name of this sound
4115
+ */
4116
+ get name() {
4117
+ return this[kData].name;
4118
+ }
4119
+ /**
4120
+ * The id of this sound
4121
+ */
4122
+ get soundId() {
4123
+ return this[kData].sound_id;
4124
+ }
4125
+ /**
4126
+ * The volume of this sound, from 0 to 1
4127
+ */
4128
+ get volume() {
4129
+ return this[kData].volume;
4130
+ }
4131
+ /**
4132
+ * The id of this sound's custom emoji
4133
+ */
4134
+ get emojiId() {
4135
+ return this[kData].emoji_id;
4136
+ }
4137
+ /**
4138
+ * The unicode character of this sound's standard emoji
4139
+ */
4140
+ get emojiName() {
4141
+ return this[kData].emoji_name;
4142
+ }
4143
+ /**
4144
+ * The id of the guild this sound is in
4145
+ */
4146
+ get guildId() {
4147
+ return this[kData].guild_id;
4148
+ }
4149
+ /**
4150
+ * Whether this sound can be used, may be false due to loss of server boosts
4151
+ */
4152
+ get available() {
4153
+ return this[kData].available;
4154
+ }
4155
+ /**
4156
+ * The timestamp this sound was created at
4157
+ *
4158
+ * @remarks only available for guild soundboard sounds
4159
+ */
4160
+ get createdTimestamp() {
4161
+ return isIdSet(this[kData].sound_id) && isIdSet(this[kData].guild_id) ? import_snowflake5.DiscordSnowflake.timestampFrom(this[kData].sound_id) : null;
4162
+ }
4163
+ /**
4164
+ * The time this sound was created at
4165
+ *
4166
+ * @remarks only available for guild soundboard sounds
4167
+ */
4168
+ get createdAt() {
4169
+ const createdTimestamp = this.createdTimestamp;
4170
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4171
+ }
4172
+ };
4173
+
4174
+ // src/stageInstances/StageInstance.ts
4175
+ var import_snowflake6 = require("@sapphire/snowflake");
4176
+ var StageInstance = class extends Structure {
4177
+ static {
4178
+ __name(this, "StageInstance");
4179
+ }
4180
+ /**
4181
+ * The template used for removing data from the raw data stored for each stage instance
4182
+ */
4183
+ static DataTemplate = {};
4184
+ /**
4185
+ * @param data - The raw data received from the API for the stage instance
4186
+ */
4187
+ constructor(data) {
4188
+ super(data);
4189
+ }
4190
+ /**
4191
+ * The stage instance's id
4192
+ */
4193
+ get id() {
4194
+ return this[kData].id;
4195
+ }
4196
+ /**
4197
+ * The guild id of the associated stage channel
4198
+ */
4199
+ get guildId() {
4200
+ return this[kData].guild_id;
4201
+ }
4202
+ /**
4203
+ * The id of the associated stage channel
4204
+ */
4205
+ get channelId() {
4206
+ return this[kData].channel_id;
4207
+ }
4208
+ /**
4209
+ * The topic of the stage instance (1-120 characters)
4210
+ */
4211
+ get topic() {
4212
+ return this[kData].topic;
4213
+ }
4214
+ /**
4215
+ * The privacy level of the stage instance
4216
+ */
4217
+ get privacyLevel() {
4218
+ return this[kData].privacy_level;
4219
+ }
4220
+ /**
4221
+ * The id of the scheduled event for this stage instance
4222
+ */
4223
+ get guildScheduledEventId() {
4224
+ return this[kData].guild_scheduled_event_id;
4225
+ }
4226
+ /**
4227
+ * The timestamp the stage instance was created at
4228
+ */
4229
+ get createdTimestamp() {
4230
+ return isIdSet(this.id) ? import_snowflake6.DiscordSnowflake.timestampFrom(this.id) : null;
4231
+ }
4232
+ /**
4233
+ * The time the stage instance was created at
4234
+ */
4235
+ get createdAt() {
4236
+ const createdTimestamp = this.createdTimestamp;
4237
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4238
+ }
4239
+ };
4240
+
4081
4241
  // src/stickers/Sticker.ts
4242
+ var import_snowflake7 = require("@sapphire/snowflake");
4082
4243
  var Sticker = class extends Structure {
4083
4244
  static {
4084
4245
  __name(this, "Sticker");
@@ -4135,6 +4296,182 @@ var Sticker = class extends Structure {
4135
4296
  get type() {
4136
4297
  return this[kData].type;
4137
4298
  }
4299
+ /**
4300
+ * The timestamp the sticker was created at
4301
+ */
4302
+ get createdTimestamp() {
4303
+ return isIdSet(this.id) ? import_snowflake7.DiscordSnowflake.timestampFrom(this.id) : null;
4304
+ }
4305
+ /**
4306
+ * The time the sticker was created at
4307
+ */
4308
+ get createdAt() {
4309
+ const createdTimestamp = this.createdTimestamp;
4310
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4311
+ }
4312
+ };
4313
+
4314
+ // src/stickers/StickerPack.ts
4315
+ var import_snowflake8 = require("@sapphire/snowflake");
4316
+ var StickerPack = class extends Structure {
4317
+ static {
4318
+ __name(this, "StickerPack");
4319
+ }
4320
+ /**
4321
+ * The template used for removing data from the raw data stored for each sticker pack
4322
+ */
4323
+ static DataTemplate = {};
4324
+ /**
4325
+ * @param data - The raw data received from the API for the sticker pack
4326
+ */
4327
+ constructor(data) {
4328
+ super(data);
4329
+ }
4330
+ /**
4331
+ * The id of the sticker pack
4332
+ */
4333
+ get id() {
4334
+ return this[kData].id;
4335
+ }
4336
+ /**
4337
+ * The name of the sticker pack
4338
+ */
4339
+ get name() {
4340
+ return this[kData].name;
4341
+ }
4342
+ /**
4343
+ * The id of the pack's SKU
4344
+ */
4345
+ get skuId() {
4346
+ return this[kData].sku_id;
4347
+ }
4348
+ /**
4349
+ * The id of a sticker in the pack which is shown as the pack's icon
4350
+ */
4351
+ get coverStickerId() {
4352
+ return this[kData].cover_sticker_id;
4353
+ }
4354
+ /**
4355
+ * The description of the sticker pack
4356
+ */
4357
+ get description() {
4358
+ return this[kData].description;
4359
+ }
4360
+ /**
4361
+ * The id of the sticker pack's banner image
4362
+ *
4363
+ * @see {@link https://discord.com/developers/docs/reference#image-formatting}
4364
+ */
4365
+ get bannerAssetId() {
4366
+ return this[kData].banner_asset_id;
4367
+ }
4368
+ /**
4369
+ * The timestamp the sticker pack was created at
4370
+ */
4371
+ get createdTimestamp() {
4372
+ return isIdSet(this.id) ? import_snowflake8.DiscordSnowflake.timestampFrom(this.id) : null;
4373
+ }
4374
+ /**
4375
+ * The time the sticker pack was created at
4376
+ */
4377
+ get createdAt() {
4378
+ const createdTimestamp = this.createdTimestamp;
4379
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4380
+ }
4381
+ };
4382
+
4383
+ // src/teams/Team.ts
4384
+ var import_snowflake9 = require("@sapphire/snowflake");
4385
+ var Team = class extends Structure {
4386
+ static {
4387
+ __name(this, "Team");
4388
+ }
4389
+ /**
4390
+ * The template used for removing data from the raw data stored for each team.
4391
+ */
4392
+ static DataTemplate = {};
4393
+ /**
4394
+ * @param data - The raw data received from the API for the team.
4395
+ */
4396
+ constructor(data) {
4397
+ super(data);
4398
+ }
4399
+ /**
4400
+ * Hash of the image of the team's icon
4401
+ */
4402
+ get icon() {
4403
+ return this[kData].icon;
4404
+ }
4405
+ /**
4406
+ * The unique id of the team
4407
+ */
4408
+ get id() {
4409
+ return this[kData].id;
4410
+ }
4411
+ /**
4412
+ * Name of the team
4413
+ */
4414
+ get name() {
4415
+ return this[kData].name;
4416
+ }
4417
+ /**
4418
+ * User ID of the current team owner
4419
+ */
4420
+ get ownerUserId() {
4421
+ return this[kData].owner_user_id;
4422
+ }
4423
+ /**
4424
+ * The timestamp the team was created at
4425
+ */
4426
+ get createdTimestamp() {
4427
+ return isIdSet(this.id) ? import_snowflake9.DiscordSnowflake.timestampFrom(this.id) : null;
4428
+ }
4429
+ /**
4430
+ * The time the team was created at
4431
+ */
4432
+ get createdAt() {
4433
+ const createdTimestamp = this.createdTimestamp;
4434
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4435
+ }
4436
+ };
4437
+
4438
+ // src/teams/TeamMember.ts
4439
+ var TeamMember = class extends Structure {
4440
+ static {
4441
+ __name(this, "TeamMember");
4442
+ }
4443
+ /**
4444
+ * The template used for removing data from the raw data stored for each team member
4445
+ */
4446
+ static DataTemplate = {};
4447
+ /**
4448
+ * @param data - The raw data received from the API for the team member
4449
+ */
4450
+ constructor(data) {
4451
+ super(data);
4452
+ }
4453
+ /**
4454
+ * User's membership state on the team
4455
+ *
4456
+ * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
4457
+ */
4458
+ get membershipState() {
4459
+ return this[kData].membership_state;
4460
+ }
4461
+ /**
4462
+ * Id of the parent team of which they are a member
4463
+ */
4464
+ get teamId() {
4465
+ return this[kData].team_id;
4466
+ }
4467
+ /**
4468
+ * Role of the team member
4469
+ *
4470
+ * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types}
4471
+ */
4472
+ get role() {
4473
+ return this[kData].role;
4474
+ }
4138
4475
  };
4139
4476
 
4140
4477
  // src/users/AvatarDecorationData.ts
@@ -4167,7 +4504,7 @@ var AvatarDecorationData = class extends Structure {
4167
4504
  };
4168
4505
 
4169
4506
  // src/users/User.ts
4170
- var import_snowflake5 = require("@sapphire/snowflake");
4507
+ var import_snowflake10 = require("@sapphire/snowflake");
4171
4508
  var User = class extends Structure {
4172
4509
  static {
4173
4510
  __name(this, "User");
@@ -4290,7 +4627,7 @@ var User = class extends Structure {
4290
4627
  * The timestamp the user was created at
4291
4628
  */
4292
4629
  get createdTimestamp() {
4293
- return isIdSet(this.id) ? import_snowflake5.DiscordSnowflake.timestampFrom(this.id) : null;
4630
+ return isIdSet(this.id) ? import_snowflake10.DiscordSnowflake.timestampFrom(this.id) : null;
4294
4631
  }
4295
4632
  /**
4296
4633
  * The time the user was created at
@@ -4381,6 +4718,286 @@ var Connection = class extends Structure {
4381
4718
  return this[kData].visibility;
4382
4719
  }
4383
4720
  };
4721
+
4722
+ // src/voice/VoiceState.ts
4723
+ var VoiceState = class extends Structure {
4724
+ static {
4725
+ __name(this, "VoiceState");
4726
+ }
4727
+ /**
4728
+ * The template used for removing data from the raw data stored for each voice state
4729
+ */
4730
+ static DataTemplate = {};
4731
+ /**
4732
+ * @param data - The raw data received from the API for the voice state
4733
+ */
4734
+ constructor(data) {
4735
+ super(data);
4736
+ }
4737
+ /**
4738
+ * The guild id this voice state is for
4739
+ */
4740
+ get guildId() {
4741
+ return this[kData].guild_id;
4742
+ }
4743
+ /**
4744
+ * The channel id this user is connected to
4745
+ */
4746
+ get channelId() {
4747
+ return this[kData].channel_id;
4748
+ }
4749
+ /**
4750
+ * The user id this voice state is for
4751
+ */
4752
+ get userId() {
4753
+ return this[kData].user_id;
4754
+ }
4755
+ /**
4756
+ * The session id for this voice state
4757
+ */
4758
+ get sessionId() {
4759
+ return this[kData].session_id;
4760
+ }
4761
+ /**
4762
+ * Whether this user is deafened by the server
4763
+ */
4764
+ get deaf() {
4765
+ return this[kData].deaf;
4766
+ }
4767
+ /**
4768
+ * Whether this user is muted by the server
4769
+ */
4770
+ get mute() {
4771
+ return this[kData].mute;
4772
+ }
4773
+ /**
4774
+ * Whether this user is locally deafened
4775
+ */
4776
+ get selfDeaf() {
4777
+ return this[kData].self_deaf;
4778
+ }
4779
+ /**
4780
+ * Whether this user is locally muted
4781
+ */
4782
+ get selfMute() {
4783
+ return this[kData].self_mute;
4784
+ }
4785
+ /**
4786
+ * Whether this user is streaming using "Go Live"
4787
+ */
4788
+ get selfStream() {
4789
+ return this[kData].self_stream;
4790
+ }
4791
+ /**
4792
+ * Whether this user's camera is enabled
4793
+ */
4794
+ get selfVideo() {
4795
+ return this[kData].self_video;
4796
+ }
4797
+ /**
4798
+ * Whether this user's permission to speak is denied
4799
+ */
4800
+ get suppress() {
4801
+ return this[kData].suppress;
4802
+ }
4803
+ /**
4804
+ * The time at which the user requested to speak
4805
+ */
4806
+ get requestToSpeakTimestamp() {
4807
+ return this[kData].request_to_speak_timestamp;
4808
+ }
4809
+ };
4810
+
4811
+ // src/voice/VoiceRegion.ts
4812
+ var VoiceRegion = class extends Structure {
4813
+ static {
4814
+ __name(this, "VoiceRegion");
4815
+ }
4816
+ /**
4817
+ * The template used for removing data from the raw data stored for each voice region
4818
+ */
4819
+ static DataTemplate = {};
4820
+ /**
4821
+ * @param data - The raw data received from the API for the voice region
4822
+ */
4823
+ constructor(data) {
4824
+ super(data);
4825
+ }
4826
+ /**
4827
+ * Unique id for the region
4828
+ */
4829
+ get id() {
4830
+ return this[kData].id;
4831
+ }
4832
+ /**
4833
+ * Name of the region
4834
+ */
4835
+ get name() {
4836
+ return this[kData].name;
4837
+ }
4838
+ /**
4839
+ * `true` for a single server that is closest to the current user's client
4840
+ */
4841
+ get optimal() {
4842
+ return this[kData].optimal;
4843
+ }
4844
+ /**
4845
+ * Whether this is a deprecated voice region (avoid switching to these)
4846
+ */
4847
+ get deprecated() {
4848
+ return this[kData].deprecated;
4849
+ }
4850
+ /**
4851
+ * Whether this is a custom voice region (used for events/etc)
4852
+ */
4853
+ get custom() {
4854
+ return this[kData].custom;
4855
+ }
4856
+ };
4857
+
4858
+ // src/subscriptions/Subscription.ts
4859
+ var import_snowflake11 = require("@sapphire/snowflake");
4860
+ var Subscription = class extends Structure {
4861
+ static {
4862
+ __name(this, "Subscription");
4863
+ }
4864
+ /**
4865
+ * The template used for removing data from the raw data stored for each subscription
4866
+ */
4867
+ static DataTemplate = {
4868
+ set current_period_start(_) {
4869
+ },
4870
+ set current_period_end(_) {
4871
+ },
4872
+ set canceled_at(_) {
4873
+ }
4874
+ };
4875
+ [kCurrentPeriodStartTimestamp] = null;
4876
+ [kCurrentPeriodEndTimestamp] = null;
4877
+ [kCanceledTimestamp] = null;
4878
+ /**
4879
+ * @param data - The raw data received from the API for the subscription
4880
+ */
4881
+ constructor(data) {
4882
+ super(data);
4883
+ this.optimizeData(data);
4884
+ }
4885
+ /**
4886
+ * {@inheritDoc Structure.optimizeData}
4887
+ */
4888
+ optimizeData(data) {
4889
+ const currentPeriodStartTimestamp = data.current_period_start;
4890
+ const currentPeriodEndTimestamp = data.current_period_end;
4891
+ const canceledTimestamp = data.canceled_at;
4892
+ if (currentPeriodStartTimestamp) {
4893
+ this[kCurrentPeriodStartTimestamp] = Date.parse(currentPeriodStartTimestamp);
4894
+ }
4895
+ if (currentPeriodEndTimestamp) {
4896
+ this[kCurrentPeriodEndTimestamp] = Date.parse(currentPeriodEndTimestamp);
4897
+ }
4898
+ if (canceledTimestamp) {
4899
+ this[kCanceledTimestamp] = Date.parse(canceledTimestamp);
4900
+ }
4901
+ }
4902
+ /**
4903
+ * The subscription's id
4904
+ *
4905
+ * @remarks The start of a subscription is determined by its id. When the subscription renews, its current period is updated.
4906
+ */
4907
+ get id() {
4908
+ return this[kData].id;
4909
+ }
4910
+ /**
4911
+ * Id of the user who is subscribed
4912
+ */
4913
+ get userId() {
4914
+ return this[kData].user_id;
4915
+ }
4916
+ /**
4917
+ * List of SKUs subscribed to
4918
+ */
4919
+ get skuIds() {
4920
+ return this[kData].sku_ids;
4921
+ }
4922
+ /**
4923
+ * List of entitlements granted for this subscription
4924
+ */
4925
+ get entitlementIds() {
4926
+ return this[kData].entitlement_ids;
4927
+ }
4928
+ /**
4929
+ * List of SKUs that this user will be subscribed to at renewal
4930
+ */
4931
+ get renewalSkuIds() {
4932
+ return this[kData].renewal_sku_ids;
4933
+ }
4934
+ /**
4935
+ * Timestamp of start of the current subscription period
4936
+ */
4937
+ get currentPeriodStartTimestamp() {
4938
+ return this[kCurrentPeriodStartTimestamp];
4939
+ }
4940
+ /**
4941
+ * The time at which the current subscription period will start
4942
+ */
4943
+ get currentPeriodStartAt() {
4944
+ const startTimestamp = this.currentPeriodStartTimestamp;
4945
+ return startTimestamp ? new Date(startTimestamp) : null;
4946
+ }
4947
+ /**
4948
+ * Timestamp of end of the current subscription period
4949
+ */
4950
+ get currentPeriodEndTimestamp() {
4951
+ return this[kCurrentPeriodEndTimestamp];
4952
+ }
4953
+ /**
4954
+ * The time at which the current subscription period will end
4955
+ */
4956
+ get currentPeriodEndsAt() {
4957
+ const endTimestamp = this.currentPeriodEndTimestamp;
4958
+ return endTimestamp ? new Date(endTimestamp) : null;
4959
+ }
4960
+ /**
4961
+ * The {@link SubscriptionStatus} of the current subscription
4962
+ */
4963
+ get status() {
4964
+ return this[kData].status;
4965
+ }
4966
+ /**
4967
+ * Timestamp when the subscription was canceled
4968
+ */
4969
+ get canceledTimestamp() {
4970
+ return this[kCanceledTimestamp];
4971
+ }
4972
+ /**
4973
+ * The time when the subscription was canceled
4974
+ *
4975
+ * @remarks This is populated when the {@link Subscription#status} transitions to {@link SubscriptionStatus.Ending}.
4976
+ */
4977
+ get canceledAt() {
4978
+ const canceledTimestamp = this.canceledTimestamp;
4979
+ return canceledTimestamp ? new Date(canceledTimestamp) : null;
4980
+ }
4981
+ /**
4982
+ * ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope.
4983
+ */
4984
+ get country() {
4985
+ return this[kData].country;
4986
+ }
4987
+ /**
4988
+ * The timestamp the subscription was created at
4989
+ */
4990
+ get createdTimestamp() {
4991
+ return isIdSet(this.id) ? import_snowflake11.DiscordSnowflake.timestampFrom(this.id) : null;
4992
+ }
4993
+ /**
4994
+ * The time the subscription was created at
4995
+ */
4996
+ get createdAt() {
4997
+ const createdTimestamp = this.createdTimestamp;
4998
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4999
+ }
5000
+ };
4384
5001
  // Annotate the CommonJS export names for ESM import in node:
4385
5002
  0 && (module.exports = {
4386
5003
  ActionRowComponent,
@@ -4470,11 +5087,17 @@ var Connection = class extends Structure {
4470
5087
  SelectMenuComponent,
4471
5088
  SelectMenuDefaultValue,
4472
5089
  SeparatorComponent,
5090
+ SoundboardSound,
4473
5091
  StageChannel,
5092
+ StageInstance,
4474
5093
  Sticker,
5094
+ StickerPack,
4475
5095
  StringSelectMenuComponent,
4476
5096
  StringSelectMenuOption,
4477
5097
  Structure,
5098
+ Subscription,
5099
+ Team,
5100
+ TeamMember,
4478
5101
  TextChannel,
4479
5102
  TextChannelMixin,
4480
5103
  TextDisplayComponent,
@@ -4488,6 +5111,8 @@ var Connection = class extends Structure {
4488
5111
  UserSelectMenuComponent,
4489
5112
  VoiceChannel,
4490
5113
  VoiceChannelMixin,
5114
+ VoiceRegion,
5115
+ VoiceState,
4491
5116
  dateToDiscordISOTimestamp,
4492
5117
  extendTemplate
4493
5118
  });