@discordeno/rest 19.0.0-next.fc13bdf → 19.0.0-next.fd357ae

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,21 +1,26 @@
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
11
11
  */
12
12
  applicationId?: BigString;
13
- /**
14
- * The base url to connect to. If you create a proxy rest, that url would go here.
15
- * IT SHOULD NOT END WITH A /
16
- * @default https://discord.com/api
17
- */
18
- baseUrl?: string;
13
+ /** Configuration when using a proxy. */
14
+ proxy?: {
15
+ /**
16
+ * The base url to connect to. If you create a proxy rest, that url would go here.
17
+ * IT SHOULD NOT END WITH A /
18
+ * @default https://discord.com/api
19
+ */
20
+ baseUrl: string;
21
+ /** The authorization header to attach when sending requests to the proxy. */
22
+ authorization: string;
23
+ };
19
24
  /**
20
25
  * The api versions which can be used to make requests.
21
26
  * @default 10
@@ -24,7 +29,7 @@ export interface CreateRestManagerOptions {
24
29
  }
25
30
  export interface RestManager {
26
31
  /** The bot token which will be used to make requests. */
27
- token: string;
32
+ token?: string;
28
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. */
29
34
  applicationId: bigint;
30
35
  /** The api version to use when making requests. Only the latest supported version will be tested. */
