@discordeno/rest 19.0.0-next.40c19da → 19.0.0-next.40eaf17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import type { ApplicationCommandPermissions, AtLeastOne, BeginGuildPrune, BigString, Camelize, CreateApplicationCommand, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGuild, CreateGuildBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, DiscordActiveThreads, DiscordApplication, DiscordApplicationCommand, DiscordApplicationCommandPermissions, DiscordArchivedThreads, DiscordAuditLog, DiscordAutoModerationRule, DiscordBan, DiscordChannel, DiscordEmoji, DiscordFollowedChannel, DiscordGetGatewayBot, DiscordGuild, DiscordGuildPreview, DiscordGuildWidget, DiscordGuildWidgetSettings, DiscordIntegration, DiscordInvite, DiscordInviteMetadata, DiscordMember, DiscordMemberWithUser, DiscordMessage, DiscordModifyGuildWelcomeScreen, DiscordPrunedCount, DiscordRole, DiscordScheduledEvent, DiscordStageInstance, DiscordSticker, DiscordStickerPack, DiscordTemplate, DiscordThreadMember, DiscordUser, DiscordVanityUrl, DiscordVoiceRegion, DiscordWebhook, DiscordWelcomeScreen, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditStageInstanceOptions, EditUserVoiceState, ExecuteWebhook, GetBans, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetReactions, GetScheduledEvents, GetScheduledEventUsers, GetWebhookMessageOptions, InteractionCallbackData, InteractionResponse, ListArchivedThreads, ListGuildMembers, MfaLevels, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildTemplate, ModifyRolePositions, ModifyWebhook, SearchMembers, StartThreadWithMessage, StartThreadWithoutMessage, WithReason } from '@discordeno/types';
1
+ import type { ApplicationCommandPermissions, AtLeastOne, BeginGuildPrune, BigString, Camelize, CamelizedDiscordActiveThreads, CamelizedDiscordApplication, CamelizedDiscordApplicationCommand, CamelizedDiscordApplicationCommandPermissions, CamelizedDiscordArchivedThreads, CamelizedDiscordAuditLog, CamelizedDiscordAutoModerationRule, CamelizedDiscordBan, CamelizedDiscordChannel, CamelizedDiscordEmoji, CamelizedDiscordFollowedChannel, CamelizedDiscordGetGatewayBot, CamelizedDiscordGuild, CamelizedDiscordGuildPreview, CamelizedDiscordGuildWidget, CamelizedDiscordGuildWidgetSettings, CamelizedDiscordIntegration, CamelizedDiscordInvite, CamelizedDiscordInviteMetadata, CamelizedDiscordMember, CamelizedDiscordMemberWithUser, CamelizedDiscordMessage, CamelizedDiscordModifyGuildWelcomeScreen, CamelizedDiscordPrunedCount, CamelizedDiscordRole, CamelizedDiscordScheduledEvent, CamelizedDiscordStageInstance, CamelizedDiscordSticker, CamelizedDiscordStickerPack, CamelizedDiscordTemplate, CamelizedDiscordThreadMember, CamelizedDiscordUser, CamelizedDiscordVanityUrl, CamelizedDiscordVoiceRegion, CamelizedDiscordWebhook, CamelizedDiscordWelcomeScreen, CreateApplicationCommand, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGuild, CreateGuildBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditUserVoiceState, ExecuteWebhook, FileContent, GetBans, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetReactions, GetScheduledEvents, GetScheduledEventUsers, GetWebhookMessageOptions, InteractionCallbackData, InteractionResponse, ListArchivedThreads, ListGuildMembers, MfaLevels, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildTemplate, ModifyRolePositions, ModifyWebhook, SearchMembers, StartThreadWithMessage, StartThreadWithoutMessage } from '@discordeno/types';
2
2
  import type { InvalidRequestBucket } from './invalidBucket.js';
3
3
  import type { Queue } from './queue.js';
4
4
  import type { RestRoutes } from './typings/routes.js';
