disgroove 2.2.7-dev.fca4921 → 3.0.0-dev.bc90599

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.
Files changed (80) hide show
  1. package/dist/lib/Client.d.ts +291 -254
  2. package/dist/lib/Client.js +553 -459
  3. package/dist/lib/constants.d.ts +29 -21
  4. package/dist/lib/constants.js +33 -24
  5. package/dist/lib/gateway/Shard.d.ts +2 -2
  6. package/dist/lib/gateway/Shard.js +98 -82
  7. package/dist/lib/index.d.ts +5 -1
  8. package/dist/lib/index.js +5 -1
  9. package/dist/lib/rest/Endpoints.d.ts +95 -91
  10. package/dist/lib/rest/Endpoints.js +111 -102
  11. package/dist/lib/rest/RequestManager.d.ts +1 -3
  12. package/dist/lib/transformers/ApplicationCommands.js +4 -4
  13. package/dist/lib/transformers/Applications.js +4 -4
  14. package/dist/lib/transformers/AuditLogs.js +10 -10
  15. package/dist/lib/transformers/AutoModeration.js +6 -6
  16. package/dist/lib/transformers/Channels.js +16 -16
  17. package/dist/lib/transformers/Components.d.ts +13 -3
  18. package/dist/lib/transformers/Components.js +283 -156
  19. package/dist/lib/transformers/Entitlements.d.ts +2 -2
  20. package/dist/lib/transformers/Entitlements.js +16 -16
  21. package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
  22. package/dist/lib/transformers/GuildTemplates.js +4 -4
  23. package/dist/lib/transformers/Guilds.js +28 -28
  24. package/dist/lib/transformers/Interactions.js +300 -55
  25. package/dist/lib/transformers/Lobbies.d.ts +7 -0
  26. package/dist/lib/transformers/Lobbies.js +38 -0
  27. package/dist/lib/transformers/Messages.d.ts +4 -3
  28. package/dist/lib/transformers/Messages.js +36 -50
  29. package/dist/lib/transformers/Polls.js +2 -2
  30. package/dist/lib/transformers/Presences.js +6 -6
  31. package/dist/lib/transformers/Roles.js +8 -8
  32. package/dist/lib/transformers/SKUs.js +2 -2
  33. package/dist/lib/transformers/Soundboards.js +6 -6
  34. package/dist/lib/transformers/StageInstances.js +6 -6
  35. package/dist/lib/transformers/Stickers.js +3 -3
  36. package/dist/lib/transformers/Subscriptions.js +8 -8
  37. package/dist/lib/transformers/Teams.js +4 -4
  38. package/dist/lib/transformers/Users.js +6 -6
  39. package/dist/lib/transformers/Voice.js +8 -8
  40. package/dist/lib/transformers/Webhooks.js +6 -6
  41. package/dist/lib/transformers/index.d.ts +2 -1
  42. package/dist/lib/transformers/index.js +2 -1
  43. package/dist/lib/types/application-command.d.ts +9 -4
  44. package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
  45. package/dist/lib/types/application.d.ts +12 -7
  46. package/dist/lib/types/audit-log.d.ts +9 -5
  47. package/dist/lib/types/auto-moderation.d.ts +7 -3
  48. package/dist/lib/types/channel.d.ts +17 -23
  49. package/dist/lib/types/common.d.ts +2 -0
  50. package/dist/lib/types/components.d.ts +478 -0
  51. package/dist/lib/types/components.js +2 -0
  52. package/dist/lib/types/emoji.d.ts +1 -0
  53. package/dist/lib/types/entitlements.d.ts +5 -4
  54. package/dist/lib/types/gateway-events.d.ts +203 -130
  55. package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
  56. package/dist/lib/types/guild-template.d.ts +3 -2
  57. package/dist/lib/types/guild.d.ts +40 -22
  58. package/dist/lib/types/interaction.d.ts +35 -18
  59. package/dist/lib/types/invite.d.ts +5 -2
  60. package/dist/lib/types/lobby.d.ts +31 -0
  61. package/dist/lib/types/lobby.js +2 -0
  62. package/dist/lib/types/message-components.d.ts +334 -118
  63. package/dist/lib/types/message.d.ts +30 -18
  64. package/dist/lib/types/poll.d.ts +7 -1
  65. package/dist/lib/types/role.d.ts +8 -5
  66. package/dist/lib/types/sku.d.ts +2 -1
  67. package/dist/lib/types/soundboard.d.ts +4 -3
  68. package/dist/lib/types/stage-instance.d.ts +4 -3
  69. package/dist/lib/types/sticker.d.ts +8 -5
  70. package/dist/lib/types/subscription.d.ts +6 -5
  71. package/dist/lib/types/team.d.ts +4 -2
  72. package/dist/lib/types/user.d.ts +10 -3
  73. package/dist/lib/types/voice.d.ts +6 -4
  74. package/dist/lib/types/webhook.d.ts +4 -3
  75. package/dist/lib/utils/CDN.d.ts +22 -22
  76. package/dist/lib/utils/CDN.js +22 -22
  77. package/dist/lib/utils/formatters.d.ts +7 -7
  78. package/dist/lib/utils/formatters.js +19 -19
  79. package/dist/package.json +4 -4
  80. package/package.json +4 -4
@@ -49,8 +49,8 @@ class Client extends node_events_1.default {
49
49
  this.ws = options?.ws;
50
50
  }
51
51
  /** https://discord.com/developers/docs/resources/channel#group-dm-add-recipient */
