disgroove 2.2.1-dev.64c7abc → 2.2.1-dev.efad41d
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/lib/Client.d.ts +224 -227
- package/dist/lib/Client.js +402 -401
- package/dist/lib/constants.d.ts +5 -4
- package/dist/lib/constants.js +5 -4
- package/dist/lib/gateway/Shard.d.ts +14 -9
- package/dist/lib/gateway/Shard.js +157 -108
- package/dist/lib/rest/CDN.d.ts +20 -20
- package/dist/lib/rest/CDN.js +20 -20
- package/dist/lib/rest/Endpoints.d.ts +81 -81
- package/dist/lib/rest/Endpoints.js +91 -91
- package/dist/lib/types/application-command.d.ts +4 -4
- package/dist/lib/types/application.d.ts +2 -2
- package/dist/lib/types/audit-log.d.ts +5 -5
- package/dist/lib/types/auto-moderation.d.ts +3 -3
- package/dist/lib/types/channel.d.ts +23 -21
- package/dist/lib/types/entitlements.d.ts +6 -6
- package/dist/lib/types/gateway-events.d.ts +151 -67
- package/dist/lib/types/guild-scheduled-event.d.ts +5 -5
- package/dist/lib/types/guild-template.d.ts +2 -2
- package/dist/lib/types/guild.d.ts +17 -17
- package/dist/lib/types/interaction.d.ts +8 -8
- package/dist/lib/types/message-components.d.ts +4 -4
- package/dist/lib/types/poll.d.ts +1 -1
- package/dist/lib/types/role.d.ts +3 -3
- package/dist/lib/types/sku.d.ts +2 -2
- package/dist/lib/types/stage-instance.d.ts +3 -3
- package/dist/lib/types/sticker.d.ts +5 -5
- package/dist/lib/types/team.d.ts +2 -2
- package/dist/lib/types/user.d.ts +1 -1
- package/dist/lib/types/voice.d.ts +4 -4
- package/dist/lib/types/webhook.d.ts +3 -3
- package/dist/lib/utils/Util.d.ts +2 -2
- package/dist/lib/utils/Util.js +195 -193
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/utils/Util.js
CHANGED
@@ -29,26 +29,26 @@ class Util {
|
|
29
29
|
}
|
30
30
|
auditLogEntryFromRaw(auditLogEntry) {
|
31
31
|
return {
|
32
|
-
|
32
|
+
targetID: auditLogEntry.target_id,
|
33
33
|
changes: auditLogEntry.changes?.map((auditLogChange) => ({
|
34
34
|
newValue: auditLogChange.new_value,
|
35
35
|
oldValue: auditLogChange.old_value,
|
36
36
|
key: auditLogChange.key,
|
37
37
|
})),
|
38
|
-
|
38
|
+
userID: auditLogEntry.user_id,
|
39
39
|
id: auditLogEntry.id,
|
40
40
|
actionType: auditLogEntry.action_type,
|
41
41
|
options: auditLogEntry.options !== undefined
|
42
42
|
? {
|
43
|
-
|
43
|
+
applicationID: auditLogEntry.options.application_id,
|
44
44
|
autoModerationRuleName: auditLogEntry.options.auto_moderation_rule_name,
|
45
45
|
autoModerationRuleTriggerType: auditLogEntry.options.auto_moderation_rule_trigger_type,
|
46
|
-
|
46
|
+
channelID: auditLogEntry.options.channel_id,
|
47
47
|
count: auditLogEntry.options.count,
|
48
48
|
deleteMemberDays: auditLogEntry.options.delete_member_days,
|
49
49
|
id: auditLogEntry.options.id,
|
50
50
|
membersRemoved: auditLogEntry.options.members_removed,
|
51
|
-
|
51
|
+
messageID: auditLogEntry.options.message_id,
|
52
52
|
roleName: auditLogEntry.options.role_name,
|
53
53
|
type: auditLogEntry.options.type,
|
54
54
|
integrationType: auditLogEntry.options.integration_type,
|
@@ -59,26 +59,26 @@ class Util {
|
|
59
59
|
}
|
60
60
|
auditLogEntryToRaw(auditLogEntry) {
|
61
61
|
return {
|
62
|
-
target_id: auditLogEntry.
|
62
|
+
target_id: auditLogEntry.targetID,
|
63
63
|
changes: auditLogEntry.changes?.map((auditLogChange) => ({
|
64
64
|
new_value: auditLogChange.newValue,
|
65
65
|
old_value: auditLogChange.oldValue,
|
66
66
|
key: auditLogChange.key,
|
67
67
|
})),
|
68
|
-
user_id: auditLogEntry.
|
68
|
+
user_id: auditLogEntry.userID,
|
69
69
|
id: auditLogEntry.id,
|
70
70
|
action_type: auditLogEntry.actionType,
|
71
71
|
options: auditLogEntry.options !== undefined
|
72
72
|
? {
|
73
|
-
application_id: auditLogEntry.options.
|
73
|
+
application_id: auditLogEntry.options.applicationID,
|
74
74
|
auto_moderation_rule_name: auditLogEntry.options.autoModerationRuleName,
|
75
75
|
auto_moderation_rule_trigger_type: auditLogEntry.options.autoModerationRuleTriggerType,
|
76
|
-
channel_id: auditLogEntry.options.
|
76
|
+
channel_id: auditLogEntry.options.channelID,
|
77
77
|
count: auditLogEntry.options.count,
|
78
78
|
delete_member_days: auditLogEntry.options.deleteMemberDays,
|
79
79
|
id: auditLogEntry.options.id,
|
80
80
|
members_removed: auditLogEntry.options.membersRemoved,
|
81
|
-
message_id: auditLogEntry.options.
|
81
|
+
message_id: auditLogEntry.options.messageID,
|
82
82
|
role_name: auditLogEntry.options.roleName,
|
83
83
|
type: auditLogEntry.options.type,
|
84
84
|
integration_type: auditLogEntry.options.integrationType,
|
@@ -90,9 +90,9 @@ class Util {
|
|
90
90
|
autoModerationRuleFromRaw(autoModerationRule) {
|
91
91
|
return {
|
92
92
|
id: autoModerationRule.id,
|
93
|
-
|
93
|
+
guildID: autoModerationRule.guild_id,
|
94
94
|
name: autoModerationRule.name,
|
95
|
-
|
95
|
+
creatorID: autoModerationRule.creator_id,
|
96
96
|
eventType: autoModerationRule.event_type,
|
97
97
|
triggerType: autoModerationRule.trigger_type,
|
98
98
|
triggerMetadata: {
|
@@ -106,7 +106,7 @@ class Util {
|
|
106
106
|
actions: autoModerationRule.actions.map((action) => ({
|
107
107
|
type: action.type,
|
108
108
|
metadata: {
|
109
|
-
|
109
|
+
channelID: action.metadata.channel_id,
|
110
110
|
durationSeconds: action.metadata.duration_seconds,
|
111
111
|
customMessage: action.metadata.custom_message,
|
112
112
|
},
|
@@ -119,9 +119,9 @@ class Util {
|
|
119
119
|
autoModerationRuleToRaw(autoModerationRule) {
|
120
120
|
return {
|
121
121
|
id: autoModerationRule.id,
|
122
|
-
guild_id: autoModerationRule.
|
122
|
+
guild_id: autoModerationRule.guildID,
|
123
123
|
name: autoModerationRule.name,
|
124
|
-
creator_id: autoModerationRule.
|
124
|
+
creator_id: autoModerationRule.creatorID,
|
125
125
|
event_type: autoModerationRule.eventType,
|
126
126
|
trigger_type: autoModerationRule.triggerType,
|
127
127
|
trigger_metadata: {
|
@@ -135,7 +135,7 @@ class Util {
|
|
135
135
|
actions: autoModerationRule.actions.map((action) => ({
|
136
136
|
type: action.type,
|
137
137
|
metadata: {
|
138
|
-
channel_id: action.metadata.
|
138
|
+
channel_id: action.metadata.channelID,
|
139
139
|
duration_seconds: action.metadata.durationSeconds,
|
140
140
|
custom_message: action.metadata.customMessage,
|
141
141
|
},
|
@@ -149,6 +149,7 @@ class Util {
|
|
149
149
|
return {
|
150
150
|
id: attachment.id,
|
151
151
|
filename: attachment.filename,
|
152
|
+
title: attachment.title,
|
152
153
|
description: attachment.description,
|
153
154
|
contentType: attachment.content_type,
|
154
155
|
size: attachment.size,
|
@@ -166,6 +167,7 @@ class Util {
|
|
166
167
|
return {
|
167
168
|
id: attachment.id,
|
168
169
|
filename: attachment.filename,
|
170
|
+
title: attachment.title,
|
169
171
|
description: attachment.description,
|
170
172
|
content_type: attachment.contentType,
|
171
173
|
size: attachment.size,
|
@@ -195,11 +197,11 @@ class Util {
|
|
195
197
|
: undefined,
|
196
198
|
verifyKey: application.verify_key,
|
197
199
|
team: application.team !== null ? this.teamFromRaw(application.team) : null,
|
198
|
-
|
200
|
+
guildID: application.guild_id,
|
199
201
|
guild: application.guild !== undefined
|
200
202
|
? this.guildFromRaw(application.guild)
|
201
203
|
: undefined,
|
202
|
-
|
204
|
+
primarySKUID: application.primary_sku_id,
|
203
205
|
slug: application.slug,
|
204
206
|
coverImage: application.cover_image,
|
205
207
|
flags: application.flags,
|
@@ -240,11 +242,11 @@ class Util {
|
|
240
242
|
: undefined,
|
241
243
|
verify_key: application.verifyKey,
|
242
244
|
team: application.team !== null ? this.teamToRaw(application.team) : null,
|
243
|
-
guild_id: application.
|
245
|
+
guild_id: application.guildID,
|
244
246
|
guild: application.guild !== undefined
|
245
247
|
? this.guildToRaw(application.guild)
|
246
248
|
: undefined,
|
247
|
-
primary_sku_id: application.
|
249
|
+
primary_sku_id: application.primarySKUID,
|
248
250
|
slug: application.slug,
|
249
251
|
cover_image: application.coverImage,
|
250
252
|
flags: application.flags,
|
@@ -271,8 +273,8 @@ class Util {
|
|
271
273
|
return {
|
272
274
|
id: applicationCommand.id,
|
273
275
|
type: applicationCommand.type,
|
274
|
-
|
275
|
-
|
276
|
+
applicationID: applicationCommand.application_id,
|
277
|
+
guildID: applicationCommand.guild_id,
|
276
278
|
name: applicationCommand.name,
|
277
279
|
nameLocalizations: applicationCommand.name_localizations,
|
278
280
|
description: applicationCommand.description,
|
@@ -326,8 +328,8 @@ class Util {
|
|
326
328
|
return {
|
327
329
|
id: applicationCommand.id,
|
328
330
|
type: applicationCommand.type,
|
329
|
-
application_id: applicationCommand.
|
330
|
-
guild_id: applicationCommand.
|
331
|
+
application_id: applicationCommand.applicationID,
|
332
|
+
guild_id: applicationCommand.guildID,
|
331
333
|
name: applicationCommand.name,
|
332
334
|
name_localizations: applicationCommand.nameLocalizations,
|
333
335
|
description: applicationCommand.description,
|
@@ -381,7 +383,7 @@ class Util {
|
|
381
383
|
return {
|
382
384
|
id: channel.id,
|
383
385
|
type: channel.type,
|
384
|
-
|
386
|
+
guildID: channel.guild_id,
|
385
387
|
position: channel.position,
|
386
388
|
permissionOverwrites: channel.permission_overwrites?.map((overwrite) => ({
|
387
389
|
id: overwrite.id,
|
@@ -392,16 +394,16 @@ class Util {
|
|
392
394
|
name: channel.name,
|
393
395
|
topic: channel.topic,
|
394
396
|
nsfw: channel.nsfw,
|
395
|
-
|
397
|
+
lastMessageID: channel.last_message_id,
|
396
398
|
bitrate: channel.bitrate,
|
397
399
|
userLimit: channel.user_limit,
|
398
400
|
rateLimitPerUser: channel.rate_limit_per_user,
|
399
401
|
recipients: channel.recipients?.map((recipient) => this.userFromRaw(recipient)),
|
400
402
|
icon: channel.icon,
|
401
|
-
|
402
|
-
|
403
|
+
ownerID: channel.owner_id,
|
404
|
+
applicationID: channel.application_id,
|
403
405
|
managed: channel.managed,
|
404
|
-
|
406
|
+
parentID: channel.parent_id,
|
405
407
|
lastPinTimestamp: channel.last_pin_timestamp,
|
406
408
|
rtcRegion: channel.rtc_region,
|
407
409
|
videoQualityMode: channel.video_quality_mode,
|
@@ -420,7 +422,7 @@ class Util {
|
|
420
422
|
member: channel.member !== undefined
|
421
423
|
? {
|
422
424
|
id: channel.member.id,
|
423
|
-
|
425
|
+
userID: channel.member.user_id,
|
424
426
|
joinTimestamp: channel.member.join_timestamp,
|
425
427
|
flags: channel.member.flags,
|
426
428
|
member: channel.member.member !== undefined
|
@@ -451,14 +453,14 @@ class Util {
|
|
451
453
|
id: availableTag.id,
|
452
454
|
name: availableTag.name,
|
453
455
|
moderated: availableTag.moderated,
|
454
|
-
|
456
|
+
emojiID: availableTag.emoji_id,
|
455
457
|
emojiName: availableTag.emoji_name,
|
456
458
|
})),
|
457
459
|
appliedTags: channel.applied_tags,
|
458
460
|
defaultReactionEmoji: channel.default_reaction_emoji !== undefined
|
459
461
|
? channel.default_reaction_emoji !== null
|
460
462
|
? {
|
461
|
-
|
463
|
+
emojiID: channel.default_reaction_emoji.emoji_id,
|
462
464
|
emojiName: channel.default_reaction_emoji.emoji_name,
|
463
465
|
}
|
464
466
|
: null
|
@@ -472,7 +474,7 @@ class Util {
|
|
472
474
|
return {
|
473
475
|
id: channel.id,
|
474
476
|
type: channel.type,
|
475
|
-
guild_id: channel.
|
477
|
+
guild_id: channel.guildID,
|
476
478
|
position: channel.position,
|
477
479
|
permission_overwrites: channel.permissionOverwrites?.map((overwrite) => ({
|
478
480
|
id: overwrite.id,
|
@@ -483,16 +485,16 @@ class Util {
|
|
483
485
|
name: channel.name,
|
484
486
|
topic: channel.topic,
|
485
487
|
nsfw: channel.nsfw,
|
486
|
-
last_message_id: channel.
|
488
|
+
last_message_id: channel.lastMessageID,
|
487
489
|
bitrate: channel.bitrate,
|
488
490
|
user_limit: channel.userLimit,
|
489
491
|
rate_limit_per_user: channel.rateLimitPerUser,
|
490
492
|
recipients: channel.recipients?.map((recipient) => this.userToRaw(recipient)),
|
491
493
|
icon: channel.icon,
|
492
|
-
owner_id: channel.
|
493
|
-
application_id: channel.
|
494
|
+
owner_id: channel.ownerID,
|
495
|
+
application_id: channel.applicationID,
|
494
496
|
managed: channel.managed,
|
495
|
-
parent_id: channel.
|
497
|
+
parent_id: channel.parentID,
|
496
498
|
last_pin_timestamp: channel.lastPinTimestamp,
|
497
499
|
rtc_region: channel.rtcRegion,
|
498
500
|
video_quality_mode: channel.videoQualityMode,
|
@@ -511,7 +513,7 @@ class Util {
|
|
511
513
|
member: channel.member !== undefined
|
512
514
|
? {
|
513
515
|
id: channel.member.id,
|
514
|
-
user_id: channel.member.
|
516
|
+
user_id: channel.member.userID,
|
515
517
|
join_timestamp: channel.member.joinTimestamp,
|
516
518
|
flags: channel.member.flags,
|
517
519
|
member: channel.member.member !== undefined
|
@@ -542,14 +544,14 @@ class Util {
|
|
542
544
|
id: availableTag.id,
|
543
545
|
name: availableTag.name,
|
544
546
|
moderated: availableTag.moderated,
|
545
|
-
emoji_id: availableTag.
|
547
|
+
emoji_id: availableTag.emojiID,
|
546
548
|
emoji_name: availableTag.emojiName,
|
547
549
|
})),
|
548
550
|
applied_tags: channel.appliedTags,
|
549
551
|
default_reaction_emoji: channel.defaultReactionEmoji !== undefined
|
550
552
|
? channel.defaultReactionEmoji !== null
|
551
553
|
? {
|
552
|
-
emoji_id: channel.defaultReactionEmoji.
|
554
|
+
emoji_id: channel.defaultReactionEmoji.emojiID,
|
553
555
|
emoji_name: channel.defaultReactionEmoji.emojiName,
|
554
556
|
}
|
555
557
|
: null
|
@@ -698,42 +700,42 @@ class Util {
|
|
698
700
|
entitlementFromRaw(entitlement) {
|
699
701
|
return {
|
700
702
|
id: entitlement.id,
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
703
|
+
skuID: entitlement.sku_id,
|
704
|
+
applicationID: entitlement.application_id,
|
705
|
+
userID: entitlement.user_id,
|
706
|
+
promotionID: entitlement.promotion_id,
|
705
707
|
type: entitlement.type,
|
706
708
|
deleted: entitlement.deleted,
|
707
709
|
giftCodeFlags: entitlement.gift_code_flags,
|
708
710
|
consumed: entitlement.consumed,
|
709
711
|
startsAt: entitlement.starts_at,
|
710
712
|
endsAt: entitlement.ends_at,
|
711
|
-
|
712
|
-
|
713
|
+
guildID: entitlement.guild_id,
|
714
|
+
subscriptionID: entitlement.subscription_id,
|
713
715
|
};
|
714
716
|
}
|
715
717
|
entitlementToRaw(entitlement) {
|
716
718
|
return {
|
717
719
|
id: entitlement.id,
|
718
|
-
sku_id: entitlement.
|
719
|
-
application_id: entitlement.
|
720
|
-
user_id: entitlement.
|
721
|
-
promotion_id: entitlement.
|
720
|
+
sku_id: entitlement.skuID,
|
721
|
+
application_id: entitlement.applicationID,
|
722
|
+
user_id: entitlement.userID,
|
723
|
+
promotion_id: entitlement.promotionID,
|
722
724
|
type: entitlement.type,
|
723
725
|
deleted: entitlement.deleted,
|
724
726
|
gift_code_flags: entitlement.giftCodeFlags,
|
725
727
|
consumed: entitlement.consumed,
|
726
728
|
starts_at: entitlement.startsAt,
|
727
729
|
ends_at: entitlement.endsAt,
|
728
|
-
guild_id: entitlement.
|
729
|
-
subscription_id: entitlement.
|
730
|
+
guild_id: entitlement.guildID,
|
731
|
+
subscription_id: entitlement.subscriptionID,
|
730
732
|
};
|
731
733
|
}
|
732
734
|
guildApplicationCommandPermissionsFromRaw(guildApplicationCommandPermissions) {
|
733
735
|
return {
|
734
736
|
id: guildApplicationCommandPermissions.id,
|
735
|
-
|
736
|
-
|
737
|
+
applicationID: guildApplicationCommandPermissions.application_id,
|
738
|
+
guildID: guildApplicationCommandPermissions.guild_id,
|
737
739
|
permissions: guildApplicationCommandPermissions.permissions.map((permission) => ({
|
738
740
|
id: permission.id,
|
739
741
|
type: permission.type,
|
@@ -744,8 +746,8 @@ class Util {
|
|
744
746
|
guildApplicationCommandPermissionsToRaw(guildApplicationCommandPermissions) {
|
745
747
|
return {
|
746
748
|
id: guildApplicationCommandPermissions.id,
|
747
|
-
application_id: guildApplicationCommandPermissions.
|
748
|
-
guild_id: guildApplicationCommandPermissions.
|
749
|
+
application_id: guildApplicationCommandPermissions.applicationID,
|
750
|
+
guild_id: guildApplicationCommandPermissions.guildID,
|
749
751
|
permissions: guildApplicationCommandPermissions.permissions.map((permission) => ({
|
750
752
|
id: permission.id,
|
751
753
|
type: permission.type,
|
@@ -762,13 +764,13 @@ class Util {
|
|
762
764
|
splash: guild.splash,
|
763
765
|
discoverySplash: guild.discovery_splash,
|
764
766
|
owner: guild.owner,
|
765
|
-
|
767
|
+
ownerID: guild.owner_id,
|
766
768
|
permissions: guild.permissions,
|
767
769
|
region: guild.region,
|
768
|
-
|
770
|
+
afkChannelID: guild.afk_channel_id,
|
769
771
|
afkTimeout: guild.afk_timeout,
|
770
772
|
widgetEnabled: guild.widget_enabled,
|
771
|
-
|
773
|
+
widgetChannelID: guild.widget_channel_id,
|
772
774
|
verificationLevel: guild.verification_level,
|
773
775
|
defaultMessageNotifications: guild.default_message_notifications,
|
774
776
|
explicitContentFilter: guild.explicit_content_filter,
|
@@ -776,10 +778,10 @@ class Util {
|
|
776
778
|
emojis: guild.emojis.map((emoji) => this.emojiFromRaw(emoji)),
|
777
779
|
features: guild.features,
|
778
780
|
mfaLevel: guild.mfa_level,
|
779
|
-
|
780
|
-
|
781
|
+
applicationID: guild.application_id,
|
782
|
+
systemChannelID: guild.system_channel_id,
|
781
783
|
systemChannelFlags: guild.system_channel_flags,
|
782
|
-
|
784
|
+
rulesChannelID: guild.rules_channel_id,
|
783
785
|
maxPresences: guild.max_presences,
|
784
786
|
maxMembers: guild.max_members,
|
785
787
|
vanityURLCode: guild.vanity_url_code,
|
@@ -788,7 +790,7 @@ class Util {
|
|
788
790
|
premiumTier: guild.premium_tier,
|
789
791
|
premiumSubscriptionCount: guild.premium_subscription_count,
|
790
792
|
preferredLocale: guild.preferred_locale,
|
791
|
-
|
793
|
+
publicUpdatesChannelID: guild.public_updates_channel_id,
|
792
794
|
maxVideoChannelUsers: guild.max_video_channel_users,
|
793
795
|
maxStageVideoChannelUsers: guild.max_stage_video_channel_users,
|
794
796
|
approximateMemberCount: guild.approximate_member_count,
|
@@ -797,9 +799,9 @@ class Util {
|
|
797
799
|
? {
|
798
800
|
description: guild.welcome_screen.description,
|
799
801
|
welcomeChannels: guild.welcome_screen.welcome_channels.map((welcomeScreenChannel) => ({
|
800
|
-
|
802
|
+
channelID: welcomeScreenChannel.channel_id,
|
801
803
|
description: welcomeScreenChannel.description,
|
802
|
-
|
804
|
+
emojiID: welcomeScreenChannel.emoji_id,
|
803
805
|
emojiName: welcomeScreenChannel.emoji_name,
|
804
806
|
})),
|
805
807
|
}
|
@@ -807,7 +809,7 @@ class Util {
|
|
807
809
|
nsfwLevel: guild.nsfw_level,
|
808
810
|
stickers: guild.stickers?.map((sticker) => this.stickerFromRaw(sticker)),
|
809
811
|
premiumProgressBarEnabled: guild.premium_progress_bar_enabled,
|
810
|
-
|
812
|
+
safetyAlertsChannelID: guild.safety_alerts_channel_id,
|
811
813
|
};
|
812
814
|
}
|
813
815
|
guildToRaw(guild) {
|
@@ -819,13 +821,13 @@ class Util {
|
|
819
821
|
splash: guild.splash,
|
820
822
|
discovery_splash: guild.discoverySplash,
|
821
823
|
owner: guild.owner,
|
822
|
-
owner_id: guild.
|
824
|
+
owner_id: guild.ownerID,
|
823
825
|
permissions: guild.permissions,
|
824
826
|
region: guild.region,
|
825
|
-
afk_channel_id: guild.
|
827
|
+
afk_channel_id: guild.afkChannelID,
|
826
828
|
afk_timeout: guild.afkTimeout,
|
827
829
|
widget_enabled: guild.widgetEnabled,
|
828
|
-
widget_channel_id: guild.
|
830
|
+
widget_channel_id: guild.widgetChannelID,
|
829
831
|
verification_level: guild.verificationLevel,
|
830
832
|
default_message_notifications: guild.defaultMessageNotifications,
|
831
833
|
explicit_content_filter: guild.explicitContentFilter,
|
@@ -833,10 +835,10 @@ class Util {
|
|
833
835
|
emojis: guild.emojis.map((emoji) => this.emojiToRaw(emoji)),
|
834
836
|
features: guild.features,
|
835
837
|
mfa_level: guild.mfaLevel,
|
836
|
-
application_id: guild.
|
837
|
-
system_channel_id: guild.
|
838
|
+
application_id: guild.applicationID,
|
839
|
+
system_channel_id: guild.systemChannelID,
|
838
840
|
system_channel_flags: guild.systemChannelFlags,
|
839
|
-
rules_channel_id: guild.
|
841
|
+
rules_channel_id: guild.rulesChannelID,
|
840
842
|
max_presences: guild.maxPresences,
|
841
843
|
max_members: guild.maxMembers,
|
842
844
|
vanity_url_code: guild.vanityURLCode,
|
@@ -845,7 +847,7 @@ class Util {
|
|
845
847
|
premium_tier: guild.premiumTier,
|
846
848
|
premium_subscription_count: guild.premiumSubscriptionCount,
|
847
849
|
preferred_locale: guild.preferredLocale,
|
848
|
-
public_updates_channel_id: guild.
|
850
|
+
public_updates_channel_id: guild.publicUpdatesChannelID,
|
849
851
|
max_video_channel_users: guild.maxVideoChannelUsers,
|
850
852
|
max_stage_video_channel_users: guild.maxStageVideoChannelUsers,
|
851
853
|
approximate_member_count: guild.approximateMemberCount,
|
@@ -854,9 +856,9 @@ class Util {
|
|
854
856
|
? {
|
855
857
|
description: guild.welcomeScreen.description,
|
856
858
|
welcome_channels: guild.welcomeScreen.welcomeChannels.map((welcomeScreenChannel) => ({
|
857
|
-
channel_id: welcomeScreenChannel.
|
859
|
+
channel_id: welcomeScreenChannel.channelID,
|
858
860
|
description: welcomeScreenChannel.description,
|
859
|
-
emoji_id: welcomeScreenChannel.
|
861
|
+
emoji_id: welcomeScreenChannel.emojiID,
|
860
862
|
emoji_name: welcomeScreenChannel.emojiName,
|
861
863
|
})),
|
862
864
|
}
|
@@ -864,7 +866,7 @@ class Util {
|
|
864
866
|
nsfw_level: guild.nsfwLevel,
|
865
867
|
stickers: guild.stickers?.map((sticker) => this.stickerToRaw(sticker)),
|
866
868
|
premium_progress_bar_enabled: guild.premiumProgressBarEnabled,
|
867
|
-
safety_alerts_channel_id: guild.
|
869
|
+
safety_alerts_channel_id: guild.safetyAlertsChannelID,
|
868
870
|
};
|
869
871
|
}
|
870
872
|
guildMemberFromRaw(guildMember) {
|
@@ -906,9 +908,9 @@ class Util {
|
|
906
908
|
guildScheduledEventFromRaw(guildScheduledEvent) {
|
907
909
|
return {
|
908
910
|
id: guildScheduledEvent.id,
|
909
|
-
|
910
|
-
|
911
|
-
|
911
|
+
guildID: guildScheduledEvent.guild_id,
|
912
|
+
channelID: guildScheduledEvent.channel_id,
|
913
|
+
creatorID: guildScheduledEvent.creator_id,
|
912
914
|
name: guildScheduledEvent.name,
|
913
915
|
description: guildScheduledEvent.description,
|
914
916
|
scheduledStartTime: guildScheduledEvent.scheduled_start_time,
|
@@ -916,7 +918,7 @@ class Util {
|
|
916
918
|
privacyLevel: guildScheduledEvent.privacy_level,
|
917
919
|
status: guildScheduledEvent.status,
|
918
920
|
entityType: guildScheduledEvent.entity_type,
|
919
|
-
|
921
|
+
entityID: guildScheduledEvent.entity_id,
|
920
922
|
entityMetadata: guildScheduledEvent.entity_metadata,
|
921
923
|
creator: guildScheduledEvent.creator !== undefined
|
922
924
|
? this.userFromRaw(guildScheduledEvent.creator)
|
@@ -928,9 +930,9 @@ class Util {
|
|
928
930
|
guildScheduledEventToRaw(guildScheduledEvent) {
|
929
931
|
return {
|
930
932
|
id: guildScheduledEvent.id,
|
931
|
-
guild_id: guildScheduledEvent.
|
932
|
-
channel_id: guildScheduledEvent.
|
933
|
-
creator_id: guildScheduledEvent.
|
933
|
+
guild_id: guildScheduledEvent.guildID,
|
934
|
+
channel_id: guildScheduledEvent.channelID,
|
935
|
+
creator_id: guildScheduledEvent.creatorID,
|
934
936
|
name: guildScheduledEvent.name,
|
935
937
|
description: guildScheduledEvent.description,
|
936
938
|
scheduled_start_time: guildScheduledEvent.scheduledStartTime,
|
@@ -938,7 +940,7 @@ class Util {
|
|
938
940
|
privacy_level: guildScheduledEvent.privacyLevel,
|
939
941
|
status: guildScheduledEvent.status,
|
940
942
|
entity_type: guildScheduledEvent.entityType,
|
941
|
-
entity_id: guildScheduledEvent.
|
943
|
+
entity_id: guildScheduledEvent.entityID,
|
942
944
|
entity_metadata: guildScheduledEvent.entityMetadata,
|
943
945
|
creator: guildScheduledEvent.creator !== undefined
|
944
946
|
? this.userToRaw(guildScheduledEvent.creator)
|
@@ -953,11 +955,11 @@ class Util {
|
|
953
955
|
name: guildTemplate.name,
|
954
956
|
description: guildTemplate.description,
|
955
957
|
usageCount: guildTemplate.usage_count,
|
956
|
-
|
958
|
+
creatorID: guildTemplate.creator_id,
|
957
959
|
creator: this.userFromRaw(guildTemplate.creator),
|
958
960
|
createdAt: guildTemplate.created_at,
|
959
961
|
updatedAt: guildTemplate.updated_at,
|
960
|
-
|
962
|
+
sourceGuildID: guildTemplate.source_guild_id,
|
961
963
|
serializedSourceGuild: this.guildFromRaw(guildTemplate.serialized_source_guild),
|
962
964
|
isDirty: guildTemplate.is_dirty,
|
963
965
|
};
|
@@ -968,11 +970,11 @@ class Util {
|
|
968
970
|
name: guildTemplate.name,
|
969
971
|
description: guildTemplate.description,
|
970
972
|
usage_count: guildTemplate.usageCount,
|
971
|
-
creator_id: guildTemplate.
|
973
|
+
creator_id: guildTemplate.creatorID,
|
972
974
|
creator: this.userToRaw(guildTemplate.creator),
|
973
975
|
created_at: guildTemplate.createdAt,
|
974
976
|
updated_at: guildTemplate.updatedAt,
|
975
|
-
source_guild_id: guildTemplate.
|
977
|
+
source_guild_id: guildTemplate.sourceGuildID,
|
976
978
|
serialized_source_guild: this.guildToRaw(guildTemplate.serializedSourceGuild),
|
977
979
|
is_dirty: guildTemplate.isDirty,
|
978
980
|
};
|
@@ -984,7 +986,7 @@ class Util {
|
|
984
986
|
type: integration.type,
|
985
987
|
enabled: integration.enabled,
|
986
988
|
syncing: integration.syncing,
|
987
|
-
|
989
|
+
roleID: integration.role_id,
|
988
990
|
enableEmoticons: integration.enable_emoticons,
|
989
991
|
expireBehavior: integration.expire_behavior,
|
990
992
|
expireGracePeriod: integration.expire_grace_period,
|
@@ -1016,7 +1018,7 @@ class Util {
|
|
1016
1018
|
type: integration.type,
|
1017
1019
|
enabled: integration.enabled,
|
1018
1020
|
syncing: integration.syncing,
|
1019
|
-
role_id: integration.
|
1021
|
+
role_id: integration.roleID,
|
1020
1022
|
enable_emoticons: integration.enableEmoticons,
|
1021
1023
|
expire_behavior: integration.expireBehavior,
|
1022
1024
|
expire_grace_period: integration.expireGracePeriod,
|
@@ -1044,7 +1046,7 @@ class Util {
|
|
1044
1046
|
interactionFromRaw(interaction) {
|
1045
1047
|
return {
|
1046
1048
|
id: interaction.id,
|
1047
|
-
|
1049
|
+
applicationID: interaction.application_id,
|
1048
1050
|
type: interaction.type,
|
1049
1051
|
data: interaction.data !== undefined
|
1050
1052
|
? {
|
@@ -1055,16 +1057,16 @@ class Util {
|
|
1055
1057
|
? this.resolvedDataFromRaw(interaction.data.resolved)
|
1056
1058
|
: undefined,
|
1057
1059
|
options: interaction.data.options,
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1060
|
+
guildID: interaction.data.guild_id,
|
1061
|
+
targetID: interaction.data.target_id,
|
1062
|
+
customID: interaction.data.custom_id,
|
1061
1063
|
componentType: interaction.data.component_type,
|
1062
1064
|
values: interaction.data.values,
|
1063
1065
|
components: interaction.data.components?.map((component) => ({
|
1064
1066
|
type: component.type,
|
1065
1067
|
components: component.components?.map((c) => ({
|
1066
1068
|
type: c.type,
|
1067
|
-
|
1069
|
+
customID: c.custom_id,
|
1068
1070
|
style: c.style,
|
1069
1071
|
label: c.label,
|
1070
1072
|
minLength: c.min_length,
|
@@ -1083,11 +1085,11 @@ class Util {
|
|
1083
1085
|
features: interaction.guild.features,
|
1084
1086
|
}
|
1085
1087
|
: undefined,
|
1086
|
-
|
1088
|
+
guildID: interaction.guild_id,
|
1087
1089
|
channel: interaction.channel !== undefined
|
1088
1090
|
? this.channelFromRaw(interaction.channel)
|
1089
1091
|
: undefined,
|
1090
|
-
|
1092
|
+
channelID: interaction.channel_id,
|
1091
1093
|
member: interaction.member !== undefined
|
1092
1094
|
? this.guildMemberFromRaw(interaction.member)
|
1093
1095
|
: undefined,
|
@@ -1113,7 +1115,7 @@ class Util {
|
|
1113
1115
|
interactionToRaw(interaction) {
|
1114
1116
|
return {
|
1115
1117
|
id: interaction.id,
|
1116
|
-
application_id: interaction.
|
1118
|
+
application_id: interaction.applicationID,
|
1117
1119
|
type: interaction.type,
|
1118
1120
|
data: interaction.data !== undefined
|
1119
1121
|
? {
|
@@ -1124,16 +1126,16 @@ class Util {
|
|
1124
1126
|
? this.resolvedDataToRaw(interaction.data.resolved)
|
1125
1127
|
: undefined,
|
1126
1128
|
options: interaction.data.options,
|
1127
|
-
guild_id: interaction.data.
|
1128
|
-
target_id: interaction.data.
|
1129
|
-
custom_id: interaction.data.
|
1129
|
+
guild_id: interaction.data.guildID,
|
1130
|
+
target_id: interaction.data.targetID,
|
1131
|
+
custom_id: interaction.data.customID,
|
1130
1132
|
component_type: interaction.data.componentType,
|
1131
1133
|
values: interaction.data.values,
|
1132
1134
|
components: interaction.data.components?.map((component) => ({
|
1133
1135
|
type: component.type,
|
1134
1136
|
components: component.components?.map((c) => ({
|
1135
1137
|
type: c.type,
|
1136
|
-
custom_id: c.
|
1138
|
+
custom_id: c.customID,
|
1137
1139
|
style: c.style,
|
1138
1140
|
label: c.label,
|
1139
1141
|
min_length: c.minLength,
|
@@ -1152,11 +1154,11 @@ class Util {
|
|
1152
1154
|
features: interaction.guild.features,
|
1153
1155
|
}
|
1154
1156
|
: undefined,
|
1155
|
-
guild_id: interaction.
|
1157
|
+
guild_id: interaction.guildID,
|
1156
1158
|
channel: interaction.channel !== undefined
|
1157
1159
|
? this.channelToRaw(interaction.channel)
|
1158
1160
|
: undefined,
|
1159
|
-
channel_id: interaction.
|
1161
|
+
channel_id: interaction.channelID,
|
1160
1162
|
member: interaction.member !== undefined
|
1161
1163
|
? this.guildMemberToRaw(interaction.member)
|
1162
1164
|
: undefined,
|
@@ -1188,8 +1190,8 @@ class Util {
|
|
1188
1190
|
"0": interactionMetadata.authorizing_integration_owners[0],
|
1189
1191
|
"1": interactionMetadata.authorizing_integration_owners[1],
|
1190
1192
|
},
|
1191
|
-
|
1192
|
-
|
1193
|
+
originalResponseMessageID: interactionMetadata.original_response_message_id,
|
1194
|
+
interactedMessageID: interactionMetadata.interacted_message_id,
|
1193
1195
|
triggeringInteractionMetadata: interactionMetadata.triggering_interaction_metadata !== undefined
|
1194
1196
|
? this.interactionMetadataFromRaw(interactionMetadata.triggering_interaction_metadata)
|
1195
1197
|
: undefined,
|
@@ -1204,8 +1206,8 @@ class Util {
|
|
1204
1206
|
"0": interactionMetadata.authorizingIntegrationOwners[0],
|
1205
1207
|
"1": interactionMetadata.authorizingIntegrationOwners[1],
|
1206
1208
|
},
|
1207
|
-
original_response_message_id: interactionMetadata.
|
1208
|
-
interacted_message_id: interactionMetadata.
|
1209
|
+
original_response_message_id: interactionMetadata.originalResponseMessageID,
|
1210
|
+
interacted_message_id: interactionMetadata.interactedMessageID,
|
1209
1211
|
triggering_interaction_metadata: interactionMetadata.triggeringInteractionMetadata !== undefined
|
1210
1212
|
? this.interactionMetadataToRaw(interactionMetadata.triggeringInteractionMetadata)
|
1211
1213
|
: undefined,
|
@@ -1294,8 +1296,8 @@ class Util {
|
|
1294
1296
|
animated: c.emoji.animated,
|
1295
1297
|
}
|
1296
1298
|
: undefined,
|
1297
|
-
|
1298
|
-
|
1299
|
+
customID: c.custom_id,
|
1300
|
+
skuID: c.sku_id,
|
1299
1301
|
url: c.url,
|
1300
1302
|
disabled: c.disabled,
|
1301
1303
|
};
|
@@ -1303,7 +1305,7 @@ class Util {
|
|
1303
1305
|
case constants_1.ComponentTypes.TextInput: {
|
1304
1306
|
return {
|
1305
1307
|
type: c.type,
|
1306
|
-
|
1308
|
+
customID: c.custom_id,
|
1307
1309
|
style: c.style,
|
1308
1310
|
label: c.label,
|
1309
1311
|
minLength: c.min_length,
|
@@ -1316,7 +1318,7 @@ class Util {
|
|
1316
1318
|
case constants_1.ComponentTypes.ChannelSelect: {
|
1317
1319
|
return {
|
1318
1320
|
type: c.type,
|
1319
|
-
|
1321
|
+
customID: c.custom_id,
|
1320
1322
|
channelTypes: c.channel_types,
|
1321
1323
|
placeholder: c.placeholder,
|
1322
1324
|
defaultValues: c.default_values,
|
@@ -1328,7 +1330,7 @@ class Util {
|
|
1328
1330
|
case constants_1.ComponentTypes.StringSelect: {
|
1329
1331
|
return {
|
1330
1332
|
type: c.type,
|
1331
|
-
|
1333
|
+
customID: c.custom_id,
|
1332
1334
|
placeholder: c.placeholder,
|
1333
1335
|
options: c.options?.map((option) => ({
|
1334
1336
|
label: option.label,
|
@@ -1353,7 +1355,7 @@ class Util {
|
|
1353
1355
|
case constants_1.ComponentTypes.UserSelect: {
|
1354
1356
|
return {
|
1355
1357
|
type: c.type,
|
1356
|
-
|
1358
|
+
customID: c.custom_id,
|
1357
1359
|
placeholder: c.placeholder,
|
1358
1360
|
defaultValues: c.default_values,
|
1359
1361
|
minValues: c.min_values,
|
@@ -1382,8 +1384,8 @@ class Util {
|
|
1382
1384
|
animated: c.emoji.animated,
|
1383
1385
|
}
|
1384
1386
|
: undefined,
|
1385
|
-
custom_id: c.
|
1386
|
-
sku_id: c.
|
1387
|
+
custom_id: c.customID,
|
1388
|
+
sku_id: c.skuID,
|
1387
1389
|
url: c.url,
|
1388
1390
|
disabled: c.disabled,
|
1389
1391
|
};
|
@@ -1391,7 +1393,7 @@ class Util {
|
|
1391
1393
|
case constants_1.ComponentTypes.TextInput: {
|
1392
1394
|
return {
|
1393
1395
|
type: c.type,
|
1394
|
-
custom_id: c.
|
1396
|
+
custom_id: c.customID,
|
1395
1397
|
style: c.style,
|
1396
1398
|
label: c.label,
|
1397
1399
|
min_length: c.minLength,
|
@@ -1404,7 +1406,7 @@ class Util {
|
|
1404
1406
|
case constants_1.ComponentTypes.ChannelSelect: {
|
1405
1407
|
return {
|
1406
1408
|
type: c.type,
|
1407
|
-
custom_id: c.
|
1409
|
+
custom_id: c.customID,
|
1408
1410
|
channel_types: c.channelTypes,
|
1409
1411
|
placeholder: c.placeholder,
|
1410
1412
|
default_values: c.defaultValues,
|
@@ -1416,7 +1418,7 @@ class Util {
|
|
1416
1418
|
case constants_1.ComponentTypes.StringSelect: {
|
1417
1419
|
return {
|
1418
1420
|
type: c.type,
|
1419
|
-
custom_id: c.
|
1421
|
+
custom_id: c.customID,
|
1420
1422
|
placeholder: c.placeholder,
|
1421
1423
|
options: c.options?.map((option) => ({
|
1422
1424
|
label: option.label,
|
@@ -1441,7 +1443,7 @@ class Util {
|
|
1441
1443
|
case constants_1.ComponentTypes.UserSelect: {
|
1442
1444
|
return {
|
1443
1445
|
type: c.type,
|
1444
|
-
custom_id: c.
|
1446
|
+
custom_id: c.customID,
|
1445
1447
|
placeholder: c.placeholder,
|
1446
1448
|
default_values: c.defaultValues,
|
1447
1449
|
min_values: c.minValues,
|
@@ -1456,7 +1458,7 @@ class Util {
|
|
1456
1458
|
messageFromRaw(message) {
|
1457
1459
|
return {
|
1458
1460
|
id: message.id,
|
1459
|
-
|
1461
|
+
channelID: message.channel_id,
|
1460
1462
|
author: this.userFromRaw(message.author),
|
1461
1463
|
content: message.content,
|
1462
1464
|
timestamp: message.timestamp,
|
@@ -1467,7 +1469,7 @@ class Util {
|
|
1467
1469
|
mentionRoles: message.mention_roles,
|
1468
1470
|
mentionChannels: message.mention_channels?.map((channelMention) => ({
|
1469
1471
|
id: channelMention.id,
|
1470
|
-
|
1472
|
+
guildID: channelMention.guild_id,
|
1471
1473
|
type: channelMention.type,
|
1472
1474
|
name: channelMention.name,
|
1473
1475
|
})),
|
@@ -1483,18 +1485,18 @@ class Util {
|
|
1483
1485
|
})),
|
1484
1486
|
nonce: message.nonce,
|
1485
1487
|
pinned: message.pinned,
|
1486
|
-
|
1488
|
+
webhookID: message.webhook_id,
|
1487
1489
|
type: message.type,
|
1488
1490
|
activity: message.activity,
|
1489
1491
|
application: message.application !== undefined
|
1490
1492
|
? this.applicationFromRaw(message.application)
|
1491
1493
|
: undefined,
|
1492
|
-
|
1494
|
+
applicationID: message.application_id,
|
1493
1495
|
messageReference: message.message_reference !== undefined
|
1494
1496
|
? {
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1497
|
+
messageID: message.message_reference.message_id,
|
1498
|
+
channelID: message.message_reference.channel_id,
|
1499
|
+
guildID: message.message_reference.guild_id,
|
1498
1500
|
failIfNotExists: message.message_reference.fail_if_not_exists,
|
1499
1501
|
}
|
1500
1502
|
: undefined,
|
@@ -1533,7 +1535,7 @@ class Util {
|
|
1533
1535
|
position: message.position,
|
1534
1536
|
roleSubscriptionData: message.role_subscription_data !== undefined
|
1535
1537
|
? {
|
1536
|
-
|
1538
|
+
roleSubscriptionListingID: message.role_subscription_data.role_subscription_listing_id,
|
1537
1539
|
tierName: message.role_subscription_data.tier_name,
|
1538
1540
|
totalMonthsSubscribed: message.role_subscription_data.total_months_subscribed,
|
1539
1541
|
isRenewal: message.role_subscription_data.is_renewal,
|
@@ -1549,7 +1551,7 @@ class Util {
|
|
1549
1551
|
messageToRaw(message) {
|
1550
1552
|
return {
|
1551
1553
|
id: message.id,
|
1552
|
-
channel_id: message.
|
1554
|
+
channel_id: message.channelID,
|
1553
1555
|
author: this.userToRaw(message.author),
|
1554
1556
|
content: message.content,
|
1555
1557
|
timestamp: message.timestamp,
|
@@ -1560,7 +1562,7 @@ class Util {
|
|
1560
1562
|
mention_roles: message.mentionRoles,
|
1561
1563
|
mention_channels: message.mentionChannels?.map((channelMention) => ({
|
1562
1564
|
id: channelMention.id,
|
1563
|
-
guild_id: channelMention.
|
1565
|
+
guild_id: channelMention.guildID,
|
1564
1566
|
type: channelMention.type,
|
1565
1567
|
name: channelMention.name,
|
1566
1568
|
})),
|
@@ -1576,18 +1578,18 @@ class Util {
|
|
1576
1578
|
})),
|
1577
1579
|
nonce: message.nonce,
|
1578
1580
|
pinned: message.pinned,
|
1579
|
-
webhook_id: message.
|
1581
|
+
webhook_id: message.webhookID,
|
1580
1582
|
type: message.type,
|
1581
1583
|
activity: message.activity,
|
1582
1584
|
application: message.application !== undefined
|
1583
1585
|
? this.applicationToRaw(message.application)
|
1584
1586
|
: undefined,
|
1585
|
-
application_id: message.
|
1587
|
+
application_id: message.applicationID,
|
1586
1588
|
message_reference: message.messageReference !== undefined
|
1587
1589
|
? {
|
1588
|
-
message_id: message.messageReference.
|
1589
|
-
channel_id: message.messageReference.
|
1590
|
-
guild_id: message.messageReference.
|
1590
|
+
message_id: message.messageReference.messageID,
|
1591
|
+
channel_id: message.messageReference.channelID,
|
1592
|
+
guild_id: message.messageReference.guildID,
|
1591
1593
|
fail_if_not_exists: message.messageReference.failIfNotExists,
|
1592
1594
|
}
|
1593
1595
|
: undefined,
|
@@ -1626,7 +1628,7 @@ class Util {
|
|
1626
1628
|
position: message.position,
|
1627
1629
|
role_subscription_data: message.roleSubscriptionData !== undefined
|
1628
1630
|
? {
|
1629
|
-
role_subscription_listing_id: message.roleSubscriptionData.
|
1631
|
+
role_subscription_listing_id: message.roleSubscriptionData.roleSubscriptionListingID,
|
1630
1632
|
tier_name: message.roleSubscriptionData.tierName,
|
1631
1633
|
total_months_subscribed: message.roleSubscriptionData.totalMonthsSubscribed,
|
1632
1634
|
is_renewal: message.roleSubscriptionData.isRenewal,
|
@@ -1643,8 +1645,8 @@ class Util {
|
|
1643
1645
|
return {
|
1644
1646
|
id: applicationCommand.id,
|
1645
1647
|
type: applicationCommand.type,
|
1646
|
-
application_id: applicationCommand.
|
1647
|
-
guild_id: applicationCommand.
|
1648
|
+
application_id: applicationCommand.applicationID,
|
1649
|
+
guild_id: applicationCommand.guildID,
|
1648
1650
|
name: applicationCommand.name,
|
1649
1651
|
name_localizations: applicationCommand.nameLocalizations,
|
1650
1652
|
description: applicationCommand.description,
|
@@ -1697,7 +1699,7 @@ class Util {
|
|
1697
1699
|
presenceFromRaw(presence) {
|
1698
1700
|
return {
|
1699
1701
|
user: this.userFromRaw(presence.user),
|
1700
|
-
|
1702
|
+
guildID: presence.guild_id,
|
1701
1703
|
status: presence.status,
|
1702
1704
|
activities: presence.activities.map((activity) => ({
|
1703
1705
|
name: activity.name,
|
@@ -1705,7 +1707,7 @@ class Util {
|
|
1705
1707
|
url: activity.url,
|
1706
1708
|
createdAt: activity.created_at,
|
1707
1709
|
timestamps: activity.timestamps,
|
1708
|
-
|
1710
|
+
applicationID: activity.application_id,
|
1709
1711
|
details: activity.details,
|
1710
1712
|
state: activity.state,
|
1711
1713
|
party: activity.party,
|
@@ -1726,7 +1728,7 @@ class Util {
|
|
1726
1728
|
presenceToRaw(presence) {
|
1727
1729
|
return {
|
1728
1730
|
user: this.userToRaw(presence.user),
|
1729
|
-
guild_id: presence.
|
1731
|
+
guild_id: presence.guildID,
|
1730
1732
|
status: presence.status,
|
1731
1733
|
activities: presence.activities.map((activity) => ({
|
1732
1734
|
name: activity.name,
|
@@ -1734,7 +1736,7 @@ class Util {
|
|
1734
1736
|
url: activity.url,
|
1735
1737
|
created_at: activity.createdAt,
|
1736
1738
|
timestamps: activity.timestamps,
|
1737
|
-
application_id: activity.
|
1739
|
+
application_id: activity.applicationID,
|
1738
1740
|
details: activity.details,
|
1739
1741
|
state: activity.state,
|
1740
1742
|
party: activity.party,
|
@@ -1848,7 +1850,7 @@ class Util {
|
|
1848
1850
|
return {
|
1849
1851
|
question: poll.question,
|
1850
1852
|
answers: poll.answers.map((answer) => ({
|
1851
|
-
|
1853
|
+
answerID: answer.answer_id,
|
1852
1854
|
pollMedia: answer.poll_media,
|
1853
1855
|
})),
|
1854
1856
|
expiry: poll.expiry,
|
@@ -1870,7 +1872,7 @@ class Util {
|
|
1870
1872
|
return {
|
1871
1873
|
question: poll.question,
|
1872
1874
|
answers: poll.answers.map((answer) => ({
|
1873
|
-
answer_id: answer.
|
1875
|
+
answer_id: answer.answerID,
|
1874
1876
|
poll_media: answer.pollMedia,
|
1875
1877
|
})),
|
1876
1878
|
expiry: poll.expiry,
|
@@ -1902,10 +1904,10 @@ class Util {
|
|
1902
1904
|
mentionable: role.mentionable,
|
1903
1905
|
tags: role.tags !== undefined
|
1904
1906
|
? {
|
1905
|
-
|
1906
|
-
|
1907
|
+
botID: role.tags.bot_id,
|
1908
|
+
integrationID: role.tags.integration_id,
|
1907
1909
|
premiumSubscriber: role.tags.premium_subscriber,
|
1908
|
-
|
1910
|
+
subscriptionListingID: role.tags.subscription_listing_id,
|
1909
1911
|
availableForPurchase: role.tags.available_for_purchase,
|
1910
1912
|
guildConnections: role.tags.guild_connections,
|
1911
1913
|
}
|
@@ -1927,10 +1929,10 @@ class Util {
|
|
1927
1929
|
mentionable: role.mentionable,
|
1928
1930
|
tags: role.tags !== undefined
|
1929
1931
|
? {
|
1930
|
-
bot_id: role.tags.
|
1931
|
-
integration_id: role.tags.
|
1932
|
+
bot_id: role.tags.botID,
|
1933
|
+
integration_id: role.tags.integrationID,
|
1932
1934
|
premium_subscriber: role.tags.premiumSubscriber,
|
1933
|
-
subscription_listing_id: role.tags.
|
1935
|
+
subscription_listing_id: role.tags.subscriptionListingID,
|
1934
1936
|
available_for_purchase: role.tags.availableForPurchase,
|
1935
1937
|
guild_connections: role.tags.guildConnections,
|
1936
1938
|
}
|
@@ -1942,8 +1944,8 @@ class Util {
|
|
1942
1944
|
return {
|
1943
1945
|
id: sku.id,
|
1944
1946
|
type: sku.type,
|
1945
|
-
|
1946
|
-
|
1947
|
+
dependentSKUID: sku.dependent_sku_id,
|
1948
|
+
applicationID: sku.application_id,
|
1947
1949
|
manifestLabels: sku.manifest_labels,
|
1948
1950
|
accessType: sku.access_type,
|
1949
1951
|
name: sku.name,
|
@@ -1958,8 +1960,8 @@ class Util {
|
|
1958
1960
|
return {
|
1959
1961
|
id: sku.id,
|
1960
1962
|
type: sku.type,
|
1961
|
-
dependent_sku_id: sku.
|
1962
|
-
application_id: sku.
|
1963
|
+
dependent_sku_id: sku.dependentSKUID,
|
1964
|
+
application_id: sku.applicationID,
|
1963
1965
|
manifest_labels: sku.manifestLabels,
|
1964
1966
|
access_type: sku.accessType,
|
1965
1967
|
name: sku.name,
|
@@ -1973,29 +1975,29 @@ class Util {
|
|
1973
1975
|
stageInstanceFromRaw(stageInstance) {
|
1974
1976
|
return {
|
1975
1977
|
id: stageInstance.id,
|
1976
|
-
|
1977
|
-
|
1978
|
+
guildID: stageInstance.guild_id,
|
1979
|
+
channelID: stageInstance.channel_id,
|
1978
1980
|
topic: stageInstance.topic,
|
1979
1981
|
privacyLevel: stageInstance.privacy_level,
|
1980
1982
|
discoverableDisabled: stageInstance.discoverable_disabled,
|
1981
|
-
|
1983
|
+
guildScheduledEventID: stageInstance.guild_scheduled_event_id,
|
1982
1984
|
};
|
1983
1985
|
}
|
1984
1986
|
stageInstanceToRaw(stageInstance) {
|
1985
1987
|
return {
|
1986
1988
|
id: stageInstance.id,
|
1987
|
-
guild_id: stageInstance.
|
1988
|
-
channel_id: stageInstance.
|
1989
|
+
guild_id: stageInstance.guildID,
|
1990
|
+
channel_id: stageInstance.channelID,
|
1989
1991
|
topic: stageInstance.topic,
|
1990
1992
|
privacy_level: stageInstance.privacyLevel,
|
1991
1993
|
discoverable_disabled: stageInstance.discoverableDisabled,
|
1992
|
-
guild_scheduled_event_id: stageInstance.
|
1994
|
+
guild_scheduled_event_id: stageInstance.guildScheduledEventID,
|
1993
1995
|
};
|
1994
1996
|
}
|
1995
1997
|
stickerFromRaw(sticker) {
|
1996
1998
|
return {
|
1997
1999
|
id: sticker.id,
|
1998
|
-
|
2000
|
+
packID: sticker.pack_id,
|
1999
2001
|
name: sticker.name,
|
2000
2002
|
description: sticker.description,
|
2001
2003
|
tags: sticker.tags,
|
@@ -2003,7 +2005,7 @@ class Util {
|
|
2003
2005
|
type: sticker.type,
|
2004
2006
|
formatType: sticker.format_type,
|
2005
2007
|
available: sticker.available,
|
2006
|
-
|
2008
|
+
guildID: sticker.id,
|
2007
2009
|
user: sticker.user !== undefined ? this.userFromRaw(sticker.user) : undefined,
|
2008
2010
|
sortValue: sticker.sort_value,
|
2009
2011
|
};
|
@@ -2011,7 +2013,7 @@ class Util {
|
|
2011
2013
|
stickerToRaw(sticker) {
|
2012
2014
|
return {
|
2013
2015
|
id: sticker.id,
|
2014
|
-
pack_id: sticker.
|
2016
|
+
pack_id: sticker.packID,
|
2015
2017
|
name: sticker.name,
|
2016
2018
|
description: sticker.description,
|
2017
2019
|
tags: sticker.tags,
|
@@ -2030,12 +2032,12 @@ class Util {
|
|
2030
2032
|
id: team.id,
|
2031
2033
|
members: team.members.map((teamMember) => ({
|
2032
2034
|
membershipState: teamMember.membership_state,
|
2033
|
-
|
2035
|
+
teamID: teamMember.team_id,
|
2034
2036
|
user: this.userFromRaw(teamMember.user),
|
2035
2037
|
role: teamMember.role,
|
2036
2038
|
})),
|
2037
2039
|
name: team.name,
|
2038
|
-
|
2040
|
+
ownerUserID: team.owner_user_id,
|
2039
2041
|
};
|
2040
2042
|
}
|
2041
2043
|
teamToRaw(team) {
|
@@ -2044,18 +2046,18 @@ class Util {
|
|
2044
2046
|
id: team.id,
|
2045
2047
|
members: team.members.map((teamMember) => ({
|
2046
2048
|
membership_state: teamMember.membershipState,
|
2047
|
-
team_id: teamMember.
|
2049
|
+
team_id: teamMember.teamID,
|
2048
2050
|
user: this.userToRaw(teamMember.user),
|
2049
2051
|
role: teamMember.role,
|
2050
2052
|
})),
|
2051
2053
|
name: team.name,
|
2052
|
-
owner_user_id: team.
|
2054
|
+
owner_user_id: team.ownerUserID,
|
2053
2055
|
};
|
2054
2056
|
}
|
2055
2057
|
threadMemberFromRaw(threadMember) {
|
2056
2058
|
return {
|
2057
2059
|
id: threadMember.id,
|
2058
|
-
|
2060
|
+
userID: threadMember.user_id,
|
2059
2061
|
joinTimestamp: threadMember.join_timestamp,
|
2060
2062
|
flags: threadMember.flags,
|
2061
2063
|
member: threadMember.member !== undefined
|
@@ -2066,7 +2068,7 @@ class Util {
|
|
2066
2068
|
threadMemberToRaw(threadMember) {
|
2067
2069
|
return {
|
2068
2070
|
id: threadMember.id,
|
2069
|
-
user_id: threadMember.
|
2071
|
+
user_id: threadMember.userID,
|
2070
2072
|
join_timestamp: threadMember.joinTimestamp,
|
2071
2073
|
flags: threadMember.flags,
|
2072
2074
|
member: threadMember.member !== undefined
|
@@ -2077,29 +2079,29 @@ class Util {
|
|
2077
2079
|
testEntitlementFromRaw(entitlement) {
|
2078
2080
|
return {
|
2079
2081
|
id: entitlement.id,
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2082
|
+
skuID: entitlement.sku_id,
|
2083
|
+
applicationID: entitlement.application_id,
|
2084
|
+
userID: entitlement.user_id,
|
2085
|
+
promotionID: entitlement.promotion_id,
|
2084
2086
|
type: entitlement.type,
|
2085
2087
|
deleted: entitlement.deleted,
|
2086
2088
|
giftCodeFlags: entitlement.gift_code_flags,
|
2087
2089
|
consumed: entitlement.consumed,
|
2088
|
-
|
2090
|
+
guildID: entitlement.guild_id,
|
2089
2091
|
};
|
2090
2092
|
}
|
2091
2093
|
testEntitlementToRaw(entitlement) {
|
2092
2094
|
return {
|
2093
2095
|
id: entitlement.id,
|
2094
|
-
sku_id: entitlement.
|
2095
|
-
application_id: entitlement.
|
2096
|
-
user_id: entitlement.
|
2097
|
-
promotion_id: entitlement.
|
2096
|
+
sku_id: entitlement.skuID,
|
2097
|
+
application_id: entitlement.applicationID,
|
2098
|
+
user_id: entitlement.userID,
|
2099
|
+
promotion_id: entitlement.promotionID,
|
2098
2100
|
type: entitlement.type,
|
2099
2101
|
deleted: entitlement.deleted,
|
2100
2102
|
gift_code_flags: entitlement.giftCodeFlags,
|
2101
2103
|
consumed: entitlement.consumed,
|
2102
|
-
guild_id: entitlement.
|
2104
|
+
guild_id: entitlement.guildID,
|
2103
2105
|
};
|
2104
2106
|
}
|
2105
2107
|
userFromRaw(user) {
|
@@ -2146,13 +2148,13 @@ class Util {
|
|
2146
2148
|
}
|
2147
2149
|
voiceStateFromRaw(voiceState) {
|
2148
2150
|
return {
|
2149
|
-
|
2150
|
-
|
2151
|
-
|
2151
|
+
guildID: voiceState.guild_id,
|
2152
|
+
channelID: voiceState.channel_id,
|
2153
|
+
userID: voiceState.user_id,
|
2152
2154
|
member: voiceState.member !== undefined
|
2153
2155
|
? this.guildMemberFromRaw(voiceState.member)
|
2154
2156
|
: undefined,
|
2155
|
-
|
2157
|
+
sessionID: voiceState.session_id,
|
2156
2158
|
deaf: voiceState.deaf,
|
2157
2159
|
mute: voiceState.mute,
|
2158
2160
|
selfDeaf: voiceState.self_deaf,
|
@@ -2165,13 +2167,13 @@ class Util {
|
|
2165
2167
|
}
|
2166
2168
|
voiceStateToRaw(voiceState) {
|
2167
2169
|
return {
|
2168
|
-
guild_id: voiceState.
|
2169
|
-
channel_id: voiceState.
|
2170
|
-
user_id: voiceState.
|
2170
|
+
guild_id: voiceState.guildID,
|
2171
|
+
channel_id: voiceState.channelID,
|
2172
|
+
user_id: voiceState.userID,
|
2171
2173
|
member: voiceState.member !== undefined
|
2172
2174
|
? this.guildMemberToRaw(voiceState.member)
|
2173
2175
|
: undefined,
|
2174
|
-
session_id: voiceState.
|
2176
|
+
session_id: voiceState.sessionID,
|
2175
2177
|
deaf: voiceState.deaf,
|
2176
2178
|
mute: voiceState.mute,
|
2177
2179
|
self_deaf: voiceState.selfDeaf,
|
@@ -2186,13 +2188,13 @@ class Util {
|
|
2186
2188
|
return {
|
2187
2189
|
id: webhook.id,
|
2188
2190
|
type: webhook.type,
|
2189
|
-
|
2190
|
-
|
2191
|
+
guildID: webhook.guild_id,
|
2192
|
+
channelID: webhook.channel_id,
|
2191
2193
|
user: webhook.user !== undefined ? this.userFromRaw(webhook.user) : undefined,
|
2192
2194
|
name: webhook.name,
|
2193
2195
|
avatar: webhook.avatar,
|
2194
2196
|
token: webhook.token,
|
2195
|
-
|
2197
|
+
applicationID: webhook.application_id,
|
2196
2198
|
sourceGuild: webhook.source_guild !== undefined
|
2197
2199
|
? this.guildFromRaw(webhook.source_guild)
|
2198
2200
|
: undefined,
|
@@ -2206,13 +2208,13 @@ class Util {
|
|
2206
2208
|
return {
|
2207
2209
|
id: webhook.id,
|
2208
2210
|
type: webhook.type,
|
2209
|
-
guild_id: webhook.
|
2210
|
-
channel_id: webhook.
|
2211
|
+
guild_id: webhook.guildID,
|
2212
|
+
channel_id: webhook.channelID,
|
2211
2213
|
user: webhook.user !== undefined ? this.userToRaw(webhook.user) : undefined,
|
2212
2214
|
name: webhook.name,
|
2213
2215
|
avatar: webhook.avatar,
|
2214
2216
|
token: webhook.token,
|
2215
|
-
application_id: webhook.
|
2217
|
+
application_id: webhook.applicationID,
|
2216
2218
|
source_guild: webhook.sourceGuild !== undefined
|
2217
2219
|
? this.guildToRaw(webhook.sourceGuild)
|
2218
2220
|
: undefined,
|