5
5
  export interface CreateRestManagerOptions {
6
6
  /** The bot token which will be used to make requests. */
7
- token: string;
7
+ token?: string;
8
8
  /**
9
9
  * For old bots that have a different bot id and application id.
10
10
  * @default bot id from token
@@ -29,7 +29,7 @@ export interface CreateRestManagerOptions {
29
29
  }
30
30
  export interface RestManager {
31
31
  /** The bot token which will be used to make requests. */
32
- token: string;
32
+ token?: string;
33
33
  /** The application id. Normally this is not required for recent bots but old bot's application id is sometimes different from the bot id so it is required for those bots. */
34
34
  applicationId: bigint;
35
35
  /** The api version to use when making requests. Only the latest supported version will be tested. */
@@ -40,6 +40,12 @@ export interface RestManager {
40
40
  * @default https://discord.com/api
41
41
  */
42
42
  baseUrl: string;
43
+ /**
44
+ * `true` if the `baseUrl` does not start with `https://discord.com/api`.
45
+ *
46
+ * Mostly used only for intern functions.
47
+ */
48
+ isProxied: boolean;
43
49
  /** The authorization header to attach when sending requests to the proxy. */
44
50
  authorization?: string;
45
51
  /** The maximum amount of times a request should be retried. Defaults to Infinity */
@@ -63,7 +69,7 @@ export interface RestManager {
63
69
  /** Reshapes and modifies the obj as needed to make it ready for discords api. */
64
70
  changeToDiscordFormat: (obj: any) => any;
65
71
  /** Creates the request body and headers that are necessary to send a request. Will handle different types of methods and everything necessary for discord. */
66
- createRequest: (options: CreateRequestBodyOptions) => RequestBody;
72
+ createRequestBody: (method: RequestMethods, options?: CreateRequestBodyOptions) => RequestBody;
67
73
  /** This will create a infinite loop running in 1 seconds using tail recursion to keep rate limits clean. When a rate limit resets, this will remove it so the queue can proceed. */
68
74
  processRateLimitedPaths: () => void;
69
75
  /** Processes the rate limit headers and determines if it needs to be rate limited and returns the bucket id if available */
@@ -73,19 +79,19 @@ export interface RestManager {
73
79
  /** Split a url to separate rate limit buckets based on major/minor parameters. */
74
80
  simplifyUrl: (url: string, method: RequestMethods) => string;
75
81
  /** Make a request to be sent to the api. */
76
- makeRequest: <T = unknown>(method: RequestMethods, url: string, body?: Record<string, any>, options?: Record<string, any>) => Promise<T>;
82
+ makeRequest: <T = unknown>(method: RequestMethods, url: string, options?: MakeRequestOptions) => Promise<T>;
77
83
  /** Takes a request and processes it into a queue. */
78
- processRequest: (request: SendRequestOptions) => void;
84
+ processRequest: (request: SendRequestOptions) => Promise<void>;
79
85
  /** Make a get request to the api */
80
- get: <T = void>(url: string) => Promise<Camelize<T>>;
86
+ get: <T = void>(url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<Camelize<T>>;
81
87
  /** Make a post request to the api. */
82
- post: <T = void>(url: string, body?: Record<string, any>) => Promise<Camelize<T>>;
88
+ post: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
83
89
  /** Make a put request to the api. */
84
- put: <T = void>(url: string, body?: Record<string, any>, options?: Record<string, any>) => Promise<Camelize<T>>;
90
+ put: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
85
91
  /** Make a delete request to the api. */
86
- delete: (url: string, body?: Record<string, any>) => Promise<void>;
92
+ delete: (url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<void>;
87
93
  /** Make a patch request to the api. */
88
- patch: <T = void>(url: string, body?: Record<string, any>) => Promise<Camelize<T>>;
94
+ patch: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
89
95
  /**
90
96
  * Adds a reaction to a message.
91
97
  *
@@ -130,6 +136,7 @@ export interface RestManager {
130
136
  * @param guildId - The ID of the guild the member to add the role to is in.
131
137
  * @param userId - The user ID of the member to add the role to.
132
138
  * @param roleId - The ID of the role to add to the member.
139
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
133
140
  *
134
141
  * @remarks
135
142
  * Requires the `MANAGE_ROLES` permission.
@@ -159,7 +166,8 @@ export interface RestManager {
159
166
  *
160
167
  * @param guildId - The ID of the guild to create the rule in.
161
168
  * @param options - The parameters for the creation of the rule.
162
- * @returns An instance of the created {@link DiscordAutoModerationRule}.
169
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
170
+ * @returns An instance of the created {@link CamelizedDiscordAutoModerationRule}.
163
171
  *
164
172
  * @remarks
165
173
  * Requires the `MANAGE_GUILD` permission.
@@ -168,13 +176,14 @@ export interface RestManager {
168
176
  *
169
177
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
170
178
  */
171
- createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions) => Promise<Camelize<DiscordAutoModerationRule>>;
179
+ createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
172
180
  /**
173
181
  * Creates a channel within a guild.
174
182
  *
175
183
  * @param guildId - The ID of the guild to create the channel within.
176
184
  * @param options - The parameters for the creation of the channel.
177
- * @returns An instance of the created {@link DiscordChannel}.
185
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
186
+ * @returns An instance of the created {@link CamelizedDiscordChannel}.
178
187
  *
179
188
  * @remarks
180
189
  * Requires the `MANAGE_CHANNELS` permission.
@@ -187,13 +196,14 @@ export interface RestManager {
187
196
  *
188
197
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
189
198
  */
190
- createChannel: (guildId: BigString, options: CreateGuildChannel) => Promise<Camelize<DiscordChannel>>;
199
+ createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
191
200
  /**
192
201
  * Creates an emoji in a guild.
193
202
  *
194
203
  * @param guildId - The ID of the guild in which to create the emoji.
195
204
  * @param options - The parameters for the creation of the emoji.
196
- * @returns An instance of the created {@link DiscordEmoji}.
205
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
206
+ * @returns An instance of the created {@link CamelizedDiscordEmoji}.
197
207
  *
198
208
  * @remarks
199
209
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -204,13 +214,14 @@ export interface RestManager {
204
214
  *
205
215
  * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
206
216
  */
207
- createEmoji: (guildId: BigString, options: CreateGuildEmoji) => Promise<Camelize<DiscordEmoji>>;
217
+ createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
208
218
  /**
209
219
  * Creates a new thread in a forum channel, and sends a message within the created thread.
210
220
  *
211
221
  * @param channelId - The ID of the forum channel to create the thread within.
212
222
  * @param options - The parameters for the creation of the thread.
213
- * @returns An instance of {@link DiscordChannel} with a nested {@link Message} object.
223
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
224
+ * @returns An instance of {@link CamelizedDiscordChannel} with a nested {@link Message} object.
214
225
  *
215
226
  * @remarks
216
227
  * Requires the `CREATE_MESSAGES` permission.
@@ -222,7 +233,7 @@ export interface RestManager {
222
233
  *
223
234
  * @experimental
224
235
  */
225
- createForumThread: (channelId: BigString, options: CreateForumPostWithMessage) => Promise<Camelize<DiscordChannel>>;
236
+ createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
226
237
  /**
227
238
  * Creates an application command accessible globally; across different guilds and channels.
228
239
  *
@@ -236,12 +247,12 @@ export interface RestManager {
236
247
  *
237
248
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
238
249
  */
239
- createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
250
+ createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
240
251
  /**
241
252
  * Creates a guild.
242
253
  *
243
254
  * @param options - The parameters for the creation of the guild.
244
- * @returns An instance of the created {@link DiscordGuild}.
255
+ * @returns An instance of the created {@link CamelizedDiscordGuild}.
245
256
  *
246
257
  * @remarks
247
258
  * ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
@@ -250,7 +261,7 @@ export interface RestManager {
250
261
  *
251
262
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
252
263
  */
253
- createGuild: (options: CreateGuild) => Promise<Camelize<DiscordGuild>>;
264
+ createGuild: (options: CreateGuild) => Promise<CamelizedDiscordGuild>;
254
265
  /**
255
266
  * Creates an application command only accessible in a specific guild.
256
267
  *
@@ -264,7 +275,7 @@ export interface RestManager {
264
275
  *
265
276
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
266
277
  */
267
- createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
278
+ createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
268
279
  /**
269
280
  * Creates a guild from a template.
270
281
  *
@@ -279,12 +290,13 @@ export interface RestManager {
279
290
  *
280
291
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
281
292
  */
282
- createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<Camelize<DiscordGuild>>;
293
+ createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<CamelizedDiscordGuild>;
283
294
  /**
284
295
  * Create a new sticker for the guild.
285
296
  *
286
297
  * @param guildId The ID of the guild to get
287
- * @return A {@link DiscordSticker}
298
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
299
+ * @return A {@link CamelizedDiscordSticker}
288
300
  *
289
301
  * @remarks
290
302
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -294,7 +306,7 @@ export interface RestManager {
294
306
  *
295
307
  * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}
296
308
  */
297
- createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions) => Promise<Camelize<DiscordSticker>>;
309
+ createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<CamelizedDiscordSticker>;
298
310
  /**
299
311
  * Creates a template from a guild.
300
312
  *
@@ -309,13 +321,14 @@ export interface RestManager {
309
321
  *
310
322
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
311
323
  */
312
- createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Camelize<DiscordTemplate>>;
324
+ createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<CamelizedDiscordTemplate>;
313
325
  /**
314
326
  * Creates an invite to a channel in a guild.
315
327
  *
316
328
  * @param channelId - The ID of the channel to create the invite to.
317
329
  * @param options - The parameters for the creation of the invite.
318
- * @returns An instance of the created {@link DiscordInvite}.
330
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
331
+ * @returns An instance of the created {@link CamelizedDiscordInvite}.
319
332
  *
320
333
  * @remarks
321
334
  * Requires the `CREATE_INSTANT_INVITE` permission.
@@ -327,13 +340,14 @@ export interface RestManager {
327
340
  *
328
341
  * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
329
342
  */
330
- createInvite: (channelId: BigString, options?: CreateChannelInvite) => Promise<Camelize<DiscordInvite>>;
343
+ createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<CamelizedDiscordInvite>;
331
344
  /**
332
345
  * Creates a role in a guild.
333
346
  *
334
347
  * @param guildId - The ID of the guild to create the role in.
335
348
  * @param options - The parameters for the creation of the role.
336
- * @returns An instance of the created {@link DiscordRole}.
349
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
350
+ * @returns An instance of the created {@link CamelizedDiscordRole}.
337
351
  *
338
352
  * @remarks
339
353
  * Requires the `MANAGE_ROLES` permission.
@@ -342,12 +356,13 @@ export interface RestManager {
342
356
  *
343
357
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
344
358
  */
345
- createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
359
+ createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
346
360
  /**
347
361
  * Creates a scheduled event in a guild.
348
362
  *
349
363
  * @param guildId - The ID of the guild to create the scheduled event in.
350
364
  * @param options - The parameters for the creation of the scheduled event.
365
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
351
366
  * @returns An instance of the created {@link ScheduledEvent}.
352
367
  *
353
368
  * @remarks
@@ -359,12 +374,13 @@ export interface RestManager {
359
374
  *
360
375
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
361
376
  */
362
- createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent) => Promise<Camelize<DiscordScheduledEvent>>;
377
+ createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
363
378
  /**
364
379
  * Creates a stage instance associated with a stage channel.
365
380
  *
366
381
  * @param options - The parameters for the creation of the stage instance.
367
- * @returns An instance of the created {@link DiscordStageInstance}.
382
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
383
+ * @returns An instance of the created {@link CamelizedDiscordStageInstance}.
368
384
  *
369
385
  * @remarks
370
386
  * Requires the user to be a moderator of the stage channel.
@@ -373,29 +389,31 @@ export interface RestManager {
373
389
  *
374
390
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance}
375
391
  */
376
- createStageInstance: (options: CreateStageInstance) => Promise<Camelize<DiscordStageInstance>>;
392
+ createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<CamelizedDiscordStageInstance>;
377
393
  /**
378
394
  * Creates a webhook.
379
395
  *
380
396
  * @param channelId - The ID of the channel to create the webhook in.
381
397
  * @param options - The parameters for the creation of the webhook.
382
- * @returns An instance of the created {@link DiscordWebhook}.
398
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
399
+ * @returns An instance of the created {@link CamelizedDiscordWebhook}.
383
400
  *
384
401
  * @remarks
385
402
  * Requires the `MANAGE_WEBHOOKS` permission.
386
403
  *
387
- * ⚠️ The webhook name must not contain the string 'clyde' (case-insensitive).
404
+ * ⚠️ The webhook name must not contain the substrings 'clyde', or 'discord' (case-insensitive).
388
405
  *
389
406
  * Fires a _Webhooks Update_ gateway event.
390
407
  *
391
408
  * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
392
409
  */
393
- createWebhook: (channelId: BigString, options: CreateWebhook) => Promise<Camelize<DiscordWebhook>>;
410
+ createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
394
411
  /**
395
412
  * Deletes an automod rule.
396
413
  *
397
414
  * @param guildId - The ID of the guild to delete the rule from.
398
415
  * @param ruleId - The ID of the automod rule to delete.
416
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
399
417
  *
400
418
  * @remarks
401
419
  * Requires the `MANAGE_GUILD` permission.
@@ -409,6 +427,7 @@ export interface RestManager {
409
427
  * Deletes a channel from within a guild.
410
428
  *
411
429
  * @param channelId - The ID of the channel to delete.
430
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
412
431
  * @returns An instance of the deleted {@link Channel}.
413
432
  *
414
433
  * @remarks
@@ -435,6 +454,7 @@ export interface RestManager {
435
454
  *
436
455
  * @param channelId - The ID of the channel to delete the permission override of.
437
456
  * @param overwriteId - The ID of the permission override to delete.
457
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
438
458
  *
439
459
  * @remarks
440
460
  * Requires the `MANAGE_ROLES` permission.
@@ -449,6 +469,7 @@ export interface RestManager {
449
469
  *
450
470
  * @param guildId - The ID of the guild from which to delete the emoji.
451
471
  * @param id - The ID of the emoji to delete.
472
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
452
473
  *
453
474
  * @remarks
454
475
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -506,7 +527,8 @@ export interface RestManager {
506
527
  * Delete a new sticker for the guild.
507
528
  *
508
529
  * @param guildId The ID of the guild to get
509
- * @return A {@link DiscordSticker}
530
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
531
+ * @return A {@link CamelizedDiscordSticker}
510
532
  *
511
533
  * @remarks
512
534
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -536,6 +558,7 @@ export interface RestManager {
536
558
  *
537
559
  * @param guildId - The ID of the guild from which to delete the integration.
538
560
  * @param integrationId - The ID of the integration to delete from the guild.
561
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
539
562
  *
540
563
  * @remarks
541
564
  * Requires the `MANAGE_GUILD` permission.
@@ -547,11 +570,12 @@ export interface RestManager {
547
570
  *
548
571
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}
549
572
  */
550
- deleteIntegration: (guildId: BigString, integrationId: BigString) => Promise<void>;
573
+ deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
551
574
  /**
552
575
  * Deletes an invite to a channel.
553
576
  *
554
577
  * @param inviteCode - The invite code of the invite to delete.
578
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
555
579
  *
556
580
  * @remarks
557
581
  * Requires the `MANAGE_CHANNELS` permission.
@@ -566,6 +590,7 @@ export interface RestManager {
566
590
  *
567
591
  * @param channelId - The ID of the channel to delete the message from.
568
592
  * @param messageId - The ID of the message to delete from the channel.
593
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
569
594
  *
570
595
  * @remarks
571
596
  * If not deleting own message:
@@ -581,6 +606,7 @@ export interface RestManager {
581
606
  *
582
607
  * @param channelId - The ID of the channel to delete the messages from.
583
608
  * @param messageIds - The IDs of the messages to delete from the channel.
609
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
584
610
  *
585
611
  * @remarks
586
612
  * Requires the `MANAGE_MESSAGES` permission.
@@ -658,6 +684,7 @@ export interface RestManager {
658
684
  *
659
685
  * @param guildId - The ID of the guild to delete the role from.
660
686
  * @param roleId - The ID of the role to delete.
687
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
661
688
  *
662
689
  * @remarks
663
690
  * Requires the `MANAGE_ROLES` permission.
@@ -666,7 +693,7 @@ export interface RestManager {
666
693
  *
667
694
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
668
695
  */
669
- deleteRole: (guildId: BigString, roleId: BigString) => Promise<void>;
696
+ deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
670
697
  /**
671
698
  * Deletes a scheduled event from a guild.
672
699
  *
@@ -685,6 +712,7 @@ export interface RestManager {
685
712
  * Deletes the stage instance associated with a stage channel, if one exists.
686
713
  *
687
714
  * @param channelId - The ID of the stage channel the stage instance is associated with.
715
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
688
716
  *
689
717
  * @remarks
690
718
  * Requires the user to be a moderator of the stage channel.
@@ -765,14 +793,15 @@ export interface RestManager {
765
793
  *
766
794
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
767
795
  */
768
- editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<Camelize<DiscordApplicationCommandPermissions>>;
796
+ editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<CamelizedDiscordApplicationCommandPermissions>;
769
797
  /**
770
798
  * Edits an automod rule.
771
799
  *
772
800
  * @param guildId - The ID of the guild to edit the rule in.
773
801
  * @param ruleId - The ID of the rule to edit.
774
802
  * @param options - The parameters for the edit of the rule.
775
- * @returns An instance of the edited {@link DiscordAutoModerationRule}.
803
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
804
+ * @returns An instance of the edited {@link CamelizedDiscordAutoModerationRule}.
776
805
  *
777
806
  * @remarks
778
807
  * Requires the `MANAGE_GUILD` permission.
@@ -781,7 +810,7 @@ export interface RestManager {
781
810
  *
782
811
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
783
812
  */
784
- editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>) => Promise<Camelize<DiscordAutoModerationRule>>;
813
+ editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
785
814
  /**
786
815
  * Modifies the bot's username or avatar.
787
816
  * NOTE: username: if changed may cause the bot's discriminator to be randomized.
@@ -789,13 +818,14 @@ export interface RestManager {
789
818
  editBotProfile: (options: {
790
819
  username?: string;
791
820
  botAvatarURL?: string | null;
792
- }) => Promise<Camelize<DiscordUser>>;
821
+ }) => Promise<CamelizedDiscordUser>;
793
822
  /**
794
823
  * Edits a channel's settings.
795
824
  *
796
825
  * @param channelId - The ID of the channel to edit.
797
826
  * @param options - The parameters for the edit of the channel.
798
- * @returns An instance of the edited {@link DiscordChannel}.
827
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
828
+ * @returns An instance of the edited {@link CamelizedDiscordChannel}.
799
829
  *
800
830
  * @remarks
801
831
  * If editing a channel of type {@link ChannelTypes.GroupDm}:
@@ -819,12 +849,13 @@ export interface RestManager {
819
849
  * - Otherwise:
820
850
  * - Fires a _Channel Update_ gateway event.
821
851
  */
822
- editChannel: (channelId: BigString, options: ModifyChannel) => Promise<Camelize<DiscordChannel>>;
852
+ editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
823
853
  /**
824
854
  * Edits the permission overrides for a user or role in a channel.
825
855
  *
826
856
  * @param channelId - The ID of the channel to edit the permission overrides of.
827
857
  * @param options - The permission override.
858
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
828
859
  *
829
860
  * @remarks
830
861
  * Requires the `MANAGE_ROLES` permission.
@@ -835,7 +866,7 @@ export interface RestManager {
835
866
  *
836
867
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions}
837
868
  */
838
- editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions) => Promise<void>;
869
+ editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
839
870
  /**
840
871
  * Edits the positions of a set of channels in a guild.
841
872
  *
@@ -856,7 +887,8 @@ export interface RestManager {
856
887
  * @param guildId - The ID of the guild in which to edit the emoji.
857
888
  * @param id - The ID of the emoji to edit.
858
889
  * @param options - The parameters for the edit of the emoji.
859
- * @returns An instance of the updated {@link DiscordEmoji}.
890
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
891
+ * @returns An instance of the updated {@link CamelizedDiscordEmoji}.
860
892
  *
861
893
  * @remarks
862
894
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -865,7 +897,7 @@ export interface RestManager {
865
897
  *
866
898
  * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
867
899
  */
868
- editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji) => Promise<Camelize<DiscordEmoji>>;
900
+ editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
869
901
  /**
870
902
  * Edits a follow-up message to an interaction.
871
903
  *
@@ -883,7 +915,7 @@ export interface RestManager {
883
915
  *
884
916
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
885
917
  */