52
- addGroupRecipient(channelID, userID, options) {
53
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelRecipient(channelID, userID), {
52
+ addGroupRecipient(channelId, userId, options) {
53
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelRecipient(channelId, userId), {
54
54
  json: {
55
55
  access_token: options.accessToken,
56
56
  nick: options.nick,
@@ -58,8 +58,8 @@ class Client extends node_events_1.default {
58
58
  });
59
59
  }
60
60
  /** https://discord.com/developers/docs/resources/guild#add-guild-member */
61
- async addGuildMember(guildID, userID, options) {
62
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildMember(guildID, userID), {
61
+ async addGuildMember(guildId, userId, options) {
62
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildMember(guildId, userId), {
63
63
  json: {
64
64
  access_token: options.accessToken,
65
65
  nick: options.nick,
@@ -71,18 +71,25 @@ class Client extends node_events_1.default {
71
71
  return response !== null ? transformers_1.Guilds.guildMemberFromRaw(response) : null;
72
72
  }
73
73
  /** https://discord.com/developers/docs/resources/guild#add-guild-member-role */
74
- addGuildMemberRole(guildID, userID, roleID, reason) {
75
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildMemberRole(guildID, userID, roleID), {
74
+ addGuildMemberRole(guildId, userId, roleId, reason) {
75
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildMemberRole(guildId, userId, roleId), {
76
76
  reason,
77
77
  });
78
78
  }
79
+ /** https://discord.com/developers/docs/resources/lobby#add-a-member-to-a-lobby */
80
+ async addLobbyMember(lobbyId, userId, options) {
81
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.lobbyMember(lobbyId, userId), {
82
+ json: options,
83
+ });
84
+ return transformers_1.Lobbies.lobbyMemberFromRaw(response);
85
+ }
79
86
  /** https://discord.com/developers/docs/resources/channel#add-thread-member */
80
- addThreadMember(channelID, userID) {
81
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelID, userID));
87
+ addThreadMember(channelId, userId) {
88
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelId, userId));
82
89
  }
83
90
  /** https://discord.com/developers/docs/resources/guild#begin-guild-prune */
84
- beginGuildPrune(guildID, options, reason) {
85
- return this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildPrune(guildID), {
91
+ beginGuildPrune(guildId, options, reason) {
92
+ return this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildPrune(guildId), {
86
93
  json: {
87
94
  days: options.days,
88
95
  compute_prune_count: options.computePruneCount,
@@ -92,10 +99,10 @@ class Client extends node_events_1.default {
92
99
  });
93
100
  }
94
101
  /** https://discord.com/developers/docs/resources/guild#bulk-guild-ban */
95
- async bulkGuildBan(guildID, options, reason) {
96
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildBulkBan(guildID), {
102
+ async bulkGuildBan(guildId, options, reason) {
103
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildBulkBan(guildId), {
97
104
  json: {
98
- user_ids: options.userIDs,
105
+ user_ids: options.userIds,
99
106
  delete_message_seconds: options.deleteMessageSeconds,
100
107
  },
101
108
  reason,
@@ -106,8 +113,8 @@ class Client extends node_events_1.default {
106
113
  };
107
114
  }
108
115
  /** https://discord.com/developers/docs/resources/message#bulk-delete-messages */
109
- bulkDeleteMessages(channelID, options, reason) {
110
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelBulkDelete(channelID), {
116
+ bulkDeleteMessages(channelId, options, reason) {
117
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelBulkDelete(channelId), {
111
118
  json: {
112
119
  messages: options?.messages,
113
120
  },
@@ -115,8 +122,8 @@ class Client extends node_events_1.default {
115
122
  });
116
123
  }
117
124
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
118
- async bulkEditGlobalApplicationCommands(applicationID, commands) {
119
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationCommands(applicationID), {
125
+ async bulkEditGlobalApplicationCommands(applicationId, commands) {
126
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationCommands(applicationId), {
120
127
  json: commands.map((command) => ({
121
128
  id: command.id,
122
129
  name: command.name,
@@ -134,8 +141,8 @@ class Client extends node_events_1.default {
134
141
  return response.map((c) => transformers_1.ApplicationCommands.applicationCommandFromRaw(c));
135
142
  }
136
143
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
137
- async bulkEditGuildApplicationCommands(applicationID, guildID, commands) {
138
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationGuildCommands(applicationID, guildID), {
144
+ async bulkEditGuildApplicationCommands(applicationId, guildId, commands) {
145
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
139
146
  json: commands.map((command) => ({
140
147
  id: command.id,
141
148
  name: command.name,
@@ -161,12 +168,12 @@ class Client extends node_events_1.default {
161
168
  this.shards.forEach((shard) => shard.connect());
162
169
  }
163
170
  /** https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement */
164
- consumeEntitlement(applicationID, entitlementID) {
165
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlementConsume(applicationID, entitlementID));
171
+ consumeEntitlement(applicationId, entitlementId) {
172
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlementConsume(applicationId, entitlementId));
166
173
  }
167
174
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
168
- async createAutoModerationRule(guildID, options, reason) {
169
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildAutoModerationRules(guildID), {
175
+ async createAutoModerationRule(guildId, options, reason) {
176
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildAutoModerationRules(guildId), {
170
177
  json: {
171
178
  name: options.name,
172
179
  event_type: options.eventType,
@@ -184,15 +191,15 @@ class Client extends node_events_1.default {
184
191
  return transformers_1.AutoModeration.autoModerationRuleFromRaw(response);
185
192
  }
186
193
  /** https://discord.com/developers/docs/resources/emoji#create-application-emoji */
187
- async createApplicationEmoji(applicationID, options) {
188
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEmojis(applicationID), {
194
+ async createApplicationEmoji(applicationId, options) {
195
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEmojis(applicationId), {
189
196
  json: options,
190
197
  });
191
198
  return transformers_1.Emojis.emojiFromRaw(response);
192
199
  }
193
200
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
194
- async createChannel(guildID, options, reason) {
195
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildChannels(guildID), {
201
+ async createChannel(guildId, options, reason) {
202
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildChannels(guildId), {
196
203
  json: {
197
204
  name: options.name,
198
205
  type: options.type,
@@ -202,7 +209,7 @@ class Client extends node_events_1.default {
202
209
  rate_limit_per_user: options.rateLimitPerUser,
203
210
  position: options.position,
204
211
  permission_overwrites: options.permissionOverwrites,
205
- parent_id: options.parentID,
212
+ parent_id: options.parentId,
206
213
  nsfw: options.nsfw,
207
214
  rtc_region: options.rtcRegion,
208
215
  video_quality_mode: options.videoQualityMode,
@@ -210,7 +217,7 @@ class Client extends node_events_1.default {
210
217
  default_reaction_emoji: options.defaultReactionEmoji !== undefined
211
218
  ? options.defaultReactionEmoji !== null
212
219
  ? {
213
- emoji_id: options.defaultReactionEmoji.emojiID,
220
+ emoji_id: options.defaultReactionEmoji.emojiId,
214
221
  emoji_name: options.defaultReactionEmoji.emojiName,
215
222
  }
216
223
  : null
@@ -225,24 +232,24 @@ class Client extends node_events_1.default {
225
232
  return transformers_1.Channels.channelFromRaw(response);
226
233
  }
227
234
  /** https://discord.com/developers/docs/resources/channel#create-channel-invite */
228
- async createChannelInvite(channelID, options, reason) {
229
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelInvites(channelID), {
235
+ async createChannelInvite(channelId, options, reason) {
236
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelInvites(channelId), {
230
237
  json: {
231
238
  max_age: options.maxAge,
232
239
  max_uses: options.maxUses,
233
240
  temporary: options.temporary,
234
241
  unique: options.unique,
235
242
  target_type: options.targetType,
236
- target_user_id: options.targetUserID,
237
- target_application_id: options.targetApplicationID,
243
+ target_user_id: options.targetUserId,
244
+ target_application_id: options.targetApplicationId,
238
245
  },
239
246
  reason,
240
247
  });
241
248
  return transformers_1.Invites.inviteFromRaw(response);
242
249
  }
243
250
  /** https://discord.com/developers/docs/resources/webhook#create-webhook */
244
- async createChannelWebhook(channelID, options, reason) {
245
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelWebhooks(channelID), {
251
+ async createChannelWebhook(channelId, options, reason) {
252
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelWebhooks(channelId), {
246
253
  json: {
247
254
  name: options.name,
248
255
  avatar: options.avatar,
@@ -255,14 +262,14 @@ class Client extends node_events_1.default {
255
262
  async createDM(options) {
256
263
  const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.userChannels(), {
257
264
  json: {
258
- recipient_id: options.recipientID,
265
+ recipient_id: options.recipientId,
259
266
  },
260
267
  });
261
268
  return transformers_1.Channels.channelFromRaw(response);
262
269
  }
263
270
  /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
264
- async createGlobalApplicationCommand(applicationID, options) {
265
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationCommands(applicationID), {
271
+ async createGlobalApplicationCommand(applicationId, options) {
272
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationCommands(applicationId), {
266
273
  json: {
267
274
  name: options.name,
268
275
  name_localizations: options.nameLocalizations,
@@ -289,8 +296,8 @@ class Client extends node_events_1.default {
289
296
  return transformers_1.Channels.channelFromRaw(response);
290
297
  }
291
298
  /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
292
- async createGuildApplicationCommand(applicationID, guildID, options) {
293
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationGuildCommands(applicationID, guildID), {
299
+ async createGuildApplicationCommand(applicationId, guildId, options) {
300
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
294
301
  json: {
295
302
  name: options.name,
296
303
  name_localizations: options.nameLocalizations,
@@ -305,8 +312,8 @@ class Client extends node_events_1.default {
305
312
  return transformers_1.ApplicationCommands.applicationCommandFromRaw(response);
306
313
  }
307
314
  /** https://discord.com/developers/docs/resources/guild#create-guild-ban */
308
- createGuildBan(guildID, userID, options, reason) {
309
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildBan(guildID, userID), {
315
+ createGuildBan(guildId, userId, options, reason) {
316
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildBan(guildId, userId), {
310
317
  json: {
311
318
  delete_message_days: options?.deleteMessageDays,
312
319
  delete_message_seconds: options?.deleteMessageSeconds,
@@ -315,8 +322,8 @@ class Client extends node_events_1.default {
315
322
  });
316
323
  }
317
324
  /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
318
- async createGuildEmoji(guildID, options, reason) {
319
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildEmojis(guildID), {
325
+ async createGuildEmoji(guildId, options, reason) {
326
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildEmojis(guildId), {
320
327
  json: {
321
328
  name: options.name,
322
329
  image: options.image,
@@ -327,12 +334,17 @@ class Client extends node_events_1.default {
327
334
  return transformers_1.Emojis.emojiFromRaw(response);
328
335
  }
329
336
  /** https://discord.com/developers/docs/resources/guild#create-guild-role */
330
- async createGuildRole(guildID, options, reason) {
331
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildRoles(guildID), {
337
+ async createGuildRole(guildId, options, reason) {
338
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildRoles(guildId), {
332
339
  json: {
333
340
  name: options.name,
334
341
  permissions: options.permissions,
335
342
  color: options.color,
343
+ colors: {
344
+ primary_color: options.colors?.primaryColor,
345
+ secondary_color: options.colors?.secondaryColor,
346
+ tertiary_color: options.colors?.tertiaryColor,
347
+ },
336
348
  hoist: options.hoist,
337
349
  icon: options.icon,
338
350
  unicode_emoji: options.unicodeEmoji,
@@ -343,10 +355,10 @@ class Client extends node_events_1.default {
343
355
  return transformers_1.Roles.roleFromRaw(response);
344
356
  }
345
357
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event */
346
- async createGuildScheduledEvent(guildID, options, reason) {
347
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildScheduledEvents(guildID), {
358
+ async createGuildScheduledEvent(guildId, options, reason) {
359
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildScheduledEvents(guildId), {
348
360
  json: {
349
- channel_id: options.channelID,
361
+ channel_id: options.channelId,
350
362
  entity_metadata: options.entityMetadata,
351
363
  name: options.name,
352
364
  privacy_level: options.privacyLevel,
@@ -364,26 +376,26 @@ class Client extends node_events_1.default {
364
376
  return transformers_1.GuildScheduledEvents.guildScheduledEventFromRaw(response);
365
377
  }
366
378
  /** https://discord.com/developers/docs/resources/sticker#create-guild-sticker */
367
- async createGuildSticker(guildID, options, reason) {
379
+ async createGuildSticker(guildId, options, reason) {
368
380
  const formData = new FormData();
369
381
  formData.set("name", options.name);
370
382
  formData.set("description", options.description);
371
383
  formData.set("tags", options.tags);
372
384
  formData.set("file", new Blob([options.file.contents]), options.file.name);
373
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildStickers(guildID), {
385
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildStickers(guildId), {
374
386
  form: formData,
375
387
  reason,
376
388
  });
377
389
  return transformers_1.Stickers.stickerFromRaw(response);
378
390
  }
379
391
  /** https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound */
380
- async createGuildSoundboardSound(guildID, options, reason) {
381
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildID), {
392
+ async createGuildSoundboardSound(guildId, options, reason) {
393
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildId), {
382
394
  json: {
383
395
  name: options.name,
384
396
  sound: options.sound,
385
397
  volume: options.volume,
386
- emoji_id: options.emojiID,
398
+ emoji_id: options.emojiId,
387
399
  emoji_name: options.emojiName,
388
400
  },
389
401
  reason,
@@ -391,8 +403,8 @@ class Client extends node_events_1.default {
391
403
  return transformers_1.Soundboards.soundboardSoundFromRaw(response);
392
404
  }
393
405
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
394
- async createGuildTemplate(guildID, options) {
395
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildTemplates(guildID), {
406
+ async createGuildTemplate(guildId, options) {
407
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildTemplates(guildId), {
396
408
  json: {
397
409
  name: options.name,
398
410
  description: options.description,
@@ -401,8 +413,8 @@ class Client extends node_events_1.default {
401
413
  return transformers_1.GuildTemplates.guildTemplateFromRaw(response);
402
414
  }
403
415
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message */
404
- async createInteractionFollowupMessage(applicationID, interactionToken, options) {
405
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhook(applicationID, interactionToken), {
416
+ async createInteractionFollowupMessage(applicationId, interactionToken, options) {
417
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhook(applicationId, interactionToken), {
406
418
  json: {
407
419
  content: options.content,
408
420
  tts: options.tts,
@@ -427,7 +439,7 @@ class Client extends node_events_1.default {
427
439
  ? {
428
440
  question: options.poll.question,
429
441
  answers: options.poll.answers.map((answer) => ({
430
- answer_id: answer.answerID,
442
+ answer_id: answer.answerId,
431
443
  poll_media: answer.pollMedia,
432
444
  })),
433
445
  duration: options.poll.duration,
@@ -441,7 +453,7 @@ class Client extends node_events_1.default {
441
453
  return transformers_1.Messages.messageFromRaw(response);
442
454
  }
443
455
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response */
444
- async createInteractionResponse(interactionID, interactionToken, options) {
456
+ async createInteractionResponse(interactionId, interactionToken, options) {
445
457
  let json;
446
458
  let files;
447
459
  switch (options.type) {
@@ -465,14 +477,31 @@ class Client extends node_events_1.default {
465
477
  : undefined,
466
478
  flags: options.data?.flags,
467
479
  components: options.data?.components !== undefined
468
- ? transformers_1.Messages.componentsToRaw(options.data.components)
480
+ ? options.data?.components.map((component) => {
481
+ switch (component.type) {
482
+ case constants_1.ComponentTypes.ActionRow:
483
+ return transformers_1.Components.actionRowToRaw(component);
484
+ case constants_1.ComponentTypes.Section:
485
+ return transformers_1.Components.sectionToRaw(component);
486
+ case constants_1.ComponentTypes.TextDisplay:
487
+ return transformers_1.Components.textDisplayToRaw(component);
488
+ case constants_1.ComponentTypes.MediaGallery:
489
+ return transformers_1.Components.mediaGalleryToRaw(component);
490
+ case constants_1.ComponentTypes.File:
491
+ return transformers_1.Components.fileToRaw(component);
492
+ case constants_1.ComponentTypes.Separator:
493
+ return transformers_1.Components.separatorToRaw(component);
494
+ case constants_1.ComponentTypes.Container:
495
+ return transformers_1.Components.containerToRaw(component);
496
+ }
497
+ })
469
498
  : undefined,
470
499
  attachments: options.data?.attachments,
471
500
  poll: options.data?.poll !== undefined
472
501
  ? {
473
502
  question: options.data.poll.question,
474
503
  answers: options.data.poll.answers.map((answer) => ({
475
- answer_id: answer.answerID,
504
+ answer_id: answer.answerId,
476
505
  poll_media: answer.pollMedia,
477
506
  })),
478
507
  duration: options.data.poll.duration,
@@ -515,9 +544,18 @@ class Client extends node_events_1.default {
515
544
  json = {
516
545
  type: options.type,
517
546
  data: {
518
- custom_id: options.data?.customID,
547
+ custom_id: options.data?.customId,
519
548
  components: options.data?.components !== undefined
520
- ? transformers_1.Messages.componentsToRaw(options.data.components)
549
+ ? options.data?.components.map((component) => {
550
+ switch (component.type) {
551
+ case constants_1.ComponentTypes.ActionRow:
552
+ return transformers_1.Components.actionRowToRaw(component);
553
+ case constants_1.ComponentTypes.TextDisplay:
554
+ return transformers_1.Components.textDisplayToRaw(component);
555
+ case constants_1.ComponentTypes.Label:
556
+ return transformers_1.Components.labelToRaw(component);
557
+ }
558
+ })
521
559
  : undefined,
522
560
  title: options.data?.title,
523
561
  },
@@ -535,7 +573,7 @@ class Client extends node_events_1.default {
535
573
  break;
536
574
  }
537
575
  if (options.withResponse) {
538
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
576
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
539
577
  json,
540
578
  query: {
541
579
  with_response: options.withResponse,
@@ -545,7 +583,7 @@ class Client extends node_events_1.default {
545
583
  return transformers_1.Interactions.interactionCallbackResponseFromRaw(response);
546
584
  }
547
585
  else {
548
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionID, interactionToken), {
586
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
549
587
  json,
550
588
  query: {
551
589
  with_response: options.withResponse,
@@ -554,9 +592,20 @@ class Client extends node_events_1.default {
554
592
  });
555
593
  }
556
594
  }
595
+ /** https://discord.com/developers/docs/resources/lobby#create-lobby */
596
+ async createLobby(options) {
597
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.lobbies(), {
598
+ json: {
599
+ metadata: options.metadata,
600
+ members: options.members,
601
+ idle_timeout_seconds: options.idleTimeoutSeconds,
602
+ },
603
+ });
604
+ return transformers_1.Lobbies.lobbyFromRaw(response);
605
+ }
557
606
  /** https://discord.com/developers/docs/resources/message#create-message */
558
- async createMessage(channelID, options) {
559
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessages(channelID), {
607
+ async createMessage(channelId, options) {
608
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessages(channelId), {
560
609
  json: {
561
610
  content: options.content,
562
611
  nonce: options.nonce,
@@ -572,16 +621,16 @@ class Client extends node_events_1.default {
572
621
  : undefined,
573
622
  message_reference: options.messageReference !== undefined
574
623
  ? {
575
- message_id: options.messageReference.messageID,
576
- channel_id: options.messageReference.channelID,
577
- guild_id: options.messageReference.guildID,
624
+ message_id: options.messageReference.messageId,
625
+ channel_id: options.messageReference.channelId,
626
+ guild_id: options.messageReference.guildId,
578
627
  fail_if_not_exists: options.messageReference.failIfNotExists,
579
628
  }
580
629
  : undefined,
581
630
  components: options.components !== undefined
582
631
  ? transformers_1.Messages.componentsToRaw(options.components)
583
632
  : undefined,
584
- stickers_ids: options.stickersIDs,
633
+ stickers_ids: options.stickersIds,
585
634
  attachments: options.attachments,
586
635
  flags: options.flags,
587
636
  enforce_nonce: options.enforceNonce,
@@ -589,7 +638,7 @@ class Client extends node_events_1.default {
589
638
  ? {
590
639
  question: options.poll.question,
591
640
  answers: options.poll.answers.map((answer) => ({
592
- answer_id: answer.answerID,
641
+ answer_id: answer.answerId,
593
642
  poll_media: answer.pollMedia,
594
643
  })),
595
644
  duration: options.poll.duration,
@@ -603,37 +652,37 @@ class Client extends node_events_1.default {
603
652
  return transformers_1.Messages.messageFromRaw(response);
604
653
  }
605
654
  /** https://discord.com/developers/docs/resources/message#create-reaction */
606
- createMessageReaction(channelID, messageID, emoji) {
607
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelMessageReaction(channelID, messageID, emoji));
655
+ createMessageReaction(channelId, messageId, emoji) {
656
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelMessageReaction(channelId, messageId, emoji));
608
657
  }
609
658
  /** https://discord.com/developers/docs/resources/stage-instance#create-stage-instance */
610
659
  async createStageInstance(options, reason) {
611
660
  const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.stageInstances(), {
612
661
  json: {
613
- channel_id: options.channelID,
662
+ channel_id: options.channelId,
614
663
  topic: options.topic,
615
664
  privacy_level: options.privacyLevel,
616
665
  send_start_notifications: options.sendStartNotifications,
617
- guild_scheduled_event_id: options.guildScheduledEventID,
666
+ guild_scheduled_event_id: options.guildScheduledEventId,
618
667
  },
619
668
  reason,
620
669
  });
621
670
  return transformers_1.StageInstances.stageInstanceFromRaw(response);
622
671
  }
623
672
  /** https://discord.com/developers/docs/resources/entitlement#create-test-entitlement */
624
- async createTestEntitlement(applicationID, options) {
625
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlements(applicationID), {
673
+ async createTestEntitlement(applicationId, options) {
674
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlements(applicationId), {
626
675
  json: {
627
- sku_id: options.skuID,
628
- owner_id: options.ownerID,
676
+ sku_id: options.skuId,
677
+ owner_id: options.ownerId,
629
678
  owner_type: options.ownerType,
630
679
  },
631
680
  });
632
681
  return transformers_1.Entitlements.testEntitlementFromRaw(response);
633
682
  }
634
683
  /** https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */
635
- async createThread(channelID, options, reason) {
636
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelID), {
684
+ async createThread(channelId, options, reason) {
685
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelId), {
637
686
  json: {
638
687
  name: options.name,
639
688
  auto_archive_duration: options.autoArchiveDuration,
@@ -649,7 +698,7 @@ class Client extends node_events_1.default {
649
698
  replied_user: options.message.allowedMentions.repliedUser,
650
699
  }
651
700
  : undefined,
652
- sticker_ids: options.message.stickerIDs,
701
+ sticker_ids: options.message.stickerIds,
653
702
  attachments: options.message.attachments,
654
703
  flags: options.message.flags,
655
704
  },
@@ -661,8 +710,8 @@ class Client extends node_events_1.default {
661
710
  return transformers_1.Channels.channelFromRaw(response);
662
711
  }
663
712
  /** https://discord.com/developers/docs/resources/channel#start-thread-from-message */
664
- async createThreadFromMessage(channelID, messageID, options, reason) {
665
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelID, messageID), {
713
+ async createThreadFromMessage(channelId, messageId, options, reason) {
714
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelId, messageId), {
666
715
  json: {
667
716
  name: options.name,
668
717
  auto_archive_duration: options.autoArchiveDuration,
@@ -673,8 +722,8 @@ class Client extends node_events_1.default {
673
722
  return transformers_1.Channels.channelFromRaw(response);
674
723
  }
675
724
  /** https://discord.com/developers/docs/resources/channel#start-thread-without-message */
676
- async createThreadWithoutMessage(channelID, options, reason) {
677
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelID), {
725
+ async createThreadWithoutMessage(channelId, options, reason) {
726
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelId), {
678
727
  json: {
679
728
  name: options.name,
680
729
  auto_archive_duration: options.autoArchiveDuration,
@@ -687,82 +736,82 @@ class Client extends node_events_1.default {
687
736
  return transformers_1.Channels.channelFromRaw(response);
688
737
  }
689
738
  /** https://discord.com/developers/docs/resources/message#crosspost-message */
690
- async crosspostMessage(channelID, messageID) {
691
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessage(channelID, messageID));
739
+ async crosspostMessage(channelId, messageId) {
740
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessage(channelId, messageId));
692
741
  return transformers_1.Messages.messageFromRaw(response);
693
742
  }
694
743
  /** https://discord.com/developers/docs/resources/message#delete-all-reactions */
695
- deleteAllMessageReactions(channelID, messageID, emoji) {
696
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessageAllReactions(channelID, messageID, emoji));
744
+ deleteAllMessageReactions(channelId, messageId, emoji) {
745
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessageAllReactions(channelId, messageId, emoji));
697
746
  }
698
747
  /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
699
- deleteAutoModerationRule(guildID, autoModerationRuleID, reason) {
700
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildAutoModerationRule(guildID, autoModerationRuleID), {
748
+ deleteAutoModerationRule(guildId, autoModerationRuleId, reason) {
749
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildAutoModerationRule(guildId, autoModerationRuleId), {
701
750
  reason,
702
751
  });
703
752
  }
704
753
  /** https://discord.com/developers/docs/resources/emoji#delete-application-emoji */
705
- deleteApplicationEmoji(applicationID, emojiID) {
706
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationEmoji(applicationID, emojiID));
754
+ deleteApplicationEmoji(applicationId, emojiId) {
755
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationEmoji(applicationId, emojiId));
707
756
  }
708
757
  /** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
709
- async deleteChannel(channelID, reason) {
710
- const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channel(channelID), {
758
+ async deleteChannel(channelId, reason) {
759
+ const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channel(channelId), {
711
760
  reason,
712
761
  });
713
762
  return transformers_1.Channels.channelFromRaw(response);
714
763
  }
715
764
  /** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
716
- deleteChannelPermission(channelID, overwriteID, reason) {
717
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPermission(channelID, overwriteID), {
765
+ deleteChannelPermission(channelId, overwriteId, reason) {
766
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPermission(channelId, overwriteId), {
718
767
  reason,
719
768
  });
720
769
  }
721
770
  /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
722
- deleteGlobalApplicationCommand(applicationID, commandID) {
723
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationCommand(applicationID, commandID));
771
+ deleteGlobalApplicationCommand(applicationId, commandId) {
772
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationCommand(applicationId, commandId));
724
773
  }
725
774
  /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
726
- deleteGuildApplicationCommand(applicationID, guildID, commandID) {
727
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationGuildCommand(applicationID, guildID, commandID));
775
+ deleteGuildApplicationCommand(applicationId, guildId, commandId) {
776
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId));
728
777
  }
729
778
  /** https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */
730
- deleteGuildEmoji(guildID, emojiID, reason) {
731
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildEmoji(guildID, emojiID), {
779
+ deleteGuildEmoji(guildId, emojiId, reason) {
780
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildEmoji(guildId, emojiId), {
732
781
  reason,
733
782
  });
734
783
  }
735
784
  /** https://discord.com/developers/docs/resources/guild#delete-guild-integration */
736
- deleteGuildIntegration(guildID, integrationID, reason) {
737
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildIntegration(guildID, integrationID), {
785
+ deleteGuildIntegration(guildId, integrationId, reason) {
786
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildIntegration(guildId, integrationId), {
738
787
  reason,
739
788
  });
740
789
  }
741
790
  /** https://discord.com/developers/docs/resources/guild#delete-guild-role */
742
- deleteGuildRole(guildID, roleID, reason) {
743
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildRole(guildID, roleID), {
791
+ deleteGuildRole(guildId, roleId, reason) {
792
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildRole(guildId, roleId), {
744
793
  reason,
745
794
  });
746
795
  }
747
796
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event */
748
- deleteGuildScheduledEvent(guildID, guildScheduledEventID) {
749
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildScheduledEvent(guildID, guildScheduledEventID));
797
+ deleteGuildScheduledEvent(guildId, guildScheduledEventId) {
798
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId));
750
799
  }
751
800
  /** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
752
- deleteGuildSticker(guildID, stickerID, reason) {
753
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildSticker(guildID, stickerID), {
801
+ deleteGuildSticker(guildId, stickerId, reason) {
802
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildSticker(guildId, stickerId), {
754
803
  reason,
755
804
  });
756
805
  }
757
806
  /** https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound */
758
- deleteGuildSoundboardSound(guildID, soundID, reason) {
759
- this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID), {
807
+ deleteGuildSoundboardSound(guildId, soundId, reason) {
808
+ this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildId, soundId), {
760
809
  reason,
761
810
  });
762
811
  }
763
812
  /** https://discord.com/developers/docs/resources/guild-template#delete-guild-template */
764
- async deleteGuildTemplate(guildID, code) {
765
- const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildTemplate(guildID, code));
813
+ async deleteGuildTemplate(guildId, code) {
814
+ const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildTemplate(guildId, code));
766
815
  return transformers_1.GuildTemplates.guildTemplateFromRaw(response);
767
816
  }
768
817
  /** https://discord.com/developers/docs/resources/invite#delete-invite */
@@ -773,60 +822,65 @@ class Client extends node_events_1.default {
773
822
  return transformers_1.Invites.inviteFromRaw(response);
774
823
  }
775
824
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message */
776
- deleteInteractionFollowupMessage(applicationID, interactionToken, messageID) {
777
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(applicationID, interactionToken, messageID));
825
+ deleteInteractionFollowupMessage(applicationId, interactionToken, messageId) {
826
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId));
778
827
  }
779
828
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response */
780
- deleteInteractionResponse(applicationID, interactionToken) {
781
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(applicationID, interactionToken));
829
+ deleteInteractionResponse(applicationId, interactionToken) {
830
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(applicationId, interactionToken));
831
+ }
832
+ /** https://discord.com/developers/docs/resources/lobby#delete-lobby */
833
+ deleteLobby(lobbyId) {
834
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.lobby(lobbyId));
782
835
  }
783
836
  /** https://discord.com/developers/docs/resources/message#delete-message */
784
- deleteMessage(channelID, messageID, reason) {
785
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessage(channelID, messageID), {
837
+ deleteMessage(channelId, messageId, reason) {
838
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessage(channelId, messageId), {
786
839
  reason,
787
840
  });
788
841
  }
789
842
  /** https://discord.com/developers/docs/resources/message#delete-user-reaction */
790
- deleteMessageReaction(channelID, messageID, emoji, userID) {
791
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessageReaction(channelID, messageID, emoji, userID));
843
+ deleteMessageReaction(channelId, messageId, emoji, userId) {
844
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessageReaction(channelId, messageId, emoji, userId));
792
845
  }
793
846
  /** https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance */
794
- deleteStageInstance(channelID, reason) {
795
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.stageInstance(channelID), {
847
+ deleteStageInstance(channelId, reason) {
848
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.stageInstance(channelId), {
796
849
  reason,
797
850
  });
798
851
  }
799
852
  /** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
800
- deleteTestEntitlement(applicationID, entitlementID) {
801
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationEntitlement(applicationID, entitlementID));
853
+ deleteTestEntitlement(applicationId, entitlementId) {
854
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationEntitlement(applicationId, entitlementId));
802
855
  }
803
856
  /** https://discord.com/developers/docs/resources/webhook#delete-webhook */
804
- deleteWebhook(webhookID, reason) {
805
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhook(webhookID), {
857
+ deleteWebhook(webhookId, reason) {
858
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhook(webhookId), {
806
859
  reason,
807
860
  });
808
861
  }
809
862
  /** https://discord.com/developers/docs/resources/webhook#delete-webhook-message */
810
- deleteWebhookMessage(webhookID, webhookToken, messageID, options) {
811
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(webhookID, webhookToken, messageID), {
863
+ deleteWebhookMessage(webhookId, webhookToken, messageId, options) {
864
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
812
865
  query: {
813
- thread_id: options?.threadID,
866
+ thread_id: options?.threadId,
814
867
  },
815
868
  });
816
869
  }
817
870
  /** https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token */
818
- deleteWebhookWithToken(webhookID, webhookToken, reason) {
819
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhook(webhookID, webhookToken), {
871
+ deleteWebhookWithToken(webhookId, webhookToken, reason) {
872
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhook(webhookId, webhookToken), {
820
873
  reason,
821
874
  authorization: false,
822
875
  });
823
876
  }
877
+ /** https://discord.com/developers/docs/events/gateway#initiating-a-disconnect */
824
878
  disconnect() {
825
879
  this.shards.forEach((shard) => shard.disconnect());
826
880
  }
827
881
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
828
- async editAutoModerationRule(guildID, autoModerationRuleID, options, reason) {
829
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildAutoModerationRule(guildID, autoModerationRuleID), {
882
+ async editAutoModerationRule(guildId, autoModerationRuleId, options, reason) {
883
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildAutoModerationRule(guildId, autoModerationRuleId), {
830
884
  json: {
831
885
  name: options.name,
832
886
  event_type: options.eventType,
@@ -844,8 +898,8 @@ class Client extends node_events_1.default {
844
898
  return transformers_1.AutoModeration.autoModerationRuleFromRaw(response);
845
899
  }
846
900
  /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
847
- async editApplicationCommandPermissions(applicationID, guildID, commandID, options) {
848
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationCommandPermissions(applicationID, guildID, commandID), {
901
+ async editApplicationCommandPermissions(applicationId, guildId, commandId, options) {
902
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationCommandPermissions(applicationId, guildId, commandId), {
849
903
  json: {
850
904
  permissions: options.permissions.map((permission) => ({
851
905
  id: permission.type,
@@ -857,15 +911,15 @@ class Client extends node_events_1.default {
857
911
  return transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(response);
858
912
  }
859
913
  /** https://discord.com/developers/docs/resources/emoji#modify-application-emoji */
860
- async editApplicationEmoji(applicationID, emojiID, options) {
861
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationEmoji(applicationID, emojiID), {
914
+ async editApplicationEmoji(applicationId, emojiId, options) {
915
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationEmoji(applicationId, emojiId), {
862
916
  json: options,
863
917
  });
864
918
  return transformers_1.Emojis.emojiFromRaw(response);
865
919
  }
866
920
  /** https://discord.com/developers/docs/resources/channel#modify-channel */
867
- async editChannel(channelID, options, reason) {
868
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channel(channelID), {
921
+ async editChannel(channelId, options, reason) {
922
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channel(channelId), {
869
923
  json: {
870
924
  name: options.name,
871
925
  icon: options.icon,
@@ -877,7 +931,7 @@ class Client extends node_events_1.default {
877
931
  bitrate: options.bitrate,
878
932
  user_limit: options.userLimit,
879
933
  permission_overwrites: options.permissionOverwrites,
880
- parent_id: options.parentID,
934
+ parent_id: options.parentId,
881
935
  rtc_region: options.rtcRegion,
882
936
  video_quality_mode: options.videoQualityMode,
883
937
  default_auto_archive_duration: options.defaultAutoArchiveDuration,
@@ -886,7 +940,7 @@ class Client extends node_events_1.default {
886
940
  default_reaction_emoji: options.defaultReactionEmoji !== undefined
887
941
  ? options.defaultReactionEmoji !== null
888
942
  ? {
889
- emoji_id: options.defaultReactionEmoji.emojiID,
943
+ emoji_id: options.defaultReactionEmoji.emojiId,
890
944
  emoji_name: options.defaultReactionEmoji.emojiName,
891
945
  }
892
946
  : null
@@ -905,20 +959,20 @@ class Client extends node_events_1.default {
905
959
  return transformers_1.Channels.channelFromRaw(response);
906
960
  }
907
961
  /** https://discord.com/developers/docs/resources/channel#edit-channel-permissions */
908
- editChannelPermissions(channelID, overwriteID, options, reason) {
909
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelPermission(channelID, overwriteID), {
962
+ editChannelPermissions(channelId, overwriteId, options, reason) {
963
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelPermission(channelId, overwriteId), {
910
964
  json: options,
911
965
  reason,
912
966
  });
913
967
  }
914
968
  /** https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions */
915
- editChannelPositions(guildID, options) {
916
- this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildChannels(guildID), {
969
+ editChannelPositions(guildId, options) {
970
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildChannels(guildId), {
917
971
  json: options.map((data) => ({
918
972
  id: data.id,
919
973
  position: data.position,
920
974
  lock_permissions: data.lockPermissions,
921
- parent_id: data.parentID,
975
+ parent_id: data.parentId,
922
976
  })),
923
977
  });
924
978
  }
@@ -934,20 +988,18 @@ class Client extends node_events_1.default {
934
988
  return transformers_1.Users.userFromRaw(response);
935
989
  }
936
990
  /** https://discord.com/developers/docs/resources/guild#modify-current-member */
937
- async editCurrentGuildMember(guildID, options, reason) {
938
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildID), {
939
- json: {
940
- nick: options.nick,
941
- },
991
+ async editCurrentGuildMember(guildId, options, reason) {
992
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildId), {
993
+ json: options,
942
994
  reason,
943
995
  });
944
996
  return transformers_1.Guilds.guildMemberFromRaw(response);
945
997
  }
946
998
  /** https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state */
947
- editCurrentUserVoiceState(guildID, options) {
948
- this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildVoiceState(guildID), {
999
+ editCurrentUserVoiceState(guildId, options) {
1000
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildVoiceState(guildId), {
949
1001
  json: {
950
- channel_id: options.channelID,
1002
+ channel_id: options.channelId,
951
1003
  suppress: options.suppress,
952
1004
  requestToSpeakTimestamp: options.requestToSpeakTimestamp,
953
1005
  },
@@ -981,8 +1033,8 @@ class Client extends node_events_1.default {
981
1033
  return transformers_1.Applications.applicationFromRaw(response);
982
1034
  }
983
1035
  /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
984
- async editGlobalApplicationCommand(applicationID, commandID, options) {
985
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationCommand(applicationID, commandID), {
1036
+ async editGlobalApplicationCommand(applicationId, commandId, options) {
1037
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationCommand(applicationId, commandId), {
986
1038
  json: {
987
1039
  name: options.name,
988
1040
  name_localizations: options.nameLocalizations,
@@ -998,36 +1050,36 @@ class Client extends node_events_1.default {
998
1050
  return transformers_1.ApplicationCommands.applicationCommandFromRaw(response);
999
1051
  }
1000
1052
  /** https://discord.com/developers/docs/resources/guild#modify-guild */
1001
- async editGuild(guildID, options, reason) {
1002
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guild(guildID), {
1053
+ async editGuild(guildId, options, reason) {
1054
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guild(guildId), {
1003
1055
  json: {
1004
1056
  name: options.name,
1005
1057
  verification_level: options.verificationLevel,
1006
1058
  default_message_notifications: options.defaultMessageNotifications,
1007
1059
  explicit_content_filter: options.explicitContentFilter,
1008
- afk_channel_id: options.afkChannelID,
1060
+ afk_channel_id: options.afkChannelId,
1009
1061
  afk_timeout: options.afkTimeout,
1010
1062
  icon: options.icon,
1011
1063
  splash: options.splash,
1012
1064
  discovery_splash: options.discoverySplash,
1013
1065
  banner: options.banner,
1014
- system_channel_id: options.systemChannelID,
1066
+ system_channel_id: options.systemChannelId,
1015
1067
  system_channel_flags: options.systemChannelFlags,
1016
- rules_channel_id: options.rulesChannelID,
1017
- public_updates_channel_id: options.publicUpdatesChannelID,
1068
+ rules_channel_id: options.rulesChannelId,
1069
+ public_updates_channel_id: options.publicUpdatesChannelId,
1018
1070
  preferred_locale: options.preferredLocale,
1019
1071
  features: options.features,
1020
1072
  description: options.description,
1021
1073
  premium_progress_bar_enabled: options.premiumProgressBarEnabled,
1022
- safety_alerts_channel_id: options.safetyAlertsChannelID,
1074
+ safety_alerts_channel_id: options.safetyAlertsChannelId,
1023
1075
  },
1024
1076
  reason,
1025
1077
  });
1026
1078
  return transformers_1.Guilds.guildFromRaw(response);
1027
1079
  }
1028
1080
  /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
1029
- async editGuildApplicationCommand(applicationID, guildID, commandID, options) {
1030
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationGuildCommand(applicationID, guildID, commandID), {
1081
+ async editGuildApplicationCommand(applicationId, guildId, commandId, options) {
1082
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId), {
1031
1083
  json: {
1032
1084
  name: options.name,
1033
1085
  name_localizations: options.nameLocalizations,
@@ -1041,8 +1093,8 @@ class Client extends node_events_1.default {
1041
1093
  return transformers_1.ApplicationCommands.applicationCommandFromRaw(response);
1042
1094
  }
1043
1095
  /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
1044
- async editGuildEmoji(guildID, emojiID, options, reason) {
1045
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildEmoji(guildID, emojiID), {
1096
+ async editGuildEmoji(guildId, emojiId, options, reason) {
1097
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildEmoji(guildId, emojiId), {
1046
1098
  json: {
1047
1099
  name: options.name,
1048
1100
  roles: options.roles,
@@ -1052,8 +1104,8 @@ class Client extends node_events_1.default {
1052
1104
  return transformers_1.Emojis.emojiFromRaw(response);
1053
1105
  }
1054
1106
  /** https://discord.com/developers/docs/resources/emoji#modify-guild-incidents-actions */
1055
- async editGuildIncidentsActions(guildID, options, reason) {
1056
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildIncidentsActions(guildID), {
1107
+ async editGuildIncidentsActions(guildId, options, reason) {
1108
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildIncidentsActions(guildId), {
1057
1109
  json: {
1058
1110
  invites_disabled_until: options?.invitesDisabledUntil,
1059
1111
  dms_disabled_until: options?.dmsDisabledUntil,
@@ -1068,14 +1120,14 @@ class Client extends node_events_1.default {
1068
1120
  };
1069
1121
  }
1070
1122
  /** https://discord.com/developers/docs/resources/guild#modify-guild-member */
1071
- async editGuildMember(guildID, userID, options, reason) {
1072
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildID, userID), {
1123
+ async editGuildMember(guildId, userId, options, reason) {
1124
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildId, userId), {
1073
1125
  json: {
1074
1126
  nick: options.nick,
1075
1127
  roles: options.roles,
1076
1128
  mute: options.mute,
1077
1129
  deaf: options.deaf,
1078
- channel_id: options.channelID,
1130
+ channel_id: options.channelId,
1079
1131
  communication_disabled_until: options.communicationDisabledUntil,
1080
1132
  flags: options.flags,
1081
1133
  },
@@ -1084,20 +1136,20 @@ class Client extends node_events_1.default {
1084
1136
  return transformers_1.Guilds.guildMemberFromRaw(response);
1085
1137
  }
1086
1138
  /** https://discord.com/developers/docs/resources/guild#modify-guild-onboarding */
1087
- editGuildOnboarding(guildID, options, reason) {
1088
- this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildOnboarding(guildID), {
1139
+ editGuildOnboarding(guildId, options, reason) {
1140
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildOnboarding(guildId), {
1089
1141
  json: {
1090
1142
  prompts: options.prompts?.map((prompt) => ({
1091
1143
  id: prompt.id,
1092
1144
  type: prompt.type,
1093
1145
  options: prompt.options.map((promptOption) => ({
1094
1146
  id: promptOption.id,
1095
- channel_ids: promptOption.channelIDs,
1096
- role_ids: promptOption.roleIDs,
1147
+ channel_ids: promptOption.channelIds,
1148
+ role_ids: promptOption.roleIds,
1097
1149
  emoji: promptOption.emoji !== undefined
1098
1150
  ? transformers_1.Emojis.emojiToRaw(promptOption.emoji)
1099
1151
  : undefined,
1100
- emoji_id: promptOption.emojiID,
1152
+ emoji_id: promptOption.emojiId,
1101
1153
  emoji_name: promptOption.emojiName,
1102
1154
  emoji_animated: promptOption.emojiAnimated,
1103
1155
  title: promptOption.title,
@@ -1113,12 +1165,17 @@ class Client extends node_events_1.default {
1113
1165
  });
1114
1166
  }
1115
1167
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role */
1116
- async editGuildRole(guildID, roleID, options, reason) {
1117
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildRole(guildID, roleID), {
1168
+ async editGuildRole(guildId, roleId, options, reason) {
1169
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildRole(guildId, roleId), {
1118
1170
  json: {
1119
1171
  name: options?.name,
1120
1172
  permissions: options?.permissions,
1121
1173
  color: options?.color,
1174
+ colors: {
1175
+ primary_color: options?.colors?.primaryColor,
1176
+ secondary_color: options?.colors?.secondaryColor,
1177
+ tertiary_color: options?.colors?.tertiaryColor,
1178
+ },
1122
1179
  hoist: options?.hoist,
1123
1180
  icon: options?.icon,
1124
1181
  unicode_emoji: options?.unicodeEmoji,
@@ -1129,18 +1186,18 @@ class Client extends node_events_1.default {
1129
1186
  return transformers_1.Roles.roleFromRaw(response);
1130
1187
  }
1131
1188
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role-positions */
1132
- async editGuildRolePositions(guildID, options, reason) {
1133
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildRoles(guildID), {
1189
+ async editGuildRolePositions(guildId, options, reason) {
1190
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildRoles(guildId), {
1134
1191
  json: options,
1135
1192
  reason,
1136
1193
  });
1137
1194
  return response.map((role) => transformers_1.Roles.roleFromRaw(role));
1138
1195
  }
1139
1196
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event */
1140
- async editGuildScheduledEvent(guildID, guildScheduledEventID, options, reason) {
1141
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildScheduledEvent(guildID, guildScheduledEventID), {
1197
+ async editGuildScheduledEvent(guildId, guildScheduledEventId, options, reason) {
1198
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId), {
1142
1199
  json: {
1143
- channel_id: options.channelID,
1200
+ channel_id: options.channelId,
1144
1201
  entity_metadata: options.entityMetadata,
1145
1202
  name: options.name,
1146
1203
  privacy_level: options.privacyLevel,
@@ -1161,8 +1218,8 @@ class Client extends node_events_1.default {
1161
1218
  return transformers_1.GuildScheduledEvents.guildScheduledEventFromRaw(response);
1162
1219
  }
1163
1220
  /** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
1164
- async editGuildSticker(guildID, stickerID, options, reason) {
1165
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildSticker(guildID, stickerID), {
1221
+ async editGuildSticker(guildId, stickerId, options, reason) {
1222
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildSticker(guildId, stickerId), {
1166
1223
  json: {
1167
1224
  name: options.name,
1168
1225
  description: options.description,
@@ -1173,12 +1230,12 @@ class Client extends node_events_1.default {
1173
1230
  return transformers_1.Stickers.stickerFromRaw(response);
1174
1231
  }
1175
1232
  /** https://discord.com/developers/docs/resources/soundboard#edit-guild-soundboard-sound */
1176
- async editGuildSoundboardSound(guildID, soundID, options, reason) {
1177
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID), {
1233
+ async editGuildSoundboardSound(guildId, soundId, options, reason) {
1234
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildId, soundId), {
1178
1235
  json: {
1179
1236
  name: options.name,
1180
1237
  volume: options.volume,
1181
- emoji_id: options.emojiID,
1238
+ emoji_id: options.emojiId,
1182
1239
  emoji_name: options.emojiName,
1183
1240
  },
1184
1241
  reason,
@@ -1186,8 +1243,8 @@ class Client extends node_events_1.default {
1186
1243
  return transformers_1.Soundboards.soundboardSoundFromRaw(response);
1187
1244
  }
1188
1245
  /** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
1189
- async editGuildTemplate(guildID, code, options) {
1190
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildTemplate(guildID, code), {
1246
+ async editGuildTemplate(guildId, code, options) {
1247
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildTemplate(guildId, code), {
1191
1248
  json: {
1192
1249
  name: options.name,
1193
1250
  description: options.description,
@@ -1196,14 +1253,14 @@ class Client extends node_events_1.default {
1196
1253
  return transformers_1.GuildTemplates.guildTemplateFromRaw(response);
1197
1254
  }
1198
1255
  /** https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen */
1199
- async editGuildWelcomeScreen(guildID, options, reason) {
1200
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildWelcomeScreen(guildID), {
1256
+ async editGuildWelcomeScreen(guildId, options, reason) {
1257
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildWelcomeScreen(guildId), {
1201
1258
  json: {
1202
1259
  enabled: options.enabled,
1203
1260
  welcome_channels: options.welcomeChannels?.map((welcomeChannel) => ({
1204
- channel_id: welcomeChannel.channelID,
1261
+ channel_id: welcomeChannel.channelId,
1205
1262
  description: welcomeChannel.description,
1206
- emoji_id: welcomeChannel.emojiID,
1263
+ emoji_id: welcomeChannel.emojiId,
1207
1264
  emoji_name: welcomeChannel.emojiName,
1208
1265
  })),
1209
1266
  description: options.description,
@@ -1213,30 +1270,41 @@ class Client extends node_events_1.default {
1213
1270
  return {
1214
1271
  description: response.description,
1215
1272
  welcomeChannels: response.welcome_channels.map((welcomeScreenChannel) => ({
1216
- channelID: welcomeScreenChannel.channel_id,
1273
+ channelId: welcomeScreenChannel.channel_id,
1217
1274
  description: welcomeScreenChannel.description,
1218
- emojiID: welcomeScreenChannel.emoji_id,
1275
+ emojiId: welcomeScreenChannel.emoji_id,
1219
1276
  emojiName: welcomeScreenChannel.emoji_name,
1220
1277
  })),
1221
1278
  };
1222
1279
  }
1223
1280
  /** https://discord.com/developers/docs/resources/guild#modify-guild-widget */
1224
- async editGuildWidget(guildID, options, reason) {
1225
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildWidgetSettings(guildID), {
1281
+ async editGuildWidget(guildId, options, reason) {
1282
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildWidgetSettings(guildId), {
1226
1283
  json: {
1227
1284
  enabled: options.enabled,
1228
- channel_id: options.channelID,
1285
+ channel_id: options.channelId,
1229
1286
  },
1230
1287
  reason,
1231
1288
  });
1232
1289
  return {
1233
1290
  enabled: response.enabled,
1234
- channelID: response.channel_id,
1291
+ channelId: response.channel_id,
1235
1292
  };
1236
1293
  }
1294
+ /** https://discord.com/developers/docs/resources/lobby#modify-lobby */
1295
+ async editLobby(lobbyId, options) {
1296
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.lobby(lobbyId), {
1297
+ json: {
1298
+ metadata: options.metadata,
1299
+ members: options.members,
1300
+ idle_timeout_seconds: options.idleTimeoutSeconds,
1301
+ },
1302
+ });
1303
+ return transformers_1.Lobbies.lobbyFromRaw(response);
1304
+ }
1237
1305
  /** https://discord.com/developers/docs/resources/message#edit-message */
1238
- async editMessage(channelID, messageID, options) {
1239
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channelMessage(channelID, messageID), {
1306
+ async editMessage(channelId, messageId, options) {
1307
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channelMessage(channelId, messageId), {
1240
1308
  json: {
1241
1309
  content: options.content,
1242
1310
  embeds: options.embeds !== null
@@ -1265,8 +1333,8 @@ class Client extends node_events_1.default {
1265
1333
  return transformers_1.Messages.messageFromRaw(response);
1266
1334
  }
1267
1335
  /** https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance */
1268
- async editStageInstance(channelID, options, reason) {
1269
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.stageInstance(channelID), {
1336
+ async editStageInstance(channelId, options, reason) {
1337
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.stageInstance(channelId), {
1270
1338
  json: {
1271
1339
  topic: options.topic,
1272
1340
  privacy_level: options.privacyLevel,
@@ -1276,8 +1344,8 @@ class Client extends node_events_1.default {
1276
1344
  return transformers_1.StageInstances.stageInstanceFromRaw(response);
1277
1345
  }
1278
1346
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message */
1279
- async editInteractionFollowupMessage(applicationID, interactionToken, messageID, options) {
1280
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhookMessage(applicationID, interactionToken, messageID), {
1347
+ async editInteractionFollowupMessage(applicationId, interactionToken, messageId, options) {
1348
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId), {
1281
1349
  json: {
1282
1350
  content: options.content,
1283
1351
  embeds: options.embeds !== null
@@ -1319,7 +1387,7 @@ class Client extends node_events_1.default {
1319
1387
  ? {
1320
1388
  question: options.poll.question,
1321
1389
  answers: options.poll.answers.map((answer) => ({
1322
- answer_id: answer.answerID,
1390
+ answer_id: answer.answerId,
1323
1391
  poll_media: answer.pollMedia,
1324
1392
  })),
1325
1393
  duration: options.poll.duration,
@@ -1331,14 +1399,14 @@ class Client extends node_events_1.default {
1331
1399
  },
1332
1400
  files: options.files,
1333
1401
  query: {
1334
- thread_id: options.threadID,
1402
+ thread_id: options.threadId,
1335
1403
  },
1336
1404
  });
1337
1405
  return transformers_1.Messages.messageFromRaw(response);
1338
1406
  }
1339
1407
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response */
1340
- async editInteractionResponse(applicationID, interactionToken, options) {
1341
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhookMessage(applicationID, interactionToken), {
1408
+ async editInteractionResponse(applicationId, interactionToken, options) {
1409
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhookMessage(applicationId, interactionToken), {
1342
1410
  json: {
1343
1411
  content: options.content,
1344
1412
  embeds: options.embeds !== null
@@ -1380,7 +1448,7 @@ class Client extends node_events_1.default {
1380
1448
  ? {
1381
1449
  question: options.poll.question,
1382
1450
  answers: options.poll.answers.map((answer) => ({
1383
- answer_id: answer.answerID,
1451
+ answer_id: answer.answerId,
1384
1452
  poll_media: answer.pollMedia,
1385
1453
  })),
1386
1454
  duration: options.poll.duration,
@@ -1392,35 +1460,35 @@ class Client extends node_events_1.default {
1392
1460
  },
1393
1461
  files: options.files,
1394
1462
  query: {
1395
- thread_id: options.threadID,
1463
+ thread_id: options.threadId,
1396
1464
  },
1397
1465
  });
1398
1466
  return transformers_1.Messages.messageFromRaw(response);
1399
1467
  }
1400
1468
  /** https://discord.com/developers/docs/resources/guild#modify-user-voice-state */
1401
- editUserVoiceState(guildID, userID, options) {
1402
- this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildVoiceState(guildID, userID), {
1469
+ editUserVoiceState(guildId, userId, options) {
1470
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildVoiceState(guildId, userId), {
1403
1471
  json: {
1404
- channel_id: options.channelID,
1472
+ channel_id: options.channelId,
1405
1473
  suppress: options.suppress,
1406
1474
  },
1407
1475
  });
1408
1476
  }
1409
1477
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook */
1410
- async editWebhook(webhookID, options, reason) {
1411
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhook(webhookID), {
1478
+ async editWebhook(webhookId, options, reason) {
1479
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhook(webhookId), {
1412
1480
  json: {
1413
1481
  name: options.name,
1414
1482
  avatar: options.avatar,
1415
- channel_id: options.channelID,
1483
+ channel_id: options.channelId,
1416
1484
  },
1417
1485
  reason,
1418
1486
  });
1419
1487
  return transformers_1.Webhooks.webhookFromRaw(response);
1420
1488
  }
1421
1489
  /** https://discord.com/developers/docs/resources/webhook#edit-webhook-message */
1422
- async editWebhookMessage(webhookID, webhookToken, messageID, options) {
1423
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhookMessage(webhookID, webhookToken, messageID), {
1490
+ async editWebhookMessage(webhookId, webhookToken, messageId, options) {
1491
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
1424
1492
  json: {
1425
1493
  content: options.content,
1426
1494
  embeds: options.embeds !== null
@@ -1462,7 +1530,7 @@ class Client extends node_events_1.default {
1462
1530
  ? {
1463
1531
  question: options.poll.question,
1464
1532
  answers: options.poll.answers.map((answer) => ({
1465
- answer_id: answer.answerID,
1533
+ answer_id: answer.answerId,
1466
1534
  poll_media: answer.pollMedia,
1467
1535
  })),
1468
1536
  duration: options.poll.duration,
@@ -1474,15 +1542,15 @@ class Client extends node_events_1.default {
1474
1542
  },
1475
1543
  files: options.files,
1476
1544
  query: {
1477
- thread_id: options.threadID,
1545
+ thread_id: options.threadId,
1478
1546
  with_components: options.withComponents,
1479
1547
  },
1480
1548
  });
1481
1549
  return transformers_1.Messages.messageFromRaw(response);
1482
1550
  }
1483
1551
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
1484
- async editWebhookWithToken(webhookID, webhookToken, options, reason) {
1485
- const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhook(webhookID, webhookToken), {
1552
+ async editWebhookWithToken(webhookId, webhookToken, options, reason) {
1553
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhook(webhookId, webhookToken), {
1486
1554
  json: {
1487
1555
  name: options.name,
1488
1556
  avatar: options.avatar,
@@ -1493,13 +1561,13 @@ class Client extends node_events_1.default {
1493
1561
  return transformers_1.Webhooks.webhookFromRaw(response);
1494
1562
  }
1495
1563
  /** https://discord.com/developers/docs/resources/poll#end-poll */
1496
- async endPoll(channelID, messageID) {
1497
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.pollExpire(channelID, messageID));
1564
+ async endPoll(channelId, messageId) {
1565
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.pollExpire(channelId, messageId));
1498
1566
  return transformers_1.Messages.messageFromRaw(response);
1499
1567
  }
1500
1568
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
1501
- async executeWebhook(webhookID, webhookToken, options) {
1502
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhook(webhookID, webhookToken), {
1569
+ async executeWebhook(webhookId, webhookToken, options) {
1570
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhook(webhookId, webhookToken), {
1503
1571
  json: {
1504
1572
  content: options.content,
1505
1573
  username: options.username,
@@ -1525,7 +1593,7 @@ class Client extends node_events_1.default {
1525
1593
  ? {
1526
1594
  question: options.poll.question,
1527
1595
  answers: options.poll.answers.map((answer) => ({
1528
- answer_id: answer.answerID,
1596
+ answer_id: answer.answerId,
1529
1597
  poll_media: answer.pollMedia,
1530
1598
  })),
1531
1599
  duration: options.poll.duration,
@@ -1537,7 +1605,7 @@ class Client extends node_events_1.default {
1537
1605
  files: options.files,
1538
1606
  query: {
1539
1607
  wait: options.wait,
1540
- thread_id: options.threadID,
1608
+ thread_id: options.threadId,
1541
1609
  with_components: options.withComponents,
1542
1610
  },
1543
1611
  });
@@ -1548,10 +1616,10 @@ class Client extends node_events_1.default {
1548
1616
  *
1549
1617
  * https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
1550
1618
  */
1551
- async executeWebhookPlatform(webhookID, webhookToken, platform, options) {
1552
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhookPlatform(webhookID, webhookToken, platform), {
1619
+ async executeWebhookPlatform(webhookId, webhookToken, platform, options) {
1620
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhookPlatform(webhookId, webhookToken, platform), {
1553
1621
  query: {
1554
- thread_id: options.threadID,
1622
+ thread_id: options.threadId,
1555
1623
  wait: options.wait,
1556
1624
  },
1557
1625
  json: options,
@@ -1559,29 +1627,29 @@ class Client extends node_events_1.default {
1559
1627
  return response !== null ? transformers_1.Messages.messageFromRaw(response) : null;
1560
1628
  }
1561
1629
  /** https://discord.com/developers/docs/resources/channel#follow-announcement-channel */
1562
- async followChannel(channelID, options, reason) {
1563
- const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelFollowers(channelID), {
1630
+ async followChannel(channelId, options, reason) {
1631
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelFollowers(channelId), {
1564
1632
  json: {
1565
- webhook_channel_id: options.webhookChannelID,
1633
+ webhook_channel_id: options.webhookChannelId,
1566
1634
  },
1567
1635
  reason,
1568
1636
  });
1569
1637
  return {
1570
- channelID: response.channel_id,
1571
- webhookID: response.webhook_id,
1638
+ channelId: response.channel_id,
1639
+ webhookId: response.webhook_id,
1572
1640
  };
1573
1641
  }
1574
1642
  /** https://discord.com/developers/docs/resources/guild#list-active-guild-threads */
1575
- async getActiveGuildThreads(guildID) {
1576
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildActiveThreads(guildID));
1643
+ async getActiveGuildThreads(guildId) {
1644
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildActiveThreads(guildId));
1577
1645
  return {
1578
1646
  threads: response.threads.map((thread) => transformers_1.Channels.channelFromRaw(thread)),
1579
1647
  members: response.members.map((threadMember) => transformers_1.Channels.threadMemberFromRaw(threadMember)),
1580
1648
  };
1581
1649
  }
1582
1650
  /** https://discord.com/developers/docs/resources/channel#list-public-archived-threads */
1583
- async getArchivedThreads(channelID, archivedStatus, options) {
1584
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelThreads(channelID, archivedStatus, false), {
1651
+ async getArchivedThreads(channelId, archivedStatus, options) {
1652
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelThreads(channelId, archivedStatus, false), {
1585
1653
  query: {
1586
1654
  before: options?.before,
1587
1655
  limit: options?.limit,
@@ -1594,10 +1662,10 @@ class Client extends node_events_1.default {
1594
1662
  };
1595
1663
  }
1596
1664
  /** https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log */
1597
- async getAuditLog(guildID, options) {
1598
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAuditLog(guildID), {
1665
+ async getAuditLog(guildId, options) {
1666
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAuditLog(guildId), {
1599
1667
  query: {
1600
- user_id: options?.userID,
1668
+ user_id: options?.userId,
1601
1669
  action_type: options?.actionType,
1602
1670
  before: options?.before,
1603
1671
  after: options?.after,
@@ -1607,71 +1675,71 @@ class Client extends node_events_1.default {
1607
1675
  return transformers_1.AuditLogs.auditLogFromRaw(response);
1608
1676
  }
1609
1677
  /** https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule */
1610
- async getAutoModerationRule(guildID, ruleID) {
1611
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRule(guildID, ruleID));
1678
+ async getAutoModerationRule(guildId, ruleId) {
1679
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRule(guildId, ruleId));
1612
1680
  return transformers_1.AutoModeration.autoModerationRuleFromRaw(response);
1613
1681
  }
1614
1682
  /** https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild */
1615
- async getAutoModerationRules(guildID) {
1616
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRules(guildID));
1683
+ async getAutoModerationRules(guildId) {
1684
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRules(guildId));
1617
1685
  return response.map((autoModerationRule) => transformers_1.AutoModeration.autoModerationRuleFromRaw(autoModerationRule));
1618
1686
  }
1619
1687
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-activity-instance */
1620
- async getApplicationActivityInstance(applicationID, instanceID) {
1621
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationActivityInstance(applicationID, instanceID));
1688
+ async getApplicationActivityInstance(applicationId, instanceId) {
1689
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationActivityInstance(applicationId, instanceId));
1622
1690
  return {
1623
- applicationID: response.application_id,
1624
- instanceID: response.instance_id,
1625
- launchID: response.launch_id,
1691
+ applicationId: response.application_id,
1692
+ instanceId: response.instance_id,
1693
+ launchId: response.launch_id,
1626
1694
  location: {
1627
1695
  id: response.location.id,
1628
1696
  kind: response.location.kind,
1629
- channelID: response.location.channel_id,
1630
- guildID: response.location.guild_id,
1697
+ channelId: response.location.channel_id,
1698
+ guildId: response.location.guild_id,
1631
1699
  },
1632
1700
  users: response.users,
1633
1701
  };
1634
1702
  }
1635
1703
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
1636
- async getApplicationCommandPermissions(applicationID, guildID, commandID) {
1637
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationID, guildID, commandID));
1704
+ async getApplicationCommandPermissions(applicationId, guildId, commandId) {
1705
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationId, guildId, commandId));
1638
1706
  return transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(response);
1639
1707
  }
1640
1708
  /** https://discord.com/developers/docs/resources/emoji#get-application-emoji */
1641
- async getApplicationEmoji(applicationID, emojiID) {
1642
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmoji(applicationID, emojiID));
1709
+ async getApplicationEmoji(applicationId, emojiId) {
1710
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmoji(applicationId, emojiId));
1643
1711
  return transformers_1.Emojis.emojiFromRaw(response);
1644
1712
  }
1645
1713
  /** https://discord.com/developers/docs/resources/emoji#list-application-emojis */
1646
- async getApplicationEmojis(applicationID) {
1647
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmojis(applicationID));
1714
+ async getApplicationEmojis(applicationId) {
1715
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmojis(applicationId));
1648
1716
  return {
1649
1717
  items: response.items.map((emoji) => transformers_1.Emojis.emojiFromRaw(emoji)),
1650
1718
  };
1651
1719
  }
1652
1720
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
1653
- async getApplicationRoleConnectionMetadataRecords(applicationID) {
1654
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationID));
1721
+ async getApplicationRoleConnectionMetadataRecords(applicationId) {
1722
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationId));
1655
1723
  return response.map((applicationRoleConnectionMetadata) => transformers_1.ApplicationRoleConnectionMetadatas.applicationRoleConnectionMetadataFromRaw(applicationRoleConnectionMetadata));
1656
1724
  }
1657
1725
  /** https://discord.com/developers/docs/resources/channel#get-channel */
1658
- async getChannel(channelID) {
1659
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channel(channelID));
1726
+ async getChannel(channelId) {
1727
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channel(channelId));
1660
1728
  return transformers_1.Channels.channelFromRaw(response);
1661
1729
  }
1662
1730
  /** https://discord.com/developers/docs/resources/guild#get-guild-channels */
1663
- async getChannels(guildID) {
1664
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildChannels(guildID));
1731
+ async getChannels(guildId) {
1732
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildChannels(guildId));
1665
1733
  return response.map((channel) => transformers_1.Channels.channelFromRaw(channel));
1666
1734
  }
1667
1735
  /** https://discord.com/developers/docs/resources/channel#get-channel-invites */
1668
- async getChannelInvites(channelID) {
1669
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelInvites(channelID));
1736
+ async getChannelInvites(channelId) {
1737
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelInvites(channelId));
1670
1738
  return response.map((invite) => transformers_1.Invites.inviteFromRaw(invite));
1671
1739
  }
1672
1740
  /** https://discord.com/developers/docs/resources/webhook#get-channel-webhooks */
1673
- async getChannelWebhooks(channelID) {
1674
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelWebhooks(channelID));
1741
+ async getChannelWebhooks(channelId) {
1742
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelWebhooks(channelId));
1675
1743
  return response.map((webhook) => transformers_1.Webhooks.webhookFromRaw(webhook));
1676
1744
  }
1677
1745
  /** https://discord.com/developers/docs/resources/application#get-current-application */
@@ -1680,8 +1748,8 @@ class Client extends node_events_1.default {
1680
1748
  return transformers_1.Applications.applicationFromRaw(response);
1681
1749
  }
1682
1750
  /** https://discord.com/developers/docs/resources/user#get-current-user-application-role-connection */
1683
- async getCurrentApplicationRoleConnection(applicationID) {
1684
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.userApplicationRoleConnection(applicationID));
1751
+ async getCurrentApplicationRoleConnection(applicationId) {
1752
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.userApplicationRoleConnection(applicationId));
1685
1753
  return {
1686
1754
  platformName: response.platform_name,
1687
1755
  platformUsername: response.platform_username,
@@ -1689,8 +1757,8 @@ class Client extends node_events_1.default {
1689
1757
  };
1690
1758
  }
1691
1759
  /** https://discord.com/developers/docs/resources/user#get-current-user-guild-member */
1692
- async getCurrentGuildMember(guildID) {
1693
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMember(guildID));
1760
+ async getCurrentGuildMember(guildId) {
1761
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMember(guildId));
1694
1762
  return transformers_1.Guilds.guildMemberFromRaw(response);
1695
1763
  }
1696
1764
  /** https://discord.com/developers/docs/resources/user#get-current-user-connections */
@@ -1710,8 +1778,8 @@ class Client extends node_events_1.default {
1710
1778
  }));
1711
1779
  }
1712
1780
  /** https://discord.com/developers/docs/resources/voice#get-current-user-voice-state */
1713
- async getCurrentUserVoiceState(guildID) {
1714
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID));
1781
+ async getCurrentUserVoiceState(guildId) {
1782
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildId));
1715
1783
  return transformers_1.Voice.voiceStateFromRaw(response);
1716
1784
  }
1717
1785
  /** https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds */
@@ -1720,20 +1788,20 @@ class Client extends node_events_1.default {
1720
1788
  return response.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound));
1721
1789
  }
1722
1790
  /** https://discord.com/developers/docs/resources/entitlement#get-entitlement */
1723
- async getEntitlement(applicationID, entitlementID) {
1724
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlement(applicationID, entitlementID));
1791
+ async getEntitlement(applicationId, entitlementId) {
1792
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlement(applicationId, entitlementId));
1725
1793
  return transformers_1.Entitlements.entitlementFromRaw(response);
1726
1794
  }
1727
1795
  /** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
1728
- async getEntitlements(applicationID, options) {
1729
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationID), {
1796
+ async getEntitlements(applicationId, options) {
1797
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationId), {
1730
1798
  query: {
1731
- user_id: options?.userID,
1732
- sku_ids: options?.skuIDs,
1799
+ user_id: options?.userId,
1800
+ sku_ids: options?.skuIds,
1733
1801
  before: options?.before,
1734
1802
  after: options?.after,
1735
1803
  limit: options?.limit,
1736
- guild_id: options?.guildID,
1804
+ guild_id: options?.guildId,
1737
1805
  exclude_ended: options?.excludeEnded,
1738
1806
  exclude_deleted: options?.excludeDeleted,
1739
1807
  },
@@ -1759,13 +1827,13 @@ class Client extends node_events_1.default {
1759
1827
  };
1760
1828
  }
1761
1829
  /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
1762
- async getGlobalApplicationCommand(applicationID, commandID) {
1763
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommand(applicationID, commandID));
1830
+ async getGlobalApplicationCommand(applicationId, commandId) {
1831
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommand(applicationId, commandId));
1764
1832
  return transformers_1.ApplicationCommands.applicationCommandFromRaw(response);
1765
1833
  }
1766
1834
  /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
1767
- async getGlobalApplicationCommands(applicationID, options) {
1768
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommands(applicationID), {
1835
+ async getGlobalApplicationCommands(applicationId, options) {
1836
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommands(applicationId), {
1769
1837
  query: {
1770
1838
  with_localizations: options.withLocalizations,
1771
1839
  },
@@ -1773,8 +1841,8 @@ class Client extends node_events_1.default {
1773
1841
  return response.map((applicationCommand) => transformers_1.ApplicationCommands.applicationCommandFromRaw(applicationCommand));
1774
1842
  }
1775
1843
  /** https://discord.com/developers/docs/resources/guild#get-guild */
1776
- async getGuild(guildID, options) {
1777
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guild(guildID), {
1844
+ async getGuild(guildId, options) {
1845
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guild(guildId), {
1778
1846
  query: {
1779
1847
  with_counts: options?.withCounts,
1780
1848
  },
@@ -1804,13 +1872,13 @@ class Client extends node_events_1.default {
1804
1872
  }));
1805
1873
  }
1806
1874
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
1807
- async getGuildApplicationCommand(applicationID, guildID, commandID) {
1808
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationGuildCommand(applicationID, guildID, commandID));
1875
+ async getGuildApplicationCommand(applicationId, guildId, commandId) {
1876
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId));
1809
1877
  return transformers_1.ApplicationCommands.applicationCommandFromRaw(response);
1810
1878
  }
1811
1879
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
1812
- async getGuildApplicationCommands(applicationID, guildID, options) {
1813
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationGuildCommands(applicationID, guildID), {
1880
+ async getGuildApplicationCommands(applicationId, guildId, options) {
1881
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
1814
1882
  query: {
1815
1883
  with_localizations: options?.withLocalizations,
1816
1884
  },
@@ -1818,21 +1886,21 @@ class Client extends node_events_1.default {
1818
1886
  return response.map((applicationCommand) => transformers_1.ApplicationCommands.applicationCommandFromRaw(applicationCommand));
1819
1887
  }
1820
1888
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
1821
- async getGuildApplicationCommandPermissions(applicationID, guildID) {
1822
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildApplicationCommandsPermissions(applicationID, guildID));
1889
+ async getGuildApplicationCommandPermissions(applicationId, guildId) {
1890
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildApplicationCommandsPermissions(applicationId, guildId));
1823
1891
  return transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(response);
1824
1892
  }
1825
1893
  /** https://discord.com/developers/docs/resources/guild#get-guild-ban */
1826
- async getGuildBan(guildID, userID) {
1827
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildBan(guildID, userID));
1894
+ async getGuildBan(guildId, userId) {
1895
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildBan(guildId, userId));
1828
1896
  return {
1829
1897
  reason: response.reason,
1830
1898
  user: transformers_1.Users.userFromRaw(response.user),
1831
1899
  };
1832
1900
  }
1833
1901
  /** https://discord.com/developers/docs/resources/guild#get-guild-bans */
1834
- async getGuildBans(guildID, options) {
1835
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildBans(guildID), {
1902
+ async getGuildBans(guildId, options) {
1903
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildBans(guildId), {
1836
1904
  query: {
1837
1905
  limit: options?.limit,
1838
1906
  before: options?.before,
@@ -1845,33 +1913,33 @@ class Client extends node_events_1.default {
1845
1913
  }));
1846
1914
  }
1847
1915
  /** https://discord.com/developers/docs/resources/emoji#get-guild-emoji */
1848
- async getGuildEmoji(guildID, emojiID) {
1849
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildEmoji(guildID, emojiID));
1916
+ async getGuildEmoji(guildId, emojiId) {
1917
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildEmoji(guildId, emojiId));
1850
1918
  return transformers_1.Emojis.emojiFromRaw(response);
1851
1919
  }
1852
1920
  /** https://discord.com/developers/docs/resources/emoji#list-guild-emojis */
1853
- async getGuildEmojis(guildID) {
1854
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildEmojis(guildID));
1921
+ async getGuildEmojis(guildId) {
1922
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildEmojis(guildId));
1855
1923
  return response.map((emoji) => transformers_1.Emojis.emojiFromRaw(emoji));
1856
1924
  }
1857
1925
  /** https://discord.com/developers/docs/resources/guild#get-guild-integrations */
1858
- async getGuildIntegrations(guildID) {
1859
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildIntegrations(guildID));
1926
+ async getGuildIntegrations(guildId) {
1927
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildIntegrations(guildId));
1860
1928
  return response.map((integration) => transformers_1.Guilds.integrationFromRaw(integration));
1861
1929
  }
1862
1930
  /** https://discord.com/developers/docs/resources/guild#get-guild-invites */
1863
- async getGuildInvites(guildID) {
1864
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildInvites(guildID));
1931
+ async getGuildInvites(guildId) {
1932
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildInvites(guildId));
1865
1933
  return response.map((invite) => transformers_1.Invites.inviteFromRaw(invite));
1866
1934
  }
1867
1935
  /** https://discord.com/developers/docs/resources/guild#get-guild-member */
1868
- async getGuildMember(guildID, userID) {
1869
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMember(guildID, userID));
1936
+ async getGuildMember(guildId, userId) {
1937
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMember(guildId, userId));
1870
1938
  return transformers_1.Guilds.guildMemberFromRaw(response);
1871
1939
  }
1872
1940
  /** https://discord.com/developers/docs/resources/guild#list-guild-members */
1873
- async getGuildMembers(guildID, options) {
1874
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembers(guildID), {
1941
+ async getGuildMembers(guildId, options) {
1942
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembers(guildId), {
1875
1943
  query: {
1876
1944
  limit: options.limit,
1877
1945
  after: options.after,
@@ -1880,21 +1948,21 @@ class Client extends node_events_1.default {
1880
1948
  return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
1881
1949
  }
1882
1950
  /** https://discord.com/developers/docs/resources/guild#get-guild-onboarding */
1883
- async getGuildOnboarding(guildID) {
1884
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildOnboarding(guildID));
1951
+ async getGuildOnboarding(guildId) {
1952
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildOnboarding(guildId));
1885
1953
  return {
1886
- guildID: response.guild_id,
1954
+ guildId: response.guild_id,
1887
1955
  prompts: response.prompts.map((prompt) => ({
1888
1956
  id: prompt.id,
1889
1957
  type: prompt.type,
1890
1958
  options: prompt.options.map((promptOption) => ({
1891
1959
  id: promptOption.id,
1892
- channelIDs: promptOption.channel_ids,
1893
- roleIDs: promptOption.role_ids,
1960
+ channelIds: promptOption.channel_ids,
1961
+ roleIds: promptOption.role_ids,
1894
1962
  emoji: promptOption.emoji !== undefined
1895
1963
  ? transformers_1.Emojis.emojiFromRaw(promptOption.emoji)
1896
1964
  : undefined,
1897
- emojiID: promptOption.emoji_id,
1965
+ emojiId: promptOption.emoji_id,
1898
1966
  emojiName: promptOption.emoji_name,
1899
1967
  emojiAnimated: promptOption.emoji_animated,
1900
1968
  title: promptOption.title,
@@ -1905,14 +1973,14 @@ class Client extends node_events_1.default {
1905
1973
  required: prompt.required,
1906
1974
  inOnboarding: prompt.in_onboarding,
1907
1975
  })),
1908
- defaultChannelIDs: response.default_channel_ids,
1976
+ defaultChannelIds: response.default_channel_ids,
1909
1977
  enabled: response.enabled,
1910
1978
  mode: response.mode,
1911
1979
  };
1912
1980
  }
1913
1981
  /** https://discord.com/developers/docs/resources/guild#get-guild-preview */
1914
- async getGuildPreview(guildID) {
1915
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildPreview(guildID));
1982
+ async getGuildPreview(guildId) {
1983
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildPreview(guildId));
1916
1984
  return {
1917
1985
  id: response.id,
1918
1986
  name: response.name,
@@ -1928,8 +1996,8 @@ class Client extends node_events_1.default {
1928
1996
  };
1929
1997
  }
1930
1998
  /** https://discord.com/developers/docs/resources/guild#get-guild-prune-count */
1931
- getGuildPruneCount(guildID, options) {
1932
- return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildPrune(guildID), {
1999
+ getGuildPruneCount(guildId, options) {
2000
+ return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildPrune(guildId), {
1933
2001
  query: {
1934
2002
  days: options.days,
1935
2003
  include_roles: options.includeRoles,
@@ -1937,18 +2005,18 @@ class Client extends node_events_1.default {
1937
2005
  });
1938
2006
  }
1939
2007
  /** https://discord.com/developers/docs/resources/guild#get-guild-role */
1940
- async getGuildRole(guildID, roleID) {
1941
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRole(guildID, roleID));
2008
+ async getGuildRole(guildId, roleId) {
2009
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRole(guildId, roleId));
1942
2010
  return transformers_1.Roles.roleFromRaw(response);
1943
2011
  }
1944
2012
  /** https://discord.com/developers/docs/resources/guild#get-guild-roles */
1945
- async getGuildRoles(guildID) {
1946
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildID));
2013
+ async getGuildRoles(guildId) {
2014
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildId));
1947
2015
  return response.map((role) => transformers_1.Roles.roleFromRaw(role));
1948
2016
  }
1949
2017
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild */
1950
- async getGuildScheduledEvents(guildID, options) {
1951
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildScheduledEvents(guildID), {
2018
+ async getGuildScheduledEvents(guildId, options) {
2019
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildScheduledEvents(guildId), {
1952
2020
  query: {
1953
2021
  with_user_count: options?.withUserCount,
1954
2022
  },
@@ -1956,8 +2024,8 @@ class Client extends node_events_1.default {
1956
2024
  return response.map((guildScheduledEvent) => transformers_1.GuildScheduledEvents.guildScheduledEventFromRaw(guildScheduledEvent));
1957
2025
  }
1958
2026
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users */
1959
- async getGuildScheduledEventUsers(guildID, guildScheduledEventID, options) {
1960
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildScheduledEvent(guildID, guildScheduledEventID), {
2027
+ async getGuildScheduledEventUsers(guildId, guildScheduledEventId, options) {
2028
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId), {
1961
2029
  query: {
1962
2030
  limit: options?.limit,
1963
2031
  with_member: options?.withMember,
@@ -1966,7 +2034,7 @@ class Client extends node_events_1.default {
1966
2034
  },
1967
2035
  });
1968
2036
  return response.map((guildScheduledEventUser) => ({
1969
- guildScheduledEventID: guildScheduledEventUser.guild_scheduled_event_id,
2037
+ guildScheduledEventId: guildScheduledEventUser.guild_scheduled_event_id,
1970
2038
  user: transformers_1.Users.userFromRaw(guildScheduledEventUser.user),
1971
2039
  member: guildScheduledEventUser.member !== undefined
1972
2040
  ? transformers_1.Guilds.guildMemberFromRaw(guildScheduledEventUser.member)
@@ -1974,43 +2042,43 @@ class Client extends node_events_1.default {
1974
2042
  }));
1975
2043
  }
1976
2044
  /** https://discord.com/developers/docs/resources/sticker#get-guild-sticker */
1977
- async getGuildSticker(guildID, stickerID) {
1978
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSticker(guildID, stickerID));
2045
+ async getGuildSticker(guildId, stickerId) {
2046
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSticker(guildId, stickerId));
1979
2047
  return transformers_1.Stickers.stickerFromRaw(response);
1980
2048
  }
1981
2049
  /** https://discord.com/developers/docs/resources/sticker#list-guild-stickers */
1982
- async getGuildStickers(guildID) {
1983
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildStickers(guildID));
2050
+ async getGuildStickers(guildId) {
2051
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildStickers(guildId));
1984
2052
  return response.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker));
1985
2053
  }
1986
2054
  /** https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound */
1987
- async getGuildSoundboardSound(guildID, soundID) {
1988
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildID, soundID));
2055
+ async getGuildSoundboardSound(guildId, soundId) {
2056
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSound(guildId, soundId));
1989
2057
  return transformers_1.Soundboards.soundboardSoundFromRaw(response);
1990
2058
  }
1991
- async getGuildSoundboardSounds(guildID) {
1992
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildID));
2059
+ async getGuildSoundboardSounds(guildId) {
2060
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSoundboardSounds(guildId));
1993
2061
  return {
1994
2062
  items: response.items.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound)),
1995
2063
  };
1996
2064
  }
1997
2065
  /** https://discord.com/developers/docs/resources/guild-template#get-guild-template */
1998
- async getGuildTemplate(guildID, code) {
1999
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplate(guildID, code));
2066
+ async getGuildTemplate(guildId, code) {
2067
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplate(guildId, code));
2000
2068
  return transformers_1.GuildTemplates.guildTemplateFromRaw(response);
2001
2069
  }
2002
2070
  /** https://discord.com/developers/docs/resources/guild-template#get-guild-templates */
2003
- async getGuildTemplates(guildID) {
2004
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplates(guildID));
2071
+ async getGuildTemplates(guildId) {
2072
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplates(guildId));
2005
2073
  return response.map((guildTemplate) => transformers_1.GuildTemplates.guildTemplateFromRaw(guildTemplate));
2006
2074
  }
2007
2075
  /** https://discord.com/developers/docs/resources/guild#get-guild-vanity-url */
2008
- getGuildVanityURL(guildID) {
2009
- return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVanityURL(guildID));
2076
+ getGuildVanityURL(guildId) {
2077
+ return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVanityURL(guildId));
2010
2078
  }
2011
2079
  /** https://discord.com/developers/docs/resources/guild#get-guild-voice-regions */
2012
- async getGuildVoiceRegions(guildID) {
2013
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceRegions(guildID));
2080
+ async getGuildVoiceRegions(guildId) {
2081
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceRegions(guildId));
2014
2082
  return response.map((voiceRegion) => ({
2015
2083
  id: voiceRegion.id,
2016
2084
  name: voiceRegion.name,
@@ -2020,21 +2088,21 @@ class Client extends node_events_1.default {
2020
2088
  }));
2021
2089
  }
2022
2090
  /** https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */
2023
- async getGuildWelcomeScreen(guildID) {
2024
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWelcomeScreen(guildID));
2091
+ async getGuildWelcomeScreen(guildId) {
2092
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWelcomeScreen(guildId));
2025
2093
  return {
2026
2094
  description: response.description,
2027
2095
  welcomeChannels: response.welcome_channels.map((welcomeScreenChannel) => ({
2028
- channelID: welcomeScreenChannel.channel_id,
2096
+ channelId: welcomeScreenChannel.channel_id,
2029
2097
  description: welcomeScreenChannel.description,
2030
- emojiID: welcomeScreenChannel.emoji_id,
2098
+ emojiId: welcomeScreenChannel.emoji_id,
2031
2099
  emojiName: welcomeScreenChannel.emoji_name,
2032
2100
  })),
2033
2101
  };
2034
2102
  }
2035
2103
  /** https://discord.com/developers/docs/resources/guild#get-guild-widget */
2036
- async getGuildWidget(guildID) {
2037
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetJSON(guildID));
2104
+ async getGuildWidget(guildId) {
2105
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetJSON(guildId));
2038
2106
  return {
2039
2107
  id: response.id,
2040
2108
  name: response.name,
@@ -2045,35 +2113,35 @@ class Client extends node_events_1.default {
2045
2113
  };
2046
2114
  }
2047
2115
  /** https://discord.com/developers/docs/resources/guild#get-guild-widget-image */
2048
- getGuildWidgetImage(guildID, options) {
2049
- return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetImage(guildID), {
2116
+ getGuildWidgetImage(guildId, options) {
2117
+ return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetImage(guildId), {
2050
2118
  query: {
2051
2119
  style: options?.style,
2052
2120
  },
2053
2121
  });
2054
2122
  }
2055
2123
  /** https://discord.com/developers/docs/resources/guild#get-guild-widget-settings */
2056
- async getGuildWidgetSettings(guildID) {
2057
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetSettings(guildID));
2124
+ async getGuildWidgetSettings(guildId) {
2125
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetSettings(guildId));
2058
2126
  return {
2059
2127
  enabled: response.enabled,
2060
- channelID: response.channel_id,
2128
+ channelId: response.channel_id,
2061
2129
  };
2062
2130
  }
2063
2131
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message */
2064
- async getInteractionFollowupMessage(applicationID, interactionToken, messageID, options) {
2065
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(applicationID, interactionToken, messageID), {
2132
+ async getInteractionFollowupMessage(applicationId, interactionToken, messageId, options) {
2133
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId), {
2066
2134
  query: {
2067
- thread_id: options?.threadID,
2135
+ thread_id: options?.threadId,
2068
2136
  },
2069
2137
  });
2070
2138
  return transformers_1.Messages.messageFromRaw(response);
2071
2139
  }
2072
2140
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response */
2073
- async getInteractionResponse(applicationID, interactionToken, options) {
2074
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(applicationID, interactionToken), {
2141
+ async getInteractionResponse(applicationId, interactionToken, options) {
2142
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(applicationId, interactionToken), {
2075
2143
  query: {
2076
- thread_id: options?.threadID,
2144
+ thread_id: options?.threadId,
2077
2145
  },
2078
2146
  });
2079
2147
  return transformers_1.Messages.messageFromRaw(response);
@@ -2083,15 +2151,14 @@ class Client extends node_events_1.default {
2083
2151
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.invite(code), {
2084
2152
  query: {
2085
2153
  with_counts: options?.withCounts,
2086
- with_expiration: options?.withExpiration,
2087
- guild_scheduled_event_id: options?.guildScheduledEventID,
2154
+ guild_scheduled_event_id: options?.guildScheduledEventId,
2088
2155
  },
2089
2156
  });
2090
2157
  return transformers_1.Invites.inviteFromRaw(response);
2091
2158
  }
2092
2159
  /** https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads */
2093
- async getJoinedPrivateArchivedThreads(channelID, options) {
2094
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelThreads(channelID, "private", true), {
2160
+ async getJoinedPrivateArchivedThreads(channelId, options) {
2161
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelThreads(channelId, "private", true), {
2095
2162
  query: {
2096
2163
  before: options?.before,
2097
2164
  limit: options?.limit,
@@ -2103,14 +2170,19 @@ class Client extends node_events_1.default {
2103
2170
  hasMore: response.has_more,
2104
2171
  };
2105
2172
  }
2173
+ /** https://discord.com/developers/docs/resources/lobby#get-lobby */
2174
+ async getLobby(lobbyId) {
2175
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.lobby(lobbyId));
2176
+ return transformers_1.Lobbies.lobbyFromRaw(response);
2177
+ }
2106
2178
  /** https://discord.com/developers/docs/resources/message#get-channel-message */
2107
- async getMessage(channelID, messageID) {
2108
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessage(channelID, messageID));
2179
+ async getMessage(channelId, messageId) {
2180
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessage(channelId, messageId));
2109
2181
  return transformers_1.Messages.messageFromRaw(response);
2110
2182
  }
2111
2183
  /** https://discord.com/developers/docs/resources/message#get-reactions */
2112
- async getMessageReactions(channelID, messageID, emoji, options) {
2113
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessageAllReactions(channelID, messageID, emoji), {
2184
+ async getMessageReactions(channelId, messageId, emoji, options) {
2185
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessageAllReactions(channelId, messageId, emoji), {
2114
2186
  query: {
2115
2187
  type: options?.type,
2116
2188
  after: options?.after,
@@ -2120,8 +2192,8 @@ class Client extends node_events_1.default {
2120
2192
  return response.map((user) => transformers_1.Users.userFromRaw(user));
2121
2193
  }
2122
2194
  /** https://discord.com/developers/docs/resources/message#get-channel-messages */
2123
- async getMessages(channelID, options) {
2124
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessages(channelID), {
2195
+ async getMessages(channelId, options) {
2196
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessages(channelId), {
2125
2197
  query: {
2126
2198
  around: options.around,
2127
2199
  before: options.before,
@@ -2149,8 +2221,8 @@ class Client extends node_events_1.default {
2149
2221
  };
2150
2222
  }
2151
2223
  /** https://discord.com/developers/docs/resources/channel#get-pinned-messages */
2152
- async getPinnedMessages(channelID, options) {
2153
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelPins(channelID), {
2224
+ async getPinnedMessages(channelId, options) {
2225
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelPins(channelId), {
2154
2226
  query: options,
2155
2227
  });
2156
2228
  return {
@@ -2162,8 +2234,8 @@ class Client extends node_events_1.default {
2162
2234
  };
2163
2235
  }
2164
2236
  /** https://discord.com/developers/docs/resources/poll#get-answer-voters */
2165
- async getPollAnswerVoters(channelID, messageID, answerID, options) {
2166
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.pollAnswerVoters(channelID, messageID, answerID), {
2237
+ async getPollAnswerVoters(channelId, messageId, answerId, options) {
2238
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.pollAnswerVoters(channelId, messageId, answerId), {
2167
2239
  query: {
2168
2240
  after: options?.after,
2169
2241
  limit: options?.limit,
@@ -2174,43 +2246,43 @@ class Client extends node_events_1.default {
2174
2246
  };
2175
2247
  }
2176
2248
  /** https://discord.com/developers/docs/resources/sku#list-skus */
2177
- async getSKUs(applicationID) {
2178
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationSKUs(applicationID));
2249
+ async getSKUs(applicationId) {
2250
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationSKUs(applicationId));
2179
2251
  return response.map((sku) => transformers_1.SKUs.skuFromRaw(sku));
2180
2252
  }
2181
2253
  /** https://discord.com/developers/docs/resources/subscription#get-sku-subscription */
2182
- async getSKUSubscription(skuID, subscriptionID) {
2183
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscription(skuID, subscriptionID));
2254
+ async getSKUSubscription(skuId, subscriptionId) {
2255
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscription(skuId, subscriptionId));
2184
2256
  return transformers_1.Subscriptions.subscriptionFromRaw(response);
2185
2257
  }
2186
2258
  /** https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions */
2187
- async getSKUSubscriptions(skuID, options) {
2188
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscriptions(skuID), {
2259
+ async getSKUSubscriptions(skuId, options) {
2260
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscriptions(skuId), {
2189
2261
  query: {
2190
2262
  before: options.before,
2191
2263
  after: options.after,
2192
2264
  limit: options.limit,
2193
- user_id: options.userID,
2265
+ user_id: options.userId,
2194
2266
  },
2195
2267
  });
2196
2268
  return response.map((subscription) => transformers_1.Subscriptions.subscriptionFromRaw(subscription));
2197
2269
  }
2198
2270
  /** https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */
2199
- async getStageInstance(channelID) {
2200
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stageInstance(channelID));
2271
+ async getStageInstance(channelId) {
2272
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stageInstance(channelId));
2201
2273
  return transformers_1.StageInstances.stageInstanceFromRaw(response);
2202
2274
  }
2203
2275
  /** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
2204
- async getStickerPack(packID) {
2205
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPack(packID));
2276
+ async getStickerPack(packId) {
2277
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPack(packId));
2206
2278
  return {
2207
2279
  id: response.id,
2208
2280
  stickers: response.stickers.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker)),
2209
2281
  name: response.name,
2210
- skuID: response.sku_id,
2211
- coverStickerID: response.cover_sticker_id,
2282
+ skuId: response.sku_id,
2283
+ coverStickerId: response.cover_sticker_id,
2212
2284
  description: response.description,
2213
- bannerAssetID: response.banner_asset_id,
2285
+ bannerAssetId: response.banner_asset_id,
2214
2286
  };
2215
2287
  }
2216
2288
  /** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
@@ -2221,16 +2293,16 @@ class Client extends node_events_1.default {
2221
2293
  id: stickerPack.id,
2222
2294
  stickers: stickerPack.stickers.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker)),
2223
2295
  name: stickerPack.name,
2224
- skuID: stickerPack.sku_id,
2225
- coverStickerID: stickerPack.cover_sticker_id,
2296
+ skuId: stickerPack.sku_id,
2297
+ coverStickerId: stickerPack.cover_sticker_id,
2226
2298
  description: stickerPack.description,
2227
- bannerAssetID: stickerPack.banner_asset_id,
2299
+ bannerAssetId: stickerPack.banner_asset_id,
2228
2300
  })),
2229
2301
  };
2230
2302
  }
2231
2303
  /** https://discord.com/developers/docs/resources/channel#get-thread-member */
2232
- async getThreadMember(channelID, userID, options) {
2233
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.threadMembers(channelID, userID), {
2304
+ async getThreadMember(channelId, userId, options) {
2305
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.threadMembers(channelId, userId), {
2234
2306
  query: {
2235
2307
  with_member: options?.withMember,
2236
2308
  },
@@ -2238,8 +2310,8 @@ class Client extends node_events_1.default {
2238
2310
  return transformers_1.Channels.threadMemberFromRaw(response);
2239
2311
  }
2240
2312
  /** https://discord.com/developers/docs/resources/channel#list-thread-members */
2241
- async getThreadMembers(channelID, options) {
2242
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.threadMembers(channelID), {
2313
+ async getThreadMembers(channelId, options) {
2314
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.threadMembers(channelId), {
2243
2315
  query: {
2244
2316
  with_member: options?.withMember,
2245
2317
  after: options?.after,
@@ -2249,8 +2321,8 @@ class Client extends node_events_1.default {
2249
2321
  return response.map((threadMember) => transformers_1.Channels.threadMemberFromRaw(threadMember));
2250
2322
  }
2251
2323
  /** https://discord.com/developers/docs/resources/user#get-user */
2252
- async getUser(userID) {
2253
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.user(userID));
2324
+ async getUser(userId) {
2325
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.user(userId));
2254
2326
  return transformers_1.Users.userFromRaw(response);
2255
2327
  }
2256
2328
  /** https://discord.com/developers/docs/resources/voice#list-voice-regions */
@@ -2265,89 +2337,106 @@ class Client extends node_events_1.default {
2265
2337
  }));
2266
2338
  }
2267
2339
  /** https://discord.com/developers/docs/resources/voice#get-user-voice-state */
2268
- async getUserVoiceState(guildID, userID) {
2269
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID, userID));
2340
+ async getUserVoiceState(guildId, userId) {
2341
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildId, userId));
2270
2342
  return transformers_1.Voice.voiceStateFromRaw(response);
2271
2343
  }
2272
2344
  /** https://discord.com/developers/docs/resources/webhook#get-webhook-message */
2273
- async getWebhookMessage(webhookID, webhookToken, messageID, options) {
2274
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(webhookID, webhookToken, messageID), {
2345
+ async getWebhookMessage(webhookId, webhookToken, messageId, options) {
2346
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
2275
2347
  query: {
2276
- thread_id: options?.threadID,
2348
+ thread_id: options?.threadId,
2277
2349
  },
2278
2350
  });
2279
2351
  return transformers_1.Messages.messageFromRaw(response);
2280
2352
  }
2281
2353
  /** https://discord.com/developers/docs/resources/webhook#get-guild-webhooks */
2282
- async getWebhooks(guildID) {
2283
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWebhooks(guildID));
2354
+ async getWebhooks(guildId) {
2355
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWebhooks(guildId));
2284
2356
  return response.map((webhook) => transformers_1.Webhooks.webhookFromRaw(webhook));
2285
2357
  }
2286
2358
  /** https://discord.com/developers/docs/resources/channel#join-thread */
2287
- joinThread(channelID) {
2288
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelID));
2359
+ joinThread(channelId) {
2360
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelId));
2289
2361
  }
2290
2362
  /** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
2291
- joinVoiceChannel(guildID, channelID, options) {
2292
- this.shards.get(this.guildShardMap[guildID]).updateVoiceState({
2293
- guildID,
2294
- channelID,
2363
+ joinVoiceChannel(guildId, channelId, options) {
2364
+ this.shards.get(this.guildShardMap[guildId]).updateVoiceState({
2365
+ guildId,
2366
+ channelId,
2295
2367
  selfMute: !!options?.selfMute,
2296
2368
  selfDeaf: !!options?.selfDeaf,
2297
2369
  });
2298
2370
  }
2299
2371
  /** https://discord.com/developers/docs/resources/user#leave-guild */
2300
- leaveGuild(guildID) {
2301
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.userGuild(guildID));
2372
+ leaveGuild(guildId) {
2373
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.userGuild(guildId));
2374
+ }
2375
+ /** https://discord.com/developers/docs/resources/lobby#leave-lobby */
2376
+ leaveLobby(lobbyId) {
2377
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.lobbyMember(lobbyId));
2302
2378
  }
2303
2379
  /** https://discord.com/developers/docs/resources/channel#leave-thread */
2304
- leaveThread(channelID) {
2305
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelID, "@me"));
2380
+ leaveThread(channelId) {
2381
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelId, "@me"));
2306
2382
  }
2307
2383
  /** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
2308
- leaveVoiceChannel(guildID) {
2309
- this.shards.get(this.guildShardMap[guildID]).updateVoiceState({
2310
- guildID,
2311
- channelID: null,
2384
+ leaveVoiceChannel(guildId) {
2385
+ this.shards.get(this.guildShardMap[guildId]).updateVoiceState({
2386
+ guildId,
2387
+ channelId: null,
2312
2388
  selfMute: false,
2313
2389
  selfDeaf: false,
2314
2390
  });
2315
2391
  }
2392
+ /** discord.com/developers/docs/resources/lobby#link-channel-to-lobby */
2393
+ async linkChannel(lobbyId, options) {
2394
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.lobbyChannelLinking(lobbyId), {
2395
+ json: {
2396
+ channel_id: options.channelId,
2397
+ },
2398
+ });
2399
+ return transformers_1.Lobbies.lobbyFromRaw(response);
2400
+ }
2316
2401
  /** https://discord.com/developers/docs/resources/channel#pin-message */
2317
- pinMessage(channelID, messageID, reason) {
2318
- this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelPin(channelID, messageID), {
2402
+ pinMessage(channelId, messageId, reason) {
2403
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelPin(channelId, messageId), {
2319
2404
  reason,
2320
2405
  });
2321
2406
  }
2322
2407
  /** https://discord.com/developers/docs/resources/guild#remove-guild-ban */
2323
- removeBan(guildID, userID, reason) {
2324
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildBan(guildID, userID), {
2408
+ removeBan(guildId, userId, reason) {
2409
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildBan(guildId, userId), {
2325
2410
  reason,
2326
2411
  });
2327
2412
  }
2328
2413
  /** https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient */
2329
- removeGroupRecipient(channelID, userID) {
2330
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelRecipient(channelID, userID));
2414
+ removeGroupRecipient(channelId, userId) {
2415
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelRecipient(channelId, userId));
2331
2416
  }
2332
2417
  /** https://discord.com/developers/docs/resources/guild#remove-guild-member */
2333
- removeGuildMember(guildID, userID, reason) {
2334
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildMember(guildID, userID), {
2418
+ removeGuildMember(guildId, userId, reason) {
2419
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildMember(guildId, userId), {
2335
2420
  reason,
2336
2421
  });
2337
2422
  }
2338
2423
  /** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
2339
- removeGuildMemberRole(guildID, userID, roleID, reason) {
2340
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildMemberRole(guildID, userID, roleID), {
2424
+ removeGuildMemberRole(guildId, userId, roleId, reason) {
2425
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildMemberRole(guildId, userId, roleId), {
2341
2426
  reason,
2342
2427
  });
2343
2428
  }
2429
+ /** https://discord.com/developers/docs/resources/lobby#remove-a-member-from-a-lobby */
2430
+ removeLobbyMember(lobbyId, userId) {
2431
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.lobbyMember(lobbyId, userId));
2432
+ }
2344
2433
  /** https://discord.com/developers/docs/resources/channel#remove-thread-member */
2345
- removeThreadMember(channelID, userID) {
2346
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelID, userID));
2434
+ removeThreadMember(channelId, userId) {
2435
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelId, userId));
2347
2436
  }
2348
2437
  /** https://discord.com/developers/docs/resources/guild#search-guild-members */
2349
- async searchGuildMembers(guildID, options) {
2350
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembersSearch(guildID), {
2438
+ async searchGuildMembers(guildId, options) {
2439
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembersSearch(guildId), {
2351
2440
  query: {
2352
2441
  query: options.query,
2353
2442
  limit: options.limit,
@@ -2356,11 +2445,11 @@ class Client extends node_events_1.default {
2356
2445
  return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
2357
2446
  }
2358
2447
  /** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
2359
- sendSoundboardSound(channelID, options) {
2360
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelID), {
2448
+ sendSoundboardSound(channelId, options) {
2449
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelId), {
2361
2450
  json: {
2362
- sound_id: options.soundID,
2363
- source_guild_id: options.sourceGuildID,
2451
+ sound_id: options.soundId,
2452
+ source_guild_id: options.sourceGuildId,
2364
2453
  },
2365
2454
  });
2366
2455
  }
@@ -2369,22 +2458,27 @@ class Client extends node_events_1.default {
2369
2458
  this.shards.forEach((shard) => shard.updatePresence(options));
2370
2459
  }
2371
2460
  /** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
2372
- async syncGuildTemplate(guildID, code) {
2373
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildID, code));
2461
+ async syncGuildTemplate(guildId, code) {
2462
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code));
2374
2463
  return transformers_1.GuildTemplates.guildTemplateFromRaw(response);
2375
2464
  }
2376
2465
  /** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
2377
- triggerTypingIndicator(channelID) {
2378
- this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelTyping(channelID));
2466
+ triggerTypingIndicator(channelId) {
2467
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelTyping(channelId));
2468
+ }
2469
+ /** https://discord.com/developers/docs/resources/lobby#unlink-channel-from-lobby */
2470
+ async unlinkChannel(lobbyId) {
2471
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.lobbyChannelLinking(lobbyId));
2472
+ return transformers_1.Lobbies.lobbyFromRaw(response);
2379
2473
  }
2380
2474
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
2381
- async updateApplicationRoleConnectionMetadataRecords(applicationID) {
2382
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationID));
2475
+ async updateApplicationRoleConnectionMetadataRecords(applicationId) {
2476
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationId));
2383
2477
  return response.map((applicationRoleConnectionMetadata) => transformers_1.ApplicationRoleConnectionMetadatas.applicationRoleConnectionMetadataFromRaw(applicationRoleConnectionMetadata));
2384
2478
  }
2385
2479
  /** https://discord.com/developers/docs/resources/user#update-current-user-application-role-connection */
2386
- async updateCurrentApplicationRoleConnection(applicationID, options) {
2387
- const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.userApplicationRoleConnection(applicationID), {
2480
+ async updateCurrentApplicationRoleConnection(applicationId, options) {
2481
+ const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.userApplicationRoleConnection(applicationId), {
2388
2482
  json: {
2389
2483
  platform_name: options.platformName,
2390
2484
  platform_username: options.platformUsername,
@@ -2400,8 +2494,8 @@ class Client extends node_events_1.default {
2400
2494
  };
2401
2495
  }
2402
2496
  /** https://discord.com/developers/docs/resources/channel#unpin-message */
2403
- unpinMessage(channelID, messageID, reason) {
2404
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPin(channelID, messageID), {
2497
+ unpinMessage(channelId, messageId, reason) {
2498
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPin(channelId, messageId), {
2405
2499
  reason,
2406
2500
  });
2407
2501
  }