@discordjs/structures 0.2.0-dev.1769385723-323d8e757 → 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.js CHANGED
@@ -104,15 +104,23 @@ __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,
110
112
  SeparatorComponent: () => SeparatorComponent,
113
+ SoundboardSound: () => SoundboardSound,
111
114
  StageChannel: () => StageChannel,
115
+ StageInstance: () => StageInstance,
112
116
  Sticker: () => Sticker,
117
+ StickerPack: () => StickerPack,
113
118
  StringSelectMenuComponent: () => StringSelectMenuComponent,
114
119
  StringSelectMenuOption: () => StringSelectMenuOption,
115
120
  Structure: () => Structure,
121
+ Subscription: () => Subscription,
122
+ Team: () => Team,
123
+ TeamMember: () => TeamMember,
116
124
  TextChannel: () => TextChannel,
117
125
  TextChannelMixin: () => TextChannelMixin,
118
126
  TextDisplayComponent: () => TextDisplayComponent,
@@ -126,6 +134,8 @@ __export(index_exports, {
126
134
  UserSelectMenuComponent: () => UserSelectMenuComponent,
127
135
  VoiceChannel: () => VoiceChannel,
128
136
  VoiceChannelMixin: () => VoiceChannelMixin,
137
+ VoiceRegion: () => VoiceRegion,
138
+ VoiceState: () => VoiceState,
129
139
  dateToDiscordISOTimestamp: () => dateToDiscordISOTimestamp,
130
140
  extendTemplate: () => extendTemplate
131
141
  });
@@ -142,6 +152,9 @@ var kEditedTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.editedTimestam
142
152
  var kArchiveTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.archiveTimestamp");
143
153
  var kStartsTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.startsTimestamp");
144
154
  var kEndsTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.endsTimestamp");
155
+ var kCurrentPeriodStartTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.currentPeriodStartTimestamp");
156
+ var kCurrentPeriodEndTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.currentPeriodEndTimestamp");
157
+ var kCanceledTimestamp = /* @__PURE__ */ Symbol.for("djs.structures.canceledTimestamp");
145
158
  var kAllow = /* @__PURE__ */ Symbol.for("djs.structures.allow");
146
159
  var kDeny = /* @__PURE__ */ Symbol.for("djs.structures.deny");
147
160
  var kBurstColors = /* @__PURE__ */ Symbol.for("djs.structures.burstColors");
@@ -264,7 +277,9 @@ var AutoModerationAction = class extends Structure {
264
277
  super(data);
265
278
  }
266
279
  /**
267
- * 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}
268
283
  */