886
- editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
918
+ editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
887
919
  /**
888
920
  * Edits a global application command.
889
921
  *
@@ -893,13 +925,14 @@ export interface RestManager {
893
925
  *
894
926
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
895
927
  */
896
- editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
928
+ editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
897
929
  /**
898
930
  * Edits a guild's settings.
899
931
  *
900
932
  * @param guildId - The ID of the guild to edit.
901
933
  * @param shardId - The ID of the shard the guild is in.
902
934
  * @param options - The parameters for the edit of the guild.
935
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
903
936
  * @returns An instance of the edited {@link Guild}.
904
937
  *
905
938
  * @remarks
@@ -912,7 +945,7 @@ export interface RestManager {
912
945
  *
913
946
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
914
947
  */
915
- editGuild: (guildId: BigString, options: ModifyGuild) => Promise<Camelize<DiscordGuild>>;
948
+ editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<CamelizedDiscordGuild>;
916
949
  /**
917
950
  * Edits an application command registered in a guild.
918
951
  *
@@ -923,14 +956,17 @@ export interface RestManager {
923
956
  *
924
957
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
925
958
  */
926
- editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
927
- /** Modify a guild's MFA level. Requires guild ownership. */
959
+ editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
960
+ /** Modify a guild's MFA level. Requires guild ownership.
961
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
962
+ */
928
963
  editGuildMfaLevel: (guildId: BigString, mfaLevel: MfaLevels, reason?: string) => Promise<void>;
929
964
  /**
930
965
  * Edit the given sticker.
931
966
  *
932
967
  * @param guildId The ID of the guild to get
933
- * @return A {@link DiscordSticker}
968
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
969
+ * @return A {@link CamelizedDiscordSticker}
934
970
  *
935
971
  * @remarks
936
972
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -938,7 +974,7 @@ export interface RestManager {
938
974
  *
939
975
  * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
940
976
  */
941
- editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>) => Promise<Camelize<DiscordSticker>>;
977
+ editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<CamelizedDiscordSticker>;
942
978
  /**
943
979
  * Edits a template's settings.
944
980
  *
@@ -954,7 +990,7 @@ export interface RestManager {
954
990
  *
955
991
  * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}
956
992
  */
957
- editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
993
+ editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<CamelizedDiscordTemplate>;
958
994
  /**
959
995
  * Edits a message.
960
996
  *
@@ -972,7 +1008,7 @@ export interface RestManager {
972
1008
  *
973
1009
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
974
1010
  */
975
- editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
1011
+ editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<CamelizedDiscordMessage>;
976
1012
  /**
977
1013
  * Edits the initial message response to an interaction.
978
1014
  *
@@ -989,14 +1025,14 @@ export interface RestManager {
989
1025
  *
990
1026
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
991
1027
  */
992
- editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage> | undefined>;
1028
+ editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage | undefined>;
993
1029
  /**
994
1030
  * Edits the original webhook message.
995
1031
  *
996
1032
  * @param webhookId - The ID of the webhook to edit the original message of.
997
1033
  * @param token - The webhook token, used to edit the message.
998
1034
  * @param options - The parameters for the edit of the message.
999
- * @returns An instance of the edited {@link DiscordMessage}.
1035
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1000
1036
  *
1001
1037
  * @remarks
1002
1038
  * Fires a _Message Update_ gateway event.
@@ -1005,7 +1041,7 @@ export interface RestManager {
1005
1041
  */
1006
1042
  editOriginalWebhookMessage: (webhookId: BigString, token: string, options: InteractionCallbackData & {
1007
1043
  threadId?: BigString;
1008
- }) => Promise<Camelize<DiscordMessage>>;
1044
+ }) => Promise<CamelizedDiscordMessage>;
1009
1045
  /**
1010
1046
  * Edits the voice state of the bot user.
1011
1047
  *
@@ -1030,7 +1066,8 @@ export interface RestManager {
1030
1066
  * @param guildId - The ID of the guild to edit the role in.
1031
1067
  * @param roleId - The ID of the role to edit.
1032
1068
  * @param options - The parameters for the edit of the role.
1033
- * @returns An instance of the edited {@link DiscordRole}.
1069
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1070
+ * @returns An instance of the edited {@link CamelizedDiscordRole}.
1034
1071
  *
1035
1072
  * @remarks
1036
1073
  * Requires the `MANAGE_ROLES` permission.
@@ -1039,13 +1076,14 @@ export interface RestManager {
1039
1076
  *
1040
1077
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
1041
1078
  */
1042
- editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole) => Promise<Camelize<DiscordRole>>;
1079
+ editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
1043
1080
  /**
1044
1081
  * Edits the positions of a set of roles.
1045
1082
  *
1046
1083
  * @param guildId - The ID of the guild to edit the role positions in.
1047
1084
  * @param options - The parameters for the edit of the role positions.
1048
- * @returns A collection of {@link DiscordRole} objects assorted by role ID.
1085
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1086
+ * @returns A collection of {@link CamelizedDiscordRole} objects assorted by role ID.
1049
1087
  *
1050
1088
  * @remarks
1051
1089
  * Requires the `MANAGE_ROLES` permission.
@@ -1054,12 +1092,13 @@ export interface RestManager {
1054
1092
  *
1055
1093
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
1056
1094
  */
