@discordjs/structures 1.0.0-dev.1790856158-4dc1acc60 → 1.0.0-dev.1791979323-03777df7f
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 +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +30 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -3438,6 +3438,14 @@ declare class SKU<Omitted extends keyof APISKU | '' = ''> extends Structure<APIS
|
|
|
3438
3438
|
* SKU flags combined as a bitfield
|
|
3439
3439
|
*/
|
|
3440
3440
|
get flags(): SKUFlagsBitField | null;
|
|
3441
|
+
/**
|
|
3442
|
+
* The timestamp the SKU was created at
|
|
3443
|
+
*/
|
|
3444
|
+
get createdTimestamp(): number | null;
|
|
3445
|
+
/**
|
|
3446
|
+
* The time the SKU was created at
|
|
3447
|
+
*/
|
|
3448
|
+
get createdDate(): Date | null;
|
|
3441
3449
|
}
|
|
3442
3450
|
|
|
3443
3451
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3438,6 +3438,14 @@ declare class SKU<Omitted extends keyof APISKU | '' = ''> extends Structure<APIS
|
|
|
3438
3438
|
* SKU flags combined as a bitfield
|
|
3439
3439
|
*/
|
|
3440
3440
|
get flags(): SKUFlagsBitField | null;
|
|
3441
|
+
/**
|
|
3442
|
+
* The timestamp the SKU was created at
|
|
3443
|
+
*/
|
|
3444
|
+
get createdTimestamp(): number | null;
|
|
3445
|
+
/**
|
|
3446
|
+
* The time the SKU was created at
|
|
3447
|
+
*/
|
|
3448
|
+
get createdDate(): Date | null;
|
|
3441
3449
|
}
|
|
3442
3450
|
|
|
3443
3451
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4576,6 +4576,7 @@ var Presence = class extends Structure {
|
|
|
4576
4576
|
};
|
|
4577
4577
|
|
|
4578
4578
|
// src/skus/SKU.ts
|
|
4579
|
+
var import_snowflake5 = require("@sapphire/snowflake");
|
|
4579
4580
|
var SKU = class extends Structure {
|
|
4580
4581
|
static {
|
|
4581
4582
|
__name(this, "SKU");
|
|
@@ -4628,10 +4629,23 @@ var SKU = class extends Structure {
|
|
|
4628
4629
|
get flags() {
|
|
4629
4630
|
return isFieldSet(this[kData], "flags", "number") ? new SKUFlagsBitField(this[kData].flags) : null;
|
|
4630
4631
|
}
|
|
4632
|
+
/**
|
|
4633
|
+
* The timestamp the SKU was created at
|
|
4634
|
+
*/
|
|
4635
|
+
get createdTimestamp() {
|
|
4636
|
+
return isIdSet(this.id) ? import_snowflake5.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
4637
|
+
}
|
|
4638
|
+
/**
|
|
4639
|
+
* The time the SKU was created at
|
|
4640
|
+
*/
|
|
4641
|
+
get createdDate() {
|
|
4642
|
+
const createdTimestamp = this.createdTimestamp;
|
|
4643
|
+
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4644
|
+
}
|
|
4631
4645
|
};
|
|
4632
4646
|
|
|
4633
4647
|
// src/soundboards/SoundboardSound.ts
|
|
4634
|
-
var
|
|
4648
|
+
var import_snowflake6 = require("@sapphire/snowflake");
|
|
4635
4649
|
var SoundboardSound = class extends Structure {
|
|
4636
4650
|
static {
|
|
4637
4651
|
__name(this, "SoundboardSound");
|
|
@@ -4694,7 +4708,7 @@ var SoundboardSound = class extends Structure {
|
|
|
4694
4708
|
* @remarks only available for guild soundboard sounds
|
|
4695
4709
|
*/
|
|
4696
4710
|
get createdTimestamp() {
|
|
4697
|
-
return isIdSet(this[kData].sound_id) && isIdSet(this[kData].guild_id) ?
|
|
4711
|
+
return isIdSet(this[kData].sound_id) && isIdSet(this[kData].guild_id) ? import_snowflake6.DiscordSnowflake.timestampFrom(this[kData].sound_id) : null;
|
|
4698
4712
|
}
|
|
4699
4713
|
/**
|
|
4700
4714
|
* The time this sound was created at
|
|
@@ -4708,7 +4722,7 @@ var SoundboardSound = class extends Structure {
|
|
|
4708
4722
|
};
|
|
4709
4723
|
|
|
4710
4724
|
// src/stageInstances/StageInstance.ts
|
|
4711
|
-
var
|
|
4725
|
+
var import_snowflake7 = require("@sapphire/snowflake");
|
|
4712
4726
|
var StageInstance = class extends Structure {
|
|
4713
4727
|
static {
|
|
4714
4728
|
__name(this, "StageInstance");
|
|
@@ -4763,7 +4777,7 @@ var StageInstance = class extends Structure {
|
|
|
4763
4777
|
* The timestamp the stage instance was created at
|
|
4764
4778
|
*/
|
|
4765
4779
|
get createdTimestamp() {
|
|
4766
|
-
return isIdSet(this.id) ?
|
|
4780
|
+
return isIdSet(this.id) ? import_snowflake7.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
4767
4781
|
}
|
|
4768
4782
|
/**
|
|
4769
4783
|
* The time the stage instance was created at
|
|
@@ -4775,7 +4789,7 @@ var StageInstance = class extends Structure {
|
|
|
4775
4789
|
};
|
|
4776
4790
|
|
|
4777
4791
|
// src/stickers/Sticker.ts
|
|
4778
|
-
var
|
|
4792
|
+
var import_snowflake8 = require("@sapphire/snowflake");
|
|
4779
4793
|
var Sticker = class extends Structure {
|
|
4780
4794
|
static {
|
|
4781
4795
|
__name(this, "Sticker");
|
|
@@ -4836,7 +4850,7 @@ var Sticker = class extends Structure {
|
|
|
4836
4850
|
* The timestamp the sticker was created at
|
|
4837
4851
|
*/
|
|
4838
4852
|
get createdTimestamp() {
|
|
4839
|
-
return isIdSet(this.id) ?
|
|
4853
|
+
return isIdSet(this.id) ? import_snowflake8.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
4840
4854
|
}
|
|
4841
4855
|
/**
|
|
4842
4856
|
* The time the sticker was created at
|
|
@@ -4848,7 +4862,7 @@ var Sticker = class extends Structure {
|
|
|
4848
4862
|
};
|
|
4849
4863
|
|
|
4850
4864
|
// src/stickers/StickerPack.ts
|
|
4851
|
-
var
|
|
4865
|
+
var import_snowflake9 = require("@sapphire/snowflake");
|
|
4852
4866
|
var StickerPack = class extends Structure {
|
|
4853
4867
|
static {
|
|
4854
4868
|
__name(this, "StickerPack");
|
|
@@ -4905,7 +4919,7 @@ var StickerPack = class extends Structure {
|
|
|
4905
4919
|
* The timestamp the sticker pack was created at
|
|
4906
4920
|
*/
|
|
4907
4921
|
get createdTimestamp() {
|
|
4908
|
-
return isIdSet(this.id) ?
|
|
4922
|
+
return isIdSet(this.id) ? import_snowflake9.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
4909
4923
|
}
|
|
4910
4924
|
/**
|
|
4911
4925
|
* The time the sticker pack was created at
|
|
@@ -4917,7 +4931,7 @@ var StickerPack = class extends Structure {
|
|
|
4917
4931
|
};
|
|
4918
4932
|
|
|
4919
4933
|
// src/teams/Team.ts
|
|
4920
|
-
var
|
|
4934
|
+
var import_snowflake10 = require("@sapphire/snowflake");
|
|
4921
4935
|
var Team = class extends Structure {
|
|
4922
4936
|
static {
|
|
4923
4937
|
__name(this, "Team");
|
|
@@ -4960,7 +4974,7 @@ var Team = class extends Structure {
|
|
|
4960
4974
|
* The timestamp the team was created at
|
|
4961
4975
|
*/
|
|
4962
4976
|
get createdTimestamp() {
|
|
4963
|
-
return isIdSet(this.id) ?
|
|
4977
|
+
return isIdSet(this.id) ? import_snowflake10.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
4964
4978
|
}
|
|
4965
4979
|
/**
|
|
4966
4980
|
* The time the team was created at
|
|
@@ -5040,7 +5054,7 @@ var AvatarDecorationData = class extends Structure {
|
|
|
5040
5054
|
};
|
|
5041
5055
|
|
|
5042
5056
|
// src/users/User.ts
|
|
5043
|
-
var
|
|
5057
|
+
var import_snowflake11 = require("@sapphire/snowflake");
|
|
5044
5058
|
var User = class extends Structure {
|
|
5045
5059
|
static {
|
|
5046
5060
|
__name(this, "User");
|
|
@@ -5163,7 +5177,7 @@ var User = class extends Structure {
|
|
|
5163
5177
|
* The timestamp the user was created at
|
|
5164
5178
|
*/
|
|
5165
5179
|
get createdTimestamp() {
|
|
5166
|
-
return isIdSet(this.id) ?
|
|
5180
|
+
return isIdSet(this.id) ? import_snowflake11.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
5167
5181
|
}
|
|
5168
5182
|
/**
|
|
5169
5183
|
* The time the user was created at
|
|
@@ -5256,7 +5270,7 @@ var Connection = class extends Structure {
|
|
|
5256
5270
|
};
|
|
5257
5271
|
|
|
5258
5272
|
// src/webhooks/Webhook.ts
|
|
5259
|
-
var
|
|
5273
|
+
var import_snowflake12 = require("@sapphire/snowflake");
|
|
5260
5274
|
var Webhook = class extends Structure {
|
|
5261
5275
|
static {
|
|
5262
5276
|
__name(this, "Webhook");
|
|
@@ -5333,7 +5347,7 @@ var Webhook = class extends Structure {
|
|
|
5333
5347
|
* The timestamp the webhook was created at
|
|
5334
5348
|
*/
|
|
5335
5349
|
get createdTimestamp() {
|
|
5336
|
-
return isIdSet(this.id) ?
|
|
5350
|
+
return isIdSet(this.id) ? import_snowflake12.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
5337
5351
|
}
|
|
5338
5352
|
/**
|
|
5339
5353
|
* The time the webhook was created at
|
|
@@ -5481,7 +5495,7 @@ var VoiceRegion = class extends Structure {
|
|
|
5481
5495
|
};
|
|
5482
5496
|
|
|
5483
5497
|
// src/subscriptions/Subscription.ts
|
|
5484
|
-
var
|
|
5498
|
+
var import_snowflake13 = require("@sapphire/snowflake");
|
|
5485
5499
|
var Subscription = class extends Structure {
|
|
5486
5500
|
static {
|
|
5487
5501
|
__name(this, "Subscription");
|
|
@@ -5613,7 +5627,7 @@ var Subscription = class extends Structure {
|
|
|
5613
5627
|
* The timestamp the subscription was created at
|
|
5614
5628
|
*/
|
|
5615
5629
|
get createdTimestamp() {
|
|
5616
|
-
return isIdSet(this.id) ?
|
|
5630
|
+
return isIdSet(this.id) ? import_snowflake13.DiscordSnowflake.timestampFrom(this.id) : null;
|
|
5617
5631
|
}
|
|
5618
5632
|
/**
|
|
5619
5633
|
* The time the subscription was created at
|