@@ -35,6 +40,8 @@ export interface RestManager {
35
40
  * @default https://discord.com/api
36
41
  */
37
42
  baseUrl: string;
43
+ /** The authorization header to attach when sending requests to the proxy. */
44
+ authorization?: string;
38
45
  /** The maximum amount of times a request should be retried. Defaults to Infinity */
39
46
  maxRetryCount: number;
40
47
  /** Whether or not the manager is rate limited globally across all requests. Defaults to false. */
@@ -56,7 +63,7 @@ export interface RestManager {
56
63
  /** Reshapes and modifies the obj as needed to make it ready for discords api. */
57
64
  changeToDiscordFormat: (obj: any) => any;
58
65
  /** Creates the request body and headers that are necessary to send a request. Will handle different types of methods and everything necessary for discord. */
59
- createRequest: (options: CreateRequestBodyOptions) => RequestBody;
66
+ createRequestBody: (method: RequestMethods, options?: CreateRequestBodyOptions) => RequestBody;
60
67
  /** 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. */
61
68
  processRateLimitedPaths: () => void;
62
69
  /** Processes the rate limit headers and determines if it needs to be rate limited and returns the bucket id if available */
@@ -66,19 +73,19 @@ export interface RestManager {
66
73
  /** Split a url to separate rate limit buckets based on major/minor parameters. */
67
74
  simplifyUrl: (url: string, method: RequestMethods) => string;
68
75
  /** Make a request to be sent to the api. */
69
- makeRequest: <T = unknown>(method: RequestMethods, url: string, body?: Record<string, any>, options?: Record<string, any>) => Promise<T>;
76
+ makeRequest: <T = unknown>(method: RequestMethods, url: string, options?: MakeRequestOptions) => Promise<T>;
70
77
  /** Takes a request and processes it into a queue. */
71
- processRequest: (request: SendRequestOptions) => void;
78
+ processRequest: (request: SendRequestOptions) => Promise<void>;
72
79
  /** Make a get request to the api */
73
- get: <T = void>(url: string) => Promise<Camelize<T>>;
80
+ get: <T = void>(url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<Camelize<T>>;
74
81
  /** Make a post request to the api. */
75
- post: <T = void>(url: string, body?: Record<string, any>) => Promise<Camelize<T>>;
82
+ post: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
76
83
  /** Make a put request to the api. */
77
- put: <T = void>(url: string, body?: Record<string, any>, options?: Record<string, any>) => Promise<Camelize<T>>;
84
+ put: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
78
85
  /** Make a delete request to the api. */
79
- delete: (url: string, body?: Record<string, any>) => Promise<void>;
86
+ delete: (url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<void>;
80
87
  /** Make a patch request to the api. */
81
- patch: <T = void>(url: string, body?: Record<string, any>) => Promise<Camelize<T>>;
88
+ patch: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
82
89
  /**
83
90
  * Adds a reaction to a message.
84
91
  *
@@ -123,6 +130,7 @@ export interface RestManager {
123
130
  * @param guildId - The ID of the guild the member to add the role to is in.
124
131
  * @param userId - The user ID of the member to add the role to.
125
132
  * @param roleId - The ID of the role to add to the member.
133
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
126
134
  *
127
135
  * @remarks
128
136
  * Requires the `MANAGE_ROLES` permission.
@@ -152,7 +160,8 @@ export interface RestManager {
152
160
  *
153
161
  * @param guildId - The ID of the guild to create the rule in.
154
162
  * @param options - The parameters for the creation of the rule.
155
- * @returns An instance of the created {@link DiscordAutoModerationRule}.
163
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
164
+ * @returns An instance of the created {@link CamelizedDiscordAutoModerationRule}.
156
165
  *
157
166
  * @remarks
158
167
  * Requires the `MANAGE_GUILD` permission.
@@ -161,13 +170,14 @@ export interface RestManager {
161
170
  *
162
171
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
163
172
  */
164
- createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions) => Promise<Camelize<DiscordAutoModerationRule>>;
173
+ createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
165
174
  /**
166
175
  * Creates a channel within a guild.
167
176
  *
168
177
  * @param guildId - The ID of the guild to create the channel within.
169
178
  * @param options - The parameters for the creation of the channel.
170
- * @returns An instance of the created {@link DiscordChannel}.
179
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
180
+ * @returns An instance of the created {@link CamelizedDiscordChannel}.
171
181
  *
172
182
  * @remarks
173
183
  * Requires the `MANAGE_CHANNELS` permission.
@@ -180,13 +190,14 @@ export interface RestManager {
180
190
  *
181
191
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
182
192
  */
183
- createChannel: (guildId: BigString, options: CreateGuildChannel) => Promise<Camelize<DiscordChannel>>;
193
+ createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
184
194
  /**
185
195
  * Creates an emoji in a guild.
186
196
  *
187
197
  * @param guildId - The ID of the guild in which to create the emoji.
188
198
  * @param options - The parameters for the creation of the emoji.
189
- * @returns An instance of the created {@link DiscordEmoji}.
199
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
200
+ * @returns An instance of the created {@link CamelizedDiscordEmoji}.
190
201
  *
191
202
  * @remarks
192
203
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -197,13 +208,14 @@ export interface RestManager {
197
208
  *
198
209
  * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
199
210
  */
200
- createEmoji: (guildId: BigString, options: CreateGuildEmoji) => Promise<Camelize<DiscordEmoji>>;
211
+ createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
201
212
  /**
202
213
  * Creates a new thread in a forum channel, and sends a message within the created thread.
203
214
  *
204
215
  * @param channelId - The ID of the forum channel to create the thread within.
205
216
  * @param options - The parameters for the creation of the thread.
206
- * @returns An instance of {@link DiscordChannel} with a nested {@link Message} object.
217
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
218
+ * @returns An instance of {@link CamelizedDiscordChannel} with a nested {@link Message} object.
207
219
  *
208
220
  * @remarks
209
221
  * Requires the `CREATE_MESSAGES` permission.
@@ -215,7 +227,7 @@ export interface RestManager {
215
227
  *
216
228
  * @experimental
217
229
  */
218
- createForumThread: (channelId: BigString, options: CreateForumPostWithMessage) => Promise<Camelize<DiscordChannel>>;
230
+ createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
219
231
  /**
220
232
  * Creates an application command accessible globally; across different guilds and channels.
221
233
  *
@@ -229,12 +241,12 @@ export interface RestManager {
229
241
  *
230
242
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
231
243
  */
232
- createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
244
+ createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
233
245
  /**
234
246
  * Creates a guild.
235
247
  *
236
248
  * @param options - The parameters for the creation of the guild.
237
- * @returns An instance of the created {@link DiscordGuild}.
249
+ * @returns An instance of the created {@link CamelizedDiscordGuild}.
238
250
  *
239
251
  * @remarks
240
252
  * ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
@@ -243,7 +255,7 @@ export interface RestManager {
243
255
  *
244
256
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
245
257
  */
246
- createGuild: (options: CreateGuild) => Promise<Camelize<DiscordGuild>>;
258
+ createGuild: (options: CreateGuild) => Promise<CamelizedDiscordGuild>;
247
259
  /**
248
260
  * Creates an application command only accessible in a specific guild.
249
261
  *
@@ -257,7 +269,7 @@ export interface RestManager {
257
269
  *
258
270
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
259
271
  */
260
- createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
272
+ createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
261
273
  /**
262
274
  * Creates a guild from a template.
263
275
  *
@@ -272,12 +284,13 @@ export interface RestManager {
272
284
  *
273
285
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
274
286
  */
275
- createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<Camelize<DiscordGuild>>;
287
+ createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<CamelizedDiscordGuild>;
276
288
  /**
277
289
  * Create a new sticker for the guild.
278
290
  *
279
291
  * @param guildId The ID of the guild to get
280
- * @return A {@link DiscordSticker}
292
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
293
+ * @return A {@link CamelizedDiscordSticker}
281
294
  *
282
295
  * @remarks
283
296
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -287,7 +300,7 @@ export interface RestManager {
287
300
  *
288
301
  * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}
289
302
  */
290
- createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions) => Promise<Camelize<DiscordSticker>>;
303
+ createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<CamelizedDiscordSticker>;
291
304
  /**
292
305
  * Creates a template from a guild.
293
306
  *
@@ -302,13 +315,14 @@ export interface RestManager {
302
315
  *
303
316
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
304
317
  */
305
- createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Camelize<DiscordTemplate>>;
318
+ createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<CamelizedDiscordTemplate>;
306
319
  /**
307
320
  * Creates an invite to a channel in a guild.
308
321
  *
309
322
  * @param channelId - The ID of the channel to create the invite to.
310
323
  * @param options - The parameters for the creation of the invite.
311
- * @returns An instance of the created {@link DiscordInvite}.
324
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
325
+ * @returns An instance of the created {@link CamelizedDiscordInvite}.
312
326
  *
313
327
  * @remarks
314
328
  * Requires the `CREATE_INSTANT_INVITE` permission.
@@ -320,13 +334,14 @@ export interface RestManager {
320
334
  *
321
335
  * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
322
336
  */
323
- createInvite: (channelId: BigString, options?: CreateChannelInvite) => Promise<Camelize<DiscordInvite>>;
337
+ createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<CamelizedDiscordInvite>;
324
338
  /**
325
339
  * Creates a role in a guild.
326
340
  *
327
341
  * @param guildId - The ID of the guild to create the role in.
328
342
  * @param options - The parameters for the creation of the role.
329
- * @returns An instance of the created {@link DiscordRole}.
343
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
344
+ * @returns An instance of the created {@link CamelizedDiscordRole}.
330
345
  *
331
346
  * @remarks
332
347
  * Requires the `MANAGE_ROLES` permission.
@@ -335,12 +350,13 @@ export interface RestManager {
335
350
  *
336
351
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
337
352
  */
338
- createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
353
+ createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
339
354
  /**
340
355
  * Creates a scheduled event in a guild.
341
356
  *
342
357
  * @param guildId - The ID of the guild to create the scheduled event in.
343
358
  * @param options - The parameters for the creation of the scheduled event.
359
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
344
360
  * @returns An instance of the created {@link ScheduledEvent}.
345
361
  *
346
362
  * @remarks
@@ -352,12 +368,13 @@ export interface RestManager {
352
368
  *
353
369
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
354
370
  */
355
- createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent) => Promise<Camelize<DiscordScheduledEvent>>;
371
+ createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
356
372
  /**
357
373
  * Creates a stage instance associated with a stage channel.
358
374
  *
359
375
  * @param options - The parameters for the creation of the stage instance.
360
- * @returns An instance of the created {@link DiscordStageInstance}.
376
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
377
+ * @returns An instance of the created {@link CamelizedDiscordStageInstance}.
361
378
  *
362
379
  * @remarks
363
380
  * Requires the user to be a moderator of the stage channel.
@@ -366,29 +383,31 @@ export interface RestManager {
366
383
  *
367
384
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance}
368
385
  */
369
- createStageInstance: (options: CreateStageInstance) => Promise<Camelize<DiscordStageInstance>>;
386
+ createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<CamelizedDiscordStageInstance>;
370
387
  /**
371
388
  * Creates a webhook.
372
389
  *
373
390
  * @param channelId - The ID of the channel to create the webhook in.
374
391
  * @param options - The parameters for the creation of the webhook.
375
- * @returns An instance of the created {@link DiscordWebhook}.
392
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
393
+ * @returns An instance of the created {@link CamelizedDiscordWebhook}.
376
394
  *
377
395
  * @remarks
378
396
  * Requires the `MANAGE_WEBHOOKS` permission.
379
397
  *
380
- * ⚠️ The webhook name must not contain the string 'clyde' (case-insensitive).
398
+ * ⚠️ The webhook name must not contain the substrings 'clyde', or 'discord' (case-insensitive).
381
399
  *
382
400
  * Fires a _Webhooks Update_ gateway event.
383
401
  *
384
402
  * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
385
403
  */
386
- createWebhook: (channelId: BigString, options: CreateWebhook) => Promise<Camelize<DiscordWebhook>>;
404
+ createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
387
405
  /**
388
406
  * Deletes an automod rule.
389
407
  *
390
408
  * @param guildId - The ID of the guild to delete the rule from.
391
409
  * @param ruleId - The ID of the automod rule to delete.
410
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
392
411
  *
393
412
  * @remarks
394
413
  * Requires the `MANAGE_GUILD` permission.
@@ -402,6 +421,7 @@ export interface RestManager {
402
421
  * Deletes a channel from within a guild.
403
422
  *
404
423
  * @param channelId - The ID of the channel to delete.
424
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
405
425
  * @returns An instance of the deleted {@link Channel}.
406
426
  *
407
427
  * @remarks
@@ -428,6 +448,7 @@ export interface RestManager {
428
448
  *
429
449
  * @param channelId - The ID of the channel to delete the permission override of.
430
450
  * @param overwriteId - The ID of the permission override to delete.
451
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
431
452
  *
432
453
  * @remarks
433
454
  * Requires the `MANAGE_ROLES` permission.
@@ -442,6 +463,7 @@ export interface RestManager {
442
463
  *
443
464
  * @param guildId - The ID of the guild from which to delete the emoji.
444
465
  * @param id - The ID of the emoji to delete.
466
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
445
467
  *
446
468
  * @remarks
447
469
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -499,7 +521,8 @@ export interface RestManager {
499
521
  * Delete a new sticker for the guild.
500
522
  *
501
523
  * @param guildId The ID of the guild to get
502
- * @return A {@link DiscordSticker}
524
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
525
+ * @return A {@link CamelizedDiscordSticker}
503
526
  *
504
527
  * @remarks
505
528
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -529,6 +552,7 @@ export interface RestManager {
529
552
  *
530
553
  * @param guildId - The ID of the guild from which to delete the integration.
531
554
  * @param integrationId - The ID of the integration to delete from the guild.
555
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
532
556
  *
533
557
  * @remarks
534
558
  * Requires the `MANAGE_GUILD` permission.
@@ -540,11 +564,12 @@ export interface RestManager {
540
564
  *
541
565
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}
542
566
  */
543
- deleteIntegration: (guildId: BigString, integrationId: BigString) => Promise<void>;
567
+ deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
544
568
  /**
545
569
  * Deletes an invite to a channel.
546
570
  *
547
571
  * @param inviteCode - The invite code of the invite to delete.
572
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
548
573
  *
549
574
  * @remarks
550
575
  * Requires the `MANAGE_CHANNELS` permission.
@@ -559,6 +584,7 @@ export interface RestManager {
559
584
  *
560
585
  * @param channelId - The ID of the channel to delete the message from.
561
586
  * @param messageId - The ID of the message to delete from the channel.
587
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
562
588
  *
563
589
  * @remarks
564
590
  * If not deleting own message:
@@ -574,6 +600,7 @@ export interface RestManager {
574
600
  *
575
601
  * @param channelId - The ID of the channel to delete the messages from.
576
602
  * @param messageIds - The IDs of the messages to delete from the channel.
603
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
577
604
  *
578
605
  * @remarks
579
606
  * Requires the `MANAGE_MESSAGES` permission.
@@ -651,6 +678,7 @@ export interface RestManager {
651
678
  *
652
679
  * @param guildId - The ID of the guild to delete the role from.
653
680
  * @param roleId - The ID of the role to delete.
681
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
654
682
  *
655
683
  * @remarks
656
684
  * Requires the `MANAGE_ROLES` permission.
@@ -659,7 +687,7 @@ export interface RestManager {
659
687
  *
660
688
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
661
689
  */
662
- deleteRole: (guildId: BigString, roleId: BigString) => Promise<void>;
690
+ deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
663
691
  /**
664
692
  * Deletes a scheduled event from a guild.
665
693
  *
@@ -678,6 +706,7 @@ export interface RestManager {
678
706
  * Deletes the stage instance associated with a stage channel, if one exists.
679
707
  *
680
708
  * @param channelId - The ID of the stage channel the stage instance is associated with.
709
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
681
710
  *
682
711
  * @remarks
683
712
  * Requires the user to be a moderator of the stage channel.
@@ -758,14 +787,15 @@ export interface RestManager {
758
787
  *
759
788
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
760
789
  */
761
- editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<Camelize<DiscordApplicationCommandPermissions>>;
790
+ editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<CamelizedDiscordApplicationCommandPermissions>;
762
791
  /**
763
792
  * Edits an automod rule.
764
793
  *
765
794
  * @param guildId - The ID of the guild to edit the rule in.
766
795
  * @param ruleId - The ID of the rule to edit.
767
796
  * @param options - The parameters for the edit of the rule.
768
- * @returns An instance of the edited {@link DiscordAutoModerationRule}.
797
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
798
+ * @returns An instance of the edited {@link CamelizedDiscordAutoModerationRule}.
769
799
  *
770
800
  * @remarks
771
801
  * Requires the `MANAGE_GUILD` permission.
@@ -774,7 +804,7 @@ export interface RestManager {
774
804
  *
775
805
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
776
806
  */
777
- editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>) => Promise<Camelize<DiscordAutoModerationRule>>;
807
+ editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
778
808
  /**
779
809
  * Modifies the bot's username or avatar.
780
810
  * NOTE: username: if changed may cause the bot's discriminator to be randomized.
@@ -782,13 +812,14 @@ export interface RestManager {
782
812
  editBotProfile: (options: {
783
813
  username?: string;
784
814
  botAvatarURL?: string | null;
785
- }) => Promise<Camelize<DiscordUser>>;
815
+ }) => Promise<CamelizedDiscordUser>;
786
816
  /**
787
817
  * Edits a channel's settings.
788
818
  *
789
819
  * @param channelId - The ID of the channel to edit.
790
820
  * @param options - The parameters for the edit of the channel.
791
- * @returns An instance of the edited {@link DiscordChannel}.
821
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
822
+ * @returns An instance of the edited {@link CamelizedDiscordChannel}.
792
823
  *
793
824
  * @remarks
794
825
  * If editing a channel of type {@link ChannelTypes.GroupDm}:
@@ -812,12 +843,13 @@ export interface RestManager {
812
843
  * - Otherwise:
813
844
  * - Fires a _Channel Update_ gateway event.
814
845
  */
815
- editChannel: (channelId: BigString, options: ModifyChannel) => Promise<Camelize<DiscordChannel>>;
846
+ editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
816
847
  /**
817
848
  * Edits the permission overrides for a user or role in a channel.
818
849
  *
819
850
  * @param channelId - The ID of the channel to edit the permission overrides of.
820
851
  * @param options - The permission override.
852
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
821
853
  *
822
854
  * @remarks
823
855
  * Requires the `MANAGE_ROLES` permission.
@@ -828,7 +860,7 @@ export interface RestManager {
828
860
  *
829
861
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions}
830
862
  */
831
- editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions) => Promise<void>;
863
+ editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
832
864
  /**
833
865
  * Edits the positions of a set of channels in a guild.
834
866
  *
@@ -849,7 +881,8 @@ export interface RestManager {
849
881
  * @param guildId - The ID of the guild in which to edit the emoji.
850
882
  * @param id - The ID of the emoji to edit.
851
883
  * @param options - The parameters for the edit of the emoji.
852
- * @returns An instance of the updated {@link DiscordEmoji}.
884
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
885
+ * @returns An instance of the updated {@link CamelizedDiscordEmoji}.
853
886
  *
854
887
  * @remarks
855
888
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -858,7 +891,7 @@ export interface RestManager {
858
891
  *
859
892
  * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
860
893
  */