269
284
  get type() {
270
285
  return this[kData].type;
@@ -356,13 +371,17 @@ var AutoModerationRule = class extends Structure {
356
371
  return this[kData].creator_id;
357
372
  }
358
373
  /**
359
- * 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}
360
377
  */
361
378
  get eventType() {
362
379
  return this[kData].event_type;
363
380
  }
364
381
  /**
365
- * 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}
366
385
  */
367
386
  get triggerType() {
368
387
  return this[kData].trigger_type;
@@ -733,6 +752,21 @@ var PermissionsBitField = class extends BitField {
733
752
  }
734
753
  };
735
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
+
736
770
  // src/channels/mixins/AppliedTagsMixin.ts
737
771
  var AppliedTagsMixin = class {
738
772
  static {
@@ -1317,6 +1351,14 @@ function isIdSet(id) {
1317
1351
  return typeof id === "string" || typeof id === "bigint";
1318
1352
  }
1319
1353
  __name(isIdSet, "isIdSet");
1354
+ function hasProperty(data, fieldName) {
1355
+ return fieldName in data;
1356
+ }
1357
+ __name(hasProperty, "hasProperty");
1358
+ function isFieldSet(data, fieldName, type) {
1359
+ return hasProperty(data, fieldName) && typeof data[fieldName] === type;
1360
+ }
1361
+ __name(isFieldSet, "isFieldSet");
1320
1362
 
1321
1363
  // src/channels/Channel.ts
1322
1364
  var Channel = class extends Structure {
@@ -1364,8 +1406,7 @@ var Channel = class extends Structure {
1364
1406
  * to null, respecting Omit behaviors
1365
1407
  */
1366
1408
  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;
1409
+ return isFieldSet(this[kData], "flags", "number") ? new ChannelFlagsBitField(this[kData].flags) : null;
1369
1410
  }
1370
1411
  /**
1371
1412
  * The timestamp the channel was created at
@@ -1996,7 +2037,7 @@ var ResolvedInteractionData = class extends Structure {
1996
2037
  };
1997
2038
 
1998
2039
  // src/invites/Invite.ts
1999
- var import_v105 = require("discord-api-types/v10");
2040
+ var import_v106 = require("discord-api-types/v10");
2000
2041
  var Invite = class extends Structure {
2001
2042
  static {
2002
2043
  __name(this, "Invite");
@@ -2141,7 +2182,7 @@ var Invite = class extends Structure {
2141
2182
  * The URL to the invite
2142
2183
  */
2143
2184
  get url() {
2144
- return this.code ? `${import_v105.RouteBases.invite}/${this.code}` : null;
2185
+ return this.code ? `${import_v106.RouteBases.invite}/${this.code}` : null;
2145
2186
  }
2146
2187
  /**
2147
2188
  * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.
@@ -3413,8 +3454,7 @@ var Attachment = class extends Structure {
3413
3454
  * Attachment flags combined as a bitfield
3414
3455
  */
3415
3456
  get flags() {
3416
- const flags = this[kData].flags;
3417
- return flags ? new AttachmentFlagsBitField(this[kData].flags) : null;
3457
+ return isFieldSet(this[kData], "flags", "number") ? new AttachmentFlagsBitField(this[kData].flags) : null;
3418
3458
  }
3419
3459
  };
3420
3460
 
@@ -3546,8 +3586,7 @@ var Message = class extends Structure {
3546
3586
  * The flags of this message as a bit field
3547
3587
  */
3548
3588
  get flags() {
3549
- const flags = this[kData].flags;
3550
- return flags ? new MessageFlagsBitField(this[kData].flags) : null;
3589
+ return isFieldSet(this[kData], "flags", "number") ? new MessageFlagsBitField(this[kData].flags) : null;
3551
3590
  }
3552
3591
  /**
3553
3592
  * The nonce used when sending this message.
@@ -3712,7 +3751,7 @@ var MessageComponentInteractionMetadata = class extends InteractionMetadata {
3712
3751
  };
3713
3752
 
3714
3753
  // src/messages/MessageReference.ts
3715
- var import_v106 = require("discord-api-types/v10");
3754
+ var import_v107 = require("discord-api-types/v10");
3716
3755
  var MessageReference = class extends Structure {
3717
3756
  static {
3718
3757
  __name(this, "MessageReference");
@@ -3731,7 +3770,7 @@ var MessageReference = class extends Structure {
3731
3770
  * The type of this reference
3732
3771
  */
3733
3772
  get type() {
3734
- 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;
3735
3774
  }
3736
3775
  /**
3737
3776
  * The id of the referenced message
@@ -4078,7 +4117,207 @@ var PollResults = class extends Structure {
4078
4117
  }
4079
4118
  };
4080
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
+
4175
+ // src/soundboards/SoundboardSound.ts
4176
+ var import_snowflake5 = require("@sapphire/snowflake");
4177
+ var SoundboardSound = class extends Structure {
4178
+ static {
4179
+ __name(this, "SoundboardSound");
4180
+ }
4181
+ /**
4182
+ * The template used for removing data from the raw data stored for each soundboard sound.
4183
+ */
4184
+ static DataTemplate = {};
4185
+ /**
4186
+ * @param data - The raw data received from the API for the soundboard sound
4187
+ */
4188
+ constructor(data) {
4189
+ super(data);
4190
+ }
4191
+ /**
4192
+ * The name of this sound
4193
+ */
4194
+ get name() {
4195
+ return this[kData].name;
4196
+ }
4197
+ /**
4198
+ * The id of this sound
4199
+ */
4200
+ get soundId() {
4201
+ return this[kData].sound_id;
4202
+ }
4203
+ /**
4204
+ * The volume of this sound, from 0 to 1
4205
+ */
4206
+ get volume() {
4207
+ return this[kData].volume;
4208
+ }
4209
+ /**
4210
+ * The id of this sound's custom emoji
4211
+ */
4212
+ get emojiId() {
4213
+ return this[kData].emoji_id;
4214
+ }
4215
+ /**
4216
+ * The unicode character of this sound's standard emoji
4217
+ */
4218
+ get emojiName() {
4219
+ return this[kData].emoji_name;
4220
+ }
4221
+ /**
4222
+ * The id of the guild this sound is in
4223
+ */
4224
+ get guildId() {
4225
+ return this[kData].guild_id;
4226
+ }
4227
+ /**
4228
+ * Whether this sound can be used, may be false due to loss of server boosts
4229
+ */
4230
+ get available() {
4231
+ return this[kData].available;
4232
+ }
4233
+ /**
4234
+ * The timestamp this sound was created at
4235
+ *
4236
+ * @remarks only available for guild soundboard sounds
4237
+ */
4238
+ get createdTimestamp() {
4239
+ return isIdSet(this[kData].sound_id) && isIdSet(this[kData].guild_id) ? import_snowflake5.DiscordSnowflake.timestampFrom(this[kData].sound_id) : null;
4240
+ }
4241
+ /**
4242
+ * The time this sound was created at
4243
+ *
4244
+ * @remarks only available for guild soundboard sounds
4245
+ */
4246
+ get createdAt() {
4247
+ const createdTimestamp = this.createdTimestamp;
4248
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4249
+ }
4250
+ };
4251
+
4252
+ // src/stageInstances/StageInstance.ts
4253
+ var import_snowflake6 = require("@sapphire/snowflake");
4254
+ var StageInstance = class extends Structure {
4255
+ static {
4256
+ __name(this, "StageInstance");
4257
+ }
4258
+ /**
4259
+ * The template used for removing data from the raw data stored for each stage instance
4260
+ */
4261
+ static DataTemplate = {};
4262
+ /**
4263
+ * @param data - The raw data received from the API for the stage instance
4264
+ */
4265
+ constructor(data) {
4266
+ super(data);
4267
+ }
4268
+ /**
4269
+ * The stage instance's id
4270
+ */
4271
+ get id() {
4272
+ return this[kData].id;
4273
+ }
4274
+ /**
4275
+ * The guild id of the associated stage channel
4276
+ */
4277
+ get guildId() {
4278
+ return this[kData].guild_id;
4279
+ }
4280
+ /**
4281
+ * The id of the associated stage channel
4282
+ */
4283
+ get channelId() {
4284
+ return this[kData].channel_id;
4285
+ }
4286
+ /**
4287
+ * The topic of the stage instance (1-120 characters)
4288
+ */
4289
+ get topic() {
4290
+ return this[kData].topic;
4291
+ }
4292
+ /**
4293
+ * The privacy level of the stage instance
4294
+ */
4295
+ get privacyLevel() {
4296
+ return this[kData].privacy_level;
4297
+ }
4298
+ /**
4299
+ * The id of the scheduled event for this stage instance
4300
+ */
4301
+ get guildScheduledEventId() {
4302
+ return this[kData].guild_scheduled_event_id;
4303
+ }
4304
+ /**
4305
+ * The timestamp the stage instance was created at
4306
+ */
4307
+ get createdTimestamp() {
4308
+ return isIdSet(this.id) ? import_snowflake6.DiscordSnowflake.timestampFrom(this.id) : null;
4309
+ }
4310
+ /**
4311
+ * The time the stage instance was created at
4312
+ */
4313
+ get createdAt() {
4314
+ const createdTimestamp = this.createdTimestamp;
4315
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4316
+ }
4317
+ };
4318
+
4081
4319
  // src/stickers/Sticker.ts
4320
+ var import_snowflake7 = require("@sapphire/snowflake");
4082
4321
  var Sticker = class extends Structure {
4083
4322
  static {
4084
4323
  __name(this, "Sticker");
@@ -4135,6 +4374,182 @@ var Sticker = class extends Structure {
4135
4374
  get type() {
4136
4375
  return this[kData].type;
4137
4376
  }
4377
+ /**
4378
+ * The timestamp the sticker was created at
4379
+ */
4380
+ get createdTimestamp() {
4381
+ return isIdSet(this.id) ? import_snowflake7.DiscordSnowflake.timestampFrom(this.id) : null;
4382
+ }
4383
+ /**
4384
+ * The time the sticker was created at
4385
+ */
4386
+ get createdAt() {
4387
+ const createdTimestamp = this.createdTimestamp;
4388
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4389
+ }
4390
+ };
4391
+
4392
+ // src/stickers/StickerPack.ts
4393
+ var import_snowflake8 = require("@sapphire/snowflake");
4394
+ var StickerPack = class extends Structure {
4395
+ static {
4396
+ __name(this, "StickerPack");
4397
+ }
4398
+ /**
4399
+ * The template used for removing data from the raw data stored for each sticker pack
4400
+ */
4401
+ static DataTemplate = {};
4402
+ /**
4403
+ * @param data - The raw data received from the API for the sticker pack
4404
+ */
4405
+ constructor(data) {
4406
+ super(data);
4407
+ }
4408
+ /**
4409
+ * The id of the sticker pack
4410
+ */
4411
+ get id() {
4412
+ return this[kData].id;
4413
+ }
4414
+ /**
4415
+ * The name of the sticker pack
4416
+ */
4417
+ get name() {
4418
+ return this[kData].name;
4419
+ }
4420
+ /**
4421
+ * The id of the pack's SKU
4422
+ */
4423
+ get skuId() {
4424
+ return this[kData].sku_id;
4425
+ }
4426
+ /**
4427
+ * The id of a sticker in the pack which is shown as the pack's icon
4428
+ */
4429
+ get coverStickerId() {
4430
+ return this[kData].cover_sticker_id;
4431
+ }
4432
+ /**
4433
+ * The description of the sticker pack
4434
+ */
4435
+ get description() {
4436
+ return this[kData].description;
4437
+ }
4438
+ /**
4439
+ * The id of the sticker pack's banner image
4440
+ *
4441
+ * @see {@link https://discord.com/developers/docs/reference#image-formatting}
4442
+ */
4443
+ get bannerAssetId() {
4444
+ return this[kData].banner_asset_id;
4445
+ }
4446
+ /**
4447
+ * The timestamp the sticker pack was created at
4448
+ */
4449
+ get createdTimestamp() {
4450
+ return isIdSet(this.id) ? import_snowflake8.DiscordSnowflake.timestampFrom(this.id) : null;
4451
+ }
4452
+ /**
4453
+ * The time the sticker pack was created at
4454
+ */
4455
+ get createdAt() {
4456
+ const createdTimestamp = this.createdTimestamp;
4457
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4458
+ }
4459
+ };
4460
+
4461
+ // src/teams/Team.ts
4462
+ var import_snowflake9 = require("@sapphire/snowflake");
4463
+ var Team = class extends Structure {
4464
+ static {
4465
+ __name(this, "Team");
4466
+ }
4467
+ /**
4468
+ * The template used for removing data from the raw data stored for each team.
4469
+ */
4470
+ static DataTemplate = {};
4471
+ /**
4472
+ * @param data - The raw data received from the API for the team.
4473
+ */
4474
+ constructor(data) {
4475
+ super(data);
4476
+ }
4477
+ /**
4478
+ * Hash of the image of the team's icon
4479
+ */
4480
+ get icon() {
4481
+ return this[kData].icon;
4482
+ }
4483
+ /**
4484
+ * The unique id of the team
4485
+ */
4486
+ get id() {
4487
+ return this[kData].id;
4488
+ }
4489
+ /**
4490
+ * Name of the team
4491
+ */
4492
+ get name() {
4493
+ return this[kData].name;
4494
+ }
4495
+ /**
4496
+ * User ID of the current team owner
4497
+ */
4498
+ get ownerUserId() {
4499
+ return this[kData].owner_user_id;
4500
+ }
4501
+ /**
4502
+ * The timestamp the team was created at
4503
+ */
4504
+ get createdTimestamp() {
4505
+ return isIdSet(this.id) ? import_snowflake9.DiscordSnowflake.timestampFrom(this.id) : null;
4506
+ }
4507
+ /**
4508
+ * The time the team was created at
4509
+ */
4510
+ get createdAt() {
4511
+ const createdTimestamp = this.createdTimestamp;
4512
+ return createdTimestamp ? new Date(createdTimestamp) : null;
4513
+ }
4514
+ };
4515
+
4516
+ // src/teams/TeamMember.ts
4517
+ var TeamMember = class extends Structure {
4518
+ static {
4519
+ __name(this, "TeamMember");
4520
+ }
4521
+ /**
4522
+ * The template used for removing data from the raw data stored for each team member
4523
+ */
4524
+ static DataTemplate = {};
4525
+ /**
4526
+ * @param data - The raw data received from the API for the team member
4527
+ */
4528
+ constructor(data) {
4529
+ super(data);
4530
+ }
4531
+ /**
4532
+ * User's membership state on the team
4533
+ *
4534
+ * @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
4535
+ */
4536
+ get membershipState() {
4537
+ return this[kData].membership_state;
4538
+ }
4539
+ /**
4540
+ * Id of the parent team of which they are a member
4541
+ */
4542
+ get teamId() {
4543
+ return this[kData].team_id;
4544
+ }
4545
+ /**
4546
+ * Role of the team member
4547
+ *
4548
+ * @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types}
4549
+ */
4550
+ get role() {
4551
+ return this[kData].role;
4552
+ }
4138
4553
  };
4139
4554
 
4140
4555
  // src/users/AvatarDecorationData.ts
@@ -4167,7 +4582,7 @@ var AvatarDecorationData = class extends Structure {
4167
4582
  };
4168
4583
 
4169
4584
  // src/users/User.ts
4170
- var import_snowflake5 = require("@sapphire/snowflake");
4585
+ var import_snowflake10 = require("@sapphire/snowflake");
4171
4586
  var User = class extends Structure {
4172
4587
  static {
4173
4588
  __name(this, "User");
@@ -4290,7 +4705,7 @@ var User = class extends Structure {
4290
4705
  * The timestamp the user was created at
4291
4706
  */
4292
4707
  get createdTimestamp() {
4293
- return isIdSet(this.id) ? import_snowflake5.DiscordSnowflake.timestampFrom(this.id) : null;
4708
+ return isIdSet(this.id) ? import_snowflake10.DiscordSnowflake.timestampFrom(this.id) : null;
4294
4709
  }
4295
4710
  /**
4296
4711
  * The time the user was created at
@@ -4381,6 +4796,286 @@ var Connection = class extends Structure {
4381
4796
  return this[kData].visibility;
4382
4797
  }
4383
4798
  };
4799
+
4800
+ // src/voice/VoiceState.ts
4801
+ var VoiceState = class extends Structure {
4802
+ static {
4803
+ __name(this, "VoiceState");
4804
+ }
4805
+ /**
4806
+ * The template used for removing data from the raw data stored for each voice state
4807
+ */
4808
+ static DataTemplate = {};
4809
+ /**
4810
+ * @param data - The raw data received from the API for the voice state
4811
+ */
4812
+ constructor(data) {
4813
+ super(data);
4814
+ }
4815
+ /**
4816
+ * The guild id this voice state is for
4817
+ */
4818
+ get guildId() {
4819
+ return this[kData].guild_id;
4820
+ }
4821
+ /**
4822
+ * The channel id this user is connected to
4823
+ */
4824
+ get channelId() {
4825
+ return this[kData].channel_id;
4826
+ }
4827
+ /**
4828
+ * The user id this voice state is for
4829
+ */
4830
+ get userId() {
4831
+ return this[kData].user_id;
4832
+ }
4833
+ /**
4834
+ * The session id for this voice state
4835
+ */
4836
+ get sessionId() {
4837
+ return this[kData].session_id;
4838
+ }
4839
+ /**
4840
+ * Whether this user is deafened by the server
4841
+ */
4842
+ get deaf() {
4843
+ return this[kData].deaf;
4844
+ }
4845
+ /**
4846
+ * Whether this user is muted by the server
4847
+ */
4848
+ get mute() {
4849
+ return this[kData].mute;
4850
+ }
4851
+ /**
4852
+ * Whether this user is locally deafened
4853
+ */
4854
+ get selfDeaf() {
4855
+ return this[kData].self_deaf;
4856
+ }
4857
+ /**
4858
+ * Whether this user is locally muted
4859
+ */
4860
+ get selfMute() {
4861
+ return this[kData].self_mute;
4862
+ }
4863
+ /**
4864
+ * Whether this user is streaming using "Go Live"
4865
+ */
4866
+ get selfStream() {
4867
+ return this[kData].self_stream;
4868
+ }
4869
+ /**
4870
+ * Whether this user's camera is enabled
4871
+ */
4872
+ get selfVideo() {
4873
+ return this[kData].self_video;
4874
+ }
4875
+ /**
4876
+ * Whether this user's permission to speak is denied
4877
+ */
4878
+ get suppress() {
4879
+ return this[kData].suppress;
4880
+ }
4881
+ /**
4882
+ * The time at which the user requested to speak
4883
+ */
4884
+ get requestToSpeakTimestamp() {
4885
+ return this[kData].request_to_speak_timestamp;
4886
+ }
4887
+ };
4888
+
4889
+ // src/voice/VoiceRegion.ts
4890
+ var VoiceRegion = class extends Structure {
4891
+ static {
4892
+ __name(this, "VoiceRegion");
4893
+ }
4894
+ /**
4895
+ * The template used for removing data from the raw data stored for each voice region
4896
+ */
4897
+ static DataTemplate = {};
4898
+ /**
4899
+ * @param data - The raw data received from the API for the voice region
4900
+ */
4901
+ constructor(data) {
4902
+ super(data);
4903
+ }
4904
+ /**
4905
+ * Unique id for the region
4906
+ */
4907
+ get id() {
4908
+ return this[kData].id;
4909
+ }
4910
+ /**
4911
+ * Name of the region
4912
+ */
4913
+ get name() {
4914
+ return this[kData].name;
4915
+ }
4916
+ /**
4917
+ * `true` for a single server that is closest to the current user's client
4918
+ */
4919
+ get optimal() {
4920
+ return this[kData].optimal;
4921
+ }
4922
+ /**
4923
+ * Whether this is a deprecated voice region (avoid switching to these)
4924
+ */
4925
+ get deprecated() {
4926
+ return this[kData].deprecated;
4927
+ }
4928
+ /**
4929
+ * Whether this is a custom voice region (used for events/etc)
4930
+ */
4931
+ get custom() {
4932
+ return this[kData].custom;
4933
+ }
4934
+ };
4935
+
4936
+ // src/subscriptions/Subscription.ts
4937
+ var import_snowflake11 = require("@sapphire/snowflake");
4938
+ var Subscription = class extends Structure {
4939
+ static {
4940
+ __name(this, "Subscription");
4941
+ }
4942
+ /**
4943
+ * The template used for removing data from the raw data stored for each subscription
4944
+ */
4945
+ static DataTemplate = {
4946
+ set current_period_start(_) {
4947
+ },
4948
+ set current_period_end(_) {
4949
+ },
4950
+ set canceled_at(_) {
4951
+ }
4952
+ };
4953
+ [kCurrentPeriodStartTimestamp] = null;
4954
+ [kCurrentPeriodEndTimestamp] = null;
4955
+ [kCanceledTimestamp] = null;
4956
+ /**
4957
+ * @param data - The raw data received from the API for the subscription
4958
+ */
4959
+ constructor(data) {
4960
+ super(data);
4961
+ this.optimizeData(data);
4962
+ }
4963
+ /**
4964
+ * {@inheritDoc Structure.optimizeData}
4965
+ */
4966
+ optimizeData(data) {
4967
+ const currentPeriodStartTimestamp = data.current_period_start;
4968
+ const currentPeriodEndTimestamp = data.current_period_end;
4969
+ const canceledTimestamp = data.canceled_at;
4970
+ if (currentPeriodStartTimestamp) {
4971
+ this[kCurrentPeriodStartTimestamp] = Date.parse(currentPeriodStartTimestamp);
4972
+ }
4973
+ if (currentPeriodEndTimestamp) {
4974
+ this[kCurrentPeriodEndTimestamp] = Date.parse(currentPeriodEndTimestamp);
4975
+ }
4976
+ if (canceledTimestamp) {
4977
+ this[kCanceledTimestamp] = Date.parse(canceledTimestamp);
4978
+ }
4979
+ }
4980
+ /**
4981
+ * The subscription's id
4982
+ *
4983
+ * @remarks The start of a subscription is determined by its id. When the subscription renews, its current period is updated.
4984
+ */
4985
+ get id() {
4986
+ return this[kData].id;
4987
+ }
4988
+ /**
4989
+ * Id of the user who is subscribed
4990
+ */
4991
+ get userId() {
4992
+ return this[kData].user_id;
4993
+ }
4994
+ /**
4995
+ * List of SKUs subscribed to
4996
+ */
4997
+ get skuIds() {
4998
+ return this[kData].sku_ids;
4999
+ }
5000
+ /**
5001
+ * List of entitlements granted for this subscription
5002
+ */
5003
+ get entitlementIds() {
5004
+ return this[kData].entitlement_ids;
5005
+ }
5006
+ /**
5007
+ * List of SKUs that this user will be subscribed to at renewal
5008
+ */
5009
+ get renewalSkuIds() {
5010
+ return this[kData].renewal_sku_ids;
5011
+ }
5012
+ /**
5013
+ * Timestamp of start of the current subscription period
5014
+ */
5015
+ get currentPeriodStartTimestamp() {
5016
+ return this[kCurrentPeriodStartTimestamp];
5017
+ }
5018
+ /**
5019
+ * The time at which the current subscription period will start
5020
+ */
5021
+ get currentPeriodStartAt() {
5022
+ const startTimestamp = this.currentPeriodStartTimestamp;
5023
+ return startTimestamp ? new Date(startTimestamp) : null;
5024
+ }
5025
+ /**
5026
+ * Timestamp of end of the current subscription period
5027
+ */
5028
+ get currentPeriodEndTimestamp() {
5029
+ return this[kCurrentPeriodEndTimestamp];
5030
+ }
5031
+ /**
5032
+ * The time at which the current subscription period will end
5033
+ */
5034
+ get currentPeriodEndsAt() {
5035
+ const endTimestamp = this.currentPeriodEndTimestamp;
5036
+ return endTimestamp ? new Date(endTimestamp) : null;
5037
+ }
5038
+ /**
5039
+ * The {@link SubscriptionStatus} of the current subscription
5040
+ */
5041
+ get status() {
5042
+ return this[kData].status;
5043
+ }
5044
+ /**
5045
+ * Timestamp when the subscription was canceled
5046
+ */
5047
+ get canceledTimestamp() {
5048
+ return this[kCanceledTimestamp];
5049
+ }
5050
+ /**
5051
+ * The time when the subscription was canceled
5052
+ *
5053
+ * @remarks This is populated when the {@link Subscription#status} transitions to {@link SubscriptionStatus.Ending}.
5054
+ */
5055
+ get canceledAt() {
5056
+ const canceledTimestamp = this.canceledTimestamp;
5057
+ return canceledTimestamp ? new Date(canceledTimestamp) : null;
5058
+ }
5059
+ /**
5060
+ * ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope.
5061
+ */
5062
+ get country() {
5063
+ return this[kData].country;
5064
+ }
5065
+ /**
5066
+ * The timestamp the subscription was created at
5067
+ */
5068
+ get createdTimestamp() {
5069
+ return isIdSet(this.id) ? import_snowflake11.DiscordSnowflake.timestampFrom(this.id) : null;
5070
+ }
5071
+ /**
5072
+ * The time the subscription was created at
5073
+ */
5074
+ get createdAt() {
5075
+ const createdTimestamp = this.createdTimestamp;
5076
+ return createdTimestamp ? new Date(createdTimestamp) : null;
5077
+ }
5078
+ };
4384
5079
  // Annotate the CommonJS export names for ESM import in node:
4385
5080
  0 && (module.exports = {
4386
5081
  ActionRowComponent,
@@ -4466,15 +5161,23 @@ var Connection = class extends Structure {
4466
5161
  ResolvedInteractionData,
4467
5162
  RoleSelectMenuComponent,
4468
5163
  RoleSubscriptionData,
5164
+ SKU,
5165
+ SKUFlagsBitField,
4469
5166
  SectionComponent,
4470
5167
  SelectMenuComponent,
4471
5168
  SelectMenuDefaultValue,
4472
5169
  SeparatorComponent,
5170
+ SoundboardSound,
4473
5171
  StageChannel,
5172
+ StageInstance,
4474
5173
  Sticker,
5174
+ StickerPack,
4475
5175
  StringSelectMenuComponent,
4476
5176
  StringSelectMenuOption,
4477
5177
  Structure,
5178
+ Subscription,
5179
+ Team,
5180
+ TeamMember,
4478
5181
  TextChannel,
4479
5182
  TextChannelMixin,
4480
5183
  TextDisplayComponent,
@@ -4488,6 +5191,8 @@ var Connection = class extends Structure {
4488
5191
  UserSelectMenuComponent,
4489
5192
  VoiceChannel,
4490
5193
  VoiceChannelMixin,
5194
+ VoiceRegion,
5195
+ VoiceState,
4491
5196
  dateToDiscordISOTimestamp,
4492
5197
  extendTemplate
4493
5198
  });