@discordjs/structures 1.0.0-dev.1786968995-99af6d8be → 1.0.0-dev.1788538586-ecea9ed57
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 +340 -28
- package/dist/index.d.ts +340 -28
- package/dist/index.js +495 -73
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +471 -54
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -22,6 +22,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var index_exports = {};
|
|
23
23
|
__export(index_exports, {
|
|
24
24
|
ActionRowComponent: () => ActionRowComponent,
|
|
25
|
+
Activity: () => Activity,
|
|
26
|
+
ActivityAssets: () => ActivityAssets,
|
|
27
|
+
ActivityButton: () => ActivityButton,
|
|
28
|
+
ActivityFlagsBitField: () => ActivityFlagsBitField,
|
|
29
|
+
ActivityParty: () => ActivityParty,
|
|
30
|
+
ActivitySecrets: () => ActivitySecrets,
|
|
31
|
+
ActivityTimestamps: () => ActivityTimestamps,
|
|
25
32
|
AnnouncementChannel: () => AnnouncementChannel,
|
|
26
33
|
AnnouncementThreadChannel: () => AnnouncementThreadChannel,
|
|
27
34
|
ApplicationCommandInteractionMetadata: () => ApplicationCommandInteractionMetadata,
|
|
@@ -47,6 +54,7 @@ __export(index_exports, {
|
|
|
47
54
|
ChannelSlowmodeMixin: () => ChannelSlowmodeMixin,
|
|
48
55
|
ChannelTopicMixin: () => ChannelTopicMixin,
|
|
49
56
|
ChannelWebhookMixin: () => ChannelWebhookMixin,
|
|
57
|
+
ClientStatus: () => ClientStatus,
|
|
50
58
|
Component: () => Component,
|
|
51
59
|
ComponentEmoji: () => ComponentEmoji,
|
|
52
60
|
Connection: () => Connection,
|
|
@@ -97,6 +105,7 @@ __export(index_exports, {
|
|
|
97
105
|
PollMedia: () => PollMedia,
|
|
98
106
|
PollResults: () => PollResults,
|
|
99
107
|
PremiumButtonComponent: () => PremiumButtonComponent,
|
|
108
|
+
Presence: () => Presence,
|
|
100
109
|
PrivateThreadChannel: () => PrivateThreadChannel,
|
|
101
110
|
PublicThreadChannel: () => PublicThreadChannel,
|
|
102
111
|
Reaction: () => Reaction,
|
|
@@ -591,7 +600,8 @@ var BitField = class _BitField {
|
|
|
591
600
|
serialize(...hasParams) {
|
|
592
601
|
const serialized = {};
|
|
593
602
|
for (const [flag, bit] of Object.entries(this.constructor.Flags)) {
|
|
594
|
-
if (Number.isNaN(Number(flag))
|
|
603
|
+
if (Number.isNaN(Number(flag)) && bit > 0)
|
|
604
|
+
serialized[flag] = this.has(bit, ...hasParams);
|
|
595
605
|
}
|
|
596
606
|
return serialized;
|
|
597
607
|
}
|
|
@@ -619,8 +629,9 @@ var BitField = class _BitField {
|
|
|
619
629
|
return this.bitField;
|
|
620
630
|
}
|
|
621
631
|
*[Symbol.iterator](...hasParams) {
|
|
622
|
-
for (const bitName of Object.
|
|
623
|
-
if (Number.isNaN(Number(bitName)) && this.has(
|
|
632
|
+
for (const [bitName, bit] of Object.entries(this.constructor.Flags)) {
|
|
633
|
+
if (Number.isNaN(Number(bitName)) && bit > 0 && this.has(bit, ...hasParams))
|
|
634
|
+
yield bitName;
|
|
624
635
|
}
|
|
625
636
|
}
|
|
626
637
|
/**
|
|
@@ -645,8 +656,23 @@ var BitField = class _BitField {
|
|
|
645
656
|
}
|
|
646
657
|
};
|
|
647
658
|
|
|
648
|
-
// src/bitfields/
|
|
659
|
+
// src/bitfields/ActivityFlagsBitField.ts
|
|
649
660
|
var import_v10 = require("discord-api-types/v10");
|
|
661
|
+
var ActivityFlagsBitField = class extends BitField {
|
|
662
|
+
static {
|
|
663
|
+
__name(this, "ActivityFlagsBitField");
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Numeric gateway presence activity flags.
|
|
667
|
+
*/
|
|
668
|
+
static Flags = import_v10.ActivityFlags;
|
|
669
|
+
toJSON() {
|
|
670
|
+
return super.toJSON(true);
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
// src/bitfields/AttachmentFlagsBitField.ts
|
|
675
|
+
var import_v102 = require("discord-api-types/v10");
|
|
650
676
|
var AttachmentFlagsBitField = class extends BitField {
|
|
651
677
|
static {
|
|
652
678
|
__name(this, "AttachmentFlagsBitField");
|
|
@@ -654,14 +680,14 @@ var AttachmentFlagsBitField = class extends BitField {
|
|
|
654
680
|
/**
|
|
655
681
|
* Numeric attachment flags.
|
|
656
682
|
*/
|
|
657
|
-
static Flags =
|
|
683
|
+
static Flags = import_v102.AttachmentFlags;
|
|
658
684
|
toJSON() {
|
|
659
685
|
return super.toJSON(true);
|
|
660
686
|
}
|
|
661
687
|
};
|
|
662
688
|
|
|
663
689
|
// src/bitfields/ChannelFlagsBitField.ts
|
|
664
|
-
var
|
|
690
|
+
var import_v103 = require("discord-api-types/v10");
|
|
665
691
|
var ChannelFlagsBitField = class extends BitField {
|
|
666
692
|
static {
|
|
667
693
|
__name(this, "ChannelFlagsBitField");
|
|
@@ -669,14 +695,14 @@ var ChannelFlagsBitField = class extends BitField {
|
|
|
669
695
|
/**
|
|
670
696
|
* Numeric guild channel flags.
|
|
671
697
|
*/
|
|
672
|
-
static Flags =
|
|
698
|
+
static Flags = import_v103.ChannelFlags;
|
|
673
699
|
toJSON() {
|
|
674
700
|
return super.toJSON(true);
|
|
675
701
|
}
|
|
676
702
|
};
|
|
677
703
|
|
|
678
704
|
// src/bitfields/MessageFlagsBitField.ts
|
|
679
|
-
var
|
|
705
|
+
var import_v104 = require("discord-api-types/v10");
|
|
680
706
|
var MessageFlagsBitField = class extends BitField {
|
|
681
707
|
static {
|
|
682
708
|
__name(this, "MessageFlagsBitField");
|
|
@@ -684,14 +710,14 @@ var MessageFlagsBitField = class extends BitField {
|
|
|
684
710
|
/**
|
|
685
711
|
* Numeric message flags.
|
|
686
712
|
*/
|
|
687
|
-
static Flags =
|
|
713
|
+
static Flags = import_v104.MessageFlags;
|
|
688
714
|
toJSON() {
|
|
689
715
|
return super.toJSON(true);
|
|
690
716
|
}
|
|
691
717
|
};
|
|
692
718
|
|
|
693
719
|
// src/bitfields/PermissionsBitField.ts
|
|
694
|
-
var
|
|
720
|
+
var import_v105 = require("discord-api-types/v10");
|
|
695
721
|
var PermissionsBitField = class extends BitField {
|
|
696
722
|
static {
|
|
697
723
|
__name(this, "PermissionsBitField");
|
|
@@ -701,11 +727,11 @@ var PermissionsBitField = class extends BitField {
|
|
|
701
727
|
*
|
|
702
728
|
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
|
|
703
729
|
*/
|
|
704
|
-
static Flags =
|
|
730
|
+
static Flags = import_v105.PermissionFlagsBits;
|
|
705
731
|
/**
|
|
706
732
|
* Bit field representing every permission combined
|
|
707
733
|
*/
|
|
708
|
-
static All = Object.values(
|
|
734
|
+
static All = Object.values(import_v105.PermissionFlagsBits).reduce((all, perm) => all | perm, 0n);
|
|
709
735
|
/**
|
|
710
736
|
* Bit field representing the default permissions for users
|
|
711
737
|
*/
|
|
@@ -713,7 +739,7 @@ var PermissionsBitField = class extends BitField {
|
|
|
713
739
|
/**
|
|
714
740
|
* Bit field representing the permissions required for moderators of stage channels
|
|
715
741
|
*/
|
|
716
|
-
static StageModerator =
|
|
742
|
+
static StageModerator = import_v105.PermissionFlagsBits.ManageChannels | import_v105.PermissionFlagsBits.MuteMembers | import_v105.PermissionFlagsBits.MoveMembers;
|
|
717
743
|
/**
|
|
718
744
|
* Gets all given bits that are missing from the bit field.
|
|
719
745
|
*
|
|
@@ -722,7 +748,7 @@ var PermissionsBitField = class extends BitField {
|
|
|
722
748
|
* @returns A bit field containing the missing permissions
|
|
723
749
|
*/
|
|
724
750
|
missing(bits, checkAdmin = true) {
|
|
725
|
-
return checkAdmin && this.has(
|
|
751
|
+
return checkAdmin && this.has(import_v105.PermissionFlagsBits.Administrator) ? [] : super.missing(bits);
|
|
726
752
|
}
|
|
727
753
|
/**
|
|
728
754
|
* Checks whether the bit field has a permission, or any of multiple permissions.
|
|
@@ -732,7 +758,7 @@ var PermissionsBitField = class extends BitField {
|
|
|
732
758
|
* @returns Whether the bit field has the permission(s)
|
|
733
759
|
*/
|
|
734
760
|
any(permission, checkAdmin = true) {
|
|
735
|
-
return checkAdmin && super.has(
|
|
761
|
+
return checkAdmin && super.has(import_v105.PermissionFlagsBits.Administrator) || super.any(permission);
|
|
736
762
|
}
|
|
737
763
|
/**
|
|
738
764
|
* Checks whether the bit field has a permission, or multiple permissions.
|
|
@@ -742,7 +768,7 @@ var PermissionsBitField = class extends BitField {
|
|
|
742
768
|
* @returns Whether the bit field has the permission(s)
|
|
743
769
|
*/
|
|
744
770
|
has(permission, checkAdmin = true) {
|
|
745
|
-
return checkAdmin && super.has(
|
|
771
|
+
return checkAdmin && super.has(import_v105.PermissionFlagsBits.Administrator) || super.has(permission);
|
|
746
772
|
}
|
|
747
773
|
/**
|
|
748
774
|
* Gets an Array of bitfield names based on the permissions available.
|
|
@@ -755,7 +781,7 @@ var PermissionsBitField = class extends BitField {
|
|
|
755
781
|
};
|
|
756
782
|
|
|
757
783
|
// src/bitfields/SKUFlagsBitField.ts
|
|
758
|
-
var
|
|
784
|
+
var import_v106 = require("discord-api-types/v10");
|
|
759
785
|
var SKUFlagsBitField = class extends BitField {
|
|
760
786
|
static {
|
|
761
787
|
__name(this, "SKUFlagsBitField");
|
|
@@ -763,7 +789,7 @@ var SKUFlagsBitField = class extends BitField {
|
|
|
763
789
|
/**
|
|
764
790
|
* Numeric SKU flags.
|
|
765
791
|
*/
|
|
766
|
-
static Flags =
|
|
792
|
+
static Flags = import_v106.SKUFlags;
|
|
767
793
|
toJSON() {
|
|
768
794
|
return super.toJSON(true);
|
|
769
795
|
}
|
|
@@ -868,6 +894,16 @@ var ChannelPermissionMixin = class {
|
|
|
868
894
|
}
|
|
869
895
|
};
|
|
870
896
|
|
|
897
|
+
// src/utils/optimization.ts
|
|
898
|
+
function extendTemplate(superTemplate, additions) {
|
|
899
|
+
return Object.defineProperties(additions, Object.getOwnPropertyDescriptors(superTemplate));
|
|
900
|
+
}
|
|
901
|
+
__name(extendTemplate, "extendTemplate");
|
|
902
|
+
function dateToDiscordISOTimestamp(date) {
|
|
903
|
+
return `${date.getUTCFullYear()}-${(date.getUTCMonth() + 1).toString().padStart(2, "0")}-${date.getUTCDate().toString().padStart(2, "0")}T${date.getUTCHours().toString().padStart(2, "0")}:${date.getUTCMinutes().toString().padStart(2, "0")}:${date.getUTCSeconds().toString().padStart(2, "0")}.${date.getUTCMilliseconds().toString().padStart(3, "0").padEnd(6, "0")}+00:00`;
|
|
904
|
+
}
|
|
905
|
+
__name(dateToDiscordISOTimestamp, "dateToDiscordISOTimestamp");
|
|
906
|
+
|
|
871
907
|
// src/channels/mixins/ChannelPinMixin.ts
|
|
872
908
|
var ChannelPinMixin = class {
|
|
873
909
|
static {
|
|
@@ -900,7 +936,7 @@ var ChannelPinMixin = class {
|
|
|
900
936
|
/**
|
|
901
937
|
* The Date of when the last pin in the channel happened
|
|
902
938
|
*/
|
|
903
|
-
get
|
|
939
|
+
get lastPinDate() {
|
|
904
940
|
const lastPinTimestamp = this.lastPinTimestamp;
|
|
905
941
|
return lastPinTimestamp ? new Date(lastPinTimestamp) : null;
|
|
906
942
|
}
|
|
@@ -910,7 +946,7 @@ var ChannelPinMixin = class {
|
|
|
910
946
|
* @param data - the result of {@link (Structure:class).toJSON}
|
|
911
947
|
*/
|
|
912
948
|
[kMixinToJSON](data) {
|
|
913
|
-
data.last_pin_timestamp = this[kLastPinTimestamp] ? new Date(this[kLastPinTimestamp])
|
|
949
|
+
data.last_pin_timestamp = this[kLastPinTimestamp] ? dateToDiscordISOTimestamp(new Date(this[kLastPinTimestamp])) : null;
|
|
914
950
|
}
|
|
915
951
|
};
|
|
916
952
|
|
|
@@ -1319,14 +1355,14 @@ var ThreadMetadata = class extends Structure {
|
|
|
1319
1355
|
/**
|
|
1320
1356
|
* The time the thread was archived at
|
|
1321
1357
|
*/
|
|
1322
|
-
get
|
|
1358
|
+
get archivedDate() {
|
|
1323
1359
|
const archivedTimestamp = this.archivedTimestamp;
|
|
1324
1360
|
return archivedTimestamp ? new Date(archivedTimestamp) : null;
|
|
1325
1361
|
}
|
|
1326
1362
|
/**
|
|
1327
1363
|
* The time the thread was created at
|
|
1328
1364
|
*/
|
|
1329
|
-
get
|
|
1365
|
+
get createdDate() {
|
|
1330
1366
|
const createdTimestamp = this.createdTimestamp;
|
|
1331
1367
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
1332
1368
|
}
|
|
@@ -1336,10 +1372,10 @@ var ThreadMetadata = class extends Structure {
|
|
|
1336
1372
|
toJSON() {
|
|
1337
1373
|
const data = super.toJSON();
|
|
1338
1374
|
if (this[kArchiveTimestamp]) {
|
|
1339
|
-
data.archive_timestamp = new Date(this[kArchiveTimestamp])
|
|
1375
|
+
data.archive_timestamp = dateToDiscordISOTimestamp(new Date(this[kArchiveTimestamp]));
|
|
1340
1376
|
}
|
|
1341
1377
|
if (this[kCreatedTimestamp]) {
|
|
1342
|
-
data.create_timestamp = new Date(this[kCreatedTimestamp])
|
|
1378
|
+
data.create_timestamp = dateToDiscordISOTimestamp(new Date(this[kCreatedTimestamp]));
|
|
1343
1379
|
}
|
|
1344
1380
|
return data;
|
|
1345
1381
|
}
|
|
@@ -1361,6 +1397,13 @@ function isFieldSet(data, fieldName, type) {
|
|
|
1361
1397
|
return hasProperty(data, fieldName) && typeof data[fieldName] === type;
|
|
1362
1398
|
}
|
|
1363
1399
|
__name(isFieldSet, "isFieldSet");
|
|
1400
|
+
function isArrayFieldSet(array, targetIndex, type) {
|
|
1401
|
+
return Array.isArray(array) ? array.length > targetIndex ? (
|
|
1402
|
+
// eslint-disable-next-line valid-typeof
|
|
1403
|
+
typeof array[targetIndex] === type
|
|
1404
|
+
) : false : false;
|
|
1405
|
+
}
|
|
1406
|
+
__name(isArrayFieldSet, "isArrayFieldSet");
|
|
1364
1407
|
|
|
1365
1408
|
// src/channels/Channel.ts
|
|
1366
1409
|
var Channel = class extends Structure {
|
|
@@ -1419,7 +1462,7 @@ var Channel = class extends Structure {
|
|
|
1419
1462
|
/**
|
|
1420
1463
|
* The time the channel was created at
|
|
1421
1464
|
*/
|
|
1422
|
-
get
|
|
1465
|
+
get createdDate() {
|
|
1423
1466
|
const createdTimestamp = this.createdTimestamp;
|
|
1424
1467
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
1425
1468
|
}
|
|
@@ -1863,7 +1906,7 @@ var Emoji = class extends Structure {
|
|
|
1863
1906
|
/**
|
|
1864
1907
|
* The time the emoji was created at
|
|
1865
1908
|
*/
|
|
1866
|
-
get
|
|
1909
|
+
get createdDate() {
|
|
1867
1910
|
const createdTimestamp = this.createdTimestamp;
|
|
1868
1911
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
1869
1912
|
}
|
|
@@ -1871,18 +1914,6 @@ var Emoji = class extends Structure {
|
|
|
1871
1914
|
|
|
1872
1915
|
// src/entitlements/Entitlement.ts
|
|
1873
1916
|
var import_snowflake3 = require("@sapphire/snowflake");
|
|
1874
|
-
|
|
1875
|
-
// src/utils/optimization.ts
|
|
1876
|
-
function extendTemplate(superTemplate, additions) {
|
|
1877
|
-
return Object.defineProperties(additions, Object.getOwnPropertyDescriptors(superTemplate));
|
|
1878
|
-
}
|
|
1879
|
-
__name(extendTemplate, "extendTemplate");
|
|
1880
|
-
function dateToDiscordISOTimestamp(date) {
|
|
1881
|
-
return `${date.getUTCFullYear()}-${(date.getUTCMonth() + 1).toString().padStart(2, "0")}-${date.getUTCDate().toString().padStart(2, "0")}T${date.getUTCHours().toString().padStart(2, "0")}:${date.getUTCMinutes().toString().padStart(2, "0")}:${date.getUTCSeconds().toString().padStart(2, "0")}.${date.getUTCMilliseconds().toString().padStart(3, "0").padEnd(6, "0")}+00:00`;
|
|
1882
|
-
}
|
|
1883
|
-
__name(dateToDiscordISOTimestamp, "dateToDiscordISOTimestamp");
|
|
1884
|
-
|
|
1885
|
-
// src/entitlements/Entitlement.ts
|
|
1886
1917
|
var Entitlement = class extends Structure {
|
|
1887
1918
|
static {
|
|
1888
1919
|
__name(this, "Entitlement");
|
|
@@ -1960,7 +1991,7 @@ var Entitlement = class extends Structure {
|
|
|
1960
1991
|
/**
|
|
1961
1992
|
* Start date at which the entitlement is valid
|
|
1962
1993
|
*/
|
|
1963
|
-
get
|
|
1994
|
+
get startsDate() {
|
|
1964
1995
|
const timestamp = this.startsTimestamp;
|
|
1965
1996
|
return timestamp ? new Date(timestamp) : null;
|
|
1966
1997
|
}
|
|
@@ -1973,7 +2004,7 @@ var Entitlement = class extends Structure {
|
|
|
1973
2004
|
/**
|
|
1974
2005
|
* End date at which the entitlement is valid
|
|
1975
2006
|
*/
|
|
1976
|
-
get
|
|
2007
|
+
get endsDate() {
|
|
1977
2008
|
const timestamp = this.endsTimestamp;
|
|
1978
2009
|
return timestamp ? new Date(timestamp) : null;
|
|
1979
2010
|
}
|
|
@@ -2004,7 +2035,7 @@ var Entitlement = class extends Structure {
|
|
|
2004
2035
|
/**
|
|
2005
2036
|
* The time the entitlement was created at
|
|
2006
2037
|
*/
|
|
2007
|
-
get
|
|
2038
|
+
get createdDate() {
|
|
2008
2039
|
const createdTimestamp = this.createdTimestamp;
|
|
2009
2040
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
2010
2041
|
}
|
|
@@ -2013,13 +2044,13 @@ var Entitlement = class extends Structure {
|
|
|
2013
2044
|
*/
|
|
2014
2045
|
toJSON() {
|
|
2015
2046
|
const clone = super.toJSON();
|
|
2016
|
-
const
|
|
2017
|
-
const
|
|
2018
|
-
if (
|
|
2019
|
-
clone.starts_at = dateToDiscordISOTimestamp(new Date(
|
|
2047
|
+
const startsDateTimestamp = this[kStartsTimestamp];
|
|
2048
|
+
const endsDateTimestamp = this[kEndsTimestamp];
|
|
2049
|
+
if (startsDateTimestamp) {
|
|
2050
|
+
clone.starts_at = dateToDiscordISOTimestamp(new Date(startsDateTimestamp));
|
|
2020
2051
|
}
|
|
2021
|
-
if (
|
|
2022
|
-
clone.ends_at = dateToDiscordISOTimestamp(new Date(
|
|
2052
|
+
if (endsDateTimestamp) {
|
|
2053
|
+
clone.ends_at = dateToDiscordISOTimestamp(new Date(endsDateTimestamp));
|
|
2023
2054
|
}
|
|
2024
2055
|
return clone;
|
|
2025
2056
|
}
|
|
@@ -2039,7 +2070,7 @@ var ResolvedInteractionData = class extends Structure {
|
|
|
2039
2070
|
};
|
|
2040
2071
|
|
|
2041
2072
|
// src/invites/Invite.ts
|
|
2042
|
-
var
|
|
2073
|
+
var import_v107 = require("discord-api-types/v10");
|
|
2043
2074
|
var Invite = class extends Structure {
|
|
2044
2075
|
static {
|
|
2045
2076
|
__name(this, "Invite");
|
|
@@ -2139,7 +2170,7 @@ var Invite = class extends Structure {
|
|
|
2139
2170
|
/**
|
|
2140
2171
|
* The time the invite will expire at
|
|
2141
2172
|
*/
|
|
2142
|
-
get
|
|
2173
|
+
get expiresDate() {
|
|
2143
2174
|
const expiresTimestamp = this.expiresTimestamp;
|
|
2144
2175
|
return expiresTimestamp ? new Date(expiresTimestamp) : null;
|
|
2145
2176
|
}
|
|
@@ -2176,7 +2207,7 @@ var Invite = class extends Structure {
|
|
|
2176
2207
|
/**
|
|
2177
2208
|
* The time the invite was created at
|
|
2178
2209
|
*/
|
|
2179
|
-
get
|
|
2210
|
+
get createdDate() {
|
|
2180
2211
|
const createdTimestamp = this.createdTimestamp;
|
|
2181
2212
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
2182
2213
|
}
|
|
@@ -2184,7 +2215,7 @@ var Invite = class extends Structure {
|
|
|
2184
2215
|
* The URL to the invite
|
|
2185
2216
|
*/
|
|
2186
2217
|
get url() {
|
|
2187
|
-
return this.code ? `${
|
|
2218
|
+
return this.code ? `${import_v107.RouteBases.invite}/${this.code}` : null;
|
|
2188
2219
|
}
|
|
2189
2220
|
/**
|
|
2190
2221
|
* When concatenated with a string, this automatically concatenates the invite's URL instead of the object.
|
|
@@ -3561,7 +3592,7 @@ var Message = class extends Structure {
|
|
|
3561
3592
|
/**
|
|
3562
3593
|
* The time the message was created at
|
|
3563
3594
|
*/
|
|
3564
|
-
get
|
|
3595
|
+
get createdDate() {
|
|
3565
3596
|
const createdTimestamp = this.createdTimestamp;
|
|
3566
3597
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
3567
3598
|
}
|
|
@@ -3580,7 +3611,7 @@ var Message = class extends Structure {
|
|
|
3580
3611
|
/**
|
|
3581
3612
|
* The time the message was last edited at, or `null` if it never was edited
|
|
3582
3613
|
*/
|
|
3583
|
-
get
|
|
3614
|
+
get editedDate() {
|
|
3584
3615
|
const editedTimestamp = this.editedTimestamp;
|
|
3585
3616
|
return editedTimestamp ? new Date(editedTimestamp) : null;
|
|
3586
3617
|
}
|
|
@@ -3634,12 +3665,13 @@ var Message = class extends Structure {
|
|
|
3634
3665
|
*/
|
|
3635
3666
|
toJSON() {
|
|
3636
3667
|
const clone = super.toJSON();
|
|
3637
|
-
|
|
3638
|
-
|
|
3668
|
+
const editedTimestamp = this[kEditedTimestamp];
|
|
3669
|
+
const createdDate = this.createdDate;
|
|
3670
|
+
if (editedTimestamp) {
|
|
3671
|
+
clone.edited_timestamp = dateToDiscordISOTimestamp(new Date(editedTimestamp));
|
|
3639
3672
|
}
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
clone.timestamp = dateToDiscordISOTimestamp(createdAt);
|
|
3673
|
+
if (createdDate) {
|
|
3674
|
+
clone.timestamp = dateToDiscordISOTimestamp(createdDate);
|
|
3643
3675
|
}
|
|
3644
3676
|
return clone;
|
|
3645
3677
|
}
|
|
@@ -3713,7 +3745,7 @@ var MessageCall = class extends Structure {
|
|
|
3713
3745
|
/**
|
|
3714
3746
|
* The time the call ended at, or `null` if it didn't end yet
|
|
3715
3747
|
*/
|
|
3716
|
-
get
|
|
3748
|
+
get endedDate() {
|
|
3717
3749
|
const endedTimestamp = this.endedTimestamp;
|
|
3718
3750
|
return endedTimestamp ? new Date(endedTimestamp) : null;
|
|
3719
3751
|
}
|
|
@@ -3753,7 +3785,7 @@ var MessageComponentInteractionMetadata = class extends InteractionMetadata {
|
|
|
3753
3785
|
};
|
|
3754
3786
|
|
|
3755
3787
|
// src/messages/MessageReference.ts
|
|
3756
|
-
var
|
|
3788
|
+
var import_v108 = require("discord-api-types/v10");
|
|
3757
3789
|
var MessageReference = class extends Structure {
|
|
3758
3790
|
static {
|
|
3759
3791
|
__name(this, "MessageReference");
|
|
@@ -3772,7 +3804,7 @@ var MessageReference = class extends Structure {
|
|
|
3772
3804
|
* The type of this reference
|
|
3773
3805
|
*/
|
|
3774
3806
|
get type() {
|
|
3775
|
-
return "type" in this[kData] ? this[kData].type :
|
|
3807
|
+
return "type" in this[kData] ? this[kData].type : import_v108.MessageReferenceType.Default;
|
|
3776
3808
|
}
|
|
3777
3809
|
/**
|
|
3778
3810
|
* The id of the referenced message
|
|
@@ -4042,7 +4074,7 @@ var Poll = class extends Structure {
|
|
|
4042
4074
|
/**
|
|
4043
4075
|
* The time the poll will expire at
|
|
4044
4076
|
*/
|
|
4045
|
-
get
|
|
4077
|
+
get expiresDate() {
|
|
4046
4078
|
const expiresTimestamp = this.expiresTimestamp;
|
|
4047
4079
|
return expiresTimestamp ? new Date(expiresTimestamp) : null;
|
|
4048
4080
|
}
|
|
@@ -4162,6 +4194,387 @@ var PollResults = class extends Structure {
|
|
|
4162
4194
|
}
|
|
4163
4195
|
};
|
|
4164
4196
|
|
|
4197
|
+
// src/presences/activities/Activity.ts
|
|
4198
|
+
var Activity = class extends Structure {
|
|
4199
|
+
static {
|
|
4200
|
+
__name(this, "Activity");
|
|
4201
|
+
}
|
|
4202
|
+
/**
|
|
4203
|
+
* The template used for removing data from the raw data stored for each activity
|
|
4204
|
+
*/
|
|
4205
|
+
static DataTemplate = {};
|
|
4206
|
+
/**
|
|
4207
|
+
* @param data - The raw data received from the API for the activity
|
|
4208
|
+
*/
|
|
4209
|
+
constructor(data) {
|
|
4210
|
+
super(data);
|
|
4211
|
+
}
|
|
4212
|
+
/**
|
|
4213
|
+
* The name of the activity
|
|
4214
|
+
*/
|
|
4215
|
+
get name() {
|
|
4216
|
+
return this[kData].name;
|
|
4217
|
+
}
|
|
4218
|
+
/**
|
|
4219
|
+
* The type of this activity
|
|
4220
|
+
*
|
|
4221
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#activity-object-activity-types}
|
|
4222
|
+
*/
|
|
4223
|
+
get type() {
|
|
4224
|
+
return this[kData].type;
|
|
4225
|
+
}
|
|
4226
|
+
/**
|
|
4227
|
+
* Stream URL, is validated when type is {@link ActivityType.Streaming}
|
|
4228
|
+
*/
|
|
4229
|
+
get url() {
|
|
4230
|
+
return this[kData].url;
|
|
4231
|
+
}
|
|
4232
|
+
/**
|
|
4233
|
+
* Time of when the activity was added to the user's session
|
|
4234
|
+
*/
|
|
4235
|
+
get createdDate() {
|
|
4236
|
+
return isFieldSet(this[kData], "created_at", "number") ? new Date(this[kData].created_at) : null;
|
|
4237
|
+
}
|
|
4238
|
+
/**
|
|
4239
|
+
* Unix timestamp (in milliseconds) of when the activity was added to the user's session
|
|
4240
|
+
*/
|
|
4241
|
+
get createdTimestamp() {
|
|
4242
|
+
return this[kData].created_at;
|
|
4243
|
+
}
|
|
4244
|
+
/**
|
|
4245
|
+
* Application id for the game
|
|
4246
|
+
*/
|
|
4247
|
+
get applicationId() {
|
|
4248
|
+
return this[kData].application_id;
|
|
4249
|
+
}
|
|
4250
|
+
/**
|
|
4251
|
+
* Controls which field is displayed in the user's status text in the member list
|
|
4252
|
+
*
|
|
4253
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#activity-object-status-display-types}
|
|
4254
|
+
*/
|
|
4255
|
+
get statusDisplayType() {
|
|
4256
|
+
return this[kData].status_display_type;
|
|
4257
|
+
}
|
|
4258
|
+
/**
|
|
4259
|
+
* What the player is currently doing
|
|
4260
|
+
*/
|
|
4261
|
+
get details() {
|
|
4262
|
+
return this[kData].details;
|
|
4263
|
+
}
|
|
4264
|
+
/**
|
|
4265
|
+
* URL that is linked when clicking on the details text
|
|
4266
|
+
*/
|
|
4267
|
+
get detailsURL() {
|
|
4268
|
+
return this[kData].details_url;
|
|
4269
|
+
}
|
|
4270
|
+
/**
|
|
4271
|
+
* User's current party status, or text used for a custom status
|
|
4272
|
+
*/
|
|
4273
|
+
get state() {
|
|
4274
|
+
return this[kData].state;
|
|
4275
|
+
}
|
|
4276
|
+
/**
|
|
4277
|
+
* URL that is linked when clicking on the state text
|
|
4278
|
+
*/
|
|
4279
|
+
get stateURL() {
|
|
4280
|
+
return this[kData].state_url;
|
|
4281
|
+
}
|
|
4282
|
+
/**
|
|
4283
|
+
* Whether the activity is an instanced game session
|
|
4284
|
+
*/
|
|
4285
|
+
get instance() {
|
|
4286
|
+
return this[kData].instance;
|
|
4287
|
+
}
|
|
4288
|
+
/**
|
|
4289
|
+
* Activity flags `OR`d together, describes what the payload includes
|
|
4290
|
+
*
|
|
4291
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#activity-object-activity-flags}
|
|
4292
|
+
*/
|
|
4293
|
+
get flags() {
|
|
4294
|
+
return isFieldSet(this[kData], "flags", "number") ? new ActivityFlagsBitField(this[kData].flags) : null;
|
|
4295
|
+
}
|
|
4296
|
+
};
|
|
4297
|
+
|
|
4298
|
+
// src/presences/activities/ActivityAssets.ts
|
|
4299
|
+
var import_v109 = require("discord-api-types/v10");
|
|
4300
|
+
var ActivityAssets = class extends Structure {
|
|
4301
|
+
static {
|
|
4302
|
+
__name(this, "ActivityAssets");
|
|
4303
|
+
}
|
|
4304
|
+
/**
|
|
4305
|
+
* The template used for removing data from the raw data stored for each activity assets
|
|
4306
|
+
*/
|
|
4307
|
+
static DataTemplate = {};
|
|
4308
|
+
/**
|
|
4309
|
+
* @param data - The raw data received from the API for the activity assets
|
|
4310
|
+
*/
|
|
4311
|
+
constructor(data) {
|
|
4312
|
+
super(data);
|
|
4313
|
+
}
|
|
4314
|
+
/**
|
|
4315
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#activity-object-activity-asset-image}
|
|
4316
|
+
*/
|
|
4317
|
+
get largeImage() {
|
|
4318
|
+
return this[kData].large_image;
|
|
4319
|
+
}
|
|
4320
|
+
/**
|
|
4321
|
+
* Returns the large image URL of this `largeImage`
|
|
4322
|
+
*
|
|
4323
|
+
* @param applicationId - The id of the application to whom this asset belongs to
|
|
4324
|
+
* @param imageFormat - The desired format of the returned image URL
|
|
4325
|
+
*/
|
|
4326
|
+
largeImageURL(applicationId, imageFormat = import_v109.ImageFormat.PNG) {
|
|
4327
|
+
return isFieldSet(this[kData], "large_image", "string") ? `${import_v109.RouteBases.cdn}${import_v109.CDNRoutes.applicationAsset(applicationId, this[kData].large_image, imageFormat)}` : null;
|
|
4328
|
+
}
|
|
4329
|
+
/**
|
|
4330
|
+
* Text displayed when hovering over the large image of the activity
|
|
4331
|
+
*/
|
|
4332
|
+
get largeText() {
|
|
4333
|
+
return this[kData].large_text;
|
|
4334
|
+
}
|
|
4335
|
+
/**
|
|
4336
|
+
* URL that is opened when clicking on the large image
|
|
4337
|
+
*/
|
|
4338
|
+
get largeURL() {
|
|
4339
|
+
return this[kData].large_url;
|
|
4340
|
+
}
|
|
4341
|
+
/**
|
|
4342
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#activity-object-activity-asset-image}
|
|
4343
|
+
*/
|
|
4344
|
+
get smallImage() {
|
|
4345
|
+
return this[kData].small_image;
|
|
4346
|
+
}
|
|
4347
|
+
/**
|
|
4348
|
+
* Returns the small image URL of this `smallImage`
|
|
4349
|
+
*
|
|
4350
|
+
* @param applicationId - The id of the application to whom this asset belongs to
|
|
4351
|
+
* @param imageFormat - The desired format of the returned image URL
|
|
4352
|
+
*/
|
|
4353
|
+
smallImageURL(applicationId, imageFormat = import_v109.ImageFormat.PNG) {
|
|
4354
|
+
return isFieldSet(this[kData], "small_image", "string") ? `${import_v109.RouteBases.cdn}${import_v109.CDNRoutes.applicationAsset(applicationId, this[kData].small_image, imageFormat)}` : null;
|
|
4355
|
+
}
|
|
4356
|
+
/**
|
|
4357
|
+
* Text displayed when hovering over the small image of the activity
|
|
4358
|
+
*/
|
|
4359
|
+
get smallText() {
|
|
4360
|
+
return this[kData].small_text;
|
|
4361
|
+
}
|
|
4362
|
+
/**
|
|
4363
|
+
* URL that is opened when clicking on the small image
|
|
4364
|
+
*/
|
|
4365
|
+
get smallURL() {
|
|
4366
|
+
return this[kData].small_url;
|
|
4367
|
+
}
|
|
4368
|
+
/**
|
|
4369
|
+
* URL of the image which is displayed as a banner on a Game Invite
|
|
4370
|
+
*/
|
|
4371
|
+
get inviteCoverImage() {
|
|
4372
|
+
return this[kData].invite_cover_image;
|
|
4373
|
+
}
|
|
4374
|
+
};
|
|
4375
|
+
|
|
4376
|
+
// src/presences/activities/ActivityButton.ts
|
|
4377
|
+
var ActivityButton = class extends Structure {
|
|
4378
|
+
static {
|
|
4379
|
+
__name(this, "ActivityButton");
|
|
4380
|
+
}
|
|
4381
|
+
/**
|
|
4382
|
+
* The template used for removing data from the raw data stored for each activity button
|
|
4383
|
+
*/
|
|
4384
|
+
static DataTemplate = {};
|
|
4385
|
+
/**
|
|
4386
|
+
* @param data - The raw data received from the API for the activity button
|
|
4387
|
+
*/
|
|
4388
|
+
constructor(data) {
|
|
4389
|
+
super(data);
|
|
4390
|
+
}
|
|
4391
|
+
/**
|
|
4392
|
+
* Text shown on the button (1-32 characters)
|
|
4393
|
+
*/
|
|
4394
|
+
get label() {
|
|
4395
|
+
return this[kData].label;
|
|
4396
|
+
}
|
|
4397
|
+
/**
|
|
4398
|
+
* URL opened when clicking the button (1-512 characters)
|
|
4399
|
+
*/
|
|
4400
|
+
get url() {
|
|
4401
|
+
return this[kData].url;
|
|
4402
|
+
}
|
|
4403
|
+
};
|
|
4404
|
+
|
|
4405
|
+
// src/presences/activities/ActivityParty.ts
|
|
4406
|
+
var ActivityParty = class extends Structure {
|
|
4407
|
+
static {
|
|
4408
|
+
__name(this, "ActivityParty");
|
|
4409
|
+
}
|
|
4410
|
+
/**
|
|
4411
|
+
* The template used for removing data from the raw data stored for each activity party.
|
|
4412
|
+
*/
|
|
4413
|
+
static DataTemplate = {};
|
|
4414
|
+
/**
|
|
4415
|
+
* @param data - The raw data received from the API for the activity party.
|
|
4416
|
+
*/
|
|
4417
|
+
constructor(data) {
|
|
4418
|
+
super(data);
|
|
4419
|
+
}
|
|
4420
|
+
/**
|
|
4421
|
+
* The id of the party.
|
|
4422
|
+
*
|
|
4423
|
+
* @remarks This is an application-defined id and is not a Discord snowflake.
|
|
4424
|
+
*/
|
|
4425
|
+
get id() {
|
|
4426
|
+
return this[kData].id;
|
|
4427
|
+
}
|
|
4428
|
+
/**
|
|
4429
|
+
* The current size of the party
|
|
4430
|
+
*/
|
|
4431
|
+
get currentSize() {
|
|
4432
|
+
const array = this[kData].size;
|
|
4433
|
+
return array ? isArrayFieldSet(array, 0, "number") ? array[0] : null : null;
|
|
4434
|
+
}
|
|
4435
|
+
/**
|
|
4436
|
+
* The maximum size of the party
|
|
4437
|
+
*/
|
|
4438
|
+
get maximumSize() {
|
|
4439
|
+
const array = this[kData].size;
|
|
4440
|
+
return array ? isArrayFieldSet(array, 1, "number") ? array[1] : null : null;
|
|
4441
|
+
}
|
|
4442
|
+
};
|
|
4443
|
+
|
|
4444
|
+
// src/presences/activities/ActivitySecrets.ts
|
|
4445
|
+
var ActivitySecrets = class extends Structure {
|
|
4446
|
+
static {
|
|
4447
|
+
__name(this, "ActivitySecrets");
|
|
4448
|
+
}
|
|
4449
|
+
/**
|
|
4450
|
+
* The template used for removing data from the raw data stored for each activity's secrets.
|
|
4451
|
+
*/
|
|
4452
|
+
static DataTemplate = {};
|
|
4453
|
+
/**
|
|
4454
|
+
* @param data - The raw data received from the API for the activity's secrets.
|
|
4455
|
+
*/
|
|
4456
|
+
constructor(data) {
|
|
4457
|
+
super(data);
|
|
4458
|
+
}
|
|
4459
|
+
/**
|
|
4460
|
+
* Secret for joining a party.
|
|
4461
|
+
*/
|
|
4462
|
+
get join() {
|
|
4463
|
+
return this[kData].join;
|
|
4464
|
+
}
|
|
4465
|
+
/**
|
|
4466
|
+
* Secret for spectating a game.
|
|
4467
|
+
*/
|
|
4468
|
+
get spectate() {
|
|
4469
|
+
return this[kData].spectate;
|
|
4470
|
+
}
|
|
4471
|
+
/**
|
|
4472
|
+
* Secret for a specific instanced match
|
|
4473
|
+
*/
|
|
4474
|
+
get match() {
|
|
4475
|
+
return this[kData].match;
|
|
4476
|
+
}
|
|
4477
|
+
};
|
|
4478
|
+
|
|
4479
|
+
// src/presences/activities/ActivityTimestamps.ts
|
|
4480
|
+
var ActivityTimestamps = class extends Structure {
|
|
4481
|
+
static {
|
|
4482
|
+
__name(this, "ActivityTimestamps");
|
|
4483
|
+
}
|
|
4484
|
+
/**
|
|
4485
|
+
* The template used for removing data from the raw data stored for each activity timestamp
|
|
4486
|
+
*/
|
|
4487
|
+
static DataTemplate = {};
|
|
4488
|
+
/**
|
|
4489
|
+
* @param data - The raw data received from the API for the activity timestamp
|
|
4490
|
+
*/
|
|
4491
|
+
constructor(data) {
|
|
4492
|
+
super(data);
|
|
4493
|
+
}
|
|
4494
|
+
/**
|
|
4495
|
+
* Unix time (in milliseconds) of when the activity started.
|
|
4496
|
+
*/
|
|
4497
|
+
get startTimestamp() {
|
|
4498
|
+
return this[kData].start;
|
|
4499
|
+
}
|
|
4500
|
+
/**
|
|
4501
|
+
* Time of when the activity started.
|
|
4502
|
+
*/
|
|
4503
|
+
get startDate() {
|
|
4504
|
+
return isFieldSet(this[kData], "start", "number") ? new Date(this[kData].start) : null;
|
|
4505
|
+
}
|
|
4506
|
+
/**
|
|
4507
|
+
* Unix time (in milliseconds) of when the activity ends.
|
|
4508
|
+
*/
|
|
4509
|
+
get endTimestamp() {
|
|
4510
|
+
return this[kData].end;
|
|
4511
|
+
}
|
|
4512
|
+
/**
|
|
4513
|
+
* Time of when the activity ended.
|
|
4514
|
+
*/
|
|
4515
|
+
get endDate() {
|
|
4516
|
+
return isFieldSet(this[kData], "end", "number") ? new Date(this[kData].end) : null;
|
|
4517
|
+
}
|
|
4518
|
+
};
|
|
4519
|
+
|
|
4520
|
+
// src/presences/ClientStatus.ts
|
|
4521
|
+
var ClientStatus = class extends Structure {
|
|
4522
|
+
static {
|
|
4523
|
+
__name(this, "ClientStatus");
|
|
4524
|
+
}
|
|
4525
|
+
/**
|
|
4526
|
+
* The template used for removing data from the raw data stored for each client status
|
|
4527
|
+
*/
|
|
4528
|
+
static DataTemplate = {};
|
|
4529
|
+
/**
|
|
4530
|
+
* @param data - The raw data received from the API for the client status
|
|
4531
|
+
*/
|
|
4532
|
+
constructor(data) {
|
|
4533
|
+
super(data);
|
|
4534
|
+
}
|
|
4535
|
+
/**
|
|
4536
|
+
* The user's status set for an active desktop (Windows, Linux, Mac) application session
|
|
4537
|
+
*/
|
|
4538
|
+
get desktop() {
|
|
4539
|
+
return this[kData].desktop;
|
|
4540
|
+
}
|
|
4541
|
+
/**
|
|
4542
|
+
* The user's status set for an active mobile (iOS, Android) application session
|
|
4543
|
+
*/
|
|
4544
|
+
get mobile() {
|
|
4545
|
+
return this[kData].mobile;
|
|
4546
|
+
}
|
|
4547
|
+
/**
|
|
4548
|
+
* The user's status set for an active web (browser, bot user) application session
|
|
4549
|
+
*/
|
|
4550
|
+
get web() {
|
|
4551
|
+
return this[kData].web;
|
|
4552
|
+
}
|
|
4553
|
+
};
|
|
4554
|
+
|
|
4555
|
+
// src/presences/Presence.ts
|
|
4556
|
+
var Presence = class extends Structure {
|
|
4557
|
+
static {
|
|
4558
|
+
__name(this, "Presence");
|
|
4559
|
+
}
|
|
4560
|
+
/**
|
|
4561
|
+
* The template used for removing data from the raw data stored for each presence update
|
|
4562
|
+
*/
|
|
4563
|
+
static DataTemplate = {};
|
|
4564
|
+
/**
|
|
4565
|
+
* @param data - The raw data received from the API for the presence update
|
|
4566
|
+
*/
|
|
4567
|
+
constructor(data) {
|
|
4568
|
+
super(data);
|
|
4569
|
+
}
|
|
4570
|
+
/**
|
|
4571
|
+
* The user's new status
|
|
4572
|
+
*/
|
|
4573
|
+
get status() {
|
|
4574
|
+
return this[kData].status;
|
|
4575
|
+
}
|
|
4576
|
+
};
|
|
4577
|
+
|
|
4165
4578
|
// src/skus/SKU.ts
|
|
4166
4579
|
var SKU = class extends Structure {
|
|
4167
4580
|
static {
|
|
@@ -4288,7 +4701,7 @@ var SoundboardSound = class extends Structure {
|
|
|
4288
4701
|
*
|
|
4289
4702
|
* @remarks only available for guild soundboard sounds
|
|
4290
4703
|
*/
|
|
4291
|
-
get
|
|
4704
|
+
get createdDate() {
|
|
4292
4705
|
const createdTimestamp = this.createdTimestamp;
|
|
4293
4706
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4294
4707
|
}
|
|
@@ -4355,7 +4768,7 @@ var StageInstance = class extends Structure {
|
|
|
4355
4768
|
/**
|
|
4356
4769
|
* The time the stage instance was created at
|
|
4357
4770
|
*/
|
|
4358
|
-
get
|
|
4771
|
+
get createdDate() {
|
|
4359
4772
|
const createdTimestamp = this.createdTimestamp;
|
|
4360
4773
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4361
4774
|
}
|
|
@@ -4428,7 +4841,7 @@ var Sticker = class extends Structure {
|
|
|
4428
4841
|
/**
|
|
4429
4842
|
* The time the sticker was created at
|
|
4430
4843
|
*/
|
|
4431
|
-
get
|
|
4844
|
+
get createdDate() {
|
|
4432
4845
|
const createdTimestamp = this.createdTimestamp;
|
|
4433
4846
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4434
4847
|
}
|
|
@@ -4497,7 +4910,7 @@ var StickerPack = class extends Structure {
|
|
|
4497
4910
|
/**
|
|
4498
4911
|
* The time the sticker pack was created at
|
|
4499
4912
|
*/
|
|
4500
|
-
get
|
|
4913
|
+
get createdDate() {
|
|
4501
4914
|
const createdTimestamp = this.createdTimestamp;
|
|
4502
4915
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4503
4916
|
}
|
|
@@ -4552,7 +4965,7 @@ var Team = class extends Structure {
|
|
|
4552
4965
|
/**
|
|
4553
4966
|
* The time the team was created at
|
|
4554
4967
|
*/
|
|
4555
|
-
get
|
|
4968
|
+
get createdDate() {
|
|
4556
4969
|
const createdTimestamp = this.createdTimestamp;
|
|
4557
4970
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4558
4971
|
}
|
|
@@ -4755,7 +5168,7 @@ var User = class extends Structure {
|
|
|
4755
5168
|
/**
|
|
4756
5169
|
* The time the user was created at
|
|
4757
5170
|
*/
|
|
4758
|
-
get
|
|
5171
|
+
get createdDate() {
|
|
4759
5172
|
const createdTimestamp = this.createdTimestamp;
|
|
4760
5173
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4761
5174
|
}
|
|
@@ -4925,7 +5338,7 @@ var Webhook = class extends Structure {
|
|
|
4925
5338
|
/**
|
|
4926
5339
|
* The time the webhook was created at
|
|
4927
5340
|
*/
|
|
4928
|
-
get
|
|
5341
|
+
get createdDate() {
|
|
4929
5342
|
const createdTimestamp = this.createdTimestamp;
|
|
4930
5343
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
4931
5344
|
}
|
|
@@ -5152,7 +5565,7 @@ var Subscription = class extends Structure {
|
|
|
5152
5565
|
/**
|
|
5153
5566
|
* The time at which the current subscription period will start
|
|
5154
5567
|
*/
|
|
5155
|
-
get
|
|
5568
|
+
get currentPeriodStartDate() {
|
|
5156
5569
|
const startTimestamp = this.currentPeriodStartTimestamp;
|
|
5157
5570
|
return startTimestamp ? new Date(startTimestamp) : null;
|
|
5158
5571
|
}
|
|
@@ -5165,7 +5578,7 @@ var Subscription = class extends Structure {
|
|
|
5165
5578
|
/**
|
|
5166
5579
|
* The time at which the current subscription period will end
|
|
5167
5580
|
*/
|
|
5168
|
-
get
|
|
5581
|
+
get currentPeriodEndDate() {
|
|
5169
5582
|
const endTimestamp = this.currentPeriodEndTimestamp;
|
|
5170
5583
|
return endTimestamp ? new Date(endTimestamp) : null;
|
|
5171
5584
|
}
|
|
@@ -5186,7 +5599,7 @@ var Subscription = class extends Structure {
|
|
|
5186
5599
|
*
|
|
5187
5600
|
* @remarks This is populated when the {@link Subscription.status} transitions to {@link discord-api-types/v10#SubscriptionStatus.Ending}.
|
|
5188
5601
|
*/
|
|
5189
|
-
get
|
|
5602
|
+
get canceledDate() {
|
|
5190
5603
|
const canceledTimestamp = this.canceledTimestamp;
|
|
5191
5604
|
return canceledTimestamp ? new Date(canceledTimestamp) : null;
|
|
5192
5605
|
}
|
|
@@ -5205,7 +5618,7 @@ var Subscription = class extends Structure {
|
|
|
5205
5618
|
/**
|
|
5206
5619
|
* The time the subscription was created at
|
|
5207
5620
|
*/
|
|
5208
|
-
get
|
|
5621
|
+
get createdDate() {
|
|
5209
5622
|
const createdTimestamp = this.createdTimestamp;
|
|
5210
5623
|
return createdTimestamp ? new Date(createdTimestamp) : null;
|
|
5211
5624
|
}
|
|
@@ -5232,6 +5645,13 @@ var Subscription = class extends Structure {
|
|
|
5232
5645
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5233
5646
|
0 && (module.exports = {
|
|
5234
5647
|
ActionRowComponent,
|
|
5648
|
+
Activity,
|
|
5649
|
+
ActivityAssets,
|
|
5650
|
+
ActivityButton,
|
|
5651
|
+
ActivityFlagsBitField,
|
|
5652
|
+
ActivityParty,
|
|
5653
|
+
ActivitySecrets,
|
|
5654
|
+
ActivityTimestamps,
|
|
5235
5655
|
AnnouncementChannel,
|
|
5236
5656
|
AnnouncementThreadChannel,
|
|
5237
5657
|
ApplicationCommandInteractionMetadata,
|
|
@@ -5257,6 +5677,7 @@ var Subscription = class extends Structure {
|
|
|
5257
5677
|
ChannelSlowmodeMixin,
|
|
5258
5678
|
ChannelTopicMixin,
|
|
5259
5679
|
ChannelWebhookMixin,
|
|
5680
|
+
ClientStatus,
|
|
5260
5681
|
Component,
|
|
5261
5682
|
ComponentEmoji,
|
|
5262
5683
|
Connection,
|
|
@@ -5307,6 +5728,7 @@ var Subscription = class extends Structure {
|
|
|
5307
5728
|
PollMedia,
|
|
5308
5729
|
PollResults,
|
|
5309
5730
|
PremiumButtonComponent,
|
|
5731
|
+
Presence,
|
|
5310
5732
|
PrivateThreadChannel,
|
|
5311
5733
|
PublicThreadChannel,
|
|
5312
5734
|
Reaction,
|