861
- editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji) => Promise<Camelize<DiscordEmoji>>;
894
+ editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
862
895
  /**
863
896
  * Edits a follow-up message to an interaction.
864
897
  *
@@ -876,7 +909,7 @@ export interface RestManager {
876
909
  *
877
910
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
878
911
  */
879
- editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
912
+ editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
880
913
  /**
881
914
  * Edits a global application command.
882
915
  *
@@ -886,13 +919,14 @@ export interface RestManager {
886
919
  *
887
920
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
888
921
  */
889
- editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
922
+ editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
890
923
  /**
891
924
  * Edits a guild's settings.
892
925
  *
893
926
  * @param guildId - The ID of the guild to edit.
894
927
  * @param shardId - The ID of the shard the guild is in.
895
928
  * @param options - The parameters for the edit of the guild.
929
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
896
930
  * @returns An instance of the edited {@link Guild}.
897
931
  *
898
932
  * @remarks
@@ -905,7 +939,7 @@ export interface RestManager {
905
939
  *
906
940
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
907
941
  */
908
- editGuild: (guildId: BigString, options: ModifyGuild) => Promise<Camelize<DiscordGuild>>;
942
+ editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<CamelizedDiscordGuild>;
909
943
  /**
910
944
  * Edits an application command registered in a guild.
911
945
  *
@@ -916,14 +950,17 @@ export interface RestManager {
916
950
  *
917
951
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
918
952
  */
919
- editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
920
- /** Modify a guild's MFA level. Requires guild ownership. */
953
+ editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
954
+ /** Modify a guild's MFA level. Requires guild ownership.
955
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
956
+ */
921
957
  editGuildMfaLevel: (guildId: BigString, mfaLevel: MfaLevels, reason?: string) => Promise<void>;
922
958
  /**
923
959
  * Edit the given sticker.
924
960
  *
925
961
  * @param guildId The ID of the guild to get
926
- * @return A {@link DiscordSticker}
962
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
963
+ * @return A {@link CamelizedDiscordSticker}
927
964
  *
928
965
  * @remarks
929
966
  * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
@@ -931,7 +968,7 @@ export interface RestManager {
931
968
  *
932
969
  * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
933
970
  */
934
- editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>) => Promise<Camelize<DiscordSticker>>;
971
+ editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<CamelizedDiscordSticker>;
935
972
  /**
936
973
  * Edits a template's settings.
937
974
  *
@@ -947,7 +984,7 @@ export interface RestManager {
947
984
  *
948
985
  * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}
949
986
  */
950
- editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
987
+ editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<CamelizedDiscordTemplate>;
951
988
  /**
952
989
  * Edits a message.
953
990
  *
@@ -965,7 +1002,7 @@ export interface RestManager {
965
1002
  *
966
1003
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
967
1004
  */
968
- editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
1005
+ editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<CamelizedDiscordMessage>;
969
1006
  /**
970
1007
  * Edits the initial message response to an interaction.
971
1008
  *
@@ -982,14 +1019,14 @@ export interface RestManager {
982
1019
  *
983
1020
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
984
1021
  */
985
- editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage> | undefined>;
1022
+ editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage | undefined>;
986
1023
  /**
987
1024
  * Edits the original webhook message.
988
1025
  *
989
1026
  * @param webhookId - The ID of the webhook to edit the original message of.
990
1027
  * @param token - The webhook token, used to edit the message.
991
1028
  * @param options - The parameters for the edit of the message.
992
- * @returns An instance of the edited {@link DiscordMessage}.
1029
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
993
1030
  *
994
1031
  * @remarks
995
1032
  * Fires a _Message Update_ gateway event.
@@ -998,7 +1035,7 @@ export interface RestManager {
998
1035
  */
999
1036
  editOriginalWebhookMessage: (webhookId: BigString, token: string, options: InteractionCallbackData & {
1000
1037
  threadId?: BigString;
1001
- }) => Promise<Camelize<DiscordMessage>>;
1038
+ }) => Promise<CamelizedDiscordMessage>;
1002
1039
  /**
1003
1040
  * Edits the voice state of the bot user.
1004
1041
  *
@@ -1023,7 +1060,8 @@ export interface RestManager {
1023
1060
  * @param guildId - The ID of the guild to edit the role in.
1024
1061
  * @param roleId - The ID of the role to edit.
1025
1062
  * @param options - The parameters for the edit of the role.
1026
- * @returns An instance of the edited {@link DiscordRole}.
1063
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1064
+ * @returns An instance of the edited {@link CamelizedDiscordRole}.
1027
1065
  *
1028
1066
  * @remarks
1029
1067
  * Requires the `MANAGE_ROLES` permission.
@@ -1032,13 +1070,14 @@ export interface RestManager {
1032
1070
  *
1033
1071
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
1034
1072
  */
1035
- editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole) => Promise<Camelize<DiscordRole>>;
1073
+ editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
1036
1074
  /**
1037
1075
  * Edits the positions of a set of roles.
1038
1076
  *
1039
1077
  * @param guildId - The ID of the guild to edit the role positions in.
1040
1078
  * @param options - The parameters for the edit of the role positions.
1041
- * @returns A collection of {@link DiscordRole} objects assorted by role ID.
1079
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1080
+ * @returns A collection of {@link CamelizedDiscordRole} objects assorted by role ID.
1042
1081
  *
1043
1082
  * @remarks
1044
1083
  * Requires the `MANAGE_ROLES` permission.
@@ -1047,12 +1086,13 @@ export interface RestManager {
1047
1086
  *
1048
1087
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
1049
1088
  */
1050
- editRolePositions: (guildId: BigString, options: ModifyRolePositions[]) => Promise<Camelize<DiscordRole[]>>;
1089
+ editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<CamelizedDiscordRole[]>;
1051
1090
  /**
1052
1091
  * Edits a scheduled event.
1053
1092
  *
1054
1093
  * @param guildId - The ID of the guild to edit the scheduled event in.
1055
1094
  * @param eventId - The ID of the scheduled event to edit.
1095
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1056
1096
  * @returns An instance of the edited {@link ScheduledEvent}.
1057
1097
  *
1058
1098
  * @remarks
@@ -1066,12 +1106,14 @@ export interface RestManager {
1066
1106
  *
1067
1107
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
1068
1108
  */
1069
- editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>) => Promise<Camelize<DiscordScheduledEvent>>;
1109
+ editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
1070
1110
  /**
1071
1111
  * Edits a stage instance.
1072
1112
  *
1073
1113
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1074
- * @returns An instance of the updated {@link DiscordStageInstance}.
1114
+ * @param topic - Topic of the Stage instance (1-120 characters).
1115
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1116
+ * @returns An instance of the updated {@link CamelizedDiscordStageInstance}.
1075
1117
  *
1076
1118
  * @remarks
1077
1119
  * Requires the user to be a moderator of the stage channel.
@@ -1080,7 +1122,7 @@ export interface RestManager {
1080
1122
  *
1081
1123
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance}
1082
1124
  */
1083
- editStageInstance: (channelId: BigString, data: EditStageInstanceOptions) => Promise<Camelize<DiscordStageInstance>>;
1125
+ editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<CamelizedDiscordStageInstance>;
1084
1126
  /**
1085
1127
  * Edits the voice state of another user.
1086
1128
  *
@@ -1099,7 +1141,8 @@ export interface RestManager {
1099
1141
  * Edits a webhook.
1100
1142
  *
1101
1143
  * @param webhookId - The ID of the webhook to edit.
1102
- * @returns An instance of the edited {@link DiscordWebhook}.
1144
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1145
+ * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1103
1146
  *
1104
1147
  * @remarks
1105
1148
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1108,7 +1151,7 @@ export interface RestManager {
1108
1151
  *
1109
1152
  * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook}
1110
1153
  */
