disgroove 2.2.7 → 3.0.0-dev.51640ff
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 +252 -251
- package/dist/lib/Client.js +472 -471
- package/dist/lib/gateway/Shard.d.ts +5 -3
- package/dist/lib/gateway/Shard.js +169 -121
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.js +4 -0
- package/dist/lib/rest/Endpoints.d.ts +94 -94
- package/dist/lib/rest/Endpoints.js +104 -104
- package/dist/lib/transformers/ApplicationCommands.js +4 -4
- package/dist/lib/transformers/Applications.d.ts +2 -0
- package/dist/lib/transformers/Applications.js +110 -4
- package/dist/lib/transformers/AuditLogs.js +10 -10
- package/dist/lib/transformers/AutoModeration.js +6 -6
- package/dist/lib/transformers/Channels.js +16 -16
- package/dist/lib/transformers/Components.js +16 -16
- package/dist/lib/transformers/Entitlements.d.ts +2 -2
- package/dist/lib/transformers/Entitlements.js +16 -16
- package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
- package/dist/lib/transformers/GuildTemplates.js +4 -4
- package/dist/lib/transformers/Guilds.js +28 -28
- package/dist/lib/transformers/Interactions.js +44 -44
- package/dist/lib/transformers/Lobbies.js +2 -2
- package/dist/lib/transformers/Messages.js +18 -18
- package/dist/lib/transformers/Polls.js +2 -2
- package/dist/lib/transformers/Presences.js +6 -6
- package/dist/lib/transformers/Roles.js +6 -6
- package/dist/lib/transformers/SKUs.js +2 -2
- package/dist/lib/transformers/Soundboards.js +6 -6
- package/dist/lib/transformers/StageInstances.js +6 -6
- package/dist/lib/transformers/Stickers.js +3 -3
- package/dist/lib/transformers/Subscriptions.js +8 -8
- package/dist/lib/transformers/Teams.js +4 -4
- package/dist/lib/transformers/Users.js +6 -6
- package/dist/lib/transformers/Voice.js +8 -8
- package/dist/lib/transformers/Webhooks.js +6 -6
- package/dist/lib/types/application-command.d.ts +9 -4
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
- package/dist/lib/types/application.d.ts +12 -7
- package/dist/lib/types/audit-log.d.ts +9 -5
- package/dist/lib/types/auto-moderation.d.ts +7 -3
- package/dist/lib/types/channel.d.ts +17 -23
- package/dist/lib/types/common.d.ts +2 -0
- package/dist/lib/types/components.d.ts +43 -15
- package/dist/lib/types/emoji.d.ts +1 -0
- package/dist/lib/types/entitlements.d.ts +5 -4
- package/dist/lib/types/gateway-events.d.ts +181 -130
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
- package/dist/lib/types/guild-template.d.ts +3 -2
- package/dist/lib/types/guild.d.ts +33 -17
- package/dist/lib/types/interaction.d.ts +23 -10
- package/dist/lib/types/invite.d.ts +3 -0
- package/dist/lib/types/lobby.d.ts +3 -1
- package/dist/lib/types/message.d.ts +29 -15
- package/dist/lib/types/poll.d.ts +7 -1
- package/dist/lib/types/role.d.ts +6 -3
- package/dist/lib/types/sku.d.ts +2 -1
- package/dist/lib/types/soundboard.d.ts +4 -3
- package/dist/lib/types/stage-instance.d.ts +4 -3
- package/dist/lib/types/sticker.d.ts +8 -5
- package/dist/lib/types/subscription.d.ts +6 -5
- package/dist/lib/types/team.d.ts +4 -2
- package/dist/lib/types/user.d.ts +10 -3
- package/dist/lib/types/voice.d.ts +6 -4
- package/dist/lib/types/webhook.d.ts +4 -3
- package/dist/lib/utils/CDN.d.ts +22 -22
- package/dist/lib/utils/CDN.js +22 -22
- package/dist/lib/utils/formatters.d.ts +6 -6
- package/dist/lib/utils/formatters.js +18 -18
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -9,8 +9,8 @@ class Guilds {
|
|
|
9
9
|
static guildApplicationCommandPermissionsFromRaw(guildApplicationCommandPermissions) {
|
|
10
10
|
return {
|
|
11
11
|
id: guildApplicationCommandPermissions.id,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
applicationId: guildApplicationCommandPermissions.application_id,
|
|
13
|
+
guildId: guildApplicationCommandPermissions.guild_id,
|
|
14
14
|
permissions: guildApplicationCommandPermissions.permissions.map((permission) => ({
|
|
15
15
|
id: permission.id,
|
|
16
16
|
type: permission.type,
|
|
@@ -21,8 +21,8 @@ class Guilds {
|
|
|
21
21
|
static guildApplicationCommandPermissionsToRaw(guildApplicationCommandPermissions) {
|
|
22
22
|
return {
|
|
23
23
|
id: guildApplicationCommandPermissions.id,
|
|
24
|
-
application_id: guildApplicationCommandPermissions.
|
|
25
|
-
guild_id: guildApplicationCommandPermissions.
|
|
24
|
+
application_id: guildApplicationCommandPermissions.applicationId,
|
|
25
|
+
guild_id: guildApplicationCommandPermissions.guildId,
|
|
26
26
|
permissions: guildApplicationCommandPermissions.permissions.map((permission) => ({
|
|
27
27
|
id: permission.id,
|
|
28
28
|
type: permission.type,
|
|
@@ -39,13 +39,13 @@ class Guilds {
|
|
|
39
39
|
splash: guild.splash,
|
|
40
40
|
discoverySplash: guild.discovery_splash,
|
|
41
41
|
owner: guild.owner,
|
|
42
|
-
|
|
42
|
+
ownerId: guild.owner_id,
|
|
43
43
|
permissions: guild.permissions,
|
|
44
44
|
region: guild.region,
|
|
45
|
-
|
|
45
|
+
afkChannelId: guild.afk_channel_id,
|
|
46
46
|
afkTimeout: guild.afk_timeout,
|
|
47
47
|
widgetEnabled: guild.widget_enabled,
|
|
48
|
-
|
|
48
|
+
widgetChannelId: guild.widget_channel_id,
|
|
49
49
|
verificationLevel: guild.verification_level,
|
|
50
50
|
defaultMessageNotifications: guild.default_message_notifications,
|
|
51
51
|
explicitContentFilter: guild.explicit_content_filter,
|
|
@@ -53,10 +53,10 @@ class Guilds {
|
|
|
53
53
|
emojis: guild.emojis.map((emoji) => Emojis_1.Emojis.emojiFromRaw(emoji)),
|
|
54
54
|
features: guild.features,
|
|
55
55
|
mfaLevel: guild.mfa_level,
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
applicationId: guild.application_id,
|
|
57
|
+
systemChannelId: guild.system_channel_id,
|
|
58
58
|
systemChannelFlags: guild.system_channel_flags,
|
|
59
|
-
|
|
59
|
+
rulesChannelId: guild.rules_channel_id,
|
|
60
60
|
maxPresences: guild.max_presences,
|
|
61
61
|
maxMembers: guild.max_members,
|
|
62
62
|
vanityURLCode: guild.vanity_url_code,
|
|
@@ -65,7 +65,7 @@ class Guilds {
|
|
|
65
65
|
premiumTier: guild.premium_tier,
|
|
66
66
|
premiumSubscriptionCount: guild.premium_subscription_count,
|
|
67
67
|
preferredLocale: guild.preferred_locale,
|
|
68
|
-
|
|
68
|
+
publicUpdatesChannelId: guild.public_updates_channel_id,
|
|
69
69
|
maxVideoChannelUsers: guild.max_video_channel_users,
|
|
70
70
|
maxStageVideoChannelUsers: guild.max_stage_video_channel_users,
|
|
71
71
|
approximateMemberCount: guild.approximate_member_count,
|
|
@@ -74,9 +74,9 @@ class Guilds {
|
|
|
74
74
|
? {
|
|
75
75
|
description: guild.welcome_screen.description,
|
|
76
76
|
welcomeChannels: guild.welcome_screen.welcome_channels.map((welcomeScreenChannel) => ({
|
|
77
|
-
|
|
77
|
+
channelId: welcomeScreenChannel.channel_id,
|
|
78
78
|
description: welcomeScreenChannel.description,
|
|
79
|
-
|
|
79
|
+
emojiId: welcomeScreenChannel.emoji_id,
|
|
80
80
|
emojiName: welcomeScreenChannel.emoji_name,
|
|
81
81
|
})),
|
|
82
82
|
}
|
|
@@ -84,7 +84,7 @@ class Guilds {
|
|
|
84
84
|
nsfwLevel: guild.nsfw_level,
|
|
85
85
|
stickers: guild.stickers?.map((sticker) => Stickers_1.Stickers.stickerFromRaw(sticker)),
|
|
86
86
|
premiumProgressBarEnabled: guild.premium_progress_bar_enabled,
|
|
87
|
-
|
|
87
|
+
safetyAlertsChannelId: guild.safety_alerts_channel_id,
|
|
88
88
|
incidentsData: guild.incidents_data !== null
|
|
89
89
|
? {
|
|
90
90
|
invitesDisabledUntil: guild.incidents_data.invites_disabled_until,
|
|
@@ -115,7 +115,7 @@ class Guilds {
|
|
|
115
115
|
? guildMember.avatar_decoration_data !== null
|
|
116
116
|
? {
|
|
117
117
|
asset: guildMember.avatar_decoration_data.asset,
|
|
118
|
-
|
|
118
|
+
skuId: guildMember.avatar_decoration_data.sku_id,
|
|
119
119
|
}
|
|
120
120
|
: null
|
|
121
121
|
: undefined,
|
|
@@ -141,7 +141,7 @@ class Guilds {
|
|
|
141
141
|
? guildMember.avatarDecorationData !== null
|
|
142
142
|
? {
|
|
143
143
|
asset: guildMember.avatarDecorationData.asset,
|
|
144
|
-
sku_id: guildMember.avatarDecorationData.
|
|
144
|
+
sku_id: guildMember.avatarDecorationData.skuId,
|
|
145
145
|
}
|
|
146
146
|
: null
|
|
147
147
|
: undefined,
|
|
@@ -156,13 +156,13 @@ class Guilds {
|
|
|
156
156
|
splash: guild.splash,
|
|
157
157
|
discovery_splash: guild.discoverySplash,
|
|
158
158
|
owner: guild.owner,
|
|
159
|
-
owner_id: guild.
|
|
159
|
+
owner_id: guild.ownerId,
|
|
160
160
|
permissions: guild.permissions,
|
|
161
161
|
region: guild.region,
|
|
162
|
-
afk_channel_id: guild.
|
|
162
|
+
afk_channel_id: guild.afkChannelId,
|
|
163
163
|
afk_timeout: guild.afkTimeout,
|
|
164
164
|
widget_enabled: guild.widgetEnabled,
|
|
165
|
-
widget_channel_id: guild.
|
|
165
|
+
widget_channel_id: guild.widgetChannelId,
|
|
166
166
|
verification_level: guild.verificationLevel,
|
|
167
167
|
default_message_notifications: guild.defaultMessageNotifications,
|
|
168
168
|
explicit_content_filter: guild.explicitContentFilter,
|
|
@@ -170,10 +170,10 @@ class Guilds {
|
|
|
170
170
|
emojis: guild.emojis.map((emoji) => Emojis_1.Emojis.emojiToRaw(emoji)),
|
|
171
171
|
features: guild.features,
|
|
172
172
|
mfa_level: guild.mfaLevel,
|
|
173
|
-
application_id: guild.
|
|
174
|
-
system_channel_id: guild.
|
|
173
|
+
application_id: guild.applicationId,
|
|
174
|
+
system_channel_id: guild.systemChannelId,
|
|
175
175
|
system_channel_flags: guild.systemChannelFlags,
|
|
176
|
-
rules_channel_id: guild.
|
|
176
|
+
rules_channel_id: guild.rulesChannelId,
|
|
177
177
|
max_presences: guild.maxPresences,
|
|
178
178
|
max_members: guild.maxMembers,
|
|
179
179
|
vanity_url_code: guild.vanityURLCode,
|
|
@@ -182,7 +182,7 @@ class Guilds {
|
|
|
182
182
|
premium_tier: guild.premiumTier,
|
|
183
183
|
premium_subscription_count: guild.premiumSubscriptionCount,
|
|
184
184
|
preferred_locale: guild.preferredLocale,
|
|
185
|
-
public_updates_channel_id: guild.
|
|
185
|
+
public_updates_channel_id: guild.publicUpdatesChannelId,
|
|
186
186
|
max_video_channel_users: guild.maxVideoChannelUsers,
|
|
187
187
|
max_stage_video_channel_users: guild.maxStageVideoChannelUsers,
|
|
188
188
|
approximate_member_count: guild.approximateMemberCount,
|
|
@@ -191,9 +191,9 @@ class Guilds {
|
|
|
191
191
|
? {
|
|
192
192
|
description: guild.welcomeScreen.description,
|
|
193
193
|
welcome_channels: guild.welcomeScreen.welcomeChannels.map((welcomeScreenChannel) => ({
|
|
194
|
-
channel_id: welcomeScreenChannel.
|
|
194
|
+
channel_id: welcomeScreenChannel.channelId,
|
|
195
195
|
description: welcomeScreenChannel.description,
|
|
196
|
-
emoji_id: welcomeScreenChannel.
|
|
196
|
+
emoji_id: welcomeScreenChannel.emojiId,
|
|
197
197
|
emoji_name: welcomeScreenChannel.emojiName,
|
|
198
198
|
})),
|
|
199
199
|
}
|
|
@@ -201,7 +201,7 @@ class Guilds {
|
|
|
201
201
|
nsfw_level: guild.nsfwLevel,
|
|
202
202
|
stickers: guild.stickers?.map((sticker) => Stickers_1.Stickers.stickerToRaw(sticker)),
|
|
203
203
|
premium_progress_bar_enabled: guild.premiumProgressBarEnabled,
|
|
204
|
-
safety_alerts_channel_id: guild.
|
|
204
|
+
safety_alerts_channel_id: guild.safetyAlertsChannelId,
|
|
205
205
|
incidents_data: guild.incidentsData !== null
|
|
206
206
|
? {
|
|
207
207
|
invites_disabled_until: guild.incidentsData.invitesDisabledUntil,
|
|
@@ -219,7 +219,7 @@ class Guilds {
|
|
|
219
219
|
type: integration.type,
|
|
220
220
|
enabled: integration.enabled,
|
|
221
221
|
syncing: integration.syncing,
|
|
222
|
-
|
|
222
|
+
roleId: integration.role_id,
|
|
223
223
|
enableEmoticons: integration.enable_emoticons,
|
|
224
224
|
expireBehavior: integration.expire_behavior,
|
|
225
225
|
expireGracePeriod: integration.expire_grace_period,
|
|
@@ -251,7 +251,7 @@ class Guilds {
|
|
|
251
251
|
type: integration.type,
|
|
252
252
|
enabled: integration.enabled,
|
|
253
253
|
syncing: integration.syncing,
|
|
254
|
-
role_id: integration.
|
|
254
|
+
role_id: integration.roleId,
|
|
255
255
|
enable_emoticons: integration.enableEmoticons,
|
|
256
256
|
expire_behavior: integration.expireBehavior,
|
|
257
257
|
expire_grace_period: integration.expireGracePeriod,
|
|
@@ -14,8 +14,8 @@ class Interactions {
|
|
|
14
14
|
interaction: {
|
|
15
15
|
id: interactionCallbackResponse.interaction.id,
|
|
16
16
|
type: interactionCallbackResponse.interaction.type,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
activityInstanceId: interactionCallbackResponse.interaction.activity_instance_id,
|
|
18
|
+
responseMessageId: interactionCallbackResponse.interaction.response_message_id,
|
|
19
19
|
responseMessageLoading: interactionCallbackResponse.interaction.response_message_loading,
|
|
20
20
|
responseMessageEphemeral: interactionCallbackResponse.interaction.response_message_ephemeral,
|
|
21
21
|
},
|
|
@@ -35,8 +35,8 @@ class Interactions {
|
|
|
35
35
|
interaction: {
|
|
36
36
|
id: interactionCallbackResponse.interaction.id,
|
|
37
37
|
type: interactionCallbackResponse.interaction.type,
|
|
38
|
-
activity_instance_id: interactionCallbackResponse.interaction.
|
|
39
|
-
response_message_id: interactionCallbackResponse.interaction.
|
|
38
|
+
activity_instance_id: interactionCallbackResponse.interaction.activityInstanceId,
|
|
39
|
+
response_message_id: interactionCallbackResponse.interaction.responseMessageId,
|
|
40
40
|
response_message_loading: interactionCallbackResponse.interaction.responseMessageLoading,
|
|
41
41
|
response_message_ephemeral: interactionCallbackResponse.interaction.responseMessageEphemeral,
|
|
42
42
|
},
|
|
@@ -54,7 +54,7 @@ class Interactions {
|
|
|
54
54
|
static interactionFromRaw(interaction) {
|
|
55
55
|
return {
|
|
56
56
|
id: interaction.id,
|
|
57
|
-
|
|
57
|
+
applicationId: interaction.application_id,
|
|
58
58
|
type: interaction.type,
|
|
59
59
|
data: interaction.data !== undefined
|
|
60
60
|
? {
|
|
@@ -65,9 +65,9 @@ class Interactions {
|
|
|
65
65
|
? Interactions.resolvedDataFromRaw(interaction.data.resolved)
|
|
66
66
|
: undefined,
|
|
67
67
|
options: interaction.data?.options,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
guildId: interaction.data?.guild_id,
|
|
69
|
+
targetId: interaction.data?.target_id,
|
|
70
|
+
customId: interaction.data?.custom_id,
|
|
71
71
|
componentType: interaction.data?.component_type,
|
|
72
72
|
values: interaction.data?.values,
|
|
73
73
|
components: interaction.data?.components?.map((component) => {
|
|
@@ -81,7 +81,7 @@ class Interactions {
|
|
|
81
81
|
return {
|
|
82
82
|
type: c.type,
|
|
83
83
|
id: c.id,
|
|
84
|
-
|
|
84
|
+
customId: c.custom_id,
|
|
85
85
|
value: c.value,
|
|
86
86
|
};
|
|
87
87
|
case constants_1.ComponentTypes.StringSelect:
|
|
@@ -89,7 +89,7 @@ class Interactions {
|
|
|
89
89
|
type: c.type,
|
|
90
90
|
componentType: c.component_type,
|
|
91
91
|
id: c.id,
|
|
92
|
-
|
|
92
|
+
customId: c.custom_id,
|
|
93
93
|
values: c.values,
|
|
94
94
|
};
|
|
95
95
|
case constants_1.ComponentTypes.UserSelect:
|
|
@@ -97,7 +97,7 @@ class Interactions {
|
|
|
97
97
|
type: c.type,
|
|
98
98
|
componentType: c.component_type,
|
|
99
99
|
id: c.id,
|
|
100
|
-
|
|
100
|
+
customId: c.custom_id,
|
|
101
101
|
resolved: this.resolvedDataFromRaw(c.resolved),
|
|
102
102
|
values: c.values,
|
|
103
103
|
};
|
|
@@ -106,7 +106,7 @@ class Interactions {
|
|
|
106
106
|
type: c.type,
|
|
107
107
|
componentType: c.component_type,
|
|
108
108
|
id: c.id,
|
|
109
|
-
|
|
109
|
+
customId: c.custom_id,
|
|
110
110
|
resolved: this.resolvedDataFromRaw(c.resolved),
|
|
111
111
|
values: c.values,
|
|
112
112
|
};
|
|
@@ -115,7 +115,7 @@ class Interactions {
|
|
|
115
115
|
type: c.type,
|
|
116
116
|
componentType: c.component_type,
|
|
117
117
|
id: c.id,
|
|
118
|
-
|
|
118
|
+
customId: c.custom_id,
|
|
119
119
|
resolved: this.resolvedDataFromRaw(c.resolved),
|
|
120
120
|
values: c.values,
|
|
121
121
|
};
|
|
@@ -124,7 +124,7 @@ class Interactions {
|
|
|
124
124
|
type: c.type,
|
|
125
125
|
componentType: c.component_type,
|
|
126
126
|
id: c.id,
|
|
127
|
-
|
|
127
|
+
customId: c.custom_id,
|
|
128
128
|
resolved: this.resolvedDataFromRaw(c.resolved),
|
|
129
129
|
values: c.values,
|
|
130
130
|
};
|
|
@@ -143,7 +143,7 @@ class Interactions {
|
|
|
143
143
|
c = {
|
|
144
144
|
type: component.component.type,
|
|
145
145
|
id: component.component.id,
|
|
146
|
-
|
|
146
|
+
customId: component.component.custom_id,
|
|
147
147
|
value: component.component.value,
|
|
148
148
|
};
|
|
149
149
|
break;
|
|
@@ -152,7 +152,7 @@ class Interactions {
|
|
|
152
152
|
type: component.component.type,
|
|
153
153
|
componentType: component.component.component_type,
|
|
154
154
|
id: component.component.id,
|
|
155
|
-
|
|
155
|
+
customId: component.component.custom_id,
|
|
156
156
|
values: component.component.values,
|
|
157
157
|
};
|
|
158
158
|
break;
|
|
@@ -161,7 +161,7 @@ class Interactions {
|
|
|
161
161
|
type: component.component.type,
|
|
162
162
|
componentType: component.component.component_type,
|
|
163
163
|
id: component.component.id,
|
|
164
|
-
|
|
164
|
+
customId: component.component.custom_id,
|
|
165
165
|
resolved: this.resolvedDataFromRaw(component.component.resolved),
|
|
166
166
|
values: component.component.values,
|
|
167
167
|
};
|
|
@@ -171,7 +171,7 @@ class Interactions {
|
|
|
171
171
|
type: component.component.type,
|
|
172
172
|
componentType: component.component.component_type,
|
|
173
173
|
id: component.component.id,
|
|
174
|
-
|
|
174
|
+
customId: component.component.custom_id,
|
|
175
175
|
resolved: this.resolvedDataFromRaw(component.component.resolved),
|
|
176
176
|
values: component.component.values,
|
|
177
177
|
};
|
|
@@ -181,7 +181,7 @@ class Interactions {
|
|
|
181
181
|
type: component.component.type,
|
|
182
182
|
componentType: component.component.component_type,
|
|
183
183
|
id: component.component.id,
|
|
184
|
-
|
|
184
|
+
customId: component.component.custom_id,
|
|
185
185
|
resolved: this.resolvedDataFromRaw(component.component.resolved),
|
|
186
186
|
values: component.component.values,
|
|
187
187
|
};
|
|
@@ -191,7 +191,7 @@ class Interactions {
|
|
|
191
191
|
type: component.component.type,
|
|
192
192
|
componentType: component.component.component_type,
|
|
193
193
|
id: component.component.id,
|
|
194
|
-
|
|
194
|
+
customId: component.component.custom_id,
|
|
195
195
|
resolved: this.resolvedDataFromRaw(component.component.resolved),
|
|
196
196
|
values: component.component.values,
|
|
197
197
|
};
|
|
@@ -214,11 +214,11 @@ class Interactions {
|
|
|
214
214
|
features: interaction.guild.features,
|
|
215
215
|
}
|
|
216
216
|
: undefined,
|
|
217
|
-
|
|
217
|
+
guildId: interaction.guild_id,
|
|
218
218
|
channel: interaction.channel !== undefined
|
|
219
219
|
? Channels_1.Channels.channelFromRaw(interaction.channel)
|
|
220
220
|
: undefined,
|
|
221
|
-
|
|
221
|
+
channelId: interaction.channel_id,
|
|
222
222
|
member: interaction.member !== undefined
|
|
223
223
|
? Guilds_1.Guilds.guildMemberFromRaw(interaction.member)
|
|
224
224
|
: undefined,
|
|
@@ -251,8 +251,8 @@ class Interactions {
|
|
|
251
251
|
"0": interactionMetadata.authorizing_integration_owners[0],
|
|
252
252
|
"1": interactionMetadata.authorizing_integration_owners[1],
|
|
253
253
|
},
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
originalResponseMessageId: interactionMetadata.original_response_message_id,
|
|
255
|
+
interactedMessageId: interactionMetadata.interacted_message_id,
|
|
256
256
|
triggeringInteractionMetadata: interactionMetadata.triggering_interaction_metadata !== undefined
|
|
257
257
|
? Interactions.interactionMetadataFromRaw(interactionMetadata.triggering_interaction_metadata)
|
|
258
258
|
: undefined,
|
|
@@ -267,8 +267,8 @@ class Interactions {
|
|
|
267
267
|
"0": interactionMetadata.authorizingIntegrationOwners[0],
|
|
268
268
|
"1": interactionMetadata.authorizingIntegrationOwners[1],
|
|
269
269
|
},
|
|
270
|
-
original_response_message_id: interactionMetadata.
|
|
271
|
-
interacted_message_id: interactionMetadata.
|
|
270
|
+
original_response_message_id: interactionMetadata.originalResponseMessageId,
|
|
271
|
+
interacted_message_id: interactionMetadata.interactedMessageId,
|
|
272
272
|
triggering_interaction_metadata: interactionMetadata.triggeringInteractionMetadata !== undefined
|
|
273
273
|
? Interactions.interactionMetadataToRaw(interactionMetadata.triggeringInteractionMetadata)
|
|
274
274
|
: undefined,
|
|
@@ -277,7 +277,7 @@ class Interactions {
|
|
|
277
277
|
static interactionToRaw(interaction) {
|
|
278
278
|
return {
|
|
279
279
|
id: interaction.id,
|
|
280
|
-
application_id: interaction.
|
|
280
|
+
application_id: interaction.applicationId,
|
|
281
281
|
type: interaction.type,
|
|
282
282
|
data: interaction.data !== undefined
|
|
283
283
|
? {
|
|
@@ -288,9 +288,9 @@ class Interactions {
|
|
|
288
288
|
? Interactions.resolvedDataToRaw(interaction.data.resolved)
|
|
289
289
|
: undefined,
|
|
290
290
|
options: interaction.data.options,
|
|
291
|
-
guild_id: interaction.data.
|
|
292
|
-
target_id: interaction.data.
|
|
293
|
-
custom_id: interaction.data.
|
|
291
|
+
guild_id: interaction.data.guildId,
|
|
292
|
+
target_id: interaction.data.targetId,
|
|
293
|
+
custom_id: interaction.data.customId,
|
|
294
294
|
component_type: interaction.data.componentType,
|
|
295
295
|
values: interaction.data.values,
|
|
296
296
|
components: interaction.data?.components?.map((component) => {
|
|
@@ -304,7 +304,7 @@ class Interactions {
|
|
|
304
304
|
return {
|
|
305
305
|
type: c.type,
|
|
306
306
|
id: c.id,
|
|
307
|
-
custom_id: c.
|
|
307
|
+
custom_id: c.customId,
|
|
308
308
|
value: c.value,
|
|
309
309
|
};
|
|
310
310
|
case constants_1.ComponentTypes.StringSelect:
|
|
@@ -312,7 +312,7 @@ class Interactions {
|
|
|
312
312
|
type: c.type,
|
|
313
313
|
component_type: c.componentType,
|
|
314
314
|
id: c.id,
|
|
315
|
-
custom_id: c.
|
|
315
|
+
custom_id: c.customId,
|
|
316
316
|
values: c.values,
|
|
317
317
|
};
|
|
318
318
|
case constants_1.ComponentTypes.UserSelect:
|
|
@@ -320,7 +320,7 @@ class Interactions {
|
|
|
320
320
|
type: c.type,
|
|
321
321
|
component_type: c.componentType,
|
|
322
322
|
id: c.id,
|
|
323
|
-
custom_id: c.
|
|
323
|
+
custom_id: c.customId,
|
|
324
324
|
resolved: this.resolvedDataToRaw(c.resolved),
|
|
325
325
|
values: c.values,
|
|
326
326
|
};
|
|
@@ -329,7 +329,7 @@ class Interactions {
|
|
|
329
329
|
type: c.type,
|
|
330
330
|
component_type: c.componentType,
|
|
331
331
|
id: c.id,
|
|
332
|
-
custom_id: c.
|
|
332
|
+
custom_id: c.customId,
|
|
333
333
|
resolved: this.resolvedDataToRaw(c.resolved),
|
|
334
334
|
values: c.values,
|
|
335
335
|
};
|
|
@@ -338,7 +338,7 @@ class Interactions {
|
|
|
338
338
|
type: c.type,
|
|
339
339
|
component_type: c.componentType,
|
|
340
340
|
id: c.id,
|
|
341
|
-
custom_id: c.
|
|
341
|
+
custom_id: c.customId,
|
|
342
342
|
resolved: this.resolvedDataToRaw(c.resolved),
|
|
343
343
|
values: c.values,
|
|
344
344
|
};
|
|
@@ -347,7 +347,7 @@ class Interactions {
|
|
|
347
347
|
type: c.type,
|
|
348
348
|
component_type: c.componentType,
|
|
349
349
|
id: c.id,
|
|
350
|
-
custom_id: c.
|
|
350
|
+
custom_id: c.customId,
|
|
351
351
|
resolved: this.resolvedDataToRaw(c.resolved),
|
|
352
352
|
values: c.values,
|
|
353
353
|
};
|
|
@@ -366,7 +366,7 @@ class Interactions {
|
|
|
366
366
|
c = {
|
|
367
367
|
type: component.component.type,
|
|
368
368
|
id: component.component.id,
|
|
369
|
-
custom_id: component.component.
|
|
369
|
+
custom_id: component.component.customId,
|
|
370
370
|
value: component.component.value,
|
|
371
371
|
};
|
|
372
372
|
break;
|
|
@@ -375,7 +375,7 @@ class Interactions {
|
|
|
375
375
|
type: component.component.type,
|
|
376
376
|
component_type: component.component.componentType,
|
|
377
377
|
id: component.component.id,
|
|
378
|
-
custom_id: component.component.
|
|
378
|
+
custom_id: component.component.customId,
|
|
379
379
|
values: component.component.values,
|
|
380
380
|
};
|
|
381
381
|
break;
|
|
@@ -384,7 +384,7 @@ class Interactions {
|
|
|
384
384
|
type: component.component.type,
|
|
385
385
|
component_type: component.component.componentType,
|
|
386
386
|
id: component.component.id,
|
|
387
|
-
custom_id: component.component.
|
|
387
|
+
custom_id: component.component.customId,
|
|
388
388
|
resolved: this.resolvedDataToRaw(component.component.resolved),
|
|
389
389
|
values: component.component.values,
|
|
390
390
|
};
|
|
@@ -394,7 +394,7 @@ class Interactions {
|
|
|
394
394
|
type: component.component.type,
|
|
395
395
|
component_type: component.component.componentType,
|
|
396
396
|
id: component.component.id,
|
|
397
|
-
custom_id: component.component.
|
|
397
|
+
custom_id: component.component.customId,
|
|
398
398
|
resolved: this.resolvedDataToRaw(component.component.resolved),
|
|
399
399
|
values: component.component.values,
|
|
400
400
|
};
|
|
@@ -404,7 +404,7 @@ class Interactions {
|
|
|
404
404
|
type: component.component.type,
|
|
405
405
|
component_type: component.component.componentType,
|
|
406
406
|
id: component.component.id,
|
|
407
|
-
custom_id: component.component.
|
|
407
|
+
custom_id: component.component.customId,
|
|
408
408
|
resolved: this.resolvedDataToRaw(component.component.resolved),
|
|
409
409
|
values: component.component.values,
|
|
410
410
|
};
|
|
@@ -414,7 +414,7 @@ class Interactions {
|
|
|
414
414
|
type: component.component.type,
|
|
415
415
|
component_type: component.component.componentType,
|
|
416
416
|
id: component.component.id,
|
|
417
|
-
custom_id: component.component.
|
|
417
|
+
custom_id: component.component.customId,
|
|
418
418
|
resolved: this.resolvedDataToRaw(component.component.resolved),
|
|
419
419
|
values: component.component.values,
|
|
420
420
|
};
|
|
@@ -437,11 +437,11 @@ class Interactions {
|
|
|
437
437
|
features: interaction.guild.features,
|
|
438
438
|
}
|
|
439
439
|
: undefined,
|
|
440
|
-
guild_id: interaction.
|
|
440
|
+
guild_id: interaction.guildId,
|
|
441
441
|
channel: interaction.channel !== undefined
|
|
442
442
|
? Channels_1.Channels.channelToRaw(interaction.channel)
|
|
443
443
|
: undefined,
|
|
444
|
-
channel_id: interaction.
|
|
444
|
+
channel_id: interaction.channelId,
|
|
445
445
|
member: interaction.member !== undefined
|
|
446
446
|
? Guilds_1.Guilds.guildMemberToRaw(interaction.member)
|
|
447
447
|
: undefined,
|
|
@@ -5,7 +5,7 @@ class Lobbies {
|
|
|
5
5
|
static lobbyFromRaw(lobby) {
|
|
6
6
|
return {
|
|
7
7
|
id: lobby.id,
|
|
8
|
-
|
|
8
|
+
applicationId: lobby.application_id,
|
|
9
9
|
metadata: lobby.metadata,
|
|
10
10
|
members: lobby.members,
|
|
11
11
|
linkedChannel: lobby.linked_channel,
|
|
@@ -28,7 +28,7 @@ class Lobbies {
|
|
|
28
28
|
static lobbyToRaw(lobby) {
|
|
29
29
|
return {
|
|
30
30
|
id: lobby.id,
|
|
31
|
-
application_id: lobby.
|
|
31
|
+
application_id: lobby.applicationId,
|
|
32
32
|
metadata: lobby.metadata,
|
|
33
33
|
members: lobby.members,
|
|
34
34
|
linked_channel: lobby.linkedChannel,
|
|
@@ -195,7 +195,7 @@ class Messages {
|
|
|
195
195
|
static messageFromRaw(message) {
|
|
196
196
|
return {
|
|
197
197
|
id: message.id,
|
|
198
|
-
|
|
198
|
+
channelId: message.channel_id,
|
|
199
199
|
author: Users_1.Users.userFromRaw(message.author),
|
|
200
200
|
content: message.content,
|
|
201
201
|
timestamp: message.timestamp,
|
|
@@ -206,7 +206,7 @@ class Messages {
|
|
|
206
206
|
mentionRoles: message.mention_roles,
|
|
207
207
|
mentionChannels: message.mention_channels?.map((channelMention) => ({
|
|
208
208
|
id: channelMention.id,
|
|
209
|
-
|
|
209
|
+
guildId: channelMention.guild_id,
|
|
210
210
|
type: channelMention.type,
|
|
211
211
|
name: channelMention.name,
|
|
212
212
|
})),
|
|
@@ -222,19 +222,19 @@ class Messages {
|
|
|
222
222
|
})),
|
|
223
223
|
nonce: message.nonce,
|
|
224
224
|
pinned: message.pinned,
|
|
225
|
-
|
|
225
|
+
webhookId: message.webhook_id,
|
|
226
226
|
type: message.type,
|
|
227
227
|
activity: message.activity,
|
|
228
228
|
application: message.application !== undefined
|
|
229
|
-
? Applications_1.Applications.
|
|
229
|
+
? Applications_1.Applications.partialApplicationFromRaw(message.application)
|
|
230
230
|
: undefined,
|
|
231
|
-
|
|
231
|
+
applicationId: message.application_id,
|
|
232
232
|
flags: message.flags,
|
|
233
233
|
messageReference: message.message_reference !== undefined
|
|
234
234
|
? {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
messageId: message.message_reference.message_id,
|
|
236
|
+
channelId: message.message_reference.channel_id,
|
|
237
|
+
guildId: message.message_reference.guild_id,
|
|
238
238
|
failIfNotExists: message.message_reference.fail_if_not_exists,
|
|
239
239
|
}
|
|
240
240
|
: undefined,
|
|
@@ -285,7 +285,7 @@ class Messages {
|
|
|
285
285
|
position: message.position,
|
|
286
286
|
roleSubscriptionData: message.role_subscription_data !== undefined
|
|
287
287
|
? {
|
|
288
|
-
|
|
288
|
+
roleSubscriptionListingId: message.role_subscription_data.role_subscription_listing_id,
|
|
289
289
|
tierName: message.role_subscription_data.tier_name,
|
|
290
290
|
totalMonthsSubscribed: message.role_subscription_data.total_months_subscribed,
|
|
291
291
|
isRenewal: message.role_subscription_data.is_renewal,
|
|
@@ -303,7 +303,7 @@ class Messages {
|
|
|
303
303
|
static messageToRaw(message) {
|
|
304
304
|
return {
|
|
305
305
|
id: message.id,
|
|
306
|
-
channel_id: message.
|
|
306
|
+
channel_id: message.channelId,
|
|
307
307
|
author: Users_1.Users.userToRaw(message.author),
|
|
308
308
|
content: message.content,
|
|
309
309
|
timestamp: message.timestamp,
|
|
@@ -314,7 +314,7 @@ class Messages {
|
|
|
314
314
|
mention_roles: message.mentionRoles,
|
|
315
315
|
mention_channels: message.mentionChannels?.map((channelMention) => ({
|
|
316
316
|
id: channelMention.id,
|
|
317
|
-
guild_id: channelMention.
|
|
317
|
+
guild_id: channelMention.guildId,
|
|
318
318
|
type: channelMention.type,
|
|
319
319
|
name: channelMention.name,
|
|
320
320
|
})),
|
|
@@ -330,19 +330,19 @@ class Messages {
|
|
|
330
330
|
})),
|
|
331
331
|
nonce: message.nonce,
|
|
332
332
|
pinned: message.pinned,
|
|
333
|
-
webhook_id: message.
|
|
333
|
+
webhook_id: message.webhookId,
|
|
334
334
|
type: message.type,
|
|
335
335
|
activity: message.activity,
|
|
336
336
|
application: message.application !== undefined
|
|
337
|
-
? Applications_1.Applications.
|
|
337
|
+
? Applications_1.Applications.partialApplicationToRaw(message.application)
|
|
338
338
|
: undefined,
|
|
339
|
-
application_id: message.
|
|
339
|
+
application_id: message.applicationId,
|
|
340
340
|
flags: message.flags,
|
|
341
341
|
message_reference: message.messageReference !== undefined
|
|
342
342
|
? {
|
|
343
|
-
message_id: message.messageReference.
|
|
344
|
-
channel_id: message.messageReference.
|
|
345
|
-
guild_id: message.messageReference.
|
|
343
|
+
message_id: message.messageReference.messageId,
|
|
344
|
+
channel_id: message.messageReference.channelId,
|
|
345
|
+
guild_id: message.messageReference.guildId,
|
|
346
346
|
fail_if_not_exists: message.messageReference.failIfNotExists,
|
|
347
347
|
}
|
|
348
348
|
: undefined,
|
|
@@ -393,7 +393,7 @@ class Messages {
|
|
|
393
393
|
position: message.position,
|
|
394
394
|
role_subscription_data: message.roleSubscriptionData !== undefined
|
|
395
395
|
? {
|
|
396
|
-
role_subscription_listing_id: message.roleSubscriptionData.
|
|
396
|
+
role_subscription_listing_id: message.roleSubscriptionData.roleSubscriptionListingId,
|
|
397
397
|
tier_name: message.roleSubscriptionData.tierName,
|
|
398
398
|
total_months_subscribed: message.roleSubscriptionData.totalMonthsSubscribed,
|
|
399
399
|
is_renewal: message.roleSubscriptionData.isRenewal,
|
|
@@ -6,7 +6,7 @@ class Polls {
|
|
|
6
6
|
return {
|
|
7
7
|
question: poll.question,
|
|
8
8
|
answers: poll.answers.map((answer) => ({
|
|
9
|
-
|
|
9
|
+
answerId: answer.answer_id,
|
|
10
10
|
pollMedia: answer.poll_media,
|
|
11
11
|
})),
|
|
12
12
|
expiry: poll.expiry,
|
|
@@ -28,7 +28,7 @@ class Polls {
|
|
|
28
28
|
return {
|
|
29
29
|
question: poll.question,
|
|
30
30
|
answers: poll.answers.map((answer) => ({
|
|
31
|
-
answer_id: answer.
|
|
31
|
+
answer_id: answer.answerId,
|
|
32
32
|
poll_media: answer.pollMedia,
|
|
33
33
|
})),
|
|
34
34
|
expiry: poll.expiry,
|