1057
- editRolePositions: (guildId: BigString, options: ModifyRolePositions[]) => Promise<Camelize<DiscordRole[]>>;
1095
+ editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<CamelizedDiscordRole[]>;
1058
1096
  /**
1059
1097
  * Edits a scheduled event.
1060
1098
  *
1061
1099
  * @param guildId - The ID of the guild to edit the scheduled event in.
1062
1100
  * @param eventId - The ID of the scheduled event to edit.
1101
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1063
1102
  * @returns An instance of the edited {@link ScheduledEvent}.
1064
1103
  *
1065
1104
  * @remarks
@@ -1073,12 +1112,14 @@ export interface RestManager {
1073
1112
  *
1074
1113
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
1075
1114
  */
1076
- editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>) => Promise<Camelize<DiscordScheduledEvent>>;
1115
+ editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
1077
1116
  /**
1078
1117
  * Edits a stage instance.
1079
1118
  *
1080
1119
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1081
- * @returns An instance of the updated {@link DiscordStageInstance}.
1120
+ * @param topic - Topic of the Stage instance (1-120 characters).
1121
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1122
+ * @returns An instance of the updated {@link CamelizedDiscordStageInstance}.
1082
1123
  *
1083
1124
  * @remarks
1084
1125
  * Requires the user to be a moderator of the stage channel.
@@ -1087,7 +1128,7 @@ export interface RestManager {
1087
1128
  *
1088
1129
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance}
1089
1130
  */
1090
- editStageInstance: (channelId: BigString, data: EditStageInstanceOptions) => Promise<Camelize<DiscordStageInstance>>;
1131
+ editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<CamelizedDiscordStageInstance>;
1091
1132
  /**
1092
1133
  * Edits the voice state of another user.
1093
1134
  *
@@ -1106,7 +1147,8 @@ export interface RestManager {
1106
1147
  * Edits a webhook.
1107
1148
  *
1108
1149
  * @param webhookId - The ID of the webhook to edit.
1109
- * @returns An instance of the edited {@link DiscordWebhook}.
1150
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1151
+ * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1110
1152
  *
1111
1153
  * @remarks
1112
1154
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1115,7 +1157,7 @@ export interface RestManager {
1115
1157
  *
1116
1158
  * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook}
1117
1159
  */
1118
- editWebhook: (webhookId: BigString, options: ModifyWebhook) => Promise<Camelize<DiscordWebhook>>;
1160
+ editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
1119
1161
  /**
1120
1162
  * Edits a webhook message.
1121
1163
  *
@@ -1123,7 +1165,7 @@ export interface RestManager {
1123
1165
  * @param token - The webhook token, used to edit the message.
1124
1166
  * @param messageId - The ID of the message to edit.
1125
1167
  * @param options - The parameters for the edit of the message.
1126
- * @returns An instance of the edited {@link DiscordMessage}.
1168
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1127
1169
  *
1128
1170
  * @remarks
1129
1171
  * Fires a _Message Update_ gateway event.
@@ -1132,13 +1174,13 @@ export interface RestManager {
1132
1174
  */
1133
1175
  editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
1134
1176
  threadId?: BigString;
1135
- }) => Promise<Camelize<DiscordMessage>>;
1177
+ }) => Promise<CamelizedDiscordMessage>;
1136
1178
  /**
1137
1179
  * Edits a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1138
1180
  *
1139
1181
  * @param webhookId - The ID of the webhook to edit.
1140
1182
  * @param token - The webhook token, used to edit the webhook.
1141
- * @returns An instance of the edited {@link DiscordWebhook}.
1183
+ * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1142
1184
  *
1143
1185
  * @remarks
1144
1186
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1147,12 +1189,13 @@ export interface RestManager {
1147
1189
  *
1148
1190
  * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
1149
1191
  */
1150
- editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
1192
+ editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<CamelizedDiscordWebhook>;
1151
1193
  /**
1152
1194
  * Edits a guild's welcome screen.
1153
1195
  *
1154
1196
  * @param guildId - The ID of the guild to edit the welcome screen of.
1155
1197
  * @param options - The parameters for the edit of the welcome screen.
1198
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1156
1199
  * @returns An instance of the edited {@link WelcomeScreen}.
1157
1200
  *
1158
1201
  * @remarks
@@ -1162,11 +1205,12 @@ export interface RestManager {
1162
1205
  *
1163
1206
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
1164
1207
  */
1165
- editWelcomeScreen: (guildId: BigString, options: Camelize<DiscordModifyGuildWelcomeScreen>) => Promise<Camelize<DiscordWelcomeScreen>>;
1208
+ editWelcomeScreen: (guildId: BigString, options: CamelizedDiscordModifyGuildWelcomeScreen, reason?: string) => Promise<CamelizedDiscordWelcomeScreen>;
1166
1209
  /**
1167
1210
  * Edits the settings of a guild's widget.
1168
1211
  *
1169
1212
  * @param guildId - The ID of the guild to edit the settings of the widget of.
1213
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1170
1214
  * @returns An instance of the edited {@link GuildWidgetSettings}.
1171
1215
  *
1172
1216
  * @remarks
@@ -1176,27 +1220,27 @@ export interface RestManager {
1176
1220
  *
1177
1221
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
1178
1222
  */
1179
- editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>) => Promise<Camelize<DiscordGuildWidgetSettings>>;
1223
+ editWidgetSettings: (guildId: BigString, options: CamelizedDiscordGuildWidgetSettings, reason?: string) => Promise<CamelizedDiscordGuildWidgetSettings>;
1180
1224
  /**
1181
1225
  * Executes a webhook, causing a message to be posted in the channel configured for the webhook.
1182
1226
  *
1183
1227
  * @param webhookId - The ID of the webhook to execute.
1184
1228
  * @param token - The webhook token, used to execute the webhook.
1185
1229
  * @param options - The parameters for the execution of the webhook.
1186
- * @returns An instance of the created {@link DiscordMessage}, or `undefined` if the {@link ExecuteWebhook.wait | wait} property of the {@link options} object parameter is set to `false`.
1230
+ * @returns An instance of the created {@link CamelizedDiscordMessage}, or `undefined` if the {@link ExecuteWebhook.wait | wait} property of the {@link options} object parameter is set to `false`.
1187
1231
  *
1188
1232
  * @remarks
1189
1233
  * If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
1190
1234
  *
1191
1235
  * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
1192
1236
  */
1193
- executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
1237
+ executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<CamelizedDiscordMessage | undefined>;
1194
1238
  /**
1195
1239
  * Follows an announcement channel, allowing messages posted within it to be cross-posted into the target channel.
1196
1240
  *
1197
1241
  * @param sourceChannelId - The ID of the announcement channel to follow.
1198
1242
  * @param targetChannelId - The ID of the target channel - the channel to cross-post to.
1199
- * @returns An instance of {@link DiscordFollowedChannel}.
1243
+ * @returns An instance of {@link CamelizedDiscordFollowedChannel}.
1200
1244
  *
1201
1245
  * @remarks
1202
1246
  * Requires the `MANAGE_WEBHOOKS` permission in the __target channel__.
@@ -1205,12 +1249,12 @@ export interface RestManager {
1205
1249
  *
1206
1250
  * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
1207
1251
  */
1208
- followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<Camelize<DiscordFollowedChannel>>;
1252
+ followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>;
1209
1253
  /**
1210
1254
  * Gets the list of all active threads for a guild.
1211
1255
  *
1212
1256
  * @param guildId - The ID of the guild to get the threads of.
1213
- * @returns An instance of {@link DiscordActiveThreads}.
1257
+ * @returns An instance of {@link CamelizedDiscordActiveThreads}.
1214
1258
  *
1215
1259
  * @remarks
1216
1260
  * Returns both public and private threads.
@@ -1219,9 +1263,9 @@ export interface RestManager {
1219
1263
  *
1220
1264
  * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
1221
1265
  */
1222
- getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordActiveThreads>>;
1266
+ getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>;
1223
1267
  /** Get the applications info */
1224
- getApplicationInfo: () => Promise<Camelize<DiscordApplication>>;
1268
+ getApplicationInfo: () => Promise<CamelizedDiscordApplication>;
1225
1269
  /**
1226
1270
  * Gets the permissions of a guild application command.
1227
1271
  *
@@ -1231,7 +1275,7 @@ export interface RestManager {
1231
1275
  *
1232
1276
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
1233
1277
  */
1234
- getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<Camelize<DiscordApplicationCommandPermissions>>;
1278
+ getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions>;
1235
1279
  /**
1236
1280
  * Gets the permissions of all application commands registered in a guild by the ID of the guild.
1237
1281
  *
@@ -1240,7 +1284,7 @@ export interface RestManager {
1240
1284
  *
1241
1285
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
1242
1286
  */
1243
- getApplicationCommandPermissions: (guildId: BigString) => Promise<Camelize<DiscordApplicationCommandPermissions[]>>;
1287
+ getApplicationCommandPermissions: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions[]>;
1244
1288
  /**
1245
1289
  * Gets a guild's audit log.
1246
1290
  *
@@ -1253,57 +1297,57 @@ export interface RestManager {
1253
1297
  *
1254
1298
  * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
1255
1299
  */
1256
- getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
1300
+ getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<CamelizedDiscordAuditLog>;
1257
1301
  /**
1258
1302
  * Gets an automod rule by its ID.
1259
1303
  *
1260
1304
  * @param guildId - The ID of the guild to get the rule of.
1261
1305
  * @param ruleId - The ID of the rule to get.
1262
- * @returns An instance of {@link DiscordAutoModerationRule}.
1306
+ * @returns An instance of {@link CamelizedDiscordAutoModerationRule}.
1263
1307
  *
1264
1308
  * @remarks
1265
1309
  * Requires the `MANAGE_GUILD` permission.
1266
1310
  *
1267
1311
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
1268
1312
  */
1269
- getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
1313
+ getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<CamelizedDiscordAutoModerationRule>;
1270
1314
  /**
1271
1315
  * Gets the list of automod rules for a guild.
1272
1316
  *
1273
1317
  * @param guildId - The ID of the guild to get the rules from.
1274
- * @returns A collection of {@link DiscordAutoModerationRule} objects assorted by rule ID.
1318
+ * @returns A collection of {@link CamelizedDiscordAutoModerationRule} objects assorted by rule ID.
1275
1319
  *
1276
1320
  * @remarks
1277
1321
  * Requires the `MANAGE_GUILD` permission.
1278
1322
  *
1279
1323
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
1280
1324
  */