1111
- editWebhook: (webhookId: BigString, options: ModifyWebhook) => Promise<Camelize<DiscordWebhook>>;
1154
+ editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
1112
1155
  /**
1113
1156
  * Edits a webhook message.
1114
1157
  *
@@ -1116,7 +1159,7 @@ export interface RestManager {
1116
1159
  * @param token - The webhook token, used to edit the message.
1117
1160
  * @param messageId - The ID of the message to edit.
1118
1161
  * @param options - The parameters for the edit of the message.
1119
- * @returns An instance of the edited {@link DiscordMessage}.
1162
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1120
1163
  *
1121
1164
  * @remarks
1122
1165
  * Fires a _Message Update_ gateway event.
@@ -1125,13 +1168,13 @@ export interface RestManager {
1125
1168
  */
1126
1169
  editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
1127
1170
  threadId?: BigString;
1128
- }) => Promise<Camelize<DiscordMessage>>;
1171
+ }) => Promise<CamelizedDiscordMessage>;
1129
1172
  /**
1130
1173
  * Edits a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1131
1174
  *
1132
1175
  * @param webhookId - The ID of the webhook to edit.
1133
1176
  * @param token - The webhook token, used to edit the webhook.
1134
- * @returns An instance of the edited {@link DiscordWebhook}.
1177
+ * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1135
1178
  *
1136
1179
  * @remarks
1137
1180
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1140,12 +1183,13 @@ export interface RestManager {
1140
1183
  *
1141
1184
  * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
1142
1185
  */
1143
- editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
1186
+ editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<CamelizedDiscordWebhook>;
1144
1187
  /**
1145
1188
  * Edits a guild's welcome screen.
1146
1189
  *
1147
1190
  * @param guildId - The ID of the guild to edit the welcome screen of.
1148
1191
  * @param options - The parameters for the edit of the welcome screen.
1192
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1149
1193
  * @returns An instance of the edited {@link WelcomeScreen}.
1150
1194
  *
1151
1195
  * @remarks
@@ -1155,11 +1199,12 @@ export interface RestManager {
1155
1199
  *
1156
1200
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
1157
1201
  */
1158
- editWelcomeScreen: (guildId: BigString, options: Camelize<DiscordModifyGuildWelcomeScreen>) => Promise<Camelize<DiscordWelcomeScreen>>;
1202
+ editWelcomeScreen: (guildId: BigString, options: CamelizedDiscordModifyGuildWelcomeScreen, reason?: string) => Promise<CamelizedDiscordWelcomeScreen>;
1159
1203
  /**
1160
1204
  * Edits the settings of a guild's widget.
1161
1205
  *
1162
1206
  * @param guildId - The ID of the guild to edit the settings of the widget of.
1207
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1163
1208
  * @returns An instance of the edited {@link GuildWidgetSettings}.
1164
1209
  *
1165
1210
  * @remarks
@@ -1169,27 +1214,27 @@ export interface RestManager {
1169
1214
  *
1170
1215
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
1171
1216
  */
1172
- editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>) => Promise<Camelize<DiscordGuildWidgetSettings>>;
1217
+ editWidgetSettings: (guildId: BigString, options: CamelizedDiscordGuildWidgetSettings, reason?: string) => Promise<CamelizedDiscordGuildWidgetSettings>;
1173
1218
  /**
1174
1219
  * Executes a webhook, causing a message to be posted in the channel configured for the webhook.
1175
1220
  *
1176
1221
  * @param webhookId - The ID of the webhook to execute.
1177
1222
  * @param token - The webhook token, used to execute the webhook.
1178
1223
  * @param options - The parameters for the execution of the webhook.
1179
- * @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`.
1224
+ * @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`.
1180
1225
  *
1181
1226
  * @remarks
1182
1227
  * If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
1183
1228
  *
1184
1229
  * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
1185
1230
  */
1186
- executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
1231
+ executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<CamelizedDiscordMessage | undefined>;
1187
1232
  /**
1188
1233
  * Follows an announcement channel, allowing messages posted within it to be cross-posted into the target channel.
1189
1234
  *
1190
1235
  * @param sourceChannelId - The ID of the announcement channel to follow.
1191
1236
  * @param targetChannelId - The ID of the target channel - the channel to cross-post to.
1192
- * @returns An instance of {@link DiscordFollowedChannel}.
1237
+ * @returns An instance of {@link CamelizedDiscordFollowedChannel}.
1193
1238
  *
1194
1239
  * @remarks
1195
1240
  * Requires the `MANAGE_WEBHOOKS` permission in the __target channel__.
@@ -1198,12 +1243,12 @@ export interface RestManager {
1198
1243
  *
1199
1244
  * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
1200
1245
  */
1201
- followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<Camelize<DiscordFollowedChannel>>;
1246
+ followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>;
1202
1247
  /**
1203
1248
  * Gets the list of all active threads for a guild.
1204
1249
  *
1205
1250
  * @param guildId - The ID of the guild to get the threads of.
1206
- * @returns An instance of {@link DiscordActiveThreads}.
1251
+ * @returns An instance of {@link CamelizedDiscordActiveThreads}.
1207
1252
  *
1208
1253
  * @remarks
1209
1254
  * Returns both public and private threads.
@@ -1212,9 +1257,9 @@ export interface RestManager {
1212
1257
  *
1213
1258
  * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
1214
1259
  */
1215
- getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordActiveThreads>>;
1260
+ getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>;
1216
1261
  /** Get the applications info */
1217
- getApplicationInfo: () => Promise<Camelize<DiscordApplication>>;
1262
+ getApplicationInfo: () => Promise<CamelizedDiscordApplication>;
1218
1263
  /**
1219
1264
  * Gets the permissions of a guild application command.
1220
1265
  *
@@ -1224,7 +1269,7 @@ export interface RestManager {
1224
1269
  *
1225
1270
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
1226
1271
  */
1227
- getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<Camelize<DiscordApplicationCommandPermissions>>;
1272
+ getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions>;
1228
1273
  /**
1229
1274
  * Gets the permissions of all application commands registered in a guild by the ID of the guild.
1230
1275
  *
@@ -1233,7 +1278,7 @@ export interface RestManager {
1233
1278
  *
1234
1279
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
1235
1280
  */
1236
- getApplicationCommandPermissions: (guildId: BigString) => Promise<Camelize<DiscordApplicationCommandPermissions[]>>;
1281
+ getApplicationCommandPermissions: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions[]>;
1237
1282
  /**
1238
1283
  * Gets a guild's audit log.
1239
1284
  *
@@ -1246,57 +1291,57 @@ export interface RestManager {
1246
1291
  *
1247
1292
  * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
1248
1293
  */
1249
- getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
1294
+ getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<CamelizedDiscordAuditLog>;
1250
1295
  /**
1251
1296
  * Gets an automod rule by its ID.
1252
1297
  *
1253
1298
  * @param guildId - The ID of the guild to get the rule of.
1254
1299
  * @param ruleId - The ID of the rule to get.
1255
- * @returns An instance of {@link DiscordAutoModerationRule}.
1300
+ * @returns An instance of {@link CamelizedDiscordAutoModerationRule}.
1256
1301
  *
1257
1302
  * @remarks
1258
1303
  * Requires the `MANAGE_GUILD` permission.
1259
1304
  *
1260
1305
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
1261
1306
  */
1262
- getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
1307
+ getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<CamelizedDiscordAutoModerationRule>;
1263
1308
  /**
1264
1309
  * Gets the list of automod rules for a guild.
1265
1310
  *
1266
1311
  * @param guildId - The ID of the guild to get the rules from.
1267
- * @returns A collection of {@link DiscordAutoModerationRule} objects assorted by rule ID.
1312
+ * @returns A collection of {@link CamelizedDiscordAutoModerationRule} objects assorted by rule ID.
1268
1313
  *
1269
1314
  * @remarks
1270
1315
  * Requires the `MANAGE_GUILD` permission.
1271
1316
  *
1272
1317
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
1273
1318
  */
1274
- getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule[]>>;
1319
+ getAutomodRules: (guildId: BigString) => Promise<CamelizedDiscordAutoModerationRule[]>;
1275
1320
  /**
1276
1321
  * Gets the list of available voice regions.
1277
1322
  *
1278
1323
  * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
1279
1324
  */
1280
- getAvailableVoiceRegions: () => Promise<Camelize<DiscordVoiceRegion[]>>;
1325
+ getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>;
1281
1326
  /**
1282
1327
  * Gets a ban by user ID.
1283
1328
  *
1284
1329
  * @param guildId - The ID of the guild to get the ban from.
1285
1330
  * @param userId - The ID of the user to get the ban for.
1286
- * @returns An instance of {@link DiscordBan}.
1331
+ * @returns An instance of {@link CamelizedDiscordBan}.
1287
1332
  *
1288
1333
  * @remarks
1289
1334
  * Requires the `BAN_MEMBERS` permission.
1290
1335
  *
1291
1336
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
1292
1337
  */
1293
- getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
1338
+ getBan: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordBan>;
1294
1339
  /**
1295
1340
  * Gets the list of bans for a guild.
1296
1341
  *
1297
1342
  * @param guildId - The ID of the guild to get the list of bans for.
1298
1343
  * @param options - The parameters for the fetching of the list of bans.
1299
- * @returns A collection of {@link DiscordBan} objects assorted by user ID.
1344
+ * @returns A collection of {@link CamelizedDiscordBan} objects assorted by user ID.
1300
1345
  *
1301
1346
  * @remarks
1302
1347
  * Requires the `BAN_MEMBERS` permission.
@@ -1305,24 +1350,24 @@ export interface RestManager {
1305
1350
  *
1306
1351
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
1307
1352
  */
