disgroove 2.2.1-dev.d0eed5e → 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 +220 -220
- package/dist/lib/Client.js +400 -400
- package/dist/lib/constants.d.ts +4 -4
- package/dist/lib/constants.js +4 -4
- package/dist/lib/gateway/Shard.d.ts +1 -1
- package/dist/lib/gateway/Shard.js +70 -70
- 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 +69 -69
- 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/constants.d.ts
CHANGED
@@ -1013,8 +1013,8 @@ export declare enum JSONErrorCodes {
|
|
1013
1013
|
FailedToCreateStageNeededForStageEvent = 180002,
|
1014
1014
|
MessageWasBlockedByAutomaticModeration = 200000,
|
1015
1015
|
TitleWasBlockedByAutomaticModeration = 200001,
|
1016
|
-
|
1017
|
-
|
1016
|
+
WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadID = 220001,
|
1017
|
+
WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadID = 220002,
|
1018
1018
|
WebhooksCanOnlyCreateThreadsInForumChannels = 220003,
|
1019
1019
|
WebhookServicesCannotBeUsedInForumChannels = 220004,
|
1020
1020
|
MessageBlockedByHarmfulLinksFilter = 240000,
|
@@ -1038,7 +1038,7 @@ export declare enum RPCErrorCodes {
|
|
1038
1038
|
InvalidEvent = 4004,
|
1039
1039
|
InvalidChannel = 4005,
|
1040
1040
|
InvalidPermissions = 4006,
|
1041
|
-
|
1041
|
+
InvalidClientID = 4007,
|
1042
1042
|
InvalidOrigin = 4008,
|
1043
1043
|
InvalidToken = 4009,
|
1044
1044
|
InvalidUser = 4010,
|
@@ -1050,7 +1050,7 @@ export declare enum RPCErrorCodes {
|
|
1050
1050
|
}
|
1051
1051
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-close-event-codes */
|
1052
1052
|
export declare enum RPCCloseEventCodes {
|
1053
|
-
|
1053
|
+
InvalidClientID = 4000,
|
1054
1054
|
InvalidOrigin = 4001,
|
1055
1055
|
RateLimited = 4002,
|
1056
1056
|
TokenRevoked = 4003,
|
package/dist/lib/constants.js
CHANGED
@@ -1088,8 +1088,8 @@ var JSONErrorCodes;
|
|
1088
1088
|
JSONErrorCodes[JSONErrorCodes["FailedToCreateStageNeededForStageEvent"] = 180002] = "FailedToCreateStageNeededForStageEvent";
|
1089
1089
|
JSONErrorCodes[JSONErrorCodes["MessageWasBlockedByAutomaticModeration"] = 200000] = "MessageWasBlockedByAutomaticModeration";
|
1090
1090
|
JSONErrorCodes[JSONErrorCodes["TitleWasBlockedByAutomaticModeration"] = 200001] = "TitleWasBlockedByAutomaticModeration";
|
1091
|
-
JSONErrorCodes[JSONErrorCodes["
|
1092
|
-
JSONErrorCodes[JSONErrorCodes["
|
1091
|
+
JSONErrorCodes[JSONErrorCodes["WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadID"] = 220001] = "WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadID";
|
1092
|
+
JSONErrorCodes[JSONErrorCodes["WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadID"] = 220002] = "WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadID";
|
1093
1093
|
JSONErrorCodes[JSONErrorCodes["WebhooksCanOnlyCreateThreadsInForumChannels"] = 220003] = "WebhooksCanOnlyCreateThreadsInForumChannels";
|
1094
1094
|
JSONErrorCodes[JSONErrorCodes["WebhookServicesCannotBeUsedInForumChannels"] = 220004] = "WebhookServicesCannotBeUsedInForumChannels";
|
1095
1095
|
JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
|
@@ -1114,7 +1114,7 @@ var RPCErrorCodes;
|
|
1114
1114
|
RPCErrorCodes[RPCErrorCodes["InvalidEvent"] = 4004] = "InvalidEvent";
|
1115
1115
|
RPCErrorCodes[RPCErrorCodes["InvalidChannel"] = 4005] = "InvalidChannel";
|
1116
1116
|
RPCErrorCodes[RPCErrorCodes["InvalidPermissions"] = 4006] = "InvalidPermissions";
|
1117
|
-
RPCErrorCodes[RPCErrorCodes["
|
1117
|
+
RPCErrorCodes[RPCErrorCodes["InvalidClientID"] = 4007] = "InvalidClientID";
|
1118
1118
|
RPCErrorCodes[RPCErrorCodes["InvalidOrigin"] = 4008] = "InvalidOrigin";
|
1119
1119
|
RPCErrorCodes[RPCErrorCodes["InvalidToken"] = 4009] = "InvalidToken";
|
1120
1120
|
RPCErrorCodes[RPCErrorCodes["InvalidUser"] = 4010] = "InvalidUser";
|
@@ -1127,7 +1127,7 @@ var RPCErrorCodes;
|
|
1127
1127
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-close-event-codes */
|
1128
1128
|
var RPCCloseEventCodes;
|
1129
1129
|
(function (RPCCloseEventCodes) {
|
1130
|
-
RPCCloseEventCodes[RPCCloseEventCodes["
|
1130
|
+
RPCCloseEventCodes[RPCCloseEventCodes["InvalidClientID"] = 4000] = "InvalidClientID";
|
1131
1131
|
RPCCloseEventCodes[RPCCloseEventCodes["InvalidOrigin"] = 4001] = "InvalidOrigin";
|
1132
1132
|
RPCCloseEventCodes[RPCCloseEventCodes["RateLimited"] = 4002] = "RateLimited";
|
1133
1133
|
RPCCloseEventCodes[RPCCloseEventCodes["TokenRevoked"] = 4003] = "TokenRevoked";
|
@@ -6,7 +6,7 @@ export declare class Shard {
|
|
6
6
|
private heartbeatInterval;
|
7
7
|
client: Client;
|
8
8
|
ws: WebSocket;
|
9
|
-
|
9
|
+
sessionID: string;
|
10
10
|
constructor(id: number, client: Client);
|
11
11
|
/** https://discord.com/developers/docs/topics/gateway#connections */
|
12
12
|
connect(): void;
|
@@ -36,7 +36,7 @@ class Shard {
|
|
36
36
|
heartbeatInterval;
|
37
37
|
client;
|
38
38
|
ws;
|
39
|
-
|
39
|
+
sessionID;
|
40
40
|
constructor(id, client) {
|
41
41
|
this.id = id;
|
42
42
|
this.client = client;
|
@@ -87,7 +87,7 @@ class Shard {
|
|
87
87
|
switch (packet.t) {
|
88
88
|
case "READY":
|
89
89
|
{
|
90
|
-
this.
|
90
|
+
this.sessionID = packet.d.session_id;
|
91
91
|
this.client.user = this.client.util.userFromRaw(packet.d.user);
|
92
92
|
this.client.application = packet.d.application;
|
93
93
|
this.client.emit(constants_1.GatewayEvents.Ready);
|
@@ -110,21 +110,21 @@ class Shard {
|
|
110
110
|
break;
|
111
111
|
case "AUTO_MODERATION_ACTION_EXECUTION":
|
112
112
|
this.client.emit(constants_1.GatewayEvents.AutoModerationActionExecution, {
|
113
|
-
|
113
|
+
guildID: packet.d.guild_id,
|
114
114
|
action: {
|
115
115
|
type: packet.d.action.type,
|
116
116
|
metadata: {
|
117
|
-
|
117
|
+
channelID: packet.d.action.metadata.channel_id,
|
118
118
|
durationSeconds: packet.d.action.metadata.duration_seconds,
|
119
119
|
customMessage: packet.d.action.metadata.custom_message,
|
120
120
|
},
|
121
121
|
},
|
122
|
-
|
122
|
+
ruleID: packet.d.rule_id,
|
123
123
|
ruleTriggerType: packet.d.rule_trigger_type,
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
124
|
+
userID: packet.d.user_id,
|
125
|
+
channelID: packet.d.channel_id,
|
126
|
+
messageID: packet.d.message_id,
|
127
|
+
alertSystemMessageID: packet.d.alert_system_message_id,
|
128
128
|
content: packet.d.content,
|
129
129
|
matchedKeyword: packet.d.matched_keyword,
|
130
130
|
matchedContent: packet.d.matched_content,
|
@@ -141,8 +141,8 @@ class Shard {
|
|
141
141
|
break;
|
142
142
|
case "CHANNEL_PINS_UPDATE":
|
143
143
|
this.client.emit(constants_1.GatewayEvents.ChannelPinsUpdate, {
|
144
|
-
|
145
|
-
|
144
|
+
guildID: packet.d.guild_id,
|
145
|
+
channelID: packet.d.channel_id,
|
146
146
|
lastPinTimestamp: packet.d.last_pin_timestamp,
|
147
147
|
});
|
148
148
|
break;
|
@@ -157,8 +157,8 @@ class Shard {
|
|
157
157
|
break;
|
158
158
|
case "THREAD_LIST_SYNC":
|
159
159
|
this.client.emit(constants_1.GatewayEvents.ThreadListSync, {
|
160
|
-
|
161
|
-
|
160
|
+
guildID: packet.d.guild_id,
|
161
|
+
channelIDs: packet.d.channel_ids,
|
162
162
|
threads: packet.d.threads.map((thread) => this.client.util.channelFromRaw(thread)),
|
163
163
|
members: packet.d.members.map((threadMember) => this.client.util.threadMemberFromRaw(threadMember)),
|
164
164
|
});
|
@@ -166,22 +166,22 @@ class Shard {
|
|
166
166
|
case "THREAD_MEMBER_UPDATE":
|
167
167
|
this.client.emit(constants_1.GatewayEvents.ThreadMemberUpdate, {
|
168
168
|
id: packet.d.id,
|
169
|
-
|
169
|
+
userID: packet.d.user_id,
|
170
170
|
joinTimestamp: packet.d.join_timestamp,
|
171
171
|
flags: packet.d.flags,
|
172
172
|
member: packet.d.member !== undefined
|
173
173
|
? this.client.util.guildMemberFromRaw(packet.d.member)
|
174
174
|
: undefined,
|
175
|
-
|
175
|
+
guildID: packet.d.guild_id,
|
176
176
|
});
|
177
177
|
break;
|
178
178
|
case "THREAD_MEMBERS_UPDATE":
|
179
179
|
this.client.emit(constants_1.GatewayEvents.ThreadMembersUpdate, {
|
180
180
|
id: packet.d.id,
|
181
|
-
|
181
|
+
guildID: packet.d.guild_id,
|
182
182
|
memberCount: packet.d.member_count,
|
183
183
|
addedMembers: packet.d.members.map((threadMember) => this.client.util.threadMemberFromRaw(threadMember)),
|
184
|
-
|
184
|
+
removedMemberIDs: packet.d.removed_member_ids,
|
185
185
|
});
|
186
186
|
break;
|
187
187
|
case "ENTITLEMENT_CREATE":
|
@@ -219,18 +219,18 @@ class Shard {
|
|
219
219
|
case "GUILD_AUDIT_LOG_ENTRY_CREATE":
|
220
220
|
this.client.emit(constants_1.GatewayEvents.GuildAuditLogEntryCreate, {
|
221
221
|
...this.client.util.auditLogEntryFromRaw(packet.d),
|
222
|
-
|
222
|
+
guildID: packet.d.guild_id,
|
223
223
|
});
|
224
224
|
break;
|
225
225
|
case "GUILD_BAN_ADD":
|
226
226
|
this.client.emit(constants_1.GatewayEvents.GuildBanAdd, {
|
227
|
-
|
227
|
+
guildID: packet.d.guild_id,
|
228
228
|
user: this.client.util.userFromRaw(packet.d.user),
|
229
229
|
});
|
230
230
|
break;
|
231
231
|
case "GUILD_BAN_REMOVE":
|
232
232
|
this.client.emit(constants_1.GatewayEvents.GuildBanRemove, {
|
233
|
-
|
233
|
+
guildID: packet.d.guild_id,
|
234
234
|
user: this.client.util.userFromRaw(packet.d.user),
|
235
235
|
});
|
236
236
|
break;
|
@@ -246,18 +246,18 @@ class Shard {
|
|
246
246
|
case "GUILD_MEMBER_ADD":
|
247
247
|
this.client.emit(constants_1.GatewayEvents.GuildMemberAdd, {
|
248
248
|
...this.client.util.guildMemberFromRaw(packet.d),
|
249
|
-
|
249
|
+
guildID: packet.d.guild_id,
|
250
250
|
});
|
251
251
|
break;
|
252
252
|
case "GUILD_MEMBER_REMOVE":
|
253
253
|
this.client.emit(constants_1.GatewayEvents.GuildMemberRemove, {
|
254
|
-
|
254
|
+
guildID: packet.d.guild_id,
|
255
255
|
user: this.client.util.userFromRaw(packet.d.user),
|
256
256
|
});
|
257
257
|
break;
|
258
258
|
case "GUILD_MEMBER_UPDATE":
|
259
259
|
this.client.emit(constants_1.GatewayEvents.GuildMemberUpdate, {
|
260
|
-
|
260
|
+
guildID: packet.d.guild_id,
|
261
261
|
roles: packet.d.roles,
|
262
262
|
user: this.client.util.userFromRaw(packet.d.user),
|
263
263
|
nick: packet.d.nick,
|
@@ -272,14 +272,14 @@ class Shard {
|
|
272
272
|
avatarDecorationData: packet.d.avatar_decoration_data !== undefined
|
273
273
|
? {
|
274
274
|
asset: packet.d.asset,
|
275
|
-
|
275
|
+
skuID: packet.d.sku_id,
|
276
276
|
}
|
277
277
|
: undefined,
|
278
278
|
});
|
279
279
|
break;
|
280
280
|
case "GUILD_MEMBERS_CHUNK":
|
281
281
|
this.client.emit(constants_1.GatewayEvents.GuildMembersChunk, {
|
282
|
-
|
282
|
+
guildID: packet.d.guild_id,
|
283
283
|
members: packet.d.members.map((guildMember) => this.client.util.guildMemberFromRaw(guildMember)),
|
284
284
|
chunkIndex: packet.d.chunk_index,
|
285
285
|
chunkCount: packet.d.chunk_count,
|
@@ -315,20 +315,20 @@ class Shard {
|
|
315
315
|
case "INTEGRATION_CREATE":
|
316
316
|
this.client.emit(constants_1.GatewayEvents.IntegrationCreate, {
|
317
317
|
...this.client.util.integrationFromRaw(packet.d),
|
318
|
-
|
318
|
+
guildID: packet.d.guild_id,
|
319
319
|
});
|
320
320
|
break;
|
321
321
|
case "INTEGRATION_UPDATE":
|
322
322
|
this.client.emit(constants_1.GatewayEvents.IntegrationUpdate, {
|
323
323
|
...this.client.util.integrationFromRaw(packet.d),
|
324
|
-
|
324
|
+
guildID: packet.d.guild_id,
|
325
325
|
});
|
326
326
|
break;
|
327
327
|
case "INTEGRATION_DELETE":
|
328
328
|
this.client.emit(constants_1.GatewayEvents.IntegrationDelete, {
|
329
329
|
id: packet.d.id,
|
330
|
-
|
331
|
-
|
330
|
+
guildID: packet.d.guild_id,
|
331
|
+
applicationID: packet.d.application_id,
|
332
332
|
});
|
333
333
|
break;
|
334
334
|
case "INTERACTION_CREATE":
|
@@ -336,10 +336,10 @@ class Shard {
|
|
336
336
|
break;
|
337
337
|
case "INVITE_CREATE":
|
338
338
|
this.client.emit(constants_1.GatewayEvents.InviteCreate, {
|
339
|
-
|
339
|
+
channelID: packet.d.channel_id,
|
340
340
|
code: packet.d.code,
|
341
341
|
createdAt: packet.d.created_at,
|
342
|
-
|
342
|
+
guildID: packet.d.guild_id,
|
343
343
|
inviter: packet.d.inviter !== undefined
|
344
344
|
? this.client.util.userFromRaw(packet.d.inviter)
|
345
345
|
: undefined,
|
@@ -358,15 +358,15 @@ class Shard {
|
|
358
358
|
break;
|
359
359
|
case "INVITE_DELETE":
|
360
360
|
this.client.emit(constants_1.GatewayEvents.InviteDelete, {
|
361
|
-
|
362
|
-
|
361
|
+
channelID: packet.d.channel_id,
|
362
|
+
guildID: packet.d.guild_id,
|
363
363
|
code: packet.d.code,
|
364
364
|
});
|
365
365
|
break;
|
366
366
|
case "MESSAGE_CREATE":
|
367
367
|
this.client.emit(constants_1.GatewayEvents.MessageCreate, {
|
368
368
|
...this.client.util.messageFromRaw(packet.d),
|
369
|
-
|
369
|
+
guildID: packet.d.guild_id,
|
370
370
|
member: packet.d.member !== undefined
|
371
371
|
? this.client.util.guildMemberFromRaw(packet.d.member)
|
372
372
|
: undefined,
|
@@ -379,28 +379,28 @@ class Shard {
|
|
379
379
|
case "MESSAGE_DELETE":
|
380
380
|
this.client.emit(constants_1.GatewayEvents.MessageDelete, {
|
381
381
|
id: packet.d.id,
|
382
|
-
|
383
|
-
|
382
|
+
channelID: packet.d.channel_id,
|
383
|
+
guildID: packet.d.guild_id,
|
384
384
|
});
|
385
385
|
break;
|
386
386
|
case "MESSAGE_DELETE_BULK":
|
387
387
|
this.client.emit(constants_1.GatewayEvents.MessageDeleteBulk, {
|
388
388
|
ids: packet.d.ids,
|
389
|
-
|
390
|
-
|
389
|
+
channelID: packet.d.channel_id,
|
390
|
+
guildID: packet.d.guild_id,
|
391
391
|
});
|
392
392
|
break;
|
393
393
|
case "MESSAGE_REACTION_ADD":
|
394
394
|
this.client.emit(constants_1.GatewayEvents.MessageReactionAdd, {
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
395
|
+
userID: packet.d.user_id,
|
396
|
+
channelID: packet.d.user_id,
|
397
|
+
messageID: packet.d.user_id,
|
398
|
+
guildID: packet.d.user_id,
|
399
399
|
member: packet.d.member !== undefined
|
400
400
|
? this.client.util.guildMemberFromRaw(packet.d.member)
|
401
401
|
: undefined,
|
402
402
|
emoji: this.client.util.emojiFromRaw(packet.d.emoji),
|
403
|
-
|
403
|
+
messageAuthorID: packet.d.message_author_id,
|
404
404
|
burst: packet.d.burst,
|
405
405
|
burstColors: packet.d.burst_colors,
|
406
406
|
type: packet.d.type,
|
@@ -408,10 +408,10 @@ class Shard {
|
|
408
408
|
break;
|
409
409
|
case "MESSAGE_REACTION_REMOVE":
|
410
410
|
this.client.emit(constants_1.GatewayEvents.MessageReactionRemove, {
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
411
|
+
userID: packet.d.user_id,
|
412
|
+
channelID: packet.d.user_id,
|
413
|
+
messageID: packet.d.user_id,
|
414
|
+
guildID: packet.d.user_id,
|
415
415
|
emoji: this.client.util.emojiFromRaw(packet.d.emoji),
|
416
416
|
burst: packet.d.burst,
|
417
417
|
type: packet.d.type,
|
@@ -419,16 +419,16 @@ class Shard {
|
|
419
419
|
break;
|
420
420
|
case "MESSAGE_REACTION_REMOVE_ALL":
|
421
421
|
this.client.emit(constants_1.GatewayEvents.MessageReactionRemoveAll, {
|
422
|
-
|
423
|
-
|
424
|
-
|
422
|
+
channelID: packet.d.channel_id,
|
423
|
+
messageID: packet.d.message_id,
|
424
|
+
guildID: packet.d.guild_id,
|
425
425
|
});
|
426
426
|
break;
|
427
427
|
case "MESSAGE_REACTION_REMOVE_EMOJI":
|
428
428
|
this.client.emit(constants_1.GatewayEvents.MessageReactionRemoveEmoji, {
|
429
|
-
|
430
|
-
|
431
|
-
|
429
|
+
channelID: packet.d.channel_id,
|
430
|
+
guildID: packet.d.guild_id,
|
431
|
+
messageID: packet.d.message_id,
|
432
432
|
emoji: this.client.util.emojiFromRaw(packet.d.emoji),
|
433
433
|
});
|
434
434
|
break;
|
@@ -446,9 +446,9 @@ class Shard {
|
|
446
446
|
break;
|
447
447
|
case "TYPING_START":
|
448
448
|
this.client.emit(constants_1.GatewayEvents.TypingStart, {
|
449
|
-
|
450
|
-
|
451
|
-
|
449
|
+
channelID: packet.d.channel_id,
|
450
|
+
guildID: packet.d.guild_id,
|
451
|
+
userID: packet.d.user_id,
|
452
452
|
timestamp: packet.d.timestamp,
|
453
453
|
member: packet.d.member !== undefined
|
454
454
|
? this.client.util.guildMemberFromRaw(packet.d.member)
|
@@ -464,7 +464,7 @@ class Shard {
|
|
464
464
|
case "VOICE_SERVER_UPDATE":
|
465
465
|
this.client.emit(constants_1.GatewayEvents.VoiceServerUpdate, {
|
466
466
|
token: packet.d.token,
|
467
|
-
|
467
|
+
guildID: packet.d.guild_id,
|
468
468
|
endpoint: packet.d.endpoint,
|
469
469
|
});
|
470
470
|
break;
|
@@ -473,20 +473,20 @@ class Shard {
|
|
473
473
|
break;
|
474
474
|
case "MESSAGE_POLL_VOTE_ADD":
|
475
475
|
this.client.emit(constants_1.GatewayEvents.MessagePollVoteAdd, {
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
476
|
+
userID: packet.d.user_id,
|
477
|
+
channelID: packet.d.channel_id,
|
478
|
+
messageID: packet.d.message_id,
|
479
|
+
guildID: packet.d.guild_id,
|
480
|
+
answerID: packet.d.answer_id,
|
481
481
|
});
|
482
482
|
break;
|
483
483
|
case "MESSAGE_POLL_VOTE_REMOVE":
|
484
484
|
this.client.emit(constants_1.GatewayEvents.MessagePollVoteRemove, {
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
485
|
+
userID: packet.d.user_id,
|
486
|
+
channelID: packet.d.channel_id,
|
487
|
+
messageID: packet.d.message_id,
|
488
|
+
guildID: packet.d.guild_id,
|
489
|
+
answerID: packet.d.answer_id,
|
490
490
|
});
|
491
491
|
break;
|
492
492
|
}
|
@@ -536,11 +536,11 @@ class Shard {
|
|
536
536
|
this.ws.send(JSON.stringify({
|
537
537
|
op: constants_1.GatewayOPCodes.RequestGuildMembers,
|
538
538
|
d: {
|
539
|
-
guild_id: options.
|
539
|
+
guild_id: options.guildID,
|
540
540
|
query: options.query,
|
541
541
|
limit: options.limit,
|
542
542
|
presences: options.presences,
|
543
|
-
user_ids: options.
|
543
|
+
user_ids: options.userIDs,
|
544
544
|
nonce: options.nonce,
|
545
545
|
},
|
546
546
|
}));
|
@@ -551,7 +551,7 @@ class Shard {
|
|
551
551
|
op: constants_1.GatewayOPCodes.Resume,
|
552
552
|
d: {
|
553
553
|
token: options.token,
|
554
|
-
session_id: options.
|
554
|
+
session_id: options.sessionID,
|
555
555
|
seq: options.seq,
|
556
556
|
},
|
557
557
|
}));
|
package/dist/lib/rest/CDN.d.ts
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
import type { snowflake } from "../types/common";
|
2
|
-
export declare const achievementIcon: (
|
3
|
-
export declare const applicationAsset: (
|
4
|
-
export declare const applicationCover: (
|
5
|
-
export declare const applicationIcon: (
|
6
|
-
export declare const customEmoji: (
|
2
|
+
export declare const achievementIcon: (applicationID: snowflake, achievementID: snowflake, iconHash: string) => `https://cdn.discordapp.com/app-assets/${string}/achievements/${string}/icons/${string}.png`;
|
3
|
+
export declare const applicationAsset: (applicationID: snowflake, assetID: snowflake) => `https://cdn.discordapp.com/app-assets/${string}/${string}.png`;
|
4
|
+
export declare const applicationCover: (applicationID: snowflake, coverImage: string) => `https://cdn.discordapp.com/app-icons/${string}/${string}.png`;
|
5
|
+
export declare const applicationIcon: (applicationID: snowflake, icon: string) => `https://cdn.discordapp.com/app-icons/${string}/${string}.png`;
|
6
|
+
export declare const customEmoji: (emojiID: snowflake) => `https://cdn.discordapp.com/emojis/${string}.png`;
|
7
7
|
export declare const defaultUserAvatar: (index: string) => `https://cdn.discordapp.com/embed/avatars/${string}.png`;
|
8
|
-
export declare const guildBanner: (
|
9
|
-
export declare const guildDiscoverySplash: (
|
10
|
-
export declare const guildIcon: (
|
11
|
-
export declare const guildMemberAvatar: (
|
12
|
-
export declare const guildMemberBanner: (
|
13
|
-
export declare const guildScheduledEventCover: (
|
14
|
-
export declare const guildSplash: (
|
15
|
-
export declare const roleIcon: (
|
16
|
-
export declare const stickerPackBanner: (
|
17
|
-
export declare const sticker: (
|
18
|
-
export declare const storePageAsset: (
|
19
|
-
export declare const teamIcon: (
|
20
|
-
export declare const userAvatar: (
|
21
|
-
export declare const userAvatarDecoration: (
|
22
|
-
export declare const userBanner: (
|
8
|
+
export declare const guildBanner: (guildID: snowflake, banner: string) => `https://cdn.discordapp.com/banners/${string}/${string}.png`;
|
9
|
+
export declare const guildDiscoverySplash: (guildID: snowflake, splash: string) => `https://cdn.discordapp.com/discovery-splashes/${string}/${string}.png`;
|
10
|
+
export declare const guildIcon: (guildID: snowflake, icon: string) => `https://cdn.discordapp.com/icons/${string}/${string}.png`;
|
11
|
+
export declare const guildMemberAvatar: (guildID: snowflake, userID: snowflake, avatar: string) => `https://cdn.discordapp.com/guilds/${string}/users/${string}/avatars/${string}.png`;
|
12
|
+
export declare const guildMemberBanner: (guildID: snowflake, userID: snowflake, banner: string) => `https://cdn.discordapp.com/guilds/${string}/users/${string}/banners/${string}.png`;
|
13
|
+
export declare const guildScheduledEventCover: (scheduledEventID: snowflake, coverImage: string) => `https://cdn.discordapp.com/guild-events/${string}/${string}.png`;
|
14
|
+
export declare const guildSplash: (guildID: snowflake, splash: string) => `https://cdn.discordapp.com/splashes/${string}/${string}.png`;
|
15
|
+
export declare const roleIcon: (roleID: snowflake, icon: string) => `https://cdn.discordapp.com/role-icons/${string}/${string}.png`;
|
16
|
+
export declare const stickerPackBanner: (assetID: snowflake) => `https://cdn.discordapp.com/app-assets/710982414301790216/store/${string}.png`;
|
17
|
+
export declare const sticker: (stickerID: snowflake) => `https://cdn.discordapp.com/stickers/${string}.png`;
|
18
|
+
export declare const storePageAsset: (applicationID: snowflake, assetID: snowflake) => `https://cdn.discordapp.com/app-assets/${string}/store/${string}`;
|
19
|
+
export declare const teamIcon: (teamID: snowflake, icon: string) => `https://cdn.discordapp.com/team-icons/${string}/${string}.png`;
|
20
|
+
export declare const userAvatar: (userID: snowflake, avatar: string) => `https://cdn.discordapp.com/avatars/${string}/${string}.png`;
|
21
|
+
export declare const userAvatarDecoration: (userID: snowflake, avatarDecoration: string) => `https://cdn.discordapp.com/avatar-decorations/${string}/${string}.png`;
|
22
|
+
export declare const userBanner: (userID: snowflake, banner: string) => `https://cdn.discordapp.com/banners/${string}/${string}.png`;
|
package/dist/lib/rest/CDN.js
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.userBanner = exports.userAvatarDecoration = exports.userAvatar = exports.teamIcon = exports.storePageAsset = exports.sticker = exports.stickerPackBanner = exports.roleIcon = exports.guildSplash = exports.guildScheduledEventCover = exports.guildMemberBanner = exports.guildMemberAvatar = exports.guildIcon = exports.guildDiscoverySplash = exports.guildBanner = exports.defaultUserAvatar = exports.customEmoji = exports.applicationIcon = exports.applicationCover = exports.applicationAsset = exports.achievementIcon = void 0;
|
4
|
-
const achievementIcon = (
|
4
|
+
const achievementIcon = (applicationID, achievementID, iconHash) => `https://cdn.discordapp.com/app-assets/${applicationID}/achievements/${achievementID}/icons/${iconHash}.png`;
|
5
5
|
exports.achievementIcon = achievementIcon;
|
6
|
-
const applicationAsset = (
|
6
|
+
const applicationAsset = (applicationID, assetID) => `https://cdn.discordapp.com/app-assets/${applicationID}/${assetID}.png`;
|
7
7
|
exports.applicationAsset = applicationAsset;
|
8
|
-
const applicationCover = (
|
8
|
+
const applicationCover = (applicationID, coverImage) => `https://cdn.discordapp.com/app-icons/${applicationID}/${coverImage}.png`;
|
9
9
|
exports.applicationCover = applicationCover;
|
10
|
-
const applicationIcon = (
|
10
|
+
const applicationIcon = (applicationID, icon) => `https://cdn.discordapp.com/app-icons/${applicationID}/${icon}.png`;
|
11
11
|
exports.applicationIcon = applicationIcon;
|
12
|
-
const customEmoji = (
|
12
|
+
const customEmoji = (emojiID) => `https://cdn.discordapp.com/emojis/${emojiID}.png`;
|
13
13
|
exports.customEmoji = customEmoji;
|
14
14
|
const defaultUserAvatar = (index) => `https://cdn.discordapp.com/embed/avatars/${index}.png`;
|
15
15
|
exports.defaultUserAvatar = defaultUserAvatar;
|
16
|
-
const guildBanner = (
|
16
|
+
const guildBanner = (guildID, banner) => `https://cdn.discordapp.com/banners/${guildID}/${banner}.png`;
|
17
17
|
exports.guildBanner = guildBanner;
|
18
|
-
const guildDiscoverySplash = (
|
18
|
+
const guildDiscoverySplash = (guildID, splash) => `https://cdn.discordapp.com/discovery-splashes/${guildID}/${splash}.png`;
|
19
19
|
exports.guildDiscoverySplash = guildDiscoverySplash;
|
20
|
-
const guildIcon = (
|
20
|
+
const guildIcon = (guildID, icon) => `https://cdn.discordapp.com/icons/${guildID}/${icon}.png`;
|
21
21
|
exports.guildIcon = guildIcon;
|
22
|
-
const guildMemberAvatar = (
|
22
|
+
const guildMemberAvatar = (guildID, userID, avatar) => `https://cdn.discordapp.com/guilds/${guildID}/users/${userID}/avatars/${avatar}.png`;
|
23
23
|
exports.guildMemberAvatar = guildMemberAvatar;
|
24
|
-
const guildMemberBanner = (
|
24
|
+
const guildMemberBanner = (guildID, userID, banner) => `https://cdn.discordapp.com/guilds/${guildID}/users/${userID}/banners/${banner}.png`;
|
25
25
|
exports.guildMemberBanner = guildMemberBanner;
|
26
|
-
const guildScheduledEventCover = (
|
26
|
+
const guildScheduledEventCover = (scheduledEventID, coverImage) => `https://cdn.discordapp.com/guild-events/${scheduledEventID}/${coverImage}.png`;
|
27
27
|
exports.guildScheduledEventCover = guildScheduledEventCover;
|
28
|
-
const guildSplash = (
|
28
|
+
const guildSplash = (guildID, splash) => `https://cdn.discordapp.com/splashes/${guildID}/${splash}.png`;
|
29
29
|
exports.guildSplash = guildSplash;
|
30
|
-
const roleIcon = (
|
30
|
+
const roleIcon = (roleID, icon) => `https://cdn.discordapp.com/role-icons/${roleID}/${icon}.png`;
|
31
31
|
exports.roleIcon = roleIcon;
|
32
|
-
const stickerPackBanner = (
|
32
|
+
const stickerPackBanner = (assetID) => `https://cdn.discordapp.com/app-assets/710982414301790216/store/${assetID}.png`;
|
33
33
|
exports.stickerPackBanner = stickerPackBanner;
|
34
|
-
const sticker = (
|
34
|
+
const sticker = (stickerID) => `https://cdn.discordapp.com/stickers/${stickerID}.png`;
|
35
35
|
exports.sticker = sticker;
|
36
|
-
const storePageAsset = (
|
36
|
+
const storePageAsset = (applicationID, assetID) => `https://cdn.discordapp.com/app-assets/${applicationID}/store/${assetID}`;
|
37
37
|
exports.storePageAsset = storePageAsset;
|
38
|
-
const teamIcon = (
|
38
|
+
const teamIcon = (teamID, icon) => `https://cdn.discordapp.com/team-icons/${teamID}/${icon}.png`;
|
39
39
|
exports.teamIcon = teamIcon;
|
40
|
-
const userAvatar = (
|
40
|
+
const userAvatar = (userID, avatar) => `https://cdn.discordapp.com/avatars/${userID}/${avatar}.png`;
|
41
41
|
exports.userAvatar = userAvatar;
|
42
|
-
const userAvatarDecoration = (
|
42
|
+
const userAvatarDecoration = (userID, avatarDecoration) => `https://cdn.discordapp.com/avatar-decorations/${userID}/${avatarDecoration}.png`;
|
43
43
|
exports.userAvatarDecoration = userAvatarDecoration;
|
44
|
-
const userBanner = (
|
44
|
+
const userBanner = (userID, banner) => `https://cdn.discordapp.com/banners/${userID}/${banner}.png`;
|
45
45
|
exports.userBanner = userBanner;
|