1281
- getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule[]>>;
1325
+ getAutomodRules: (guildId: BigString) => Promise<CamelizedDiscordAutoModerationRule[]>;
1282
1326
  /**
1283
1327
  * Gets the list of available voice regions.
1284
1328
  *
1285
1329
  * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
1286
1330
  */
1287
- getAvailableVoiceRegions: () => Promise<Camelize<DiscordVoiceRegion[]>>;
1331
+ getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>;
1288
1332
  /**
1289
1333
  * Gets a ban by user ID.
1290
1334
  *
1291
1335
  * @param guildId - The ID of the guild to get the ban from.
1292
1336
  * @param userId - The ID of the user to get the ban for.
1293
- * @returns An instance of {@link DiscordBan}.
1337
+ * @returns An instance of {@link CamelizedDiscordBan}.
1294
1338
  *
1295
1339
  * @remarks
1296
1340
  * Requires the `BAN_MEMBERS` permission.
1297
1341
  *
1298
1342
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
1299
1343
  */
1300
- getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
1344
+ getBan: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordBan>;
1301
1345
  /**
1302
1346
  * Gets the list of bans for a guild.
1303
1347
  *
1304
1348
  * @param guildId - The ID of the guild to get the list of bans for.
1305
1349
  * @param options - The parameters for the fetching of the list of bans.
1306
- * @returns A collection of {@link DiscordBan} objects assorted by user ID.
1350
+ * @returns A collection of {@link CamelizedDiscordBan} objects assorted by user ID.
1307
1351
  *
1308
1352
  * @remarks
1309
1353
  * Requires the `BAN_MEMBERS` permission.
@@ -1312,24 +1356,24 @@ export interface RestManager {
1312
1356
  *
1313
1357
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
1314
1358
  */
1315
- getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan[]>>;
1359
+ getBans: (guildId: BigString, options?: GetBans) => Promise<CamelizedDiscordBan[]>;
1316
1360
  /**
1317
1361
  * Gets a channel by its ID.
1318
1362
  *
1319
1363
  * @param channelId - The ID of the channel to get.
1320
- * @returns An instance of {@link DiscordChannel}.
1364
+ * @returns An instance of {@link CamelizedDiscordChannel}.
1321
1365
  *
1322
1366
  * @remarks
1323
1367
  * If the channel is a thread, a {@link ThreadMember} object is included in the result.
1324
1368
  *
1325
1369
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
1326
1370
  */
1327
- getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
1371
+ getChannel: (channelId: BigString) => Promise<CamelizedDiscordChannel>;
1328
1372
  /**
1329
1373
  * Gets the list of invites for a channel.
1330
1374
  *
1331
1375
  * @param channelId - The ID of the channel to get the invites of.
1332
- * @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
1376
+ * @returns A collection of {@link CamelizedDiscordInviteMetadata} objects assorted by invite code.
1333
1377
  *
1334
1378
  * @remarks
1335
1379
  * Requires the `MANAGE_CHANNELS` permission.
@@ -1338,59 +1382,59 @@ export interface RestManager {
1338
1382
  *
1339
1383
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
1340
1384
  */