1308
- getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan[]>>;
1353
+ getBans: (guildId: BigString, options?: GetBans) => Promise<CamelizedDiscordBan[]>;
1309
1354
  /**
1310
1355
  * Gets a channel by its ID.
1311
1356
  *
1312
1357
  * @param channelId - The ID of the channel to get.
1313
- * @returns An instance of {@link DiscordChannel}.
1358
+ * @returns An instance of {@link CamelizedDiscordChannel}.
1314
1359
  *
1315
1360
  * @remarks
1316
1361
  * If the channel is a thread, a {@link ThreadMember} object is included in the result.
1317
1362
  *
1318
1363
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
1319
1364
  */
1320
- getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
1365
+ getChannel: (channelId: BigString) => Promise<CamelizedDiscordChannel>;
1321
1366
  /**
1322
1367
  * Gets the list of invites for a channel.
1323
1368
  *
1324
1369
  * @param channelId - The ID of the channel to get the invites of.
1325
- * @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
1370
+ * @returns A collection of {@link CamelizedDiscordInviteMetadata} objects assorted by invite code.
1326
1371
  *
1327
1372
  * @remarks
1328
1373
  * Requires the `MANAGE_CHANNELS` permission.
@@ -1331,59 +1376,59 @@ export interface RestManager {
1331
1376
  *
1332
1377
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
1333
1378
  */
1334
- getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata[]>>;
1379
+ getChannelInvites: (channelId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1335
1380
  /**
1336
1381
  * Gets the list of channels for a guild.
1337
1382
  *
1338
1383
  * @param guildId - The ID of the guild to get the channels of.
1339
- * @returns A collection of {@link DiscordChannel} objects assorted by channel ID.
1384
+ * @returns A collection of {@link CamelizedDiscordChannel} objects assorted by channel ID.
1340
1385
  *
1341
1386
  * @remarks
1342
1387
  * Excludes threads.
1343
1388
  *
1344
1389
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
1345
1390
  */
1346
- getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel[]>>;
1391
+ getChannels: (guildId: BigString) => Promise<CamelizedDiscordChannel[]>;
1347
1392
  /**
1348
1393
  * Gets a list of webhooks for a channel.
1349
1394
  *
1350
1395
  * @param channelId - The ID of the channel which to get the webhooks of.
1351
- * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1396
+ * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1352
1397
  *
1353
1398
  * @remarks
1354
1399
  * Requires the `MANAGE_WEBHOOKS` permission.
1355
1400
  *
1356
1401
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks}
1357
1402
  */
1358
- getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook[]>>;
1403
+ getChannelWebhooks: (channelId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1359
1404
  /**
1360
1405
  * Gets or creates a DM channel with a user.
1361
1406
  *
1362
1407
  * @param userId - The ID of the user to create the DM channel with.
1363
- * @returns An instance of {@link DiscordChannel}.
1408
+ * @returns An instance of {@link CamelizedDiscordChannel}.
1364
1409
  *
1365
1410
  * @see {@link https://discord.com/developers/docs/resources/user#create-dm}
1366
1411
  */
1367
- getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
1412
+ getDmChannel: (userId: BigString) => Promise<CamelizedDiscordChannel>;
1368
1413
  /**
1369
1414
  * Gets an emoji by its ID.
1370
1415
  *
1371
1416
  * @param guildId - The ID of the guild from which to get the emoji.
1372
1417
  * @param emojiId - The ID of the emoji to get.
1373
- * @returns An instance of {@link DiscordEmoji}.
1418
+ * @returns An instance of {@link CamelizedDiscordEmoji}.
1374
1419
  *
1375
1420
  * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
1376
1421
  */
1377
- getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
1422
+ getEmoji: (guildId: BigString, emojiId: BigString) => Promise<CamelizedDiscordEmoji>;
1378
1423
  /**
1379
1424
  * Gets the list of emojis for a guild.
1380
1425
  *
1381
1426
  * @param guildId - The ID of the guild which to get the emojis of.
1382
- * @returns A collection of {@link DiscordEmoji} objects assorted by emoji ID.
1427
+ * @returns A collection of {@link CamelizedDiscordEmoji} objects assorted by emoji ID.
1383
1428
  *
1384
1429
  * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
1385
1430
  */
1386
- getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji[]>>;
1431
+ getEmojis: (guildId: BigString) => Promise<CamelizedDiscordEmoji[]>;
1387
1432
  /**
1388
1433
  * Gets a follow-up message to an interaction by the ID of the message.
1389
1434
  *
@@ -1400,9 +1445,9 @@ export interface RestManager {
1400
1445
  *
1401
1446
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message}
1402
1447
  */
1403
- getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1448
+ getFollowupMessage: (token: string, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1404
1449
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1405
- getGatewayBot: () => Promise<Camelize<DiscordGetGatewayBot>>;
1450
+ getGatewayBot: () => Promise<CamelizedDiscordGetGatewayBot>;
1406
1451
  /**
1407
1452
  * Gets a global application command by its ID.
1408
1453
  *
@@ -1411,7 +1456,7 @@ export interface RestManager {
1411
1456
  *
1412
1457
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
1413
1458
  */
1414
- getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1459
+ getGlobalApplicationCommand: (commandId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1415
1460
  /**
1416
1461
  * Gets the list of your bot's global application commands.
1417
1462
  *
@@ -1419,7 +1464,7 @@ export interface RestManager {
1419
1464
  *
1420
1465
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
1421
1466
  */
1422
- getGlobalApplicationCommands: () => Promise<Camelize<DiscordApplicationCommand[]>>;
1467
+ getGlobalApplicationCommands: () => Promise<CamelizedDiscordApplicationCommand[]>;
1423
1468
  /**
1424
1469
  * Gets a guild by its ID.
1425
1470
  *
@@ -1431,7 +1476,7 @@ export interface RestManager {
1431
1476
  */
1432
1477
  getGuild: (guildId: BigString, options?: {
1433
1478
  counts?: boolean;
1434
- }) => Promise<Camelize<DiscordGuild>>;
1479
+ }) => Promise<CamelizedDiscordGuild>;
1435
1480
  /**
1436
1481
  * Gets a guild application command by its ID.
1437
1482
  *
@@ -1441,7 +1486,7 @@ export interface RestManager {
1441
1486
  *
1442
1487
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}
1443
1488
  */
1444
- getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1489
+ getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1445
1490
  /**
1446
1491
  * Gets the list of application commands registered by your bot in a guild.
1447
1492
  *
@@ -1450,7 +1495,7 @@ export interface RestManager {
1450
1495
  *
1451
1496
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commandss}
1452
1497
  */
1453
- getGuildApplicationCommands: (guildId: BigString) => Promise<Camelize<DiscordApplicationCommand[]>>;
1498
+ getGuildApplicationCommands: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommand[]>;
1454
1499
  /**
1455
1500
  * Gets the preview of a guild by a guild's ID.
1456
1501
  *
@@ -1462,30 +1507,30 @@ export interface RestManager {
1462
1507
  *
1463
1508
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
1464
1509
  */
1465
- getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
1510
+ getGuildPreview: (guildId: BigString) => Promise<CamelizedDiscordGuildPreview>;
1466
1511
  /**
1467
1512
  * Returns a sticker object for the given guild and sticker IDs.
1468
1513
  *
1469
1514
  * @param guildId The ID of the guild to get
1470
1515
  * @param stickerId The ID of the sticker to get
1471
- * @return A {@link DiscordSticker}
1516
+ * @return A {@link CamelizedDiscordSticker}
1472
1517
  *
1473
1518
  * @remarks Includes the user field if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1474
1519
  *
1475
1520
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
1476
1521
  */
1477
- getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1522
+ getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<CamelizedDiscordSticker>;
1478
1523
  /**
1479
1524
  * Returns an array of sticker objects for the given guild.
1480
1525
  *
1481
1526
  * @param guildId The ID of the guild to get
1482
- * @returns A collection of {@link DiscordSticker} objects assorted by sticker ID.
1527
+ * @returns A collection of {@link CamelizedDiscordSticker} objects assorted by sticker ID.
1483
1528
  *
1484
1529
  * @remarks Includes user fields if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1485
1530
  *
1486
1531
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
1487
1532
  */
1488
- getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker[]>>;
1533
+ getGuildStickers: (guildId: BigString) => Promise<CamelizedDiscordSticker[]>;
1489
1534
  /**
1490
1535
  * Gets a template by its code.
1491
1536
  *
@@ -1497,7 +1542,7 @@ export interface RestManager {
1497
1542
  *
1498
1543
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}
1499
1544
  */
1500
- getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
1545
+ getGuildTemplate: (templateCode: string) => Promise<CamelizedDiscordTemplate>;
1501
1546
  /**
1502
1547
  * Gets the list of templates for a guild.
1503
1548
  *
@@ -1509,19 +1554,19 @@ export interface RestManager {
1509
1554
  *
1510
1555
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
1511
1556
  */
1512
- getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate[]>>;
1557
+ getGuildTemplates: (guildId: BigString) => Promise<CamelizedDiscordTemplate[]>;
1513
1558
  /**
1514
1559
  * Gets the list of webhooks for a guild.
1515
1560
  *
1516
1561
  * @param guildId - The ID of the guild to get the list of webhooks for.
1517
- * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1562
+ * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1518
1563
  *
1519
1564
  * @remarks
1520
1565
  * Requires the `MANAGE_WEBHOOKS` permission.
1521
1566
  *
1522
1567
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks}
1523
1568
  */
1524
- getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook[]>>;
1569
+ getGuildWebhooks: (guildId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1525
1570
  /**
1526
1571
  * Gets the list of integrations attached to a guild.
1527
1572
  *
@@ -1533,17 +1578,17 @@ export interface RestManager {
1533
1578
  *
1534
1579
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
1535
1580
  */
1536
- getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration[]>>;
1581
+ getIntegrations: (guildId: BigString) => Promise<CamelizedDiscordIntegration[]>;
1537
1582
  /**
1538
1583
  * Gets an invite to a channel by its invite code.
1539
1584
  *
1540
1585
  * @param inviteCode - The invite code of the invite to get.
1541
1586
  * @param options - The parameters for the fetching of the invite.
1542
- * @returns An instance of {@link DiscordInviteMetadata}.
1587
+ * @returns An instance of {@link CamelizedDiscordInviteMetadata}.
1543
1588
  *
1544
1589
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
1545
1590
  */
1546
- getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
1591
+ getInvite: (inviteCode: string, options?: GetInvite) => Promise<CamelizedDiscordInviteMetadata>;
1547
1592
  /**
1548
1593
  * Gets the list of invites for a guild.
1549
1594
  *
@@ -1555,7 +1600,7 @@ export interface RestManager {
1555
1600
  *
1556
1601
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invites}
1557
1602
  */
1558
- getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata[]>>;
1603
+ getInvites: (guildId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1559
1604
  /**
1560
1605
  * Gets a message from a channel by the ID of the message.
1561
1606
  *
@@ -1571,7 +1616,7 @@ export interface RestManager {
1571
1616
  *
1572
1617
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
1573
1618
  */
1574
- getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1619
+ getMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1575
1620
  /**
1576
1621
  * Gets multiple messages from a channel.
1577
1622
  *
@@ -1587,7 +1632,7 @@ export interface RestManager {
1587
1632
  *
1588
1633
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
1589
1634
  */
1590
- getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage[]>>;
1635
+ getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<CamelizedDiscordMessage[]>;
1591
1636
  /**
1592
1637
  * Returns the list of sticker packs available to Nitro subscribers.
1593
1638
  *
@@ -1595,7 +1640,7 @@ export interface RestManager {
1595
1640
  *
1596
1641
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
1597
1642
  */
1598
- getNitroStickerPacks: () => Promise<Camelize<DiscordStickerPack[]>>;
1643
+ getNitroStickerPacks: () => Promise<CamelizedDiscordStickerPack[]>;
1599
1644
  /**
1600
1645
  * Gets the initial message response to an interaction.
1601
1646
  *
@@ -1611,7 +1656,7 @@ export interface RestManager {
1611
1656
  *
1612
1657
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
1613
1658
  */
1614
- getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
1659
+ getOriginalInteractionResponse: (token: string) => Promise<CamelizedDiscordMessage>;
1615
1660
  /**
1616
1661
  * Gets the pinned messages for a channel.
1617
1662
  *
@@ -1626,13 +1671,13 @@ export interface RestManager {
1626
1671
  *
1627
1672
  * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
1628
1673
  */
1629
- getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage[]>>;
1674
+ getPinnedMessages: (channelId: BigString) => Promise<CamelizedDiscordMessage[]>;
1630
1675
  /**
1631
1676
  * Gets the list of private archived threads for a channel.
1632
1677
  *
1633
1678
  * @param channelId - The ID of the channel to get the archived threads for.
1634
1679
  * @param options - The parameters for the fetching of threads.
1635
- * @returns An instance of {@link DiscordArchivedThreads}.
1680
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1636
1681
  *
1637
1682
  * @remarks
1638
1683
  * Requires the `READ_MESSAGE_HISTORY` permission.
@@ -1644,13 +1689,13 @@ export interface RestManager {
1644
1689
  *
1645
1690
  * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
1646
1691
  */
1647
- getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1692
+ getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1648
1693
  /**
1649
1694
  * Gets the list of private archived threads the bot is a member of for a channel.
1650
1695
  *
1651
1696
  * @param channelId - The ID of the channel to get the archived threads for.
1652
1697
  * @param options - The parameters for the fetching of threads.
1653
- * @returns An instance of {@link DiscordArchivedThreads}.
1698
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1654
1699
  *
1655
1700
  * @remarks
1656
1701
  * Requires the `READ_MESSAGE_HISTORY` permission.
@@ -1661,7 +1706,7 @@ export interface RestManager {
1661
1706
  *
1662
1707
  * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
1663
1708
  */
1664
- getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1709
+ getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1665
1710
  /**
1666
1711
  * Gets the number of members that would be kicked from a guild during pruning.
1667
1712
  *
@@ -1674,7 +1719,7 @@ export interface RestManager {
1674
1719
  *
1675
1720
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
1676
1721
  */
1677
- getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
1722
+ getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<CamelizedDiscordPrunedCount>;
1678
1723
  /**
1679
1724
  * Gets the list of public archived threads for a channel.
1680
1725
  *
@@ -1692,7 +1737,7 @@ export interface RestManager {
1692
1737
  *
1693
1738
  * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
1694
1739
  */
1695
- getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1740
+ getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1696
1741
  /**
1697
1742
  * Gets the list of roles for a guild.
1698
1743
  *
@@ -1704,7 +1749,7 @@ export interface RestManager {
1704
1749
  *
1705
1750
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
1706
1751
  */
1707
- getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole[]>>;
1752
+ getRoles: (guildId: BigString) => Promise<CamelizedDiscordRole[]>;
1708
1753
  /**
1709
1754
  * Gets a scheduled event by its ID.
1710
1755
  *
@@ -1717,7 +1762,7 @@ export interface RestManager {
1717
1762
  */
1718
1763
  getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
1719
1764
  withUserCount?: boolean;
1720
- }) => Promise<Camelize<DiscordScheduledEvent>>;
1765
+ }) => Promise<CamelizedDiscordScheduledEvent>;
1721
1766
  /**
1722
1767
  * Gets the list of scheduled events for a guild.
1723
1768
  *
@@ -1727,7 +1772,7 @@ export interface RestManager {
1727
1772
  *
1728
1773
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
1729
1774
  */