1341
- getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata[]>>;
1385
+ getChannelInvites: (channelId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1342
1386
  /**
1343
1387
  * Gets the list of channels for a guild.
1344
1388
  *
1345
1389
  * @param guildId - The ID of the guild to get the channels of.
1346
- * @returns A collection of {@link DiscordChannel} objects assorted by channel ID.
1390
+ * @returns A collection of {@link CamelizedDiscordChannel} objects assorted by channel ID.
1347
1391
  *
1348
1392
  * @remarks
1349
1393
  * Excludes threads.
1350
1394
  *
1351
1395
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
1352
1396
  */
1353
- getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel[]>>;
1397
+ getChannels: (guildId: BigString) => Promise<CamelizedDiscordChannel[]>;
1354
1398
  /**
1355
1399
  * Gets a list of webhooks for a channel.
1356
1400
  *
1357
1401
  * @param channelId - The ID of the channel which to get the webhooks of.
1358
- * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1402
+ * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1359
1403
  *
1360
1404
  * @remarks
1361
1405
  * Requires the `MANAGE_WEBHOOKS` permission.
1362
1406
  *
1363
1407
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks}
1364
1408
  */
1365
- getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook[]>>;
1409
+ getChannelWebhooks: (channelId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1366
1410
  /**
1367
1411
  * Gets or creates a DM channel with a user.
1368
1412
  *
1369
1413
  * @param userId - The ID of the user to create the DM channel with.
1370
- * @returns An instance of {@link DiscordChannel}.
1414
+ * @returns An instance of {@link CamelizedDiscordChannel}.
1371
1415
  *
1372
1416
  * @see {@link https://discord.com/developers/docs/resources/user#create-dm}
1373
1417
  */
1374
- getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
1418
+ getDmChannel: (userId: BigString) => Promise<CamelizedDiscordChannel>;
1375
1419
  /**
1376
1420
  * Gets an emoji by its ID.
1377
1421
  *
1378
1422
  * @param guildId - The ID of the guild from which to get the emoji.
1379
1423
  * @param emojiId - The ID of the emoji to get.
1380
- * @returns An instance of {@link DiscordEmoji}.
1424
+ * @returns An instance of {@link CamelizedDiscordEmoji}.
1381
1425
  *
1382
1426
  * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
1383
1427
  */
1384
- getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
1428
+ getEmoji: (guildId: BigString, emojiId: BigString) => Promise<CamelizedDiscordEmoji>;
1385
1429
  /**
1386
1430
  * Gets the list of emojis for a guild.
1387
1431
  *
1388
1432
  * @param guildId - The ID of the guild which to get the emojis of.
1389
- * @returns A collection of {@link DiscordEmoji} objects assorted by emoji ID.
1433
+ * @returns A collection of {@link CamelizedDiscordEmoji} objects assorted by emoji ID.
1390
1434
  *
1391
1435
  * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
1392
1436
  */
1393
- getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji[]>>;
1437
+ getEmojis: (guildId: BigString) => Promise<CamelizedDiscordEmoji[]>;
1394
1438
  /**
1395
1439
  * Gets a follow-up message to an interaction by the ID of the message.
1396
1440
  *
@@ -1407,9 +1451,9 @@ export interface RestManager {
1407
1451
  *
1408
1452
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message}
1409
1453
  */
1410
- getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1454
+ getFollowupMessage: (token: string, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1411
1455
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1412
- getGatewayBot: () => Promise<Camelize<DiscordGetGatewayBot>>;
1456
+ getGatewayBot: () => Promise<CamelizedDiscordGetGatewayBot>;
1413
1457
  /**
1414
1458
  * Gets a global application command by its ID.
1415
1459
  *
@@ -1418,7 +1462,7 @@ export interface RestManager {
1418
1462
  *
1419
1463
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
1420
1464
  */
1421
- getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1465
+ getGlobalApplicationCommand: (commandId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1422
1466
  /**
1423
1467
  * Gets the list of your bot's global application commands.
1424
1468
  *
@@ -1426,7 +1470,7 @@ export interface RestManager {
1426
1470
  *
1427
1471
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
1428
1472
  */
1429
- getGlobalApplicationCommands: () => Promise<Camelize<DiscordApplicationCommand[]>>;
1473
+ getGlobalApplicationCommands: () => Promise<CamelizedDiscordApplicationCommand[]>;
1430
1474
  /**
1431
1475
  * Gets a guild by its ID.
1432
1476
  *
@@ -1438,7 +1482,7 @@ export interface RestManager {
1438
1482
  */
1439
1483
  getGuild: (guildId: BigString, options?: {
1440
1484
  counts?: boolean;
1441
- }) => Promise<Camelize<DiscordGuild>>;
1485
+ }) => Promise<CamelizedDiscordGuild>;
1442
1486
  /**
1443
1487
  * Gets a guild application command by its ID.
1444
1488
  *
@@ -1448,7 +1492,7 @@ export interface RestManager {
1448
1492
  *
1449
1493
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}
1450
1494
  */
1451
- getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1495
+ getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1452
1496
  /**
1453
1497
  * Gets the list of application commands registered by your bot in a guild.
1454
1498
  *
@@ -1457,7 +1501,7 @@ export interface RestManager {
1457
1501
  *
1458
1502
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commandss}
1459
1503
  */
1460
- getGuildApplicationCommands: (guildId: BigString) => Promise<Camelize<DiscordApplicationCommand[]>>;
1504
+ getGuildApplicationCommands: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommand[]>;
1461
1505
  /**
1462
1506
  * Gets the preview of a guild by a guild's ID.
1463
1507
  *
@@ -1469,30 +1513,30 @@ export interface RestManager {
1469
1513
  *
1470
1514
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
1471
1515
  */
1472
- getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
1516
+ getGuildPreview: (guildId: BigString) => Promise<CamelizedDiscordGuildPreview>;
1473
1517
  /**
1474
1518
  * Returns a sticker object for the given guild and sticker IDs.
1475
1519
  *
1476
1520
  * @param guildId The ID of the guild to get
1477
1521
  * @param stickerId The ID of the sticker to get
1478
- * @return A {@link DiscordSticker}
1522
+ * @return A {@link CamelizedDiscordSticker}
1479
1523
  *
1480
1524
  * @remarks Includes the user field if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1481
1525
  *
1482
1526
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
1483
1527
  */
1484
- getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1528
+ getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<CamelizedDiscordSticker>;
1485
1529
  /**
1486
1530
  * Returns an array of sticker objects for the given guild.
1487
1531
  *
1488
1532
  * @param guildId The ID of the guild to get
1489
- * @returns A collection of {@link DiscordSticker} objects assorted by sticker ID.
1533
+ * @returns A collection of {@link CamelizedDiscordSticker} objects assorted by sticker ID.
1490
1534
  *
1491
1535
  * @remarks Includes user fields if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1492
1536
  *
1493
1537
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
1494
1538
  */
1495
- getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker[]>>;
1539
+ getGuildStickers: (guildId: BigString) => Promise<CamelizedDiscordSticker[]>;
1496
1540
  /**
1497
1541
  * Gets a template by its code.
1498
1542
  *
@@ -1504,7 +1548,7 @@ export interface RestManager {
1504
1548
  *
1505
1549
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}
1506
1550
  */
1507
- getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
1551
+ getGuildTemplate: (templateCode: string) => Promise<CamelizedDiscordTemplate>;
1508
1552
  /**
1509
1553
  * Gets the list of templates for a guild.
1510
1554
  *
@@ -1516,19 +1560,19 @@ export interface RestManager {
1516
1560
  *
1517
1561
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
1518
1562
  */
1519
- getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate[]>>;
1563
+ getGuildTemplates: (guildId: BigString) => Promise<CamelizedDiscordTemplate[]>;
1520
1564
  /**
1521
1565
  * Gets the list of webhooks for a guild.
1522
1566
  *
1523
1567
  * @param guildId - The ID of the guild to get the list of webhooks for.
1524
- * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1568
+ * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1525
1569
  *
1526
1570
  * @remarks
1527
1571
  * Requires the `MANAGE_WEBHOOKS` permission.
1528
1572
  *
1529
1573
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks}
1530
1574
  */
1531
- getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook[]>>;
1575
+ getGuildWebhooks: (guildId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1532
1576
  /**
1533
1577
  * Gets the list of integrations attached to a guild.
1534
1578
  *
@@ -1540,17 +1584,17 @@ export interface RestManager {
1540
1584
  *
1541
1585
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
1542
1586
  */
1543
- getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration[]>>;
1587
+ getIntegrations: (guildId: BigString) => Promise<CamelizedDiscordIntegration[]>;
1544
1588
  /**
1545
1589
  * Gets an invite to a channel by its invite code.
1546
1590
  *
1547
1591
  * @param inviteCode - The invite code of the invite to get.
1548
1592
  * @param options - The parameters for the fetching of the invite.
1549
- * @returns An instance of {@link DiscordInviteMetadata}.
1593
+ * @returns An instance of {@link CamelizedDiscordInviteMetadata}.
1550
1594
  *
1551
1595
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
1552
1596
  */
1553
- getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
1597
+ getInvite: (inviteCode: string, options?: GetInvite) => Promise<CamelizedDiscordInviteMetadata>;
1554
1598
  /**
1555
1599
  * Gets the list of invites for a guild.
1556
1600
  *
@@ -1562,7 +1606,7 @@ export interface RestManager {
1562
1606
  *
1563
1607
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invites}
1564
1608
  */
1565
- getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata[]>>;
1609
+ getInvites: (guildId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1566
1610
  /**
1567
1611
  * Gets a message from a channel by the ID of the message.
1568
1612
  *
@@ -1578,7 +1622,7 @@ export interface RestManager {
1578
1622
  *
1579
1623
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
1580
1624
  */
1581
- getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1625
+ getMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1582
1626
  /**
1583
1627
  * Gets multiple messages from a channel.
1584
1628
  *
@@ -1594,7 +1638,7 @@ export interface RestManager {
1594
1638
  *
1595
1639
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
1596
1640
  */
1597
- getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage[]>>;
1641
+ getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<CamelizedDiscordMessage[]>;
1598
1642
  /**
1599
1643
  * Returns the list of sticker packs available to Nitro subscribers.
1600
1644
  *
@@ -1602,7 +1646,7 @@ export interface RestManager {
1602
1646
  *
1603
1647
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
1604
1648
  */
1605
- getNitroStickerPacks: () => Promise<Camelize<DiscordStickerPack[]>>;
1649
+ getNitroStickerPacks: () => Promise<CamelizedDiscordStickerPack[]>;
1606
1650
  /**
1607
1651
  * Gets the initial message response to an interaction.
1608
1652
  *
@@ -1618,7 +1662,7 @@ export interface RestManager {
1618
1662
  *
1619
1663
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
1620
1664
  */
1621
- getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
1665
+ getOriginalInteractionResponse: (token: string) => Promise<CamelizedDiscordMessage>;
1622
1666
  /**
1623
1667
  * Gets the pinned messages for a channel.
1624
1668
  *
@@ -1633,13 +1677,13 @@ export interface RestManager {
1633
1677
  *
1634
1678
  * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
1635
1679
  */
1636
- getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage[]>>;
1680
+ getPinnedMessages: (channelId: BigString) => Promise<CamelizedDiscordMessage[]>;
1637
1681
  /**
1638
1682
  * Gets the list of private archived threads for a channel.
1639
1683
  *
1640
1684
  * @param channelId - The ID of the channel to get the archived threads for.
1641
1685
  * @param options - The parameters for the fetching of threads.
1642
- * @returns An instance of {@link DiscordArchivedThreads}.
1686
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1643
1687
  *
1644
1688
  * @remarks
1645
1689
  * Requires the `READ_MESSAGE_HISTORY` permission.
@@ -1651,13 +1695,13 @@ export interface RestManager {
1651
1695
  *
1652
1696
  * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
1653
1697
  */
1654
- getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1698
+ getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1655
1699
  /**
1656
1700
  * Gets the list of private archived threads the bot is a member of for a channel.
1657
1701
  *
1658
1702
  * @param channelId - The ID of the channel to get the archived threads for.
1659
1703
  * @param options - The parameters for the fetching of threads.
1660
- * @returns An instance of {@link DiscordArchivedThreads}.
1704
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1661
1705
  *
1662
1706
  * @remarks
1663
1707
  * Requires the `READ_MESSAGE_HISTORY` permission.
@@ -1668,7 +1712,7 @@ export interface RestManager {
1668
1712
  *
1669
1713
  * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
1670
1714
  */
1671
- getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1715
+ getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1672
1716
  /**
1673
1717
  * Gets the number of members that would be kicked from a guild during pruning.
1674
1718
  *
@@ -1681,7 +1725,7 @@ export interface RestManager {
1681
1725
  *
1682
1726
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
1683
1727
  */
1684
- getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
1728
+ getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<CamelizedDiscordPrunedCount>;
1685
1729
  /**
1686
1730
  * Gets the list of public archived threads for a channel.
1687
1731
  *
@@ -1699,7 +1743,7 @@ export interface RestManager {
1699
1743
  *
1700
1744
  * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
1701
1745
  */
1702
- getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1746
+ getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1703
1747
  /**
1704
1748
  * Gets the list of roles for a guild.
1705
1749
  *
@@ -1711,7 +1755,7 @@ export interface RestManager {
1711
1755
  *
1712
1756
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
1713
1757
  */
1714
- getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole[]>>;
1758
+ getRoles: (guildId: BigString) => Promise<CamelizedDiscordRole[]>;
1715
1759
  /**
1716
1760
  * Gets a scheduled event by its ID.
1717
1761
  *
@@ -1724,7 +1768,7 @@ export interface RestManager {
1724
1768
  */
1725
1769
  getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
1726
1770
  withUserCount?: boolean;
1727
- }) => Promise<Camelize<DiscordScheduledEvent>>;
1771
+ }) => Promise<CamelizedDiscordScheduledEvent>;
1728
1772
  /**
1729
1773
  * Gets the list of scheduled events for a guild.
1730
1774
  *
@@ -1734,7 +1778,7 @@ export interface RestManager {
1734
1778
  *
1735
1779
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
1736
1780
  */
1737
- getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent[]>>;
1781
+ getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<CamelizedDiscordScheduledEvent[]>;
1738
1782
  /**
1739
1783
  * Gets the list of subscribers to a scheduled event from a guild.
1740
1784
  *
@@ -1751,51 +1795,51 @@ export interface RestManager {
1751
1795
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
1752
1796
  */
1753
1797
  getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
1754
- user: Camelize<DiscordUser>;
1755
- member?: Camelize<DiscordMember>;
1798
+ user: CamelizedDiscordUser;
1799
+ member?: CamelizedDiscordMember;
1756
1800
  }>>;
1757
1801
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1758
- getSessionInfo: () => Promise<Camelize<DiscordGetGatewayBot>>;
1802
+ getSessionInfo: () => Promise<CamelizedDiscordGetGatewayBot>;
1759
1803
  /**
1760
1804
  * Gets the stage instance associated with a stage channel, if one exists.
1761
1805
  *
1762
1806
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1763
- * @returns An instance of {@link DiscordStageInstance}.
1807
+ * @returns An instance of {@link CamelizedDiscordStageInstance}.
1764
1808
  *
1765
1809
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
1766
1810
  */
1767
- getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
1811
+ getStageInstance: (channelId: BigString) => Promise<CamelizedDiscordStageInstance>;
1768
1812
  /**
1769
1813
  * Returns a sticker object for the given sticker ID.
1770
1814
  *
1771
1815
  * @param stickerId The ID of the sticker to get
1772
- * @returns A {@link DiscordSticker}
1816
+ * @returns A {@link CamelizedDiscordSticker}
1773
1817
  *
1774
1818
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
1775
1819
  */
1776
- getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1820
+ getSticker: (stickerId: BigString) => Promise<CamelizedDiscordSticker>;
1777
1821
  /**
1778
1822
  * Gets a thread member by their user ID.
1779
1823
  *
1780
1824
  * @param channelId - The ID of the thread to get the thread member of.
1781
1825
  * @param userId - The user ID of the thread member to get.
1782
- * @returns An instance of {@link DiscordThreadMember}.
1826
+ * @returns An instance of {@link CamelizedDiscordThreadMember}.
1783
1827
  *
1784
1828
  * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
1785
1829
  */
1786
- getThreadMember: (channelId: BigString, userId: BigString) => Promise<Camelize<DiscordThreadMember>>;
1830
+ getThreadMember: (channelId: BigString, userId: BigString) => Promise<CamelizedDiscordThreadMember>;
1787
1831
  /**
1788
1832
  * Gets the list of thread members for a thread.
1789
1833
  *
1790
1834
  * @param channelId - The ID of the thread to get the thread members of.
1791
- * @returns A collection of {@link DiscordThreadMember} assorted by user ID.
1835
+ * @returns A collection of {@link CamelizedDiscordThreadMember} assorted by user ID.
1792
1836
  *
1793
1837
  * @remarks
1794
1838
  * Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
1795
1839
  *
1796
1840
  * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
1797
1841
  */
1798
- getThreadMembers: (channelId: BigString) => Promise<Camelize<DiscordThreadMember[]>>;
1842
+ getThreadMembers: (channelId: BigString) => Promise<CamelizedDiscordThreadMember[]>;
1799
1843
  /**
1800
1844
  * Gets the list of users that reacted with an emoji to a message.
1801
1845
  *
@@ -1807,14 +1851,14 @@ export interface RestManager {
1807
1851
  *
1808
1852
  * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
1809
1853
  */
1810
- getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser[]>>;
1854
+ getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<CamelizedDiscordUser[]>;
1811
1855
  /**
1812
1856
  * Get a user's data from the api
1813
1857
  *
1814
1858
  * @param id The user's id
1815
- * @returns {Camelize<DiscordUser>}
1859
+ * @returns {CamelizedDiscordUser}
1816
1860
  */
1817
- getUser: (id: BigString) => Promise<Camelize<DiscordUser>>;
1861
+ getUser: (id: BigString) => Promise<CamelizedDiscordUser>;
1818
1862
  /**
1819
1863
  * Gets information about the vanity url of a guild.
1820
1864
  *
@@ -1828,7 +1872,7 @@ export interface RestManager {
1828
1872
  *
1829
1873
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
1830
1874
  */
1831
- getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
1875
+ getVanityUrl: (guildId: BigString) => Promise<CamelizedDiscordVanityUrl>;
1832
1876
  /**
1833
1877
  * Gets the list of voice regions for a guild.
1834
1878
  *
@@ -1837,19 +1881,19 @@ export interface RestManager {
1837
1881
  *
1838
1882
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
1839
1883
  */
1840
- getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion[]>>;
1884
+ getVoiceRegions: (guildId: BigString) => Promise<CamelizedDiscordVoiceRegion[]>;
1841
1885
  /**
1842
1886
  * Gets a webhook by its ID.
1843
1887
  *
1844
1888
  * @param webhookId - The ID of the webhook to get.
1845
- * @returns An instance of {@link DiscordWebhook}.
1889
+ * @returns An instance of {@link CamelizedDiscordWebhook}.
1846
1890
  *
1847
1891
  * @remarks
1848
1892
  * Requires the `MANAGE_WEBHOOKS` permission.
1849
1893
  *
1850
1894
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}
1851
1895
  */
1852
- getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
1896
+ getWebhook: (webhookId: BigString) => Promise<CamelizedDiscordWebhook>;
1853
1897
  /**
1854
1898
  * Gets a webhook message by its ID.
1855
1899
  *
@@ -1857,21 +1901,21 @@ export interface RestManager {
1857
1901
  * @param token - The webhook token, used to get webhook messages.
1858
1902
  * @param messageId - the ID of the webhook message to get.
1859
1903
  * @param options - The parameters for the fetching of the message.
1860
- * @returns An instance of {@link DiscordMessage}.
1904
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1861
1905
  *
1862
1906
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}
1863
1907
  */
1864
- getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
1908
+ getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<CamelizedDiscordMessage>;
1865
1909
  /**
1866
1910
  * Gets a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1867
1911
  *
1868
1912
  * @param webhookId - The ID of the webhook to get.
1869
1913
  * @param token - The webhook token, used to get the webhook.
1870
- * @returns An instance of {@link DiscordWebhook}.
1914
+ * @returns An instance of {@link CamelizedDiscordWebhook}.
1871
1915
  *
1872
1916
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
1873
1917
  */
1874
- getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
1918
+ getWebhookWithToken: (webhookId: BigString, token: string) => Promise<CamelizedDiscordWebhook>;
1875
1919
  /**
1876
1920
  * Gets the welcome screen for a guild.
1877
1921
  *
@@ -1884,7 +1928,7 @@ export interface RestManager {
1884
1928
  *
1885
1929
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
1886
1930
  */
1887
- getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
1931
+ getWelcomeScreen: (guildId: BigString) => Promise<CamelizedDiscordWelcomeScreen>;
1888
1932
  /**
1889
1933
  * Gets the guild widget by guild ID.
1890
1934
  *
@@ -1893,7 +1937,7 @@ export interface RestManager {
1893
1937
  *
1894
1938
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
1895
1939
  */
1896
- getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
1940
+ getWidget: (guildId: BigString) => Promise<CamelizedDiscordGuildWidget>;
1897
1941
  /**
1898
1942
  * Gets the settings of a guild's widget.
1899
1943
  *
@@ -1905,7 +1949,7 @@ export interface RestManager {
1905
1949
  *
1906
1950
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
1907
1951
  */
1908
- getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
1952
+ getWidgetSettings: (guildId: BigString) => Promise<CamelizedDiscordGuildWidgetSettings>;
1909
1953
  /**
1910
1954
  * Adds the bot user to a thread.
1911
1955
  *
@@ -1960,13 +2004,14 @@ export interface RestManager {
1960
2004
  *
1961
2005
  * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
1962
2006
  */
1963
- publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
2007
+ publishMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1964
2008
  /**
1965
2009
  * Removes a role from a member.
1966
2010
  *
1967
2011
  * @param guildId - The ID of the guild the member to remove the role from is in.
1968
2012
  * @param userId - The user ID of the member to remove the role from.
1969
2013
  * @param roleId - The ID of the role to remove from the member.
2014
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1970
2015
  *
1971
2016
  * @remarks
1972
2017
  * Requires the `MANAGE_ROLES` permission.
@@ -1998,7 +2043,7 @@ export interface RestManager {
1998
2043
  *
1999
2044
  * @param channelId - The ID of the channel to send the message in.
2000
2045
  * @param options - The parameters for the creation of the message.
2001
- * @returns An instance of the created {@link DiscordMessage}.
2046
+ * @returns An instance of the created {@link CamelizedDiscordMessage}.
2002
2047
  *
2003
2048
  * @remarks
2004
2049
  * Requires that the bot user be able to see the contents of the channel the message is to be sent in.
@@ -2019,7 +2064,7 @@ export interface RestManager {
2019
2064
  *
2020
2065
  * @see {@link https://discord.com/developers/docs/resources/channel#create-message}
2021
2066
  */
2022
- sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
2067
+ sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<CamelizedDiscordMessage>;
2023
2068
  /**
2024
2069
  * Sends a follow-up message to an interaction.
2025
2070
  *
@@ -2040,7 +2085,7 @@ export interface RestManager {
2040
2085
  *
2041
2086
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
2042
2087
  */
2043
- sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
2088
+ sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
2044
2089
  /**
2045
2090
  * Sends a response to an interaction.
2046
2091
  *
@@ -2069,6 +2114,7 @@ export interface RestManager {
2069
2114
  * @param channelId - The ID of the channel in which to create the thread.
2070
2115
  * @param messageId - The ID of the message to use as the thread's point of origin.
2071
2116
  * @param options - The parameters to use for the creation of the thread.
2117
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2072
2118
  * @returns An instance of the created {@link Channel | Thread}.
2073
2119
  *
2074
2120
  * @remarks
@@ -2082,13 +2128,14 @@ export interface RestManager {
2082
2128
  *
2083
2129
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
2084
2130
  */
2085
- startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage) => Promise<Camelize<DiscordChannel>>;
2131
+ startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2086
2132
  /**
2087
2133
  * Creates a thread without using a message as the thread's point of origin.
2088
2134
  *
2089
2135
  * @param channelId - The ID of the channel in which to create the thread.
2090
2136
  * @param options - The parameters to use for the creation of the thread.
2091
- * @returns An instance of the created {@link DiscordChannel | Thread}.
2137
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2138
+ * @returns An instance of the created {@link CamelizedDiscordChannel | Thread}.
2092
2139
  *
2093
2140
  * @remarks
2094
2141
  * Creating a private thread requires the server to be boosted.
@@ -2097,7 +2144,7 @@ export interface RestManager {
2097
2144
  *
2098
2145
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
2099
2146
  */
2100
- startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage) => Promise<Camelize<DiscordChannel>>;
2147
+ startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2101
2148
  /**
2102
2149
  * Synchronises a template with the current state of a guild.
2103
2150
  *
@@ -2111,7 +2158,7 @@ export interface RestManager {
2111
2158
  *
2112
2159
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
2113
2160
  */
2114
- syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
2161
+ syncGuildTemplate: (guildId: BigString) => Promise<CamelizedDiscordTemplate>;
2115
2162
  /**
2116
2163
  * Triggers a typing indicator for the bot user.
2117
2164
  *
@@ -2138,7 +2185,7 @@ export interface RestManager {
2138
2185
  *
2139
2186
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
2140
2187
  */
2141
- upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<Camelize<DiscordApplicationCommand[]>>;
2188
+ upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2142
2189
  /**
2143
2190
  * Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
2144
2191
  *
@@ -2153,13 +2200,13 @@ export interface RestManager {
2153
2200
  *
2154
2201
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
2155
2202
  */
2156
- upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<Camelize<DiscordApplicationCommand[]>>;
2203
+ upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2157
2204
  /**
2158
2205
  * Bans a user from a guild.
2159
2206
  *
2160
-
2161
2207
  * @param guildId - The ID of the guild to ban the user from.
2162
2208
  * @param userId - The ID of the user to ban from the guild.
2209
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2163
2210
  * @param options - The parameters for the creation of the ban.
2164
2211
  *
2165
2212
  * @remarks
@@ -2169,25 +2216,27 @@ export interface RestManager {
2169
2216
  *
2170
2217
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
2171
2218
  */
2172
- banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan) => Promise<void>;
2219
+ banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
2173
2220
  /**
2174
2221
  * Edits the nickname of the bot user.
2175
2222
  *
2176
2223
  * @param guildId - The ID of the guild to edit the nickname of the bot user in.
2177
2224
  * @param options - The parameters for the edit of the nickname.
2178
- * @returns An instance of the edited {@link DiscordMember}
2225
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2226
+ * @returns An instance of the edited {@link CamelizedDiscordMember}
2179
2227
  *
2180
2228
  * @remarks
2181
2229
  * Fires a _Guild Member Update_ gateway event.
2182
2230
  *
2183
2231
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
2184
2232
  */
2185
- editBotMember: (guildId: BigString, options: EditBotMemberOptions) => Promise<Camelize<DiscordMember>>;
2233
+ editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<CamelizedDiscordMember>;
2186
2234
  /**
2187
2235
  * Edits a member's properties.
2188
2236
  *
2189
2237
  * @param guildId - The ID of the guild to edit the member of.
2190
2238
  * @param userId - The user ID of the member to edit.
2239
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2191
2240
  * @param options - The parameters for the edit of the user.
2192
2241
  *
2193
2242
  * @remarks
@@ -2198,24 +2247,24 @@ export interface RestManager {
2198
2247
  *
2199
2248
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
2200
2249
  */
2201
- editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember) => Promise<Camelize<DiscordMember>>;
2250
+ editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<CamelizedDiscordMember>;
2202
2251
  /**
2203
2252
  * Gets the member object by user ID.
2204
2253
  *
2205
2254
 
2206
2255
  * @param guildId - The ID of the guild to get the member object for.
2207
2256
  * @param userId - The ID of the user to get the member object for.
2208
- * @returns An instance of {@link DiscordMemberWithUser}.
2257
+ * @returns An instance of {@link CamelizedDiscordMemberWithUser}.
2209
2258
  *
2210
2259
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
2211
2260
  */
2212
- getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
2261
+ getMember: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordMemberWithUser>;
2213
2262
  /**
2214
2263
  * Gets the list of members for a guild.
2215
2264
  *
2216
2265
  * @param guildId - The ID of the guild to get the list of members for.
2217
2266
  * @param options - The parameters for the fetching of the members.
2218
- * @returns A collection of {@link DiscordMemberWithUser} objects assorted by user ID.
2267
+ * @returns A collection of {@link CamelizedDiscordMemberWithUser} objects assorted by user ID.
2219
2268
  *
2220
2269
  * @remarks
2221
2270
  * Requires the `GUILD_MEMBERS` intent.
@@ -2228,13 +2277,14 @@ export interface RestManager {
2228
2277
  * @see {@link https://discord.com/developers/docs/topics/gateway#request-guild-members}
2229
2278
  * @see {@link https://discord.com/developers/docs/topics/rate-limits#rate-limits}
2230
2279
  */
2231
- getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser[]>>;
2280
+ getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<CamelizedDiscordMemberWithUser[]>;
2232
2281
  /**
2233
2282
  * Kicks a member from a guild.
2234
2283
  *
2235
2284
 
2236
2285
  * @param guildId - The ID of the guild to kick the member from.
2237
2286
  * @param userId - The user ID of the member to kick from the guild.
2287
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2238
2288
  *
2239
2289
  * @remarks
2240
2290
  * Requires the `KICK_MEMBERS` permission.
@@ -2249,6 +2299,7 @@ export interface RestManager {
2249
2299
  *
2250
2300
  * @param channelId - The ID of the channel where the message is to be pinned.
2251
2301
  * @param messageId - The ID of the message to pin.
2302
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2252
2303
  *
2253
2304
  * @remarks
2254
2305
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -2268,6 +2319,7 @@ export interface RestManager {
2268
2319
 
2269
2320
  * @param guildId - The ID of the guild to prune the members of.
2270
2321
  * @param options - The parameters for the pruning of members.
2322
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2271
2323
  * @returns A number indicating how many members were pruned.
2272
2324
  *
2273
2325
  * @remarks
@@ -2281,7 +2333,7 @@ export interface RestManager {
2281
2333
  *
2282
2334
  * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
2283
2335
  */
2284
- pruneMembers: (guildId: BigString, options: BeginGuildPrune) => Promise<{
2336
+ pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
2285
2337
  pruned: number | null;
2286
2338
  }>;
2287
2339
  /**
@@ -2291,17 +2343,18 @@ export interface RestManager {
2291
2343
  * @param guildId - The ID of the guild to search in.
2292
2344
  * @param query - The string to match usernames or nicknames against.
2293
2345
  * @param options - The parameters for searching through the members.
2294
- * @returns A collection of {@link DiscordMember} objects assorted by user ID.
2346
+ * @returns A collection of {@link CamelizedDiscordMember} objects assorted by user ID.
2295
2347
  *
2296
2348
  * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
2297
2349
  */
2298
- searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser[]>>;
2350
+ searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<CamelizedDiscordMemberWithUser[]>;
2299
2351
  /**
2300
2352
  * Unbans a user from a guild.
2301
2353
  *
2302
2354
 
2303
2355
  * @param guildId - The ID of the guild to unban the user in.
2304
2356
  * @param userId - The ID of the user to unban.
2357
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2305
2358
  *
2306
2359
  * @remarks
2307
2360
  * Requires the `BAN_MEMBERS` permission.
@@ -2310,12 +2363,13 @@ export interface RestManager {
2310
2363
  *
2311
2364
  * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}
2312
2365
  */
2313
- unbanMember: (guildId: BigString, userId: BigString) => Promise<void>;
2366
+ unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
2314
2367
  /**
2315
2368
  * Unpins a pinned message in a channel.
2316
2369
  *
2317
2370
  * @param channelId - The ID of the channel where the message is pinned.
2318
2371
  * @param messageId - The ID of the message to unpin.
2372
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2319
2373
  *
2320
2374
  * @remarks
2321
2375
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -2330,7 +2384,7 @@ export interface RestManager {
2330
2384
  }
2331
2385
  export type RequestMethods = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT';
2332
2386
  export type ApiVersions = 9 | 10;
2333
- export interface CreateWebhook extends WithReason {
2387
+ export interface CreateWebhook {
2334
2388
  /** Name of the webhook (1-80 characters) */
2335
2389
  name: string;
2336
2390
  /** Image url for the default webhook avatar */
@@ -2338,23 +2392,22 @@ export interface CreateWebhook extends WithReason {
2338
2392
  }
2339
2393
  export interface CreateRequestBodyOptions {
2340
2394
  headers?: Record<string, string>;
2341
- method: RequestMethods;
2342
- body?: Record<string, unknown>;
2395
+ body?: any;
2343
2396
  unauthorized?: boolean;
2344
- url?: string;
2397
+ reason?: string;
2398
+ files?: FileContent[];
2345
2399
  }
2400
+ export type MakeRequestOptions = Omit<CreateRequestBodyOptions, 'method'> & Pick<SendRequestOptions, 'runThroughQueue'>;
2346
2401
  export interface RequestBody {
2347
2402
  headers: Record<string, string>;
2348
- body: string | FormData;
2403
+ body?: string | FormData;
2349
2404
  method: RequestMethods;
2350
2405
  }
2351
2406
  export interface SendRequestOptions {
2352
- /** The url to send the request to. */
2353
- url: string;
2354
- /** The method to use when sending the request. */
2407
+ /** The route to send the request to. */
2408
+ route: string;
2409
+ /** The method to use for sending the request. */
2355
2410
  method: RequestMethods;
2356
- /** The body to be sent in the request. */
2357
- body?: Record<string, any>;
2358
2411
  /** The amount of times this request has been retried. */
2359
2412
  retryCount: number;
2360
2413
  /** Handler to retry a request should it be rate limited. */
@@ -2366,7 +2419,12 @@ export interface SendRequestOptions {
2366
2419
  /** If this request has a bucket id which it falls under for rate limit */
2367
2420
  bucketId?: string;
2368
2421
  /** Additional request options, used for things like overriding authorization header. */
2369
- options?: Record<string, any>;
2422
+ requestBodyOptions?: CreateRequestBodyOptions;
2423
+ /**
2424
+ * Whether the request should be run through the queue.
2425
+ * Useful for routes which do not have any rate limits.
2426
+ */
2427
+ runThroughQueue?: boolean;
2370
2428
  }
2371
2429
  export interface RestRateLimitedPath {
2372
2430
  url: string;
@@ -2381,7 +2439,7 @@ export interface WebhookMessageEditor {
2381
2439
  * @param token - The webhook token, used to edit the message.
2382
2440
  * @param messageId - The ID of the message to edit.
2383
2441
  * @param options - The parameters for the edit of the message.
2384
- * @returns An instance of the edited {@link DiscordMessage}.
2442
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2385
2443
  *
2386
2444
  * @remarks
2387
2445
  * Fires a _Message Update_ gateway event.
@@ -2390,14 +2448,14 @@ export interface WebhookMessageEditor {
2390
2448
  */
2391
2449
  (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
2392
2450
  threadId?: BigString;
2393
- }): Promise<Camelize<DiscordMessage>>;
2451
+ }): Promise<CamelizedDiscordMessage>;
2394
2452
  /**
2395
2453
  * Edits the original webhook message.
2396
2454
  *
2397
2455
  * @param webhookId - The ID of the webhook to edit the original message of.
2398
2456
  * @param token - The webhook token, used to edit the message.
2399
2457
  * @param options - The parameters for the edit of the message.
2400
- * @returns An instance of the edited {@link DiscordMessage}.
2458
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2401
2459
  *
2402
2460
  * @remarks
2403
2461
  * Fires a _Message Update_ gateway event.
@@ -2406,7 +2464,7 @@ export interface WebhookMessageEditor {
2406
2464
  */
2407
2465
  original: (webhookId: BigString, token: string, options: InteractionCallbackData & {
2408
2466
  threadId?: BigString;
2409
- }) => Promise<Camelize<DiscordMessage>>;
2467
+ }) => Promise<CamelizedDiscordMessage>;
2410
2468
  }
2411
2469
  export interface RestRequestResponse {
2412
2470
  ok: boolean;