1730
- getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent[]>>;
1775
+ getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<CamelizedDiscordScheduledEvent[]>;
1731
1776
  /**
1732
1777
  * Gets the list of subscribers to a scheduled event from a guild.
1733
1778
  *
@@ -1744,51 +1789,51 @@ export interface RestManager {
1744
1789
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
1745
1790
  */
1746
1791
  getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
1747
- user: Camelize<DiscordUser>;
1748
- member?: Camelize<DiscordMember>;
1792
+ user: CamelizedDiscordUser;
1793
+ member?: CamelizedDiscordMember;
1749
1794
  }>>;
1750
1795
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1751
- getSessionInfo: () => Promise<Camelize<DiscordGetGatewayBot>>;
1796
+ getSessionInfo: () => Promise<CamelizedDiscordGetGatewayBot>;
1752
1797
  /**
1753
1798
  * Gets the stage instance associated with a stage channel, if one exists.
1754
1799
  *
1755
1800
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1756
- * @returns An instance of {@link DiscordStageInstance}.
1801
+ * @returns An instance of {@link CamelizedDiscordStageInstance}.
1757
1802
  *
1758
1803
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
1759
1804
  */
1760
- getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
1805
+ getStageInstance: (channelId: BigString) => Promise<CamelizedDiscordStageInstance>;
1761
1806
  /**
1762
1807
  * Returns a sticker object for the given sticker ID.
1763
1808
  *
1764
1809
  * @param stickerId The ID of the sticker to get
1765
- * @returns A {@link DiscordSticker}
1810
+ * @returns A {@link CamelizedDiscordSticker}
1766
1811
  *
1767
1812
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
1768
1813
  */
1769
- getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1814
+ getSticker: (stickerId: BigString) => Promise<CamelizedDiscordSticker>;
1770
1815
  /**
1771
1816
  * Gets a thread member by their user ID.
1772
1817
  *
1773
1818
  * @param channelId - The ID of the thread to get the thread member of.
1774
1819
  * @param userId - The user ID of the thread member to get.
1775
- * @returns An instance of {@link DiscordThreadMember}.
1820
+ * @returns An instance of {@link CamelizedDiscordThreadMember}.
1776
1821
  *
1777
1822
  * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
1778
1823
  */
1779
- getThreadMember: (channelId: BigString, userId: BigString) => Promise<Camelize<DiscordThreadMember>>;
1824
+ getThreadMember: (channelId: BigString, userId: BigString) => Promise<CamelizedDiscordThreadMember>;
1780
1825
  /**
1781
1826
  * Gets the list of thread members for a thread.
1782
1827
  *
1783
1828
  * @param channelId - The ID of the thread to get the thread members of.
1784
- * @returns A collection of {@link DiscordThreadMember} assorted by user ID.
1829
+ * @returns A collection of {@link CamelizedDiscordThreadMember} assorted by user ID.
1785
1830
  *
1786
1831
  * @remarks
1787
1832
  * Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
1788
1833
  *
1789
1834
  * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
1790
1835
  */
1791
- getThreadMembers: (channelId: BigString) => Promise<Camelize<DiscordThreadMember[]>>;
1836
+ getThreadMembers: (channelId: BigString) => Promise<CamelizedDiscordThreadMember[]>;
1792
1837
  /**
1793
1838
  * Gets the list of users that reacted with an emoji to a message.
1794
1839
  *
@@ -1800,14 +1845,14 @@ export interface RestManager {
1800
1845
  *
1801
1846
  * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
1802
1847
  */
1803
- getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser[]>>;
1848
+ getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<CamelizedDiscordUser[]>;
1804
1849
  /**
1805
1850
  * Get a user's data from the api
1806
1851
  *
1807
1852
  * @param id The user's id
1808
- * @returns {Camelize<DiscordUser>}
1853
+ * @returns {CamelizedDiscordUser}
1809
1854
  */
1810
- getUser: (id: BigString) => Promise<Camelize<DiscordUser>>;
1855
+ getUser: (id: BigString) => Promise<CamelizedDiscordUser>;
1811
1856
  /**
1812
1857
  * Gets information about the vanity url of a guild.
1813
1858
  *
@@ -1821,7 +1866,7 @@ export interface RestManager {
1821
1866
  *
1822
1867
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
1823
1868
  */
1824
- getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
1869
+ getVanityUrl: (guildId: BigString) => Promise<CamelizedDiscordVanityUrl>;
1825
1870
  /**
1826
1871
  * Gets the list of voice regions for a guild.
1827
1872
  *
@@ -1830,19 +1875,19 @@ export interface RestManager {
1830
1875
  *
1831
1876
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
1832
1877
  */
1833
- getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion[]>>;
1878
+ getVoiceRegions: (guildId: BigString) => Promise<CamelizedDiscordVoiceRegion[]>;
1834
1879
  /**
1835
1880
  * Gets a webhook by its ID.
1836
1881
  *
1837
1882
  * @param webhookId - The ID of the webhook to get.
1838
- * @returns An instance of {@link DiscordWebhook}.
1883
+ * @returns An instance of {@link CamelizedDiscordWebhook}.
1839
1884
  *
1840
1885
  * @remarks
1841
1886
  * Requires the `MANAGE_WEBHOOKS` permission.
1842
1887
  *
1843
1888
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}
1844
1889
  */
1845
- getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
1890
+ getWebhook: (webhookId: BigString) => Promise<CamelizedDiscordWebhook>;
1846
1891
  /**
1847
1892
  * Gets a webhook message by its ID.
1848
1893
  *
@@ -1850,21 +1895,21 @@ export interface RestManager {
1850
1895
  * @param token - The webhook token, used to get webhook messages.
1851
1896
  * @param messageId - the ID of the webhook message to get.
1852
1897
  * @param options - The parameters for the fetching of the message.
1853
- * @returns An instance of {@link DiscordMessage}.
1898
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1854
1899
  *
1855
1900
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}
1856
1901
  */
1857
- getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
1902
+ getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<CamelizedDiscordMessage>;
1858
1903
  /**
1859
1904
  * Gets a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1860
1905
  *
1861
1906
  * @param webhookId - The ID of the webhook to get.
1862
1907
  * @param token - The webhook token, used to get the webhook.
1863
- * @returns An instance of {@link DiscordWebhook}.
1908
+ * @returns An instance of {@link CamelizedDiscordWebhook}.
1864
1909
  *
1865
1910
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
1866
1911
  */
1867
- getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
1912
+ getWebhookWithToken: (webhookId: BigString, token: string) => Promise<CamelizedDiscordWebhook>;
1868
1913
  /**
1869
1914
  * Gets the welcome screen for a guild.
1870
1915
  *
@@ -1877,7 +1922,7 @@ export interface RestManager {
1877
1922
  *
1878
1923
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
1879
1924
  */
1880
- getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
1925
+ getWelcomeScreen: (guildId: BigString) => Promise<CamelizedDiscordWelcomeScreen>;
1881
1926
  /**
1882
1927
  * Gets the guild widget by guild ID.
1883
1928
  *
@@ -1886,7 +1931,7 @@ export interface RestManager {
1886
1931
  *
1887
1932
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
1888
1933
  */
1889
- getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
1934
+ getWidget: (guildId: BigString) => Promise<CamelizedDiscordGuildWidget>;
1890
1935
  /**
1891
1936
  * Gets the settings of a guild's widget.
1892
1937
  *
@@ -1898,7 +1943,7 @@ export interface RestManager {
1898
1943
  *
1899
1944
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
1900
1945
  */
1901
- getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
1946
+ getWidgetSettings: (guildId: BigString) => Promise<CamelizedDiscordGuildWidgetSettings>;
1902
1947
  /**
1903
1948
  * Adds the bot user to a thread.
1904
1949
  *
@@ -1953,13 +1998,14 @@ export interface RestManager {
1953
1998
  *
1954
1999
  * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
1955
2000
  */
1956
- publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
2001
+ publishMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1957
2002
  /**
1958
2003
  * Removes a role from a member.
1959
2004
  *
1960
2005
  * @param guildId - The ID of the guild the member to remove the role from is in.
1961
2006
  * @param userId - The user ID of the member to remove the role from.
1962
2007
  * @param roleId - The ID of the role to remove from the member.
2008
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1963
2009
  *
1964
2010
  * @remarks
1965
2011
  * Requires the `MANAGE_ROLES` permission.
@@ -1991,7 +2037,7 @@ export interface RestManager {
1991
2037
  *
1992
2038
  * @param channelId - The ID of the channel to send the message in.
1993
2039
  * @param options - The parameters for the creation of the message.
1994
- * @returns An instance of the created {@link DiscordMessage}.
2040
+ * @returns An instance of the created {@link CamelizedDiscordMessage}.
1995
2041
  *
1996
2042
  * @remarks
1997
2043
  * Requires that the bot user be able to see the contents of the channel the message is to be sent in.
@@ -2012,7 +2058,7 @@ export interface RestManager {
2012
2058
  *
2013
2059
  * @see {@link https://discord.com/developers/docs/resources/channel#create-message}
2014
2060
  */
2015
- sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
2061
+ sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<CamelizedDiscordMessage>;
2016
2062
  /**
2017
2063
  * Sends a follow-up message to an interaction.
2018
2064
  *
@@ -2033,7 +2079,7 @@ export interface RestManager {
2033
2079
  *
2034
2080
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
2035
2081
  */
2036
- sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
2082
+ sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
2037
2083
  /**
2038
2084
  * Sends a response to an interaction.
2039
2085
  *
@@ -2062,6 +2108,7 @@ export interface RestManager {
2062
2108
  * @param channelId - The ID of the channel in which to create the thread.
2063
2109
  * @param messageId - The ID of the message to use as the thread's point of origin.
2064
2110
  * @param options - The parameters to use for the creation of the thread.
2111
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2065
2112
  * @returns An instance of the created {@link Channel | Thread}.
2066
2113
  *
2067
2114
  * @remarks
@@ -2075,13 +2122,14 @@ export interface RestManager {
2075
2122
  *
2076
2123
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
2077
2124
  */
2078
- startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage) => Promise<Camelize<DiscordChannel>>;
2125
+ startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2079
2126
  /**
2080
2127
  * Creates a thread without using a message as the thread's point of origin.
2081
2128
  *
2082
2129
  * @param channelId - The ID of the channel in which to create the thread.
2083
2130
  * @param options - The parameters to use for the creation of the thread.
2084
- * @returns An instance of the created {@link DiscordChannel | Thread}.
2131
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2132
+ * @returns An instance of the created {@link CamelizedDiscordChannel | Thread}.
2085
2133
  *
2086
2134
  * @remarks
2087
2135
  * Creating a private thread requires the server to be boosted.
@@ -2090,7 +2138,7 @@ export interface RestManager {
2090
2138
  *
2091
2139
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
2092
2140
  */
2093
- startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage) => Promise<Camelize<DiscordChannel>>;
2141
+ startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2094
2142
  /**
2095
2143
  * Synchronises a template with the current state of a guild.
2096
2144
  *
@@ -2104,7 +2152,7 @@ export interface RestManager {
2104
2152
  *
2105
2153
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
2106
2154
  */
2107
- syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
2155
+ syncGuildTemplate: (guildId: BigString) => Promise<CamelizedDiscordTemplate>;
2108
2156
  /**
2109
2157
  * Triggers a typing indicator for the bot user.
2110
2158
  *
@@ -2131,7 +2179,7 @@ export interface RestManager {
2131
2179
  *
2132
2180
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
2133
2181
  */
2134
- upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<Camelize<DiscordApplicationCommand[]>>;
2182
+ upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2135
2183
  /**
2136
2184
  * Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
2137
2185
  *
@@ -2146,13 +2194,13 @@ export interface RestManager {
2146
2194
  *
2147
2195
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
2148
2196
  */
2149
- upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<Camelize<DiscordApplicationCommand[]>>;
2197
+ upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2150
2198
  /**
2151
2199
  * Bans a user from a guild.
2152
2200
  *
2153
-
2154
2201
  * @param guildId - The ID of the guild to ban the user from.
2155
2202
  * @param userId - The ID of the user to ban from the guild.
2203
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2156
2204
  * @param options - The parameters for the creation of the ban.
2157
2205
  *
2158
2206
  * @remarks
@@ -2162,25 +2210,27 @@ export interface RestManager {
2162
2210
  *
2163
2211
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
2164
2212
  */
2165
- banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan) => Promise<void>;
2213
+ banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
2166
2214
  /**
2167
2215
  * Edits the nickname of the bot user.
2168
2216
  *
2169
2217
  * @param guildId - The ID of the guild to edit the nickname of the bot user in.
2170
2218
  * @param options - The parameters for the edit of the nickname.
2171
- * @returns An instance of the edited {@link DiscordMember}
2219
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2220
+ * @returns An instance of the edited {@link CamelizedDiscordMember}
2172
2221
  *
2173
2222
  * @remarks
2174
2223
  * Fires a _Guild Member Update_ gateway event.
2175
2224
  *
2176
2225
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
2177
2226
  */
2178
- editBotMember: (guildId: BigString, options: EditBotMemberOptions) => Promise<Camelize<DiscordMember>>;
2227
+ editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<CamelizedDiscordMember>;
2179
2228
  /**
2180
2229
  * Edits a member's properties.
2181
2230
  *
2182
2231
  * @param guildId - The ID of the guild to edit the member of.
2183
2232
  * @param userId - The user ID of the member to edit.
2233
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2184
2234
  * @param options - The parameters for the edit of the user.
2185
2235
  *
2186
2236
  * @remarks
@@ -2191,24 +2241,24 @@ export interface RestManager {
2191
2241
  *
2192
2242
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
2193
2243
  */
2194
- editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember) => Promise<Camelize<DiscordMember>>;
2244
+ editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<CamelizedDiscordMember>;
2195
2245
  /**
2196
2246
  * Gets the member object by user ID.
2197
2247
  *
2198
2248
 
2199
2249
  * @param guildId - The ID of the guild to get the member object for.
2200
2250
  * @param userId - The ID of the user to get the member object for.
2201
- * @returns An instance of {@link DiscordMemberWithUser}.
2251
+ * @returns An instance of {@link CamelizedDiscordMemberWithUser}.
2202
2252
  *
2203
2253
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
2204
2254
  */
2205
- getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
2255
+ getMember: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordMemberWithUser>;
2206
2256
  /**
2207
2257
  * Gets the list of members for a guild.
2208
2258
  *
2209
2259
  * @param guildId - The ID of the guild to get the list of members for.
2210
2260
  * @param options - The parameters for the fetching of the members.
2211
- * @returns A collection of {@link DiscordMemberWithUser} objects assorted by user ID.
2261
+ * @returns A collection of {@link CamelizedDiscordMemberWithUser} objects assorted by user ID.
2212
2262
  *
2213
2263
  * @remarks
2214
2264
  * Requires the `GUILD_MEMBERS` intent.
@@ -2221,13 +2271,14 @@ export interface RestManager {
2221
2271
  * @see {@link https://discord.com/developers/docs/topics/gateway#request-guild-members}
2222
2272
  * @see {@link https://discord.com/developers/docs/topics/rate-limits#rate-limits}
2223
2273
  */
2224
- getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser[]>>;
2274
+ getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<CamelizedDiscordMemberWithUser[]>;
2225
2275
  /**
2226
2276
  * Kicks a member from a guild.
2227
2277
  *
2228
2278
 
2229
2279
  * @param guildId - The ID of the guild to kick the member from.
2230
2280
  * @param userId - The user ID of the member to kick from the guild.
2281
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2231
2282
  *
2232
2283
  * @remarks
2233
2284
  * Requires the `KICK_MEMBERS` permission.
@@ -2242,6 +2293,7 @@ export interface RestManager {
2242
2293
  *
2243
2294
  * @param channelId - The ID of the channel where the message is to be pinned.
2244
2295
  * @param messageId - The ID of the message to pin.
2296
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2245
2297
  *
2246
2298
  * @remarks
2247
2299
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -2261,6 +2313,7 @@ export interface RestManager {
2261
2313
 
2262
2314
  * @param guildId - The ID of the guild to prune the members of.
2263
2315
  * @param options - The parameters for the pruning of members.
2316
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2264
2317
  * @returns A number indicating how many members were pruned.
2265
2318
  *
2266
2319
  * @remarks
@@ -2274,7 +2327,7 @@ export interface RestManager {
2274
2327
  *
2275
2328
  * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
2276
2329
  */
2277
- pruneMembers: (guildId: BigString, options: BeginGuildPrune) => Promise<{
2330
+ pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
2278
2331
  pruned: number | null;
2279
2332
  }>;
2280
2333
  /**
@@ -2284,17 +2337,18 @@ export interface RestManager {
2284
2337
  * @param guildId - The ID of the guild to search in.
2285
2338
  * @param query - The string to match usernames or nicknames against.
2286
2339
  * @param options - The parameters for searching through the members.
2287
- * @returns A collection of {@link DiscordMember} objects assorted by user ID.
2340
+ * @returns A collection of {@link CamelizedDiscordMember} objects assorted by user ID.
2288
2341
  *
2289
2342
  * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
2290
2343
  */
2291
- searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser[]>>;
2344
+ searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<CamelizedDiscordMemberWithUser[]>;
2292
2345
  /**
2293
2346
  * Unbans a user from a guild.
2294
2347
  *
2295
2348
 
2296
2349
  * @param guildId - The ID of the guild to unban the user in.
2297
2350
  * @param userId - The ID of the user to unban.
2351
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2298
2352
  *
2299
2353
  * @remarks
2300
2354
  * Requires the `BAN_MEMBERS` permission.
@@ -2303,12 +2357,13 @@ export interface RestManager {
2303
2357
  *
2304
2358
  * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}
2305
2359
  */
2306
- unbanMember: (guildId: BigString, userId: BigString) => Promise<void>;
2360
+ unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
2307
2361
  /**
2308
2362
  * Unpins a pinned message in a channel.
2309
2363
  *
2310
2364
  * @param channelId - The ID of the channel where the message is pinned.
2311
2365
  * @param messageId - The ID of the message to unpin.
2366
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2312
2367
  *
2313
2368
  * @remarks
2314
2369
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -2323,7 +2378,7 @@ export interface RestManager {
2323
2378
  }
2324
2379
  export type RequestMethods = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT';
2325
2380
  export type ApiVersions = 9 | 10;
2326
- export interface CreateWebhook extends WithReason {
2381
+ export interface CreateWebhook {
2327
2382
  /** Name of the webhook (1-80 characters) */
2328
2383
  name: string;
2329
2384
  /** Image url for the default webhook avatar */
@@ -2331,23 +2386,22 @@ export interface CreateWebhook extends WithReason {
2331
2386
  }
2332
2387
  export interface CreateRequestBodyOptions {
2333
2388
  headers?: Record<string, string>;
2334
- method: RequestMethods;
2335
- body?: Record<string, unknown>;
2389
+ body?: any;
2336
2390
  unauthorized?: boolean;
2337
- url?: string;
2391
+ reason?: string;
2392
+ files?: FileContent[];
2338
2393
  }
2394
+ export type MakeRequestOptions = Omit<CreateRequestBodyOptions, 'method'> & Pick<SendRequestOptions, 'runThroughQueue'>;
2339
2395
  export interface RequestBody {
2340
2396
  headers: Record<string, string>;
2341
- body: string | FormData;
2397
+ body?: string | FormData;
2342
2398
  method: RequestMethods;
2343
2399
  }
2344
2400
  export interface SendRequestOptions {
2345
2401
  /** The url to send the request to. */
2346
2402
  url: string;
2347
- /** The method to use when sending the request. */
2403
+ /** The method to use for sending the request. */
2348
2404
  method: RequestMethods;
2349
- /** The body to be sent in the request. */
2350
- body?: Record<string, any>;
2351
2405
  /** The amount of times this request has been retried. */
2352
2406
  retryCount: number;
2353
2407
  /** Handler to retry a request should it be rate limited. */
@@ -2359,7 +2413,12 @@ export interface SendRequestOptions {
2359
2413
  /** If this request has a bucket id which it falls under for rate limit */
2360
2414
  bucketId?: string;
2361
2415
  /** Additional request options, used for things like overriding authorization header. */
2362
- options?: Record<string, any>;
2416
+ requestBodyOptions?: CreateRequestBodyOptions;
2417
+ /**
2418
+ * Whether the request should be run through the queue.
2419
+ * Useful for routes which do not have any rate limits.
2420
+ */
2421
+ runThroughQueue?: boolean;
2363
2422
  }
2364
2423
  export interface RestRateLimitedPath {
2365
2424
  url: string;
@@ -2374,7 +2433,7 @@ export interface WebhookMessageEditor {
2374
2433
  * @param token - The webhook token, used to edit the message.
2375
2434
  * @param messageId - The ID of the message to edit.
2376
2435
  * @param options - The parameters for the edit of the message.
2377
- * @returns An instance of the edited {@link DiscordMessage}.
2436
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2378
2437
  *
2379
2438
  * @remarks
2380
2439
  * Fires a _Message Update_ gateway event.
@@ -2383,14 +2442,14 @@ export interface WebhookMessageEditor {
2383
2442
  */
2384
2443
  (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
2385
2444
  threadId?: BigString;
2386
- }): Promise<Camelize<DiscordMessage>>;
2445
+ }): Promise<CamelizedDiscordMessage>;
2387
2446
  /**
2388
2447
  * Edits the original webhook message.
2389
2448
  *
2390
2449
  * @param webhookId - The ID of the webhook to edit the original message of.
2391
2450
  * @param token - The webhook token, used to edit the message.
2392
2451
  * @param options - The parameters for the edit of the message.
2393
- * @returns An instance of the edited {@link DiscordMessage}.
2452
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2394
2453
  *
2395
2454
  * @remarks
2396
2455
  * Fires a _Message Update_ gateway event.
@@ -2399,7 +2458,7 @@ export interface WebhookMessageEditor {
2399
2458
  */
2400
2459
  original: (webhookId: BigString, token: string, options: InteractionCallbackData & {
2401
2460
  threadId?: BigString;
2402
- }) => Promise<Camelize<DiscordMessage>>;
2461
+ }) => Promise<CamelizedDiscordMessage>;
2403
2462
  }
2404
2463
  export interface RestRequestResponse {
2405
2464
  ok: boolean;