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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +15 -1
  2. package/dist/cjs/index.cjs +25 -0
  3. package/dist/cjs/invalidBucket.cjs +86 -0
  4. package/dist/cjs/manager.cjs +1445 -0
  5. package/dist/cjs/queue.cjs +165 -0
  6. package/dist/cjs/routes.cjs +550 -0
  7. package/dist/cjs/types.cjs +6 -0
  8. package/dist/cjs/typings/routes.cjs +6 -0
  9. package/dist/esm/index.js +8 -0
  10. package/dist/esm/invalidBucket.js +82 -0
  11. package/dist/esm/manager.js +1403 -0
  12. package/dist/esm/queue.js +155 -0
  13. package/dist/esm/routes.js +540 -0
  14. package/dist/esm/types.js +3 -0
  15. package/dist/esm/typings/routes.js +3 -0
  16. package/dist/{index.d.ts → types/index.d.ts} +1 -0
  17. package/dist/types/index.d.ts.map +1 -0
  18. package/dist/{invalidBucket.d.ts → types/invalidBucket.d.ts} +11 -7
  19. package/dist/types/invalidBucket.d.ts.map +1 -0
  20. package/dist/types/manager.d.ts +12 -0
  21. package/dist/types/manager.d.ts.map +1 -0
  22. package/dist/{queue.d.ts → types/queue.d.ts} +12 -1
  23. package/dist/types/queue.d.ts.map +1 -0
  24. package/dist/types/routes.d.ts +3 -0
  25. package/dist/types/routes.d.ts.map +1 -0
  26. package/dist/{types.d.ts → types/types.d.ts} +696 -299
  27. package/dist/types/types.d.ts.map +1 -0
  28. package/dist/{typings → types/typings}/routes.d.ts +46 -7
  29. package/dist/types/typings/routes.d.ts.map +1 -0
  30. package/package.json +33 -30
  31. package/dist/index.d.ts.map +0 -1
  32. package/dist/index.js +0 -7
  33. package/dist/index.js.map +0 -1
  34. package/dist/invalidBucket.d.ts.map +0 -1
  35. package/dist/invalidBucket.js +0 -84
  36. package/dist/invalidBucket.js.map +0 -1
  37. package/dist/manager.d.ts +0 -3
  38. package/dist/manager.d.ts.map +0 -1
  39. package/dist/manager.js +0 -1464
  40. package/dist/manager.js.map +0 -1
  41. package/dist/queue.d.ts.map +0 -1
  42. package/dist/queue.js +0 -153
  43. package/dist/queue.js.map +0 -1
  44. package/dist/types.d.ts.map +0 -1
  45. package/dist/types.js +0 -3
  46. package/dist/types.js.map +0 -1
  47. package/dist/typings/routes.d.ts.map +0 -1
  48. package/dist/typings/routes.js +0 -3
  49. package/dist/typings/routes.js.map +0 -1
@@ -1,4 +1,5 @@
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 { AddDmRecipientOptions, AddGuildMemberOptions, AtLeastOne, BeginGuildPrune, BigString, Camelize, CamelizedDiscordAccessTokenResponse, CamelizedDiscordActiveThreads, CamelizedDiscordApplication, CamelizedDiscordApplicationCommand, CamelizedDiscordApplicationCommandPermissions, CamelizedDiscordApplicationRoleConnection, CamelizedDiscordArchivedThreads, CamelizedDiscordAuditLog, CamelizedDiscordAutoModerationRule, CamelizedDiscordBan, CamelizedDiscordChannel, CamelizedDiscordConnection, CamelizedDiscordCurrentAuthorization, CamelizedDiscordEmoji, CamelizedDiscordEntitlement, CamelizedDiscordFollowedChannel, CamelizedDiscordGetAnswerVotesResponse, CamelizedDiscordGetGatewayBot, CamelizedDiscordGuild, CamelizedDiscordGuildApplicationCommandPermissions, CamelizedDiscordGuildOnboarding, CamelizedDiscordGuildPreview, CamelizedDiscordGuildWidget, CamelizedDiscordGuildWidgetSettings, CamelizedDiscordIntegration, CamelizedDiscordInvite, CamelizedDiscordInviteMetadata, CamelizedDiscordMember, CamelizedDiscordMemberWithUser, CamelizedDiscordMessage, CamelizedDiscordModifyGuildWelcomeScreen, CamelizedDiscordPartialGuild, CamelizedDiscordPrunedCount, CamelizedDiscordRole, CamelizedDiscordScheduledEvent, CamelizedDiscordSku, CamelizedDiscordStageInstance, CamelizedDiscordSticker, CamelizedDiscordStickerPack, CamelizedDiscordTemplate, CamelizedDiscordThreadMember, CamelizedDiscordTokenExchange, CamelizedDiscordTokenRevocation, CamelizedDiscordUser, CamelizedDiscordVanityUrl, CamelizedDiscordVoiceRegion, CamelizedDiscordWebhook, CamelizedDiscordWelcomeScreen, CreateApplicationCommand, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateEntitlement, CreateForumPostWithMessage, CreateGlobalApplicationCommandOptions, CreateGuild, CreateGuildApplicationCommandOptions, CreateGuildBan, CreateGuildBulkBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, DiscordBulkBan, EditApplication, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildOnboarding, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditUserVoiceState, ExecuteWebhook, FileContent, GetApplicationCommandPermissionOptions, GetBans, GetEntitlements, GetGroupDmOptions, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetPollAnswerVotes, GetReactions, GetScheduledEventUsers, GetScheduledEvents, GetUserGuilds, GetWebhookMessageOptions, InteractionCallbackData, InteractionResponse, ListArchivedThreads, ListGuildMembers, MfaLevels, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildTemplate, ModifyRolePositions, ModifyWebhook, SearchMembers, StartThreadWithMessage, StartThreadWithoutMessage, UpsertGlobalApplicationCommandOptions, UpsertGuildApplicationCommandOptions } from '@discordeno/types';
2
+ import type { logger } from '@discordeno/utils';
2
3
  import type { InvalidRequestBucket } from './invalidBucket.js';
3
4
  import type { Queue } from './queue.js';
4
5
  import type { RestRoutes } from './typings/routes.js';
@@ -18,14 +19,38 @@ export interface CreateRestManagerOptions {
18
19
  * @default https://discord.com/api
19
20
  */
20
21
  baseUrl: string;
21
- /** The authorization header to attach when sending requests to the proxy. */
22
+ /** The authorization header value to attach when sending requests to the proxy. */
22
23
  authorization: string;
24
+ /**
25
+ * The authorization header name to use when sending requests to the proxy
26
+ *
27
+ * @remarks
28
+ * If the `authorization` header is used it will override any authorization that is given even if
29
+ * the requests uses OAuth2 Bearer tokens / Basic tokens
30
+ *
31
+ * @default "authorization" // For compatibility purposes
32
+ */
33
+ authorizationHeader?: string;
34
+ /**
35
+ * The endpoint to use in the rest proxy to update the bearer tokens
36
+ *
37
+ * @remarks
38
+ * Should not include a `/` in the start
39
+ *
40
+ * This value is actually required if you want to use `updateTokenQueues`
41
+ */
42
+ updateBearerTokenEndpoint?: string;
23
43
  };
24
44
  /**
25
45
  * The api versions which can be used to make requests.
26
46
  * @default 10
27
47
  */
28
48
  version?: ApiVersions;
49
+ /**
50
+ * The logger that the rest manager will use
51
+ * @default logger // The logger exported by `@discordeno/utils`
52
+ */
53
+ logger?: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
29
54
  }
30
55
  export interface RestManager {
31
56
  /** The bot token which will be used to make requests. */
@@ -40,8 +65,18 @@ export interface RestManager {
40
65
  * @default https://discord.com/api
41
66
  */
42
67
  baseUrl: string;
43
- /** The authorization header to attach when sending requests to the proxy. */
68
+ /**
69
+ * `true` if the `baseUrl` does not start with `https://discord.com/api`.
70
+ *
71
+ * Mostly used only for intern functions.
72
+ */
73
+ isProxied: boolean;
74
+ /** The authorization header value to attach when sending requests to the proxy. */
44
75
  authorization?: string;
76
+ /** The authorization header name to attach when sending requests to the proxy */
77
+ authorizationHeader: string;
78
+ /** The endpoint to use for `updateTokenQueues` when working with a rest proxy */
79
+ updateBearerTokenEndpoint?: string;
45
80
  /** The maximum amount of times a request should be retried. Defaults to Infinity */
46
81
  maxRetryCount: number;
47
82
  /** Whether or not the manager is rate limited globally across all requests. Defaults to false. */
@@ -58,34 +93,41 @@ export interface RestManager {
58
93
  invalidBucket: InvalidRequestBucket;
59
94
  /** The routes that are available for this manager. */
60
95
  routes: RestRoutes;
96
+ /** The logger to use for the rest manager */
97
+ logger: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
98
+ /** Allows the user to inject custom headers that will be sent with every request. */
99
+ createBaseHeaders: () => Record<string, string>;
100
+ /** Whether or not the rest manager should keep objects in raw snake case from discord. */
101
+ preferSnakeCase: (enabled: boolean) => RestManager;
61
102
  /** Check the rate limits for a url or a bucket. */
62
- checkRateLimits: (url: string) => number | false;
103
+ checkRateLimits: (url: string, requestAuthorization: string) => number | false;
104
+ updateTokenQueues: (oldToken: string, newToken: string) => Promise<void>;
63
105
  /** Reshapes and modifies the obj as needed to make it ready for discords api. */
64
106
  changeToDiscordFormat: (obj: any) => any;
65
107
  /** Creates the request body and headers that are necessary to send a request. Will handle different types of methods and everything necessary for discord. */
66
- createRequest: (options: CreateRequestBodyOptions) => RequestBody;
108
+ createRequestBody: (method: RequestMethods, options?: CreateRequestBodyOptions) => RequestBody;
67
109
  /** This will create a infinite loop running in 1 seconds using tail recursion to keep rate limits clean. When a rate limit resets, this will remove it so the queue can proceed. */
68
110
  processRateLimitedPaths: () => void;
69
111
  /** Processes the rate limit headers and determines if it needs to be rate limited and returns the bucket id if available */
70
- processHeaders: (url: string, headers: Headers) => string | undefined;
112
+ processHeaders: (url: string, headers: Headers, requestAuthorization: string) => string | undefined;
71
113
  /** Sends a request to the api. */
72
114
  sendRequest: (options: SendRequestOptions) => Promise<void>;
73
115
  /** Split a url to separate rate limit buckets based on major/minor parameters. */
74
116
  simplifyUrl: (url: string, method: RequestMethods) => string;
75
117
  /** Make a request to be sent to the api. */
76
- makeRequest: <T = unknown>(method: RequestMethods, url: string, body?: Record<string, any>, options?: Record<string, any>) => Promise<T>;
118
+ makeRequest: <T = unknown>(method: RequestMethods, url: string, options?: MakeRequestOptions) => Promise<T>;
77
119
  /** Takes a request and processes it into a queue. */
78
- processRequest: (request: SendRequestOptions) => void;
120
+ processRequest: (request: SendRequestOptions) => Promise<void>;
79
121
  /** Make a get request to the api */
80
- get: <T = void>(url: string) => Promise<Camelize<T>>;
122
+ get: <T = void>(url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<Camelize<T>>;
81
123
  /** Make a post request to the api. */
82
- post: <T = void>(url: string, body?: Record<string, any>) => Promise<Camelize<T>>;
124
+ post: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
83
125
  /** Make a put request to the api. */
84
- put: <T = void>(url: string, body?: Record<string, any>, options?: Record<string, any>) => Promise<Camelize<T>>;
126
+ put: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
85
127
  /** Make a delete request to the api. */
86
- delete: (url: string, body?: Record<string, any>) => Promise<void>;
128
+ delete: (url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<void>;
87
129
  /** Make a patch request to the api. */
88
- patch: <T = void>(url: string, body?: Record<string, any>) => Promise<Camelize<T>>;
130
+ patch: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
89
131
  /**
90
132
  * Adds a reaction to a message.
91
133
  *
@@ -130,6 +172,7 @@ export interface RestManager {
130
172
  * @param guildId - The ID of the guild the member to add the role to is in.
131
173
  * @param userId - The user ID of the member to add the role to.
132
174
  * @param roleId - The ID of the role to add to the member.
175
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
133
176
  *
134
177
  * @remarks
135
178
  * Requires the `MANAGE_ROLES` permission.
@@ -154,12 +197,42 @@ export interface RestManager {
154
197
  * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}
155
198
  */
156
199
  addThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
200
+ /**
201
+ * Adds a recipient to a group DM.
202
+ *
203
+ * @param channelId - The ID of the group dm to add the user to.
204
+ * @param userId - The user ID of the user to add to the group dm.
205
+ * @param options - The options for adding the user
206
+ *
207
+ * @remarks
208
+ * Requires an OAuth2 access token with the `gdm.join` scope
209
+ *
210
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
211
+ */
212
+ addDmRecipient: (channelId: BigString, userId: BigString, options: AddDmRecipientOptions) => Promise<void>;
213
+ /**
214
+ * Adds a member to a guild.
215
+ *
216
+ * @param guildId - The ID of the thread to add the member to.
217
+ * @param userId - The user ID of the member to add to the thread.
218
+ * @param options - The options for the add of a guild member
219
+ *
220
+ * @remarks
221
+ * Requires the bot to be in the specified server
222
+ * Requires an OAuth2 access token with the `guilds.join` scope
223
+ *
224
+ * Fires a _Guild Member Add_ gateway event.
225
+ *
226
+ * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member}
227
+ */
228
+ addGuildMember: (guildId: BigString, userId: BigString, options: AddGuildMemberOptions) => Promise<void>;
157
229
  /**
158
230
  * Creates an automod rule in a guild.
159
231
  *
160
232
  * @param guildId - The ID of the guild to create the rule in.
161
233
  * @param options - The parameters for the creation of the rule.
162
- * @returns An instance of the created {@link DiscordAutoModerationRule}.
234
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
235
+ * @returns An instance of the created {@link CamelizedDiscordAutoModerationRule}.
163
236
  *
164
237
  * @remarks
165
238
  * Requires the `MANAGE_GUILD` permission.
@@ -168,13 +241,14 @@ export interface RestManager {
168
241
  *
169
242
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
170
243
  */
171
- createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions) => Promise<Camelize<DiscordAutoModerationRule>>;
244
+ createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
172
245
  /**
173
246
  * Creates a channel within a guild.
174
247
  *
175
248
  * @param guildId - The ID of the guild to create the channel within.
176
249
  * @param options - The parameters for the creation of the channel.
177
- * @returns An instance of the created {@link DiscordChannel}.
250
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
251
+ * @returns An instance of the created {@link CamelizedDiscordChannel}.
178
252
  *
179
253
  * @remarks
180
254
  * Requires the `MANAGE_CHANNELS` permission.
@@ -187,16 +261,17 @@ export interface RestManager {
187
261
  *
188
262
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
189
263
  */
190
- createChannel: (guildId: BigString, options: CreateGuildChannel) => Promise<Camelize<DiscordChannel>>;
264
+ createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
191
265
  /**
192
266
  * Creates an emoji in a guild.
193
267
  *
194
268
  * @param guildId - The ID of the guild in which to create the emoji.
195
269
  * @param options - The parameters for the creation of the emoji.
196
- * @returns An instance of the created {@link DiscordEmoji}.
270
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
271
+ * @returns An instance of the created {@link CamelizedDiscordEmoji}.
197
272
  *
198
273
  * @remarks
199
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
274
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
200
275
  *
201
276
  * Emojis have a maximum file size of 256 kilobits. Attempting to upload a larger emoji will cause the route to return 400 Bad Request.
202
277
  *
@@ -204,13 +279,14 @@ export interface RestManager {
204
279
  *
205
280
  * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
206
281
  */
207
- createEmoji: (guildId: BigString, options: CreateGuildEmoji) => Promise<Camelize<DiscordEmoji>>;
282
+ createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
208
283
  /**
209
- * Creates a new thread in a forum channel, and sends a message within the created thread.
284
+ * Creates a new thread in a forum channel or media channel, and sends a message within the created thread.
210
285
  *
211
286
  * @param channelId - The ID of the forum channel to create the thread within.
212
287
  * @param options - The parameters for the creation of the thread.
213
- * @returns An instance of {@link DiscordChannel} with a nested {@link Message} object.
288
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
289
+ * @returns An instance of {@link CamelizedDiscordChannel} with a nested {@link CamelizedDiscordChannel} object.
214
290
  *
215
291
  * @remarks
216
292
  * Requires the `CREATE_MESSAGES` permission.
@@ -218,30 +294,32 @@ export interface RestManager {
218
294
  * Fires a _Thread Create_ gateway event.
219
295
  * Fires a _Message Create_ gateway event.
220
296
  *
221
- * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
222
- *
223
- * @experimental
297
+ * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
224
298
  */
225
- createForumThread: (channelId: BigString, options: CreateForumPostWithMessage) => Promise<Camelize<DiscordChannel>>;
299
+ createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
226
300
  /**
227
301
  * Creates an application command accessible globally; across different guilds and channels.
228
302
  *
229
303
  * @param command - The command to create.
230
- * @returns An instance of the created {@link ApplicationCommand}.
304
+ * @param options - Additional options for the endpoint
305
+ * @returns An instance of the created {@link CamelizedDiscordApplicationCommand}.
231
306
  *
232
307
  * @remarks
233
308
  * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
234
309
  * ⚠️ Global commands once created are cached for periods of __an hour__, so changes made to existing commands will take an hour to surface.
235
310
  * ⚠️ You can only create up to 200 _new_ commands daily.
236
311
  *
312
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
313
+ * You will be able to update only your own application commands
314
+ *
237
315
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
238
316
  */
239
- createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
317
+ createGlobalApplicationCommand: (command: CreateApplicationCommand, options?: CreateGlobalApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand>;
240
318
  /**
241
319
  * Creates a guild.
242
320
  *
243
321
  * @param options - The parameters for the creation of the guild.
244
- * @returns An instance of the created {@link DiscordGuild}.
322
+ * @returns An instance of the created {@link CamelizedDiscordGuild}.
245
323
  *
246
324
  * @remarks
247
325
  * ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
@@ -250,27 +328,31 @@ export interface RestManager {
250
328
  *
251
329
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
252
330
  */
253
- createGuild: (options: CreateGuild) => Promise<Camelize<DiscordGuild>>;
331
+ createGuild: (options: CreateGuild) => Promise<CamelizedDiscordGuild>;
254
332
  /**
255
333
  * Creates an application command only accessible in a specific guild.
256
334
  *
257
335
  * @param command - The command to create.
258
336
  * @param guildId - The ID of the guild to create the command for.
259
- * @returns An instance of the created {@link ApplicationCommand}.
337
+ * @param options - Additional options for the endpoint
338
+ * @returns An instance of the created {@link CamelizedDiscordApplicationCommand}.
260
339
  *
261
340
  * @remarks
262
341
  * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
263
342
  * ⚠️ You can only create up to 200 _new_ commands daily.
264
343
  *
344
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
345
+ * You will be able to update only your own application commands
346
+ *
265
347
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
266
348
  */
267
- createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
349
+ createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString, options?: CreateGuildApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand>;
268
350
  /**
269
351
  * Creates a guild from a template.
270
352
  *
271
353
  * @param templateCode - The code of the template.
272
354
  * @param options - The parameters for the creation of the guild.
273
- * @returns An instance of the created {@link Guild}.
355
+ * @returns An instance of the created {@link CamelizedDiscordGuild}.
274
356
  *
275
357
  * @remarks
276
358
  * ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
@@ -279,28 +361,29 @@ export interface RestManager {
279
361
  *
280
362
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
281
363
  */
282
- createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<Camelize<DiscordGuild>>;
364
+ createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<CamelizedDiscordGuild>;
283
365
  /**
284
366
  * Create a new sticker for the guild.
285
367
  *
286
368
  * @param guildId The ID of the guild to get
287
- * @return A {@link DiscordSticker}
369
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
370
+ * @return A {@link CamelizedDiscordSticker}
288
371
  *
289
372
  * @remarks
290
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
373
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
291
374
  * Fires a Guild Stickers Update Gateway event.
292
375
  * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
293
376
  * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
294
377
  *
295
378
  * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}
296
379
  */
297
- createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions) => Promise<Camelize<DiscordSticker>>;
380
+ createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<CamelizedDiscordSticker>;
298
381
  /**
299
382
  * Creates a template from a guild.
300
383
  *
301
384
  * @param guildId - The ID of the guild to create the template from.
302
385
  * @param options - The parameters for the creation of the template.
303
- * @returns An instance of the created {@link Template}.
386
+ * @returns An instance of the created {@link CamelizedDiscordTemplate}.
304
387
  *
305
388
  * @remarks
306
389
  * Requires the `MANAGE_GUILD` permission.
@@ -309,13 +392,14 @@ export interface RestManager {
309
392
  *
310
393
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
311
394
  */
312
- createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Camelize<DiscordTemplate>>;
395
+ createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<CamelizedDiscordTemplate>;
313
396
  /**
314
397
  * Creates an invite to a channel in a guild.
315
398
  *
316
399
  * @param channelId - The ID of the channel to create the invite to.
317
400
  * @param options - The parameters for the creation of the invite.
318
- * @returns An instance of the created {@link DiscordInvite}.
401
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
402
+ * @returns An instance of the created {@link CamelizedDiscordInvite}.
319
403
  *
320
404
  * @remarks
321
405
  * Requires the `CREATE_INSTANT_INVITE` permission.
@@ -327,13 +411,14 @@ export interface RestManager {
327
411
  *
328
412
  * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
329
413
  */
330
- createInvite: (channelId: BigString, options?: CreateChannelInvite) => Promise<Camelize<DiscordInvite>>;
414
+ createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<CamelizedDiscordInvite>;
331
415
  /**
332
416
  * Creates a role in a guild.
333
417
  *
334
418
  * @param guildId - The ID of the guild to create the role in.
335
419
  * @param options - The parameters for the creation of the role.
336
- * @returns An instance of the created {@link DiscordRole}.
420
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
421
+ * @returns An instance of the created {@link CamelizedDiscordRole}.
337
422
  *
338
423
  * @remarks
339
424
  * Requires the `MANAGE_ROLES` permission.
@@ -342,29 +427,31 @@ export interface RestManager {
342
427
  *
343
428
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
344
429
  */
345
- createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
430
+ createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
346
431
  /**
347
432
  * Creates a scheduled event in a guild.
348
433
  *
349
434
  * @param guildId - The ID of the guild to create the scheduled event in.
350
435
  * @param options - The parameters for the creation of the scheduled event.
351
- * @returns An instance of the created {@link ScheduledEvent}.
436
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
437
+ * @returns An instance of the created {@link CamelizedDiscordScheduledEvent}.
352
438
  *
353
439
  * @remarks
354
440
  * Requires the `MANAGE_EVENTS` permission.
355
441
  *
356
- * A guild can only have a maximum of 100 events with a status of {@link ScheduledEventStatus.Active} or {@link ScheduledEventStatus.Scheduled} (inclusive).
442
+ * A guild can only have a maximum of 100 events with a status of {@link ScheduledEventStatus}.Active or {@link ScheduledEventStatus}.Scheduled (inclusive).
357
443
  *
358
444
  * Fires a _Guild Scheduled Event Create_ gateway event.
359
445
  *
360
446
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
361
447
  */
362
- createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent) => Promise<Camelize<DiscordScheduledEvent>>;
448
+ createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
363
449
  /**
364
450
  * Creates a stage instance associated with a stage channel.
365
451
  *
366
452
  * @param options - The parameters for the creation of the stage instance.
367
- * @returns An instance of the created {@link DiscordStageInstance}.
453
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
454
+ * @returns An instance of the created {@link CamelizedDiscordStageInstance}.
368
455
  *
369
456
  * @remarks
370
457
  * Requires the user to be a moderator of the stage channel.
@@ -373,29 +460,31 @@ export interface RestManager {
373
460
  *
374
461
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance}
375
462
  */
376
- createStageInstance: (options: CreateStageInstance) => Promise<Camelize<DiscordStageInstance>>;
463
+ createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<CamelizedDiscordStageInstance>;
377
464
  /**
378
465
  * Creates a webhook.
379
466
  *
380
467
  * @param channelId - The ID of the channel to create the webhook in.
381
468
  * @param options - The parameters for the creation of the webhook.
382
- * @returns An instance of the created {@link DiscordWebhook}.
469
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
470
+ * @returns An instance of the created {@link CamelizedDiscordWebhook}.
383
471
  *
384
472
  * @remarks
385
473
  * Requires the `MANAGE_WEBHOOKS` permission.
386
474
  *
387
- * ⚠️ The webhook name must not contain the string 'clyde' (case-insensitive).
475
+ * ⚠️ The webhook name must not contain the substrings 'clyde', or 'discord' (case-insensitive).
388
476
  *
389
477
  * Fires a _Webhooks Update_ gateway event.
390
478
  *
391
479
  * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
392
480
  */
393
- createWebhook: (channelId: BigString, options: CreateWebhook) => Promise<Camelize<DiscordWebhook>>;
481
+ createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
394
482
  /**
395
483
  * Deletes an automod rule.
396
484
  *
397
485
  * @param guildId - The ID of the guild to delete the rule from.
398
486
  * @param ruleId - The ID of the automod rule to delete.
487
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
399
488
  *
400
489
  * @remarks
401
490
  * Requires the `MANAGE_GUILD` permission.
@@ -409,7 +498,8 @@ export interface RestManager {
409
498
  * Deletes a channel from within a guild.
410
499
  *
411
500
  * @param channelId - The ID of the channel to delete.
412
- * @returns An instance of the deleted {@link Channel}.
501
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
502
+ * @returns nothing
413
503
  *
414
504
  * @remarks
415
505
  * For community guilds, the _Rules_, _Guidelines_ and _Community Update_ channels cannot be deleted.
@@ -435,6 +525,7 @@ export interface RestManager {
435
525
  *
436
526
  * @param channelId - The ID of the channel to delete the permission override of.
437
527
  * @param overwriteId - The ID of the permission override to delete.
528
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
438
529
  *
439
530
  * @remarks
440
531
  * Requires the `MANAGE_ROLES` permission.
@@ -449,9 +540,11 @@ export interface RestManager {
449
540
  *
450
541
  * @param guildId - The ID of the guild from which to delete the emoji.
451
542
  * @param id - The ID of the emoji to delete.
543
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
452
544
  *
453
545
  * @remarks
454
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
546
+ * For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
547
+ * For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
455
548
  *
456
549
  * Fires a _Guild Emojis Update_ gateway event.
457
550
  *
@@ -506,10 +599,12 @@ export interface RestManager {
506
599
  * Delete a new sticker for the guild.
507
600
  *
508
601
  * @param guildId The ID of the guild to get
509
- * @return A {@link DiscordSticker}
602
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
603
+ * @return A {@link CamelizedDiscordSticker}
510
604
  *
511
605
  * @remarks
512
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
606
+ * For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
607
+ * For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
513
608
  * Fires a Guild Stickers Update Gateway event.
514
609
  * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
515
610
  * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
@@ -536,6 +631,7 @@ export interface RestManager {
536
631
  *
537
632
  * @param guildId - The ID of the guild from which to delete the integration.
538
633
  * @param integrationId - The ID of the integration to delete from the guild.
634
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
539
635
  *
540
636
  * @remarks
541
637
  * Requires the `MANAGE_GUILD` permission.
@@ -547,11 +643,12 @@ export interface RestManager {
547
643
  *
548
644
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}
549
645
  */
550
- deleteIntegration: (guildId: BigString, integrationId: BigString) => Promise<void>;
646
+ deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
551
647
  /**
552
648
  * Deletes an invite to a channel.
553
649
  *
554
650
  * @param inviteCode - The invite code of the invite to delete.
651
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
555
652
  *
556
653
  * @remarks
557
654
  * Requires the `MANAGE_CHANNELS` permission.
@@ -566,6 +663,7 @@ export interface RestManager {
566
663
  *
567
664
  * @param channelId - The ID of the channel to delete the message from.
568
665
  * @param messageId - The ID of the message to delete from the channel.
666
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
569
667
  *
570
668
  * @remarks
571
669
  * If not deleting own message:
@@ -581,6 +679,7 @@ export interface RestManager {
581
679
  *
582
680
  * @param channelId - The ID of the channel to delete the messages from.
583
681
  * @param messageIds - The IDs of the messages to delete from the channel.
682
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
584
683
  *
585
684
  * @remarks
586
685
  * Requires the `MANAGE_MESSAGES` permission.
@@ -658,6 +757,7 @@ export interface RestManager {
658
757
  *
659
758
  * @param guildId - The ID of the guild to delete the role from.
660
759
  * @param roleId - The ID of the role to delete.
760
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
661
761
  *
662
762
  * @remarks
663
763
  * Requires the `MANAGE_ROLES` permission.
@@ -666,7 +766,7 @@ export interface RestManager {
666
766
  *
667
767
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
668
768
  */
669
- deleteRole: (guildId: BigString, roleId: BigString) => Promise<void>;
769
+ deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
670
770
  /**
671
771
  * Deletes a scheduled event from a guild.
672
772
  *
@@ -685,6 +785,7 @@ export interface RestManager {
685
785
  * Deletes the stage instance associated with a stage channel, if one exists.
686
786
  *
687
787
  * @param channelId - The ID of the stage channel the stage instance is associated with.
788
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
688
789
  *
689
790
  * @remarks
690
791
  * Requires the user to be a moderator of the stage channel.
@@ -758,21 +859,22 @@ export interface RestManager {
758
859
  * @param commandId - The ID of the command to edit the permissions of.
759
860
  * @param bearerToken - The bearer token to use to make the request.
760
861
  * @param options - The parameters for the edit of the command permissions.
761
- * @returns An instance of the edited {@link ApplicationCommandPermission}.
862
+ * @returns An instance of the edited {@link CamelizedDiscordGuildApplicationCommandPermissions}.
762
863
  *
763
864
  * @remarks
764
865
  * The bearer token requires the `applications.commands.permissions.update` scope to be enabled, and to have access to the guild whose ID has been provided in the parameters.
765
866
  *
766
867
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
767
868
  */
768
- editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<Camelize<DiscordApplicationCommandPermissions>>;
869
+ editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: CamelizedDiscordApplicationCommandPermissions[]) => Promise<CamelizedDiscordGuildApplicationCommandPermissions>;
769
870
  /**
770
871
  * Edits an automod rule.
771
872
  *
772
873
  * @param guildId - The ID of the guild to edit the rule in.
773
874
  * @param ruleId - The ID of the rule to edit.
774
875
  * @param options - The parameters for the edit of the rule.
775
- * @returns An instance of the edited {@link DiscordAutoModerationRule}.
876
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
877
+ * @returns An instance of the edited {@link CamelizedDiscordAutoModerationRule}.
776
878
  *
777
879
  * @remarks
778
880
  * Requires the `MANAGE_GUILD` permission.
@@ -781,24 +883,26 @@ export interface RestManager {
781
883
  *
782
884
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
783
885
  */
784
- editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>) => Promise<Camelize<DiscordAutoModerationRule>>;
886
+ editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
785
887
  /**
786
- * Modifies the bot's username or avatar.
888
+ * Modifies the bot's username, avatar or banner.
787
889
  * NOTE: username: if changed may cause the bot's discriminator to be randomized.
788
890
  */
789
891
  editBotProfile: (options: {
790
892
  username?: string;
791
893
  botAvatarURL?: string | null;
792
- }) => Promise<Camelize<DiscordUser>>;
894
+ botBannerURL?: string | null;
895
+ }) => Promise<CamelizedDiscordUser>;
793
896
  /**
794
897
  * Edits a channel's settings.
795
898
  *
796
899
  * @param channelId - The ID of the channel to edit.
797
900
  * @param options - The parameters for the edit of the channel.
798
- * @returns An instance of the edited {@link DiscordChannel}.
901
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
902
+ * @returns An instance of the edited {@link CamelizedDiscordChannel}.
799
903
  *
800
904
  * @remarks
801
- * If editing a channel of type {@link ChannelTypes.GroupDm}:
905
+ * If editing a channel of type {@link ChannelTypes}.GroupDm:
802
906
  * - Fires a _Channel Update_ gateway event.
803
907
  *
804
908
  * If editing a thread channel:
@@ -814,17 +918,18 @@ export interface RestManager {
814
918
  *
815
919
  * - Only permissions the bot user has in the guild or parent channel can be allowed/denied __unless__ the bot user has a `MANAGE_ROLES` permission override in the channel.
816
920
  *
817
- * - If modifying a channel of type {@link ChannelTypes.GuildCategory}:
921
+ * - If modifying a channel of type {@link ChannelTypes}.GuildCategory:
818
922
  * - Fires a _Channel Update_ gateway event for each child channel impacted in this change.
819
923
  * - Otherwise:
820
924
  * - Fires a _Channel Update_ gateway event.
821
925
  */
822
- editChannel: (channelId: BigString, options: ModifyChannel) => Promise<Camelize<DiscordChannel>>;
926
+ editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
823
927
  /**
824
928
  * Edits the permission overrides for a user or role in a channel.
825
929
  *
826
930
  * @param channelId - The ID of the channel to edit the permission overrides of.
827
931
  * @param options - The permission override.
932
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
828
933
  *
829
934
  * @remarks
830
935
  * Requires the `MANAGE_ROLES` permission.
@@ -835,7 +940,7 @@ export interface RestManager {
835
940
  *
836
941
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions}
837
942
  */
838
- editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions) => Promise<void>;
943
+ editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
839
944
  /**
840
945
  * Edits the positions of a set of channels in a guild.
841
946
  *
@@ -856,23 +961,25 @@ export interface RestManager {
856
961
  * @param guildId - The ID of the guild in which to edit the emoji.
857
962
  * @param id - The ID of the emoji to edit.
858
963
  * @param options - The parameters for the edit of the emoji.
859
- * @returns An instance of the updated {@link DiscordEmoji}.
964
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
965
+ * @returns An instance of the updated {@link CamelizedDiscordEmoji}.
860
966
  *
861
967
  * @remarks
862
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
968
+ * For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
969
+ * For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
863
970
  *
864
971
  * Fires a `Guild Emojis Update` gateway event.
865
972
  *
866
973
  * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
867
974
  */
868
- editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji) => Promise<Camelize<DiscordEmoji>>;
975
+ editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
869
976
  /**
870
977
  * Edits a follow-up message to an interaction.
871
978
  *
872
979
  * @param token - The interaction token to use, provided in the original interaction.
873
980
  * @param messageId - The ID of the message to edit.
874
981
  * @param options - The parameters for the edit of the message.
875
- * @returns An instance of the edited {@link Message}.
982
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
876
983
  *
877
984
  * @remarks
878
985
  * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
@@ -883,69 +990,74 @@ export interface RestManager {
883
990
  *
884
991
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
885
992
  */
886
- editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
993
+ editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
887
994
  /**
888
995
  * Edits a global application command.
889
996
  *
890
997
  * @param commandId - The ID of the command to edit.
891
998
  * @param options - The parameters for the edit of the command.
892
- * @returns An instance of the edited {@link ApplicationCommand}.
999
+ * @returns An instance of the edited {@link CamelizedDiscordApplicationCommand}.
893
1000
  *
894
1001
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
895
1002
  */
896
- editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
1003
+ editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
897
1004
  /**
898
1005
  * Edits a guild's settings.
899
1006
  *
900
1007
  * @param guildId - The ID of the guild to edit.
901
1008
  * @param shardId - The ID of the shard the guild is in.
902
1009
  * @param options - The parameters for the edit of the guild.
903
- * @returns An instance of the edited {@link Guild}.
1010
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1011
+ * @returns An instance of the edited {@link CamelizedDiscordGuild}.
904
1012
  *
905
1013
  * @remarks
906
1014
  * Requires the `MANAGE_GUILD` permission.
907
1015
  *
908
- * If attempting to add or remove the {@link GuildFeatures.Community} feature:
1016
+ * If attempting to add or remove the {@link GuildFeatures}.Community feature:
909
1017
  * - Requires the `ADMINISTRATOR` permission.
910
1018
  *
911
1019
  * Fires a _Guild Update_ gateway event.
912
1020
  *
913
1021
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
914
1022
  */
915
- editGuild: (guildId: BigString, options: ModifyGuild) => Promise<Camelize<DiscordGuild>>;
1023
+ editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<CamelizedDiscordGuild>;
916
1024
  /**
917
1025
  * Edits an application command registered in a guild.
918
1026
  *
919
1027
  * @param guildId - The ID of the guild the command is registered in.
920
1028
  * @param commandId - The ID of the command to edit.
921
1029
  * @param options - The parameters for the edit of the command.
922
- * @returns An instance of the edited {@link ApplicationCommand}.
1030
+ * @returns An instance of the edited {@link CamelizedDiscordApplicationCommand}.
923
1031
  *
924
1032
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
925
1033
  */
926
- editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
927
- /** Modify a guild's MFA level. Requires guild ownership. */
1034
+ editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
1035
+ /** Modify a guild's MFA level. Requires guild ownership.
1036
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1037
+ */
928
1038
  editGuildMfaLevel: (guildId: BigString, mfaLevel: MfaLevels, reason?: string) => Promise<void>;
929
1039
  /**
930
1040
  * Edit the given sticker.
931
1041
  *
932
1042
  * @param guildId The ID of the guild to get
933
- * @return A {@link DiscordSticker}
1043
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1044
+ * @return A {@link CamelizedDiscordSticker}
934
1045
  *
935
1046
  * @remarks
936
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
1047
+ * For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1048
+ * For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
937
1049
  * Fires a Guild Stickers Update Gateway event.
938
1050
  *
939
1051
  * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
940
1052
  */
941
- editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>) => Promise<Camelize<DiscordSticker>>;
1053
+ editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<CamelizedDiscordSticker>;
942
1054
  /**
943
1055
  * Edits a template's settings.
944
1056
  *
945
1057
  * @param guildId - The ID of the guild to edit a template of.
946
1058
  * @param templateCode - The code of the template to edit.
947
1059
  * @param options - The parameters for the edit of the template.
948
- * @returns An instance of the edited {@link Template}.
1060
+ * @returns An instance of the edited {@link CamelizedDiscordTemplate}.
949
1061
  *
950
1062
  * @remarks
951
1063
  * Requires the `MANAGE_GUILD` permission.
@@ -954,14 +1066,14 @@ export interface RestManager {
954
1066
  *
955
1067
  * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}
956
1068
  */
957
- editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
1069
+ editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<CamelizedDiscordTemplate>;
958
1070
  /**
959
1071
  * Edits a message.
960
1072
  *
961
1073
  * @param channelId - The ID of the channel to edit the message in.
962
1074
  * @param messageId - The IDs of the message to edit.
963
1075
  * @param options - The parameters for the edit of the message.
964
- * @returns An instance of the edited {@link Message}.
1076
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
965
1077
  *
966
1078
  * @remarks
967
1079
  * If editing another user's message:
@@ -972,13 +1084,13 @@ export interface RestManager {
972
1084
  *
973
1085
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
974
1086
  */
975
- editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
1087
+ editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<CamelizedDiscordMessage>;
976
1088
  /**
977
1089
  * Edits the initial message response to an interaction.
978
1090
  *
979
1091
  * @param token - The interaction token to use, provided in the original interaction.
980
1092
  * @param options - The parameters for the edit of the response.
981
- * @returns An instance of the edited {@link Message}.
1093
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
982
1094
  *
983
1095
  * @remarks
984
1096
  * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
@@ -989,14 +1101,14 @@ export interface RestManager {
989
1101
  *
990
1102
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
991
1103
  */
992
- editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage> | undefined>;
1104
+ editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
993
1105
  /**
994
1106
  * Edits the original webhook message.
995
1107
  *
996
1108
  * @param webhookId - The ID of the webhook to edit the original message of.
997
1109
  * @param token - The webhook token, used to edit the message.
998
1110
  * @param options - The parameters for the edit of the message.
999
- * @returns An instance of the edited {@link DiscordMessage}.
1111
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1000
1112
  *
1001
1113
  * @remarks
1002
1114
  * Fires a _Message Update_ gateway event.
@@ -1005,7 +1117,7 @@ export interface RestManager {
1005
1117
  */
1006
1118
  editOriginalWebhookMessage: (webhookId: BigString, token: string, options: InteractionCallbackData & {
1007
1119
  threadId?: BigString;
1008
- }) => Promise<Camelize<DiscordMessage>>;
1120
+ }) => Promise<CamelizedDiscordMessage>;
1009
1121
  /**
1010
1122
  * Edits the voice state of the bot user.
1011
1123
  *
@@ -1030,7 +1142,8 @@ export interface RestManager {
1030
1142
  * @param guildId - The ID of the guild to edit the role in.
1031
1143
  * @param roleId - The ID of the role to edit.
1032
1144
  * @param options - The parameters for the edit of the role.
1033
- * @returns An instance of the edited {@link DiscordRole}.
1145
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1146
+ * @returns An instance of the edited {@link CamelizedDiscordRole}.
1034
1147
  *
1035
1148
  * @remarks
1036
1149
  * Requires the `MANAGE_ROLES` permission.
@@ -1039,13 +1152,14 @@ export interface RestManager {
1039
1152
  *
1040
1153
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
1041
1154
  */
1042
- editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole) => Promise<Camelize<DiscordRole>>;
1155
+ editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
1043
1156
  /**
1044
1157
  * Edits the positions of a set of roles.
1045
1158
  *
1046
1159
  * @param guildId - The ID of the guild to edit the role positions in.
1047
1160
  * @param options - The parameters for the edit of the role positions.
1048
- * @returns A collection of {@link DiscordRole} objects assorted by role ID.
1161
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1162
+ * @returns A collection of {@link CamelizedDiscordRole} objects assorted by role ID.
1049
1163
  *
1050
1164
  * @remarks
1051
1165
  * Requires the `MANAGE_ROLES` permission.
@@ -1054,31 +1168,34 @@ export interface RestManager {
1054
1168
  *
1055
1169
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
1056
1170
  */
1057
- editRolePositions: (guildId: BigString, options: ModifyRolePositions[]) => Promise<Camelize<DiscordRole[]>>;
1171
+ editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<CamelizedDiscordRole[]>;
1058
1172
  /**
1059
1173
  * Edits a scheduled event.
1060
1174
  *
1061
1175
  * @param guildId - The ID of the guild to edit the scheduled event in.
1062
1176
  * @param eventId - The ID of the scheduled event to edit.
1063
- * @returns An instance of the edited {@link ScheduledEvent}.
1177
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1178
+ * @returns An instance of the edited {@link CamelizedDiscordScheduledEvent}.
1064
1179
  *
1065
1180
  * @remarks
1066
1181
  * Requires the `MANAGE_EVENTS` permission.
1067
1182
  *
1068
1183
  * To start or end an event, modify the event's `status` property.
1069
1184
  *
1070
- * The `entity_metadata` property is discarded for events whose `entity_type` is not {@link ScheduledEventEntityType.External}.
1185
+ * The `entity_metadata` property is discarded for events whose `entity_type` is not {@link ScheduledEventEntityType}.External.
1071
1186
  *
1072
1187
  * Fires a _Guild Scheduled Event Update_ gateway event.
1073
1188
  *
1074
1189
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
1075
1190
  */
1076
- editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>) => Promise<Camelize<DiscordScheduledEvent>>;
1191
+ editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
1077
1192
  /**
1078
1193
  * Edits a stage instance.
1079
1194
  *
1080
1195
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1081
- * @returns An instance of the updated {@link DiscordStageInstance}.
1196
+ * @param topic - Topic of the Stage instance (1-120 characters).
1197
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1198
+ * @returns An instance of the updated {@link CamelizedDiscordStageInstance}.
1082
1199
  *
1083
1200
  * @remarks
1084
1201
  * Requires the user to be a moderator of the stage channel.
@@ -1087,7 +1204,7 @@ export interface RestManager {
1087
1204
  *
1088
1205
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance}
1089
1206
  */
1090
- editStageInstance: (channelId: BigString, data: EditStageInstanceOptions) => Promise<Camelize<DiscordStageInstance>>;
1207
+ editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<CamelizedDiscordStageInstance>;
1091
1208
  /**
1092
1209
  * Edits the voice state of another user.
1093
1210
  *
@@ -1102,11 +1219,26 @@ export interface RestManager {
1102
1219
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
1103
1220
  */
1104
1221
  editUserVoiceState: (guildId: BigString, options: EditUserVoiceState) => Promise<void>;
1222
+ /**
1223
+ * Edit the current user application role connection for the application.
1224
+ *
1225
+ * @param bearerToken - The access token of the user
1226
+ * @param applicationId - The id of the application to edit the role connection
1227
+ * @param options - The options to edit
1228
+ * @returns {CamelizedDiscordApplicationRoleConnection}
1229
+ *
1230
+ * @remarks
1231
+ * This requires the `role_connections.write` scope.
1232
+ *
1233
+ * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}
1234
+ */
1235
+ editUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString, options: CamelizedDiscordApplicationRoleConnection) => Promise<CamelizedDiscordApplicationRoleConnection>;
1105
1236
  /**
1106
1237
  * Edits a webhook.
1107
1238
  *
1108
1239
  * @param webhookId - The ID of the webhook to edit.
1109
- * @returns An instance of the edited {@link DiscordWebhook}.
1240
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1241
+ * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1110
1242
  *
1111
1243
  * @remarks
1112
1244
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1115,7 +1247,7 @@ export interface RestManager {
1115
1247
  *
1116
1248
  * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook}
1117
1249
  */
1118
- editWebhook: (webhookId: BigString, options: ModifyWebhook) => Promise<Camelize<DiscordWebhook>>;
1250
+ editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
1119
1251
  /**
1120
1252
  * Edits a webhook message.
1121
1253
  *
@@ -1123,7 +1255,7 @@ export interface RestManager {
1123
1255
  * @param token - The webhook token, used to edit the message.
1124
1256
  * @param messageId - The ID of the message to edit.
1125
1257
  * @param options - The parameters for the edit of the message.
1126
- * @returns An instance of the edited {@link DiscordMessage}.
1258
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1127
1259
  *
1128
1260
  * @remarks
1129
1261
  * Fires a _Message Update_ gateway event.
@@ -1132,13 +1264,13 @@ export interface RestManager {
1132
1264
  */
1133
1265
  editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
1134
1266
  threadId?: BigString;
1135
- }) => Promise<Camelize<DiscordMessage>>;
1267
+ }) => Promise<CamelizedDiscordMessage>;
1136
1268
  /**
1137
1269
  * Edits a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1138
1270
  *
1139
1271
  * @param webhookId - The ID of the webhook to edit.
1140
1272
  * @param token - The webhook token, used to edit the webhook.
1141
- * @returns An instance of the edited {@link DiscordWebhook}.
1273
+ * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1142
1274
  *
1143
1275
  * @remarks
1144
1276
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1147,13 +1279,14 @@ export interface RestManager {
1147
1279
  *
1148
1280
  * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
1149
1281
  */
1150
- editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
1282
+ editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<CamelizedDiscordWebhook>;
1151
1283
  /**
1152
1284
  * Edits a guild's welcome screen.
1153
1285
  *
1154
1286
  * @param guildId - The ID of the guild to edit the welcome screen of.
1155
1287
  * @param options - The parameters for the edit of the welcome screen.
1156
- * @returns An instance of the edited {@link WelcomeScreen}.
1288
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1289
+ * @returns An instance of the edited {@link CamelizedDiscordWelcomeScreen}.
1157
1290
  *
1158
1291
  * @remarks
1159
1292
  * Requires the `MANAGE_GUILD` permission.
@@ -1162,12 +1295,13 @@ export interface RestManager {
1162
1295
  *
1163
1296
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
1164
1297
  */
1165
- editWelcomeScreen: (guildId: BigString, options: Camelize<DiscordModifyGuildWelcomeScreen>) => Promise<Camelize<DiscordWelcomeScreen>>;
1298
+ editWelcomeScreen: (guildId: BigString, options: CamelizedDiscordModifyGuildWelcomeScreen, reason?: string) => Promise<CamelizedDiscordWelcomeScreen>;
1166
1299
  /**
1167
1300
  * Edits the settings of a guild's widget.
1168
1301
  *
1169
1302
  * @param guildId - The ID of the guild to edit the settings of the widget of.
1170
- * @returns An instance of the edited {@link GuildWidgetSettings}.
1303
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1304
+ * @returns An instance of the edited {@link CamelizedDiscordGuildWidgetSettings}.
1171
1305
  *
1172
1306
  * @remarks
1173
1307
  * Requires the `MANAGE_GUILD` permission.
@@ -1176,27 +1310,28 @@ export interface RestManager {
1176
1310
  *
1177
1311
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
1178
1312
  */
1179
- editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>) => Promise<Camelize<DiscordGuildWidgetSettings>>;
1313
+ editWidgetSettings: (guildId: BigString, options: CamelizedDiscordGuildWidgetSettings, reason?: string) => Promise<CamelizedDiscordGuildWidgetSettings>;
1180
1314
  /**
1181
1315
  * Executes a webhook, causing a message to be posted in the channel configured for the webhook.
1182
1316
  *
1183
1317
  * @param webhookId - The ID of the webhook to execute.
1184
1318
  * @param token - The webhook token, used to execute the webhook.
1185
1319
  * @param options - The parameters for the execution of the webhook.
1186
- * @returns An instance of the created {@link DiscordMessage}, or `undefined` if the {@link ExecuteWebhook.wait | wait} property of the {@link options} object parameter is set to `false`.
1320
+ * @returns An instance of the created {@link CamelizedDiscordMessage}, or `undefined` if the {@link ExecuteWebhook.wait | wait} property of the {@link options} object parameter is set to `false`.
1187
1321
  *
1188
1322
  * @remarks
1189
1323
  * If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
1190
1324
  *
1191
1325
  * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
1192
1326
  */
1193
- executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
1327
+ executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<CamelizedDiscordMessage | undefined>;
1194
1328
  /**
1195
1329
  * Follows an announcement channel, allowing messages posted within it to be cross-posted into the target channel.
1196
1330
  *
1197
1331
  * @param sourceChannelId - The ID of the announcement channel to follow.
1198
1332
  * @param targetChannelId - The ID of the target channel - the channel to cross-post to.
1199
- * @returns An instance of {@link DiscordFollowedChannel}.
1333
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1334
+ * @returns An instance of {@link CamelizedDiscordFollowedChannel}.
1200
1335
  *
1201
1336
  * @remarks
1202
1337
  * Requires the `MANAGE_WEBHOOKS` permission in the __target channel__.
@@ -1205,12 +1340,12 @@ export interface RestManager {
1205
1340
  *
1206
1341
  * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
1207
1342
  */
1208
- followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<Camelize<DiscordFollowedChannel>>;
1343
+ followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<CamelizedDiscordFollowedChannel>;
1209
1344
  /**
1210
1345
  * Gets the list of all active threads for a guild.
1211
1346
  *
1212
1347
  * @param guildId - The ID of the guild to get the threads of.
1213
- * @returns An instance of {@link DiscordActiveThreads}.
1348
+ * @returns An instance of {@link CamelizedDiscordActiveThreads}.
1214
1349
  *
1215
1350
  * @remarks
1216
1351
  * Returns both public and private threads.
@@ -1219,91 +1354,133 @@ export interface RestManager {
1219
1354
  *
1220
1355
  * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
1221
1356
  */
1222
- getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordActiveThreads>>;
1357
+ getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>;
1223
1358
  /** Get the applications info */
1224
- getApplicationInfo: () => Promise<Camelize<DiscordApplication>>;
1359
+ getApplicationInfo: () => Promise<CamelizedDiscordApplication>;
1360
+ /**
1361
+ * Edit properties of the app associated with the requesting bot user.
1362
+ *
1363
+ * @remarks
1364
+ * Only properties that are passed will be updated.
1365
+ */
1366
+ editApplicationInfo: (body: EditApplication) => Promise<CamelizedDiscordApplication>;
1367
+ /**
1368
+ * Get the current authentication info for the authenticated user
1369
+ *
1370
+ * @param bearerToken - Any OAuth2 derived access token
1371
+ * @returns An instance of {@link CamelizedDiscordCurrentAuthorization}
1372
+ *
1373
+ * @remarks
1374
+ * The user object is not defined if the scopes do not include `identify`.
1375
+ * In the user object, if defined, the email is not included if the scopes do not include `email`
1376
+ */
1377
+ getCurrentAuthenticationInfo: (bearerToken: string) => Promise<CamelizedDiscordCurrentAuthorization>;
1378
+ /**
1379
+ * Exchange the information to get a OAuth2 accessToken token
1380
+ *
1381
+ * @param clientId - Application's client id
1382
+ * @param clientSecret - application's client secret
1383
+ * @param options - The options to make the exchange with discord
1384
+ */
1385
+ exchangeToken: (clientId: BigString, clientSecret: string, options: CamelizedDiscordTokenExchange) => Promise<CamelizedDiscordAccessTokenResponse>;
1386
+ /**
1387
+ * Revoke an access_token
1388
+ *
1389
+ * @param clientId - Application's client id
1390
+ * @param clientSecret - application's client secret
1391
+ * @param options - The options to revoke the access_token
1392
+ */
1393
+ revokeToken: (clientId: BigString, clientSecret: string, options: CamelizedDiscordTokenRevocation) => Promise<void>;
1225
1394
  /**
1226
1395
  * Gets the permissions of a guild application command.
1227
1396
  *
1228
1397
  * @param guildId - The ID of the guild the command is registered in.
1229
1398
  * @param commandId - The ID of the command to get the permissions of.
1230
- * @returns An instance of {@link ApplicationCommandPermission}.
1399
+ * @param options - The OAuth2 related optional parameters for the endpoint
1400
+ * @returns An instance of {@link CamelizedDiscordGuildApplicationCommandPermissions}.
1401
+ *
1402
+ * @remarks
1403
+ * Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
1231
1404
  *
1232
1405
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
1233
1406
  */
1234
- getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<Camelize<DiscordApplicationCommandPermissions>>;
1407
+ getApplicationCommandPermission: (guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<CamelizedDiscordGuildApplicationCommandPermissions>;
1235
1408
  /**
1236
- * Gets the permissions of all application commands registered in a guild by the ID of the guild.
1409
+ * Gets the permissions of all application commands registered in a guild by the ID of the guild and optionally an external application.
1237
1410
  *
1238
1411
  * @param guildId - The ID of the guild to get the permissions objects of.
1239
- * @returns A collection of {@link ApplicationCommandPermission} objects assorted by command ID.
1412
+ * @param options - The OAuth2 related optional parameters for the endpoint
1413
+ * @returns A collection of {@link CamelizedDiscordGuildApplicationCommandPermissions} objects assorted by command ID.
1414
+ *
1415
+ * @remarks
1416
+ * Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
1240
1417
  *
1241
1418
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
1242
1419
  */
1243
- getApplicationCommandPermissions: (guildId: BigString) => Promise<Camelize<DiscordApplicationCommandPermissions[]>>;
1420
+ getApplicationCommandPermissions: (guildId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<CamelizedDiscordGuildApplicationCommandPermissions[]>;
1244
1421
  /**
1245
1422
  * Gets a guild's audit log.
1246
1423
  *
1247
1424
  * @param guildId - The ID of the guild to get the audit log of.
1248
1425
  * @param options - The parameters for the fetching of the audit log.
1249
- * @returns An instance of {@link AuditLog}.
1426
+ * @returns An instance of {@link CamelizedDiscordAuditLog}.
1250
1427
  *
1251
1428
  * @remarks
1252
1429
  * Requires the `VIEW_AUDIT_LOG` permission.
1253
1430
  *
1254
1431
  * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
1255
1432
  */
1256
- getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
1433
+ getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<CamelizedDiscordAuditLog>;
1257
1434
  /**
1258
1435
  * Gets an automod rule by its ID.
1259
1436
  *
1260
1437
  * @param guildId - The ID of the guild to get the rule of.
1261
1438
  * @param ruleId - The ID of the rule to get.
1262
- * @returns An instance of {@link DiscordAutoModerationRule}.
1439
+ * @returns An instance of {@link CamelizedDiscordAutoModerationRule}.
1263
1440
  *
1264
1441
  * @remarks
1265
1442
  * Requires the `MANAGE_GUILD` permission.
1266
1443
  *
1267
1444
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
1268
1445
  */
1269
- getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
1446
+ getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<CamelizedDiscordAutoModerationRule>;
1270
1447
  /**
1271
1448
  * Gets the list of automod rules for a guild.
1272
1449
  *
1273
1450
  * @param guildId - The ID of the guild to get the rules from.
1274
- * @returns A collection of {@link DiscordAutoModerationRule} objects assorted by rule ID.
1451
+ * @returns A collection of {@link CamelizedDiscordAutoModerationRule} objects assorted by rule ID.
1275
1452
  *
1276
1453
  * @remarks
1277
1454
  * Requires the `MANAGE_GUILD` permission.
1278
1455
  *
1279
1456
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
1280
1457
  */
1281
- getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule[]>>;
1458
+ getAutomodRules: (guildId: BigString) => Promise<CamelizedDiscordAutoModerationRule[]>;
1282
1459
  /**
1283
1460
  * Gets the list of available voice regions.
1284
1461
  *
1285
- * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
1462
+ * @returns A collection of {@link CamelizedDiscordVoiceRegion} objects assorted by voice region ID.
1286
1463
  */
1287
- getAvailableVoiceRegions: () => Promise<Camelize<DiscordVoiceRegion[]>>;
1464
+ getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>;
1288
1465
  /**
1289
1466
  * Gets a ban by user ID.
1290
1467
  *
1291
1468
  * @param guildId - The ID of the guild to get the ban from.
1292
1469
  * @param userId - The ID of the user to get the ban for.
1293
- * @returns An instance of {@link DiscordBan}.
1470
+ * @returns An instance of {@link CamelizedDiscordBan}.
1294
1471
  *
1295
1472
  * @remarks
1296
1473
  * Requires the `BAN_MEMBERS` permission.
1297
1474
  *
1298
1475
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
1299
1476
  */
1300
- getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
1477
+ getBan: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordBan>;
1301
1478
  /**
1302
1479
  * Gets the list of bans for a guild.
1303
1480
  *
1304
1481
  * @param guildId - The ID of the guild to get the list of bans for.
1305
1482
  * @param options - The parameters for the fetching of the list of bans.
1306
- * @returns A collection of {@link DiscordBan} objects assorted by user ID.
1483
+ * @returns A collection of {@link CamelizedDiscordBan} objects assorted by user ID.
1307
1484
  *
1308
1485
  * @remarks
1309
1486
  * Requires the `BAN_MEMBERS` permission.
@@ -1312,24 +1489,24 @@ export interface RestManager {
1312
1489
  *
1313
1490
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
1314
1491
  */
1315
- getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan[]>>;
1492
+ getBans: (guildId: BigString, options?: GetBans) => Promise<CamelizedDiscordBan[]>;
1316
1493
  /**
1317
1494
  * Gets a channel by its ID.
1318
1495
  *
1319
1496
  * @param channelId - The ID of the channel to get.
1320
- * @returns An instance of {@link DiscordChannel}.
1497
+ * @returns An instance of {@link CamelizedDiscordChannel}.
1321
1498
  *
1322
1499
  * @remarks
1323
- * If the channel is a thread, a {@link ThreadMember} object is included in the result.
1500
+ * If the channel is a thread, a {@link CamelizedDiscordThreadMember} object is included in the result.
1324
1501
  *
1325
1502
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
1326
1503
  */
1327
- getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
1504
+ getChannel: (channelId: BigString) => Promise<CamelizedDiscordChannel>;
1328
1505
  /**
1329
1506
  * Gets the list of invites for a channel.
1330
1507
  *
1331
1508
  * @param channelId - The ID of the channel to get the invites of.
1332
- * @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
1509
+ * @returns A collection of {@link CamelizedDiscordInviteMetadata} objects assorted by invite code.
1333
1510
  *
1334
1511
  * @remarks
1335
1512
  * Requires the `MANAGE_CHANNELS` permission.
@@ -1338,65 +1515,88 @@ export interface RestManager {
1338
1515
  *
1339
1516
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
1340
1517
  */
1341
- getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata[]>>;
1518
+ getChannelInvites: (channelId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1342
1519
  /**
1343
1520
  * Gets the list of channels for a guild.
1344
1521
  *
1345
1522
  * @param guildId - The ID of the guild to get the channels of.
1346
- * @returns A collection of {@link DiscordChannel} objects assorted by channel ID.
1523
+ * @returns A collection of {@link CamelizedDiscordChannel} objects assorted by channel ID.
1347
1524
  *
1348
1525
  * @remarks
1349
1526
  * Excludes threads.
1350
1527
  *
1351
1528
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
1352
1529
  */
1353
- getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel[]>>;
1530
+ getChannels: (guildId: BigString) => Promise<CamelizedDiscordChannel[]>;
1354
1531
  /**
1355
1532
  * Gets a list of webhooks for a channel.
1356
1533
  *
1357
1534
  * @param channelId - The ID of the channel which to get the webhooks of.
1358
- * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1535
+ * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1359
1536
  *
1360
1537
  * @remarks
1361
1538
  * Requires the `MANAGE_WEBHOOKS` permission.
1362
1539
  *
1363
1540
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks}
1364
1541
  */
1365
- getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook[]>>;
1542
+ getChannelWebhooks: (channelId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1366
1543
  /**
1367
1544
  * Gets or creates a DM channel with a user.
1368
1545
  *
1369
1546
  * @param userId - The ID of the user to create the DM channel with.
1370
- * @returns An instance of {@link DiscordChannel}.
1547
+ * @returns An instance of {@link CamelizedDiscordChannel}.
1371
1548
  *
1372
1549
  * @see {@link https://discord.com/developers/docs/resources/user#create-dm}
1373
1550
  */
1374
- getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
1551
+ getDmChannel: (userId: BigString) => Promise<CamelizedDiscordChannel>;
1552
+ /**
1553
+ * Create a new group DM channel with multiple users.
1554
+ *
1555
+ * @param options - The options for create a new group dm
1556
+ * @returns An instance of {@link CamelizedDiscordChannel}.
1557
+ *
1558
+ * @remarks
1559
+ * The access tokens require to have the `gdm.join` scope
1560
+ *
1561
+ * This endpoint is limited to 10 active group DMs.
1562
+ *
1563
+ * Fires a _Channel create_ gateway event.
1564
+ *
1565
+ * @see {@link https://discord.com/developers/docs/resources/user#create-group-dm}
1566
+ */
1567
+ getGroupDmChannel: (options: GetGroupDmOptions) => Promise<CamelizedDiscordChannel>;
1375
1568
  /**
1376
1569
  * Gets an emoji by its ID.
1377
1570
  *
1378
1571
  * @param guildId - The ID of the guild from which to get the emoji.
1379
1572
  * @param emojiId - The ID of the emoji to get.
1380
- * @returns An instance of {@link DiscordEmoji}.
1573
+ * @returns An instance of {@link CamelizedDiscordEmoji}.
1574
+ *
1575
+ * @remarks
1576
+ * Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission,
1577
+ * or if the bot created the emoji and has the the `CREATE_GUILD_EXPRESSIONS` permission.
1381
1578
  *
1382
1579
  * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
1383
1580
  */
1384
- getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
1581
+ getEmoji: (guildId: BigString, emojiId: BigString) => Promise<CamelizedDiscordEmoji>;
1385
1582
  /**
1386
1583
  * Gets the list of emojis for a guild.
1387
1584
  *
1388
1585
  * @param guildId - The ID of the guild which to get the emojis of.
1389
- * @returns A collection of {@link DiscordEmoji} objects assorted by emoji ID.
1586
+ * @returns A collection of {@link CamelizedDiscordEmoji} objects assorted by emoji ID.
1587
+ *
1588
+ * @remarks
1589
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1390
1590
  *
1391
1591
  * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
1392
1592
  */
1393
- getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji[]>>;
1593
+ getEmojis: (guildId: BigString) => Promise<CamelizedDiscordEmoji[]>;
1394
1594
  /**
1395
1595
  * Gets a follow-up message to an interaction by the ID of the message.
1396
1596
  *
1397
1597
  * @param token - The interaction token to use, provided in the original interaction.
1398
1598
  * @param messageId - The ID of the message to get.
1399
- * @returns An instance of {@link Message}.
1599
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1400
1600
  *
1401
1601
  * @remarks
1402
1602
  * Unlike `getMessage()`, this endpoint allows the bot user to act without:
@@ -1407,168 +1607,181 @@ export interface RestManager {
1407
1607
  *
1408
1608
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message}
1409
1609
  */
1410
- getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1610
+ getFollowupMessage: (token: string, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1411
1611
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1412
- getGatewayBot: () => Promise<Camelize<DiscordGetGatewayBot>>;
1612
+ getGatewayBot: () => Promise<CamelizedDiscordGetGatewayBot>;
1413
1613
  /**
1414
1614
  * Gets a global application command by its ID.
1415
1615
  *
1416
1616
  * @param commandId - The ID of the command to get.
1417
- * @returns An instance of {@link ApplicationCommand}.
1617
+ * @returns An instance of {@link CamelizedDiscordApplicationCommand}.
1418
1618
  *
1419
1619
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
1420
1620
  */
1421
- getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1621
+ getGlobalApplicationCommand: (commandId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1422
1622
  /**
1423
1623
  * Gets the list of your bot's global application commands.
1424
1624
  *
1425
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
1625
+ * @returns A collection of {@link CamelizedDiscordApplicationCommand} objects assorted by command ID.
1426
1626
  *
1427
1627
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
1428
1628
  */
1429
- getGlobalApplicationCommands: () => Promise<Camelize<DiscordApplicationCommand[]>>;
1629
+ getGlobalApplicationCommands: () => Promise<CamelizedDiscordApplicationCommand[]>;
1430
1630
  /**
1431
1631
  * Gets a guild by its ID.
1432
1632
  *
1433
1633
  * @param guildId - The ID of the guild to get.
1434
1634
  * @param options - The parameters for the fetching of the guild.
1435
- * @returns An instance of {@link Guild}.
1635
+ * @returns An instance of {@link CamelizedDiscordGuild}.
1436
1636
  *
1437
1637
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
1438
1638
  */
1439
1639
  getGuild: (guildId: BigString, options?: {
1440
1640
  counts?: boolean;
1441
- }) => Promise<Camelize<DiscordGuild>>;
1641
+ }) => Promise<CamelizedDiscordGuild>;
1642
+ /**
1643
+ * Get the user guilds.
1644
+ *
1645
+ * @param bearerToken - The access token of the user, if unspecified the bot token is used instead
1646
+ * @param options - The parameters for the fetching of the guild.
1647
+ * @returns An instance of {@link CamelizedDiscordGuild}.
1648
+ *
1649
+ * @remarks
1650
+ * If used with an access token, the token needs to have the `guilds` scope
1651
+ *
1652
+ * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
1653
+ */
1654
+ getGuilds: (bearerToken?: string, options?: GetUserGuilds) => Promise<CamelizedDiscordPartialGuild[]>;
1442
1655
  /**
1443
1656
  * Gets a guild application command by its ID.
1444
1657
  *
1445
1658
  * @param guildId - The ID of the guild the command is registered in.
1446
1659
  * @param commandId - The ID of the command to get.
1447
- * @returns An instance of {@link ApplicationCommand}.
1660
+ * @returns An instance of {@link CamelizedDiscordApplicationCommand}.
1448
1661
  *
1449
1662
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}
1450
1663
  */
1451
- getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1664
+ getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1452
1665
  /**
1453
1666
  * Gets the list of application commands registered by your bot in a guild.
1454
1667
  *
1455
1668
  * @param guildId - The ID of the guild the commands are registered in.
1456
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
1669
+ * @returns A collection of {@link CamelizedDiscordApplicationCommand} objects assorted by command ID.
1457
1670
  *
1458
1671
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commandss}
1459
1672
  */
1460
- getGuildApplicationCommands: (guildId: BigString) => Promise<Camelize<DiscordApplicationCommand[]>>;
1673
+ getGuildApplicationCommands: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommand[]>;
1461
1674
  /**
1462
1675
  * Gets the preview of a guild by a guild's ID.
1463
1676
  *
1464
1677
  * @param guildId - The ID of the guild to get the preview of.
1465
- * @returns An instance of {@link GuildPreview}.
1678
+ * @returns An instance of {@link CamelizedDiscordGuildPreview}.
1466
1679
  *
1467
1680
  * @remarks
1468
- * If the bot user is not in the guild, the guild must be lurkable.
1681
+ * If the bot user is not in the guild, the guild must be discoverable.
1469
1682
  *
1470
1683
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
1471
1684
  */
1472
- getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
1685
+ getGuildPreview: (guildId: BigString) => Promise<CamelizedDiscordGuildPreview>;
1473
1686
  /**
1474
1687
  * Returns a sticker object for the given guild and sticker IDs.
1475
1688
  *
1476
1689
  * @param guildId The ID of the guild to get
1477
1690
  * @param stickerId The ID of the sticker to get
1478
- * @return A {@link DiscordSticker}
1691
+ * @return A {@link CamelizedDiscordSticker}
1479
1692
  *
1480
- * @remarks Includes the user field if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1693
+ * @remarks Includes the user field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1481
1694
  *
1482
1695
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
1483
1696
  */
1484
- getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1697
+ getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<CamelizedDiscordSticker>;
1485
1698
  /**
1486
1699
  * Returns an array of sticker objects for the given guild.
1487
1700
  *
1488
1701
  * @param guildId The ID of the guild to get
1489
- * @returns A collection of {@link DiscordSticker} objects assorted by sticker ID.
1702
+ * @returns A collection of {@link CamelizedDiscordSticker} objects assorted by sticker ID.
1490
1703
  *
1491
- * @remarks Includes user fields if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1704
+ * @remarks Includes user fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1492
1705
  *
1493
1706
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
1494
1707
  */
1495
- getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker[]>>;
1708
+ getGuildStickers: (guildId: BigString) => Promise<CamelizedDiscordSticker[]>;
1496
1709
  /**
1497
1710
  * Gets a template by its code.
1498
1711
  *
1499
1712
  * @param templateCode - The code of the template to get.
1500
- * @returns An instance of {@link Template}.
1713
+ * @returns An instance of {@link CamelizedDiscordTemplate}.
1501
1714
  *
1502
1715
  * @remarks
1503
1716
  * Requires the `MANAGE_GUILD` permission.
1504
1717
  *
1505
1718
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}
1506
1719
  */
1507
- getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
1720
+ getGuildTemplate: (templateCode: string) => Promise<CamelizedDiscordTemplate>;
1508
1721
  /**
1509
1722
  * Gets the list of templates for a guild.
1510
1723
  *
1511
1724
  * @param guildId - The ID of the guild to get the list of templates for.
1512
- * @returns A collection of {@link Template} objects assorted by template code.
1725
+ * @returns A collection of {@link CamelizedDiscordTemplate} objects assorted by template code.
1513
1726
  *
1514
1727
  * @remarks
1515
1728
  * Requires the `MANAGE_GUILD` permission.
1516
1729
  *
1517
1730
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
1518
1731
  */
1519
- getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate[]>>;
1732
+ getGuildTemplates: (guildId: BigString) => Promise<CamelizedDiscordTemplate[]>;
1520
1733
  /**
1521
1734
  * Gets the list of webhooks for a guild.
1522
1735
  *
1523
1736
  * @param guildId - The ID of the guild to get the list of webhooks for.
1524
- * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1737
+ * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1525
1738
  *
1526
1739
  * @remarks
1527
1740
  * Requires the `MANAGE_WEBHOOKS` permission.
1528
1741
  *
1529
1742
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks}
1530
1743
  */
1531
- getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook[]>>;
1744
+ getGuildWebhooks: (guildId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1532
1745
  /**
1533
1746
  * Gets the list of integrations attached to a guild.
1534
1747
  *
1535
1748
  * @param guildId - The ID of the guild to get the list of integrations from.
1536
- * @returns A collection of {@link Integration} objects assorted by integration ID.
1749
+ * @returns A collection of {@link CamelizedDiscordIntegration} objects assorted by integration ID.
1537
1750
  *
1538
1751
  * @remarks
1539
1752
  * Requires the `MANAGE_GUILD` permission.
1540
1753
  *
1541
1754
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
1542
1755
  */
1543
- getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration[]>>;
1756
+ getIntegrations: (guildId: BigString) => Promise<CamelizedDiscordIntegration[]>;
1544
1757
  /**
1545
1758
  * Gets an invite to a channel by its invite code.
1546
1759
  *
1547
1760
  * @param inviteCode - The invite code of the invite to get.
1548
1761
  * @param options - The parameters for the fetching of the invite.
1549
- * @returns An instance of {@link DiscordInviteMetadata}.
1762
+ * @returns An instance of {@link CamelizedDiscordInviteMetadata}.
1550
1763
  *
1551
1764
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
1552
1765
  */
1553
- getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
1766
+ getInvite: (inviteCode: string, options?: GetInvite) => Promise<CamelizedDiscordInviteMetadata>;
1554
1767
  /**
1555
1768
  * Gets the list of invites for a guild.
1556
1769
  *
1557
1770
  * @param guildId - The ID of the guild to get the invites from.
1558
- * @returns A collection of {@link InviteMetadata | Invite} objects assorted by invite code.
1771
+ * @returns A collection of {@link CamelizedDiscordInviteMetadata} objects assorted by invite code.
1559
1772
  *
1560
1773
  * @remarks
1561
1774
  * Requires the `MANAGE_GUILD` permission.
1562
1775
  *
1563
1776
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invites}
1564
1777
  */
1565
- getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata[]>>;
1778
+ getInvites: (guildId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1566
1779
  /**
1567
1780
  * Gets a message from a channel by the ID of the message.
1568
1781
  *
1569
1782
  * @param channelId - The ID of the channel from which to get the message.
1570
1783
  * @param messageId - The ID of the message to get.
1571
- * @returns An instance of {@link Message}.
1784
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1572
1785
  *
1573
1786
  * @remarks
1574
1787
  * Requires that the bot user be able to see the contents of the channel in which the message was posted.
@@ -1578,13 +1791,13 @@ export interface RestManager {
1578
1791
  *
1579
1792
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
1580
1793
  */
1581
- getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1794
+ getMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1582
1795
  /**
1583
1796
  * Gets multiple messages from a channel.
1584
1797
  *
1585
1798
  * @param channelId - The ID of the channel from which to get the messages.
1586
1799
  * @param options - The parameters for the fetching of the messages.
1587
- * @returns A collection of {@link Message} objects assorted by message ID.
1800
+ * @returns A collection of {@link CamelizedDiscordMessage} objects assorted by message ID.
1588
1801
  *
1589
1802
  * @remarks
1590
1803
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -1594,20 +1807,20 @@ export interface RestManager {
1594
1807
  *
1595
1808
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
1596
1809
  */
1597
- getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage[]>>;
1810
+ getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<CamelizedDiscordMessage[]>;
1598
1811
  /**
1599
- * Returns the list of sticker packs available to Nitro subscribers.
1812
+ * Returns the list of sticker packs available.
1600
1813
  *
1601
- * @returns A collection of {@link StickerPack} objects assorted by sticker ID.
1814
+ * @returns A collection of {@link CamelizedDiscordStickerPack} objects assorted by sticker ID.
1602
1815
  *
1603
- * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
1816
+ * @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs}
1604
1817
  */
1605
- getNitroStickerPacks: () => Promise<Camelize<DiscordStickerPack[]>>;
1818
+ getStickerPacks: () => Promise<CamelizedDiscordStickerPack[]>;
1606
1819
  /**
1607
1820
  * Gets the initial message response to an interaction.
1608
1821
  *
1609
1822
  * @param token - The interaction token to use, provided in the original interaction.
1610
- * @returns An instance of {@link Message}.
1823
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1611
1824
  *
1612
1825
  * @remarks
1613
1826
  * Unlike `getMessage()`, this endpoint allows the bot user to act without:
@@ -1618,12 +1831,12 @@ export interface RestManager {
1618
1831
  *
1619
1832
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
1620
1833
  */
1621
- getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
1834
+ getOriginalInteractionResponse: (token: string) => Promise<CamelizedDiscordMessage>;
1622
1835
  /**
1623
1836
  * Gets the pinned messages for a channel.
1624
1837
  *
1625
1838
  * @param channelId - The ID of the channel to get the pinned messages for.
1626
- * @returns A collection of {@link Message} objects assorted by message ID.
1839
+ * @returns A collection of {@link CamelizedDiscordMessage} objects assorted by message ID.
1627
1840
  *
1628
1841
  * @remarks
1629
1842
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -1633,42 +1846,42 @@ export interface RestManager {
1633
1846
  *
1634
1847
  * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
1635
1848
  */
1636
- getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage[]>>;
1849
+ getPinnedMessages: (channelId: BigString) => Promise<CamelizedDiscordMessage[]>;
1637
1850
  /**
1638
1851
  * Gets the list of private archived threads for a channel.
1639
1852
  *
1640
1853
  * @param channelId - The ID of the channel to get the archived threads for.
1641
1854
  * @param options - The parameters for the fetching of threads.
1642
- * @returns An instance of {@link DiscordArchivedThreads}.
1855
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1643
1856
  *
1644
1857
  * @remarks
1645
1858
  * Requires the `READ_MESSAGE_HISTORY` permission.
1646
1859
  * Requires the `MANAGE_THREADS` permission.
1647
1860
  *
1648
- * Returns threads of type {@link ChannelTypes.GuildPrivateThread}.
1861
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1649
1862
  *
1650
1863
  * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1651
1864
  *
1652
1865
  * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
1653
1866
  */
1654
- getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1867
+ getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1655
1868
  /**
1656
1869
  * Gets the list of private archived threads the bot is a member of for a channel.
1657
1870
  *
1658
1871
  * @param channelId - The ID of the channel to get the archived threads for.
1659
1872
  * @param options - The parameters for the fetching of threads.
1660
- * @returns An instance of {@link DiscordArchivedThreads}.
1873
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1661
1874
  *
1662
1875
  * @remarks
1663
1876
  * Requires the `READ_MESSAGE_HISTORY` permission.
1664
1877
  *
1665
- * Returns threads of type {@link ChannelTypes.GuildPrivateThread}.
1878
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1666
1879
  *
1667
1880
  * Threads are ordered by the `id` property in descending order.
1668
1881
  *
1669
1882
  * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
1670
1883
  */
1671
- getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1884
+ getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1672
1885
  /**
1673
1886
  * Gets the number of members that would be kicked from a guild during pruning.
1674
1887
  *
@@ -1677,71 +1890,71 @@ export interface RestManager {
1677
1890
  * @returns A number indicating the number of members that would be kicked.
1678
1891
  *
1679
1892
  * @remarks
1680
- * Requires the `KICK_MEMBERS` permission.
1893
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
1681
1894
  *
1682
1895
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
1683
1896
  */
1684
- getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
1897
+ getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<CamelizedDiscordPrunedCount>;
1685
1898
  /**
1686
1899
  * Gets the list of public archived threads for a channel.
1687
1900
  *
1688
1901
  * @param channelId - The ID of the channel to get the archived threads for.
1689
1902
  * @param options - The parameters for the fetching of threads.
1690
- * @returns An instance of {@link ArchivedThreads}.
1903
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1691
1904
  *
1692
1905
  * @remarks
1693
1906
  * Requires the `READ_MESSAGE_HISTORY` permission.
1694
1907
  *
1695
- * If called on a channel of type {@link ChannelTypes.GuildText}, returns threads of type {@link ChannelTypes.GuildPublicThread}.
1696
- * If called on a channel of type {@link ChannelTypes.GuildNews}, returns threads of type {@link ChannelTypes.GuildNewsThread}.
1908
+ * If called on a channel of type {@link ChannelTypes}.GuildText, returns threads of type {@link ChannelTypes}.GuildPublicThread.
1909
+ * If called on a channel of type {@link ChannelTypes}.GuildNews, returns threads of type {@link ChannelTypes}.GuildNewsThread.
1697
1910
  *
1698
1911
  * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1699
1912
  *
1700
1913
  * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
1701
1914
  */
1702
- getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1915
+ getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1703
1916
  /**
1704
1917
  * Gets the list of roles for a guild.
1705
1918
  *
1706
1919
  * @param guildId - The ID of the guild to get the list of roles for.
1707
- * @returns A collection of {@link DisorcRole} objects assorted by role ID.
1920
+ * @returns A collection of {@link CamelizedDiscordRole} objects assorted by role ID.
1708
1921
  *
1709
1922
  * @remarks
1710
- * ⚠️ This endpoint should be used sparingly due to {@link User} objects already being included in guild payloads.
1923
+ * ⚠️ This endpoint should be used sparingly due to {@link CamelizedDiscordRole} objects already being included in guild payloads.
1711
1924
  *
1712
1925
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
1713
1926
  */
1714
- getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole[]>>;
1927
+ getRoles: (guildId: BigString) => Promise<CamelizedDiscordRole[]>;
1715
1928
  /**
1716
1929
  * Gets a scheduled event by its ID.
1717
1930
  *
1718
1931
  * @param guildId - The ID of the guild to get the scheduled event from.
1719
1932
  * @param eventId - The ID of the scheduled event to get.
1720
1933
  * @param options - The parameters for the fetching of the scheduled event.
1721
- * @returns An instance of {@link ScheduledEvent}.
1934
+ * @returns An instance of {@link CamelizedDiscordScheduledEvent}.
1722
1935
  *
1723
1936
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}
1724
1937
  */
1725
1938
  getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
1726
1939
  withUserCount?: boolean;
1727
- }) => Promise<Camelize<DiscordScheduledEvent>>;
1940
+ }) => Promise<CamelizedDiscordScheduledEvent>;
1728
1941
  /**
1729
1942
  * Gets the list of scheduled events for a guild.
1730
1943
  *
1731
1944
  * @param guildId - The ID of the guild to get the scheduled events from.
1732
1945
  * @param options - The parameters for the fetching of the scheduled events.
1733
- * @returns A collection of {@link ScheduledEvent} objects assorted by event ID.
1946
+ * @returns A collection of {@link CamelizedDiscordScheduledEvent} objects assorted by event ID.
1734
1947
  *
1735
1948
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
1736
1949
  */
1737
- getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent[]>>;
1950
+ getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<CamelizedDiscordScheduledEvent[]>;
1738
1951
  /**
1739
1952
  * Gets the list of subscribers to a scheduled event from a guild.
1740
1953
  *
1741
1954
  * @param guildId - The ID of the guild to get the subscribers to the scheduled event from.
1742
1955
  * @param eventId - The ID of the scheduled event to get the subscribers of.
1743
1956
  * @param options - The parameters for the fetching of the subscribers.
1744
- * @returns A collection of {@link User} objects assorted by user ID.
1957
+ * @returns A collection of {@link CamelizedDiscordUser} objects assorted by user ID.
1745
1958
  *
1746
1959
  * @remarks
1747
1960
  * Requires the `MANAGE_EVENTS` permission.
@@ -1751,51 +1964,51 @@ export interface RestManager {
1751
1964
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
1752
1965
  */
1753
1966
  getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
1754
- user: Camelize<DiscordUser>;
1755
- member?: Camelize<DiscordMember>;
1967
+ user: CamelizedDiscordUser;
1968
+ member?: CamelizedDiscordMember;
1756
1969
  }>>;
1757
1970
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1758
- getSessionInfo: () => Promise<Camelize<DiscordGetGatewayBot>>;
1971
+ getSessionInfo: () => Promise<CamelizedDiscordGetGatewayBot>;
1759
1972
  /**
1760
1973
  * Gets the stage instance associated with a stage channel, if one exists.
1761
1974
  *
1762
1975
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1763
- * @returns An instance of {@link DiscordStageInstance}.
1976
+ * @returns An instance of {@link CamelizedDiscordStageInstance}.
1764
1977
  *
1765
1978
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
1766
1979
  */
1767
- getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
1980
+ getStageInstance: (channelId: BigString) => Promise<CamelizedDiscordStageInstance>;
1768
1981
  /**
1769
1982
  * Returns a sticker object for the given sticker ID.
1770
1983
  *
1771
1984
  * @param stickerId The ID of the sticker to get
1772
- * @returns A {@link DiscordSticker}
1985
+ * @returns A {@link CamelizedDiscordSticker}
1773
1986
  *
1774
1987
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
1775
1988
  */
1776
- getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1989
+ getSticker: (stickerId: BigString) => Promise<CamelizedDiscordSticker>;
1777
1990
  /**
1778
1991
  * Gets a thread member by their user ID.
1779
1992
  *
1780
1993
  * @param channelId - The ID of the thread to get the thread member of.
1781
1994
  * @param userId - The user ID of the thread member to get.
1782
- * @returns An instance of {@link DiscordThreadMember}.
1995
+ * @returns An instance of {@link CamelizedDiscordThreadMember}.
1783
1996
  *
1784
1997
  * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
1785
1998
  */
1786
- getThreadMember: (channelId: BigString, userId: BigString) => Promise<Camelize<DiscordThreadMember>>;
1999
+ getThreadMember: (channelId: BigString, userId: BigString) => Promise<CamelizedDiscordThreadMember>;
1787
2000
  /**
1788
2001
  * Gets the list of thread members for a thread.
1789
2002
  *
1790
2003
  * @param channelId - The ID of the thread to get the thread members of.
1791
- * @returns A collection of {@link DiscordThreadMember} assorted by user ID.
2004
+ * @returns A collection of {@link CamelizedDiscordThreadMember} assorted by user ID.
1792
2005
  *
1793
2006
  * @remarks
1794
2007
  * Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
1795
2008
  *
1796
2009
  * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
1797
2010
  */
1798
- getThreadMembers: (channelId: BigString) => Promise<Camelize<DiscordThreadMember[]>>;
2011
+ getThreadMembers: (channelId: BigString) => Promise<CamelizedDiscordThreadMember[]>;
1799
2012
  /**
1800
2013
  * Gets the list of users that reacted with an emoji to a message.
1801
2014
  *
@@ -1803,23 +2016,58 @@ export interface RestManager {
1803
2016
  * @param messageId - The ID of the message to get the users for.
1804
2017
  * @param reaction - The reaction for which to get the users.
1805
2018
  * @param options - The parameters for the fetching of the users.
1806
- * @returns A collection of {@link User} objects assorted by user ID.
2019
+ * @returns A collection of {@link CamelizedDiscordUser} objects assorted by user ID.
1807
2020
  *
1808
2021
  * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
1809
2022
  */
1810
- getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser[]>>;
2023
+ getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<CamelizedDiscordUser[]>;
1811
2024
  /**
1812
2025
  * Get a user's data from the api
1813
2026
  *
1814
2027
  * @param id The user's id
1815
- * @returns {Camelize<DiscordUser>}
2028
+ * @returns {CamelizedDiscordUser}
2029
+ */
2030
+ getUser: (id: BigString) => Promise<CamelizedDiscordUser>;
2031
+ /**
2032
+ * Get the current user data.
2033
+ *
2034
+ * @param bearerToken - The access token of the user
2035
+ * @returns {CamelizedDiscordUser}
2036
+ *
2037
+ * @remarks
2038
+ * This requires the `identify` scope.
2039
+ *
2040
+ * To get the mail this also requires the `email` scope
2041
+ */
2042
+ getCurrentUser: (bearerToken: string) => Promise<CamelizedDiscordUser>;
2043
+ /**
2044
+ * Get the current user connections.
2045
+ *
2046
+ * @param bearerToken - The access token of the user
2047
+ * @returns {CamelizedDiscordConnection[]}
2048
+ *
2049
+ * @remarks
2050
+ * This requires the `connections` scope.
2051
+ */
2052
+ getUserConnections: (bearerToken: string) => Promise<CamelizedDiscordConnection[]>;
2053
+ /**
2054
+ * Get the current user application role connection for the application.
2055
+ *
2056
+ * @param bearerToken - The access token of the user
2057
+ * @param applicationId - The id of the application to get the role connection
2058
+ * @returns {CamelizedDiscordApplicationRoleConnection}
2059
+ *
2060
+ * @remarks
2061
+ * The access token requires the `role_connections.write` scope.
2062
+ *
2063
+ * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection}
1816
2064
  */
1817
- getUser: (id: BigString) => Promise<Camelize<DiscordUser>>;
2065
+ getUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString) => Promise<CamelizedDiscordApplicationRoleConnection>;
1818
2066
  /**
1819
2067
  * Gets information about the vanity url of a guild.
1820
2068
  *
1821
2069
  * @param guildId - The ID of the guild to get the vanity url information for.
1822
- * @returns An instance of {@link VanityUrl}.
2070
+ * @returns An instance of {@link CamelizedDiscordVanityUrl}.
1823
2071
  *
1824
2072
  * @remarks
1825
2073
  * Requires the `MANAGE_GUILD` permission.
@@ -1828,28 +2076,28 @@ export interface RestManager {
1828
2076
  *
1829
2077
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
1830
2078
  */
1831
- getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
2079
+ getVanityUrl: (guildId: BigString) => Promise<CamelizedDiscordVanityUrl>;
1832
2080
  /**
1833
2081
  * Gets the list of voice regions for a guild.
1834
2082
  *
1835
2083
  * @param guildId - The ID of the guild to get the voice regions for.
1836
- * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
2084
+ * @returns A collection of {@link CamelizedDiscordVoiceRegion} objects assorted by voice region ID.
1837
2085
  *
1838
2086
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
1839
2087
  */
1840
- getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion[]>>;
2088
+ getVoiceRegions: (guildId: BigString) => Promise<CamelizedDiscordVoiceRegion[]>;
1841
2089
  /**
1842
2090
  * Gets a webhook by its ID.
1843
2091
  *
1844
2092
  * @param webhookId - The ID of the webhook to get.
1845
- * @returns An instance of {@link DiscordWebhook}.
2093
+ * @returns An instance of {@link CamelizedDiscordWebhook}.
1846
2094
  *
1847
2095
  * @remarks
1848
2096
  * Requires the `MANAGE_WEBHOOKS` permission.
1849
2097
  *
1850
2098
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}
1851
2099
  */
1852
- getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
2100
+ getWebhook: (webhookId: BigString) => Promise<CamelizedDiscordWebhook>;
1853
2101
  /**
1854
2102
  * Gets a webhook message by its ID.
1855
2103
  *
@@ -1857,26 +2105,26 @@ export interface RestManager {
1857
2105
  * @param token - The webhook token, used to get webhook messages.
1858
2106
  * @param messageId - the ID of the webhook message to get.
1859
2107
  * @param options - The parameters for the fetching of the message.
1860
- * @returns An instance of {@link DiscordMessage}.
2108
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1861
2109
  *
1862
2110
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}
1863
2111
  */
1864
- getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
2112
+ getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<CamelizedDiscordMessage>;
1865
2113
  /**
1866
2114
  * Gets a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1867
2115
  *
1868
2116
  * @param webhookId - The ID of the webhook to get.
1869
2117
  * @param token - The webhook token, used to get the webhook.
1870
- * @returns An instance of {@link DiscordWebhook}.
2118
+ * @returns An instance of {@link CamelizedDiscordWebhook}.
1871
2119
  *
1872
2120
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
1873
2121
  */
1874
- getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
2122
+ getWebhookWithToken: (webhookId: BigString, token: string) => Promise<CamelizedDiscordWebhook>;
1875
2123
  /**
1876
2124
  * Gets the welcome screen for a guild.
1877
2125
  *
1878
2126
  * @param guildId - The ID of the guild to get the welcome screen for.
1879
- * @returns An instance of {@link WelcomeScreen}.
2127
+ * @returns An instance of {@link CamelizedDiscordWelcomeScreen}.
1880
2128
  *
1881
2129
  * @remarks
1882
2130
  * If the welcome screen is not enabled:
@@ -1884,28 +2132,31 @@ export interface RestManager {
1884
2132
  *
1885
2133
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
1886
2134
  */
1887
- getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
2135
+ getWelcomeScreen: (guildId: BigString) => Promise<CamelizedDiscordWelcomeScreen>;
1888
2136
  /**
1889
2137
  * Gets the guild widget by guild ID.
1890
2138
  *
1891
2139
  * @param guildId - The ID of the guild to get the widget of.
1892
- * @returns An instance of {@link GuildWidget}.
2140
+ * @returns An instance of {@link CamelizedDiscordGuildWidget}.
2141
+ *
2142
+ * @remarks
2143
+ * Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
1893
2144
  *
1894
2145
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
1895
2146
  */
1896
- getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
2147
+ getWidget: (guildId: BigString) => Promise<CamelizedDiscordGuildWidget>;
1897
2148
  /**
1898
2149
  * Gets the settings of a guild's widget.
1899
2150
  *
1900
2151
  * @param guildId - The ID of the guild to get the widget of.
1901
- * @returns An instance of {@link GuildWidgetSettings}.
2152
+ * @returns An instance of {@link CamelizedDiscordGuildWidgetSettings}.
1902
2153
  *
1903
2154
  * @remarks
1904
2155
  * Requires the `MANAGE_GUILD` permission.
1905
2156
  *
1906
2157
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
1907
2158
  */
1908
- getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
2159
+ getWidgetSettings: (guildId: BigString) => Promise<CamelizedDiscordGuildWidgetSettings>;
1909
2160
  /**
1910
2161
  * Adds the bot user to a thread.
1911
2162
  *
@@ -1948,7 +2199,7 @@ export interface RestManager {
1948
2199
  *
1949
2200
  * @param channelId - The ID of the announcement channel.
1950
2201
  * @param messageId - The ID of the message to cross-post.
1951
- * @returns An instance of the cross-posted {@link Message}.
2202
+ * @returns An instance of the cross-posted {@link CamelizedDiscordMessage}.
1952
2203
  *
1953
2204
  * @remarks
1954
2205
  * Requires the `SEND_MESSAGES` permission.
@@ -1960,13 +2211,14 @@ export interface RestManager {
1960
2211
  *
1961
2212
  * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
1962
2213
  */
1963
- publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
2214
+ publishMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1964
2215
  /**
1965
2216
  * Removes a role from a member.
1966
2217
  *
1967
2218
  * @param guildId - The ID of the guild the member to remove the role from is in.
1968
2219
  * @param userId - The user ID of the member to remove the role from.
1969
2220
  * @param roleId - The ID of the role to remove from the member.
2221
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1970
2222
  *
1971
2223
  * @remarks
1972
2224
  * Requires the `MANAGE_ROLES` permission.
@@ -1983,7 +2235,7 @@ export interface RestManager {
1983
2235
  * @param userId - The user ID of the thread member to remove.
1984
2236
  *
1985
2237
  * @remarks
1986
- * If the thread is of type {@link ChannelTypes.GuildPrivateThread}, requires to be the creator of the thread.
2238
+ * If the thread is of type {@link ChannelTypes}.GuildPrivateThread, requires to be the creator of the thread.
1987
2239
  * Otherwise, requires the `MANAGE_THREADS` permission.
1988
2240
  *
1989
2241
  * Requires the thread not be archived.
@@ -1993,12 +2245,21 @@ export interface RestManager {
1993
2245
  * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}
1994
2246
  */
1995
2247
  removeThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
2248
+ /**
2249
+ * Removes a member from a Group DM.
2250
+ *
2251
+ * @param channelId - The ID of the channel to remove the recipient user of.
2252
+ * @param userId - The user ID of the user to remove.
2253
+ *
2254
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient}
2255
+ */
2256
+ removeDmRecipient: (channelId: BigString, userId: BigString) => Promise<void>;
1996
2257
  /**
1997
2258
  * Sends a message to a channel.
1998
2259
  *
1999
2260
  * @param channelId - The ID of the channel to send the message in.
2000
2261
  * @param options - The parameters for the creation of the message.
2001
- * @returns An instance of the created {@link DiscordMessage}.
2262
+ * @returns An instance of the created {@link CamelizedDiscordMessage}.
2002
2263
  *
2003
2264
  * @remarks
2004
2265
  * Requires that the bot user be able to see the contents of the channel the message is to be sent in.
@@ -2019,13 +2280,13 @@ export interface RestManager {
2019
2280
  *
2020
2281
  * @see {@link https://discord.com/developers/docs/resources/channel#create-message}
2021
2282
  */
2022
- sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
2283
+ sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<CamelizedDiscordMessage>;
2023
2284
  /**
2024
2285
  * Sends a follow-up message to an interaction.
2025
2286
  *
2026
2287
  * @param token - The interaction token to use, provided in the original interaction.
2027
2288
  * @param options - The parameters for the creation of the message.
2028
- * @returns An instance of the created {@link Message}.
2289
+ * @returns An instance of the created {@link CamelizedDiscordMessage}.
2029
2290
  *
2030
2291
  * @remarks
2031
2292
  * ⚠️ Interaction tokens are only valid for _15 minutes_.
@@ -2036,18 +2297,21 @@ export interface RestManager {
2036
2297
  * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.)
2037
2298
  * - Requiring the `MESSAGE_CONTENT` intent.
2038
2299
  *
2300
+ * Apps are limited to 5 followup messages per interaction if it was initiated from a user-installed app and isn't installed in the server
2301
+ * You can check if it was initiated from a user-installed app that isn't installed in the server by checking if {@link DiscordInteraction.authorizing_integration_owners | authorizingIntegrationOwners} only contains {@link DiscordApplicationIntegrationType.UserInstall | UserInstall}.
2302
+ *
2039
2303
  * Fires a _Message Create_ event.
2040
2304
  *
2041
2305
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
2042
2306
  */
2043
- sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
2307
+ sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
2044
2308
  /**
2045
2309
  * Sends a response to an interaction.
2046
2310
  *
2047
2311
  * @param interactionId - The ID of the interaction to respond to.
2048
2312
  * @param token - The interaction token to use, provided in the original interaction.
2049
2313
  * @param options - The parameters for the creation of the message.
2050
- * @returns An instance of the created {@link Message}.
2314
+ * @returns An instance of the created {@link CamelizedDiscordMessage}.
2051
2315
  *
2052
2316
  * @remarks
2053
2317
  * ⚠️ Interaction tokens are only valid for _15 minutes_.
@@ -2069,12 +2333,13 @@ export interface RestManager {
2069
2333
  * @param channelId - The ID of the channel in which to create the thread.
2070
2334
  * @param messageId - The ID of the message to use as the thread's point of origin.
2071
2335
  * @param options - The parameters to use for the creation of the thread.
2072
- * @returns An instance of the created {@link Channel | Thread}.
2336
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2337
+ * @returns An instance of the created {@link CamelizedDiscordChannel}.
2073
2338
  *
2074
2339
  * @remarks
2075
- * If called on a channel of type {@link ChannelTypes.GuildText}, creates a {@link ChannelTypes.GuildPublicThread}.
2076
- * If called on a channel of type {@link ChannelTypes.GuildNews}, creates a {@link ChannelTypes.GuildNewsThread}.
2077
- * Does not work on channels of type {@link ChannelTypes.GuildForum}.
2340
+ * If called on a channel of type {@link ChannelTypes}.GuildText, creates a {@link ChannelTypes}.GuildPublicThread.
2341
+ * If called on a channel of type {@link ChannelTypes}.GuildNews, creates a {@link ChannelTypes}.GuildNewsThread.
2342
+ * Does not work on channels of type {@link ChannelTypes}.GuildForum.
2078
2343
  *
2079
2344
  * The ID of the created thread will be the same as the ID of the source message.
2080
2345
  *
@@ -2082,13 +2347,14 @@ export interface RestManager {
2082
2347
  *
2083
2348
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
2084
2349
  */
2085
- startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage) => Promise<Camelize<DiscordChannel>>;
2350
+ startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2086
2351
  /**
2087
2352
  * Creates a thread without using a message as the thread's point of origin.
2088
2353
  *
2089
2354
  * @param channelId - The ID of the channel in which to create the thread.
2090
2355
  * @param options - The parameters to use for the creation of the thread.
2091
- * @returns An instance of the created {@link DiscordChannel | Thread}.
2356
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2357
+ * @returns An instance of the created {@link CamelizedDiscordChannel | Thread}.
2092
2358
  *
2093
2359
  * @remarks
2094
2360
  * Creating a private thread requires the server to be boosted.
@@ -2097,12 +2363,35 @@ export interface RestManager {
2097
2363
  *
2098
2364
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
2099
2365
  */
2100
- startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage) => Promise<Camelize<DiscordChannel>>;
2366
+ startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2367
+ /**
2368
+ * Get a list of users that voted for this specific answer.
2369
+ *
2370
+ * @param channelId - The ID of the channel in which the message with the poll lives
2371
+ * @param messageId - The ID of the message in which the poll lives
2372
+ * @param answerId - The ID of the answer to get the users that voted that answer
2373
+ * @param options - The options for the request
2374
+ * @returns The list of users that voted for the specific answer.
2375
+ */
2376
+ getPollAnswerVoters: (channelId: BigString, messageId: BigString, answerId: number, options?: GetPollAnswerVotes) => Promise<CamelizedDiscordGetAnswerVotesResponse>;
2377
+ /**
2378
+ * Immediately ends the poll.
2379
+ *
2380
+ * @param channelId - The ID of the channel in which the message with the poll lives
2381
+ * @param messageId - The ID of the message in which the poll lives
2382
+ * @returns The message with the expired poll
2383
+ *
2384
+ * @remarks
2385
+ * You cannot end polls from other users.
2386
+ *
2387
+ * Fires a _Message Update_ gateway event
2388
+ */
2389
+ endPoll: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
2101
2390
  /**
2102
2391
  * Synchronises a template with the current state of a guild.
2103
2392
  *
2104
2393
  * @param guildId - The ID of the guild to synchronise a template of.
2105
- * @returns An instance of the edited {@link Template}.
2394
+ * @returns An instance of the edited {@link CamelizedDiscordTemplate}.
2106
2395
  *
2107
2396
  * @remarks
2108
2397
  * Requires the `MANAGE_GUILD` permission.
@@ -2111,14 +2400,16 @@ export interface RestManager {
2111
2400
  *
2112
2401
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
2113
2402
  */
2114
- syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
2403
+ syncGuildTemplate: (guildId: BigString) => Promise<CamelizedDiscordTemplate>;
2115
2404
  /**
2116
- * Triggers a typing indicator for the bot user.
2405
+ * Triggers a typing indicator for the specified channel, which expires after 10 seconds.
2117
2406
  *
2118
2407
  * @param channelId - The ID of the channel in which to trigger the typing indicator.
2119
2408
  *
2120
2409
  * @remarks
2121
- * Generally, bots should _not_ use this route.
2410
+ * Generally bots should **not** use this route.
2411
+ * However, if a bot is responding to a command and expects the computation to take a few seconds,
2412
+ * this endpoint may be called to let the user know that the bot is processing their message.
2122
2413
  *
2123
2414
  * Fires a _Typing Start_ gateway event.
2124
2415
  *
@@ -2129,38 +2420,46 @@ export interface RestManager {
2129
2420
  * Re-registers the list of global application commands, overwriting the previous commands completely.
2130
2421
  *
2131
2422
  * @param commands - The list of commands to use to overwrite the previous list.
2132
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
2423
+ * @param options - Additional options for the endpoint.
2424
+ * @returns A collection of {@link CamelizedDiscordApplicationCommand} objects assorted by command ID.
2133
2425
  *
2134
2426
  * @remarks
2135
2427
  * ❗ Commands that are not present in the `commands` array will be __deleted__.
2136
2428
  *
2137
2429
  * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2138
2430
  *
2431
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
2432
+ * You will be able to update only your own application commands
2433
+ *
2139
2434
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
2140
2435
  */
2141
- upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<Camelize<DiscordApplicationCommand[]>>;
2436
+ upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand[]>;
2142
2437
  /**
2143
2438
  * Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
2144
2439
  *
2145
2440
  * @param guildId - The ID of the guild whose list of commands to overwrite.
2146
2441
  * @param commands - The list of commands to use to overwrite the previous list.
2147
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
2442
+ * @param options - Additional options for the endpoint.
2443
+ * @returns A collection of {@link CamelizedDiscordApplicationCommand} objects assorted by command ID.
2148
2444
  *
2149
2445
  * @remarks
2150
2446
  * ❗ Commands that are not present in the `commands` array will be __deleted__.
2151
2447
  *
2152
2448
  * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2153
2449
  *
2450
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
2451
+ * You will be able to update only your own application commands
2452
+ *
2154
2453
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
2155
2454
  */
2156
- upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<Camelize<DiscordApplicationCommand[]>>;
2455
+ upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand[]>;
2157
2456
  /**
2158
2457
  * Bans a user from a guild.
2159
2458
  *
2160
-
2161
2459
  * @param guildId - The ID of the guild to ban the user from.
2162
2460
  * @param userId - The ID of the user to ban from the guild.
2163
2461
  * @param options - The parameters for the creation of the ban.
2462
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2164
2463
  *
2165
2464
  * @remarks
2166
2465
  * Requires the `BAN_MEMBERS` permission.
@@ -2169,25 +2468,44 @@ export interface RestManager {
2169
2468
  *
2170
2469
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
2171
2470
  */
2172
- banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan) => Promise<void>;
2471
+ banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
2472
+ /**
2473
+ * Bans up to 200 users from a guild.
2474
+ *
2475
+ * @param guildId - The ID of the guild to ban the users from.
2476
+ * @param options - The users to ban and the other options for the ban.
2477
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2478
+ *
2479
+ * @remarks
2480
+ * Requires the `BAN_MEMBERS` and `MANAGE_GUILD` permissions.
2481
+ *
2482
+ * If all provided users fail to be banned, discord will respond with an error (code: `500000: Failed to ban users`)
2483
+ *
2484
+ * Fires as many _Guild Ban Add_ gateway events as many user where banned.
2485
+ *
2486
+ * @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban}
2487
+ */
2488
+ bulkBanMembers: (guildId: BigString, options: CreateGuildBulkBan, reason?: string) => Promise<Camelize<DiscordBulkBan>>;
2173
2489
  /**
2174
2490
  * Edits the nickname of the bot user.
2175
2491
  *
2176
2492
  * @param guildId - The ID of the guild to edit the nickname of the bot user in.
2177
2493
  * @param options - The parameters for the edit of the nickname.
2178
- * @returns An instance of the edited {@link DiscordMember}
2494
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2495
+ * @returns An instance of the edited {@link CamelizedDiscordMember}
2179
2496
  *
2180
2497
  * @remarks
2181
2498
  * Fires a _Guild Member Update_ gateway event.
2182
2499
  *
2183
2500
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
2184
2501
  */
2185
- editBotMember: (guildId: BigString, options: EditBotMemberOptions) => Promise<Camelize<DiscordMember>>;
2502
+ editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<CamelizedDiscordMember>;
2186
2503
  /**
2187
2504
  * Edits a member's properties.
2188
2505
  *
2189
2506
  * @param guildId - The ID of the guild to edit the member of.
2190
2507
  * @param userId - The user ID of the member to edit.
2508
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2191
2509
  * @param options - The parameters for the edit of the user.
2192
2510
  *
2193
2511
  * @remarks
@@ -2198,24 +2516,37 @@ export interface RestManager {
2198
2516
  *
2199
2517
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
2200
2518
  */
2201
- editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember) => Promise<Camelize<DiscordMember>>;
2519
+ editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<CamelizedDiscordMember>;
2202
2520
  /**
2203
2521
  * Gets the member object by user ID.
2204
2522
  *
2205
2523
 
2206
2524
  * @param guildId - The ID of the guild to get the member object for.
2207
2525
  * @param userId - The ID of the user to get the member object for.
2208
- * @returns An instance of {@link DiscordMemberWithUser}.
2526
+ * @returns An instance of {@link CamelizedDiscordMemberWithUser}.
2209
2527
  *
2210
2528
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
2211
2529
  */
2212
- getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
2530
+ getMember: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordMemberWithUser>;
2531
+ /**
2532
+ * Gets the current member object.
2533
+ *
2534
+ * @param bearerToken - The access token of the user
2535
+ * @param guildId - The ID of the guild to get the member object for.
2536
+ * @returns An instance of {@link CamelizedDiscordMemberWithUser}.
2537
+ *
2538
+ * @remarks
2539
+ * The access tokens needs the `guilds.members.read` scope
2540
+ *
2541
+ * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}
2542
+ */
2543
+ getCurrentMember: (guildId: BigString, bearerToken: string) => Promise<CamelizedDiscordMemberWithUser>;
2213
2544
  /**
2214
2545
  * Gets the list of members for a guild.
2215
2546
  *
2216
2547
  * @param guildId - The ID of the guild to get the list of members for.
2217
2548
  * @param options - The parameters for the fetching of the members.
2218
- * @returns A collection of {@link DiscordMemberWithUser} objects assorted by user ID.
2549
+ * @returns A collection of {@link CamelizedDiscordMemberWithUser} objects assorted by user ID.
2219
2550
  *
2220
2551
  * @remarks
2221
2552
  * Requires the `GUILD_MEMBERS` intent.
@@ -2228,13 +2559,14 @@ export interface RestManager {
2228
2559
  * @see {@link https://discord.com/developers/docs/topics/gateway#request-guild-members}
2229
2560
  * @see {@link https://discord.com/developers/docs/topics/rate-limits#rate-limits}
2230
2561
  */
2231
- getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser[]>>;
2562
+ getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<CamelizedDiscordMemberWithUser[]>;
2232
2563
  /**
2233
2564
  * Kicks a member from a guild.
2234
2565
  *
2235
2566
 
2236
2567
  * @param guildId - The ID of the guild to kick the member from.
2237
2568
  * @param userId - The user ID of the member to kick from the guild.
2569
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2238
2570
  *
2239
2571
  * @remarks
2240
2572
  * Requires the `KICK_MEMBERS` permission.
@@ -2249,6 +2581,7 @@ export interface RestManager {
2249
2581
  *
2250
2582
  * @param channelId - The ID of the channel where the message is to be pinned.
2251
2583
  * @param messageId - The ID of the message to pin.
2584
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2252
2585
  *
2253
2586
  * @remarks
2254
2587
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -2268,10 +2601,11 @@ export interface RestManager {
2268
2601
 
2269
2602
  * @param guildId - The ID of the guild to prune the members of.
2270
2603
  * @param options - The parameters for the pruning of members.
2604
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2271
2605
  * @returns A number indicating how many members were pruned.
2272
2606
  *
2273
2607
  * @remarks
2274
- * Requires the `KICK_MEMBERS` permission.
2608
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
2275
2609
  *
2276
2610
  * ❗ Requests to this endpoint will time out for large guilds. To prevent this from happening, set the {@link BeginGuildPrune.computePruneCount} property of the {@link options} object parameter to `false`. This will begin the process of pruning, and immediately return `undefined`, rather than wait for the process to complete before returning the actual count of members that have been kicked.
2277
2611
  *
@@ -2281,7 +2615,7 @@ export interface RestManager {
2281
2615
  *
2282
2616
  * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
2283
2617
  */
2284
- pruneMembers: (guildId: BigString, options: BeginGuildPrune) => Promise<{
2618
+ pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
2285
2619
  pruned: number | null;
2286
2620
  }>;
2287
2621
  /**
@@ -2291,17 +2625,18 @@ export interface RestManager {
2291
2625
  * @param guildId - The ID of the guild to search in.
2292
2626
  * @param query - The string to match usernames or nicknames against.
2293
2627
  * @param options - The parameters for searching through the members.
2294
- * @returns A collection of {@link DiscordMember} objects assorted by user ID.
2628
+ * @returns A collection of {@link CamelizedDiscordMember} objects assorted by user ID.
2295
2629
  *
2296
2630
  * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
2297
2631
  */
2298
- searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser[]>>;
2632
+ searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<CamelizedDiscordMemberWithUser[]>;
2299
2633
  /**
2300
2634
  * Unbans a user from a guild.
2301
2635
  *
2302
2636
 
2303
2637
  * @param guildId - The ID of the guild to unban the user in.
2304
2638
  * @param userId - The ID of the user to unban.
2639
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2305
2640
  *
2306
2641
  * @remarks
2307
2642
  * Requires the `BAN_MEMBERS` permission.
@@ -2310,12 +2645,13 @@ export interface RestManager {
2310
2645
  *
2311
2646
  * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}
2312
2647
  */
2313
- unbanMember: (guildId: BigString, userId: BigString) => Promise<void>;
2648
+ unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
2314
2649
  /**
2315
2650
  * Unpins a pinned message in a channel.
2316
2651
  *
2317
2652
  * @param channelId - The ID of the channel where the message is pinned.
2318
2653
  * @param messageId - The ID of the message to unpin.
2654
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2319
2655
  *
2320
2656
  * @remarks
2321
2657
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -2327,10 +2663,67 @@ export interface RestManager {
2327
2663
  * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
2328
2664
  */
2329
2665
  unpinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
2666
+ /**
2667
+ * Get the guild onboarding
2668
+ *
2669
+ * @param guildId - The guild to get the onboarding from
2670
+ */
2671
+ getGuildOnboarding: (guildId: BigString) => Promise<CamelizedDiscordGuildOnboarding>;
2672
+ /**
2673
+ * Modifies the onboarding configuration of the guild.
2674
+ *
2675
+ * @param guildId - The guild to get the onboarding from
2676
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2677
+ *
2678
+ * @remarks
2679
+ * Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions.
2680
+ *
2681
+ * Onboarding enforces constraints when enabled. These constraints are:
2682
+ * - at least 7 default channels
2683
+ * - at least 5 of the 7 channels must allow sending messages to the @everyone role
2684
+ *
2685
+ * The `mode` field modifies what is considered when enforcing these constraints.
2686
+ */
2687
+ editGuildOnboarding: (guildId: BigString, options: EditGuildOnboarding, reason?: string) => Promise<CamelizedDiscordGuildOnboarding>;
2688
+ /**
2689
+ * Returns all entitlements for a given app, active and expired.
2690
+ *
2691
+ * @param applicationId - The id of the application to get the entitlements
2692
+ * @param {GetEntitlements} [options] - The optional query params for the endpoint
2693
+ */
2694
+ listEntitlements: (applicationId: BigString, options?: GetEntitlements) => Promise<CamelizedDiscordEntitlement[]>;
2695
+ /**
2696
+ * Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering.
2697
+ *
2698
+ * @param applicationId - The id of the application to create the entitlement
2699
+ * @param body - The options for new entitlement
2700
+ *
2701
+ * @remarks
2702
+ * This endpoint returns a partial entitlement object.
2703
+ * It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity.
2704
+ */
2705
+ createTestEntitlement: (applicationId: BigString, body: CreateEntitlement) => Promise<Partial<CamelizedDiscordEntitlement>>;
2706
+ /**
2707
+ * Deletes a currently-active test entitlement. Discord will act as though that user or guild no longer has entitlement to your premium offering.
2708
+ *
2709
+ * @param applicationId - The id of the application from where delete the entitlement
2710
+ * @param entitlementId - The id of the entitlement to delete
2711
+ */
2712
+ deleteTestEntitlement: (applicationId: BigString, entitlementId: BigString) => Promise<void>;
2713
+ /**
2714
+ * For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have `consumed: true` when using {@link RestManager.listEntitlements | List Entitlements}
2715
+ */
2716
+ consumeEntitlement: (applicationId: BigString, entitlementId: BigString) => Promise<void>;
2717
+ /**
2718
+ * Returns all SKUs for a given application
2719
+ *
2720
+ * @param applicationId - The id of the application to get the SKUs
2721
+ */
2722
+ listSkus: (applicationId: BigString) => Promise<CamelizedDiscordSku[]>;
2330
2723
  }
2331
2724
  export type RequestMethods = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT';
2332
2725
  export type ApiVersions = 9 | 10;
2333
- export interface CreateWebhook extends WithReason {
2726
+ export interface CreateWebhook {
2334
2727
  /** Name of the webhook (1-80 characters) */
2335
2728
  name: string;
2336
2729
  /** Image url for the default webhook avatar */
@@ -2338,23 +2731,22 @@ export interface CreateWebhook extends WithReason {
2338
2731
  }
2339
2732
  export interface CreateRequestBodyOptions {
2340
2733
  headers?: Record<string, string>;
2341
- method: RequestMethods;
2342
- body?: Record<string, unknown>;
2734
+ body?: any;
2343
2735
  unauthorized?: boolean;
2344
- url?: string;
2736
+ reason?: string;
2737
+ files?: FileContent[];
2345
2738
  }
2739
+ export type MakeRequestOptions = Omit<CreateRequestBodyOptions, 'method'> & Pick<SendRequestOptions, 'runThroughQueue'>;
2346
2740
  export interface RequestBody {
2347
2741
  headers: Record<string, string>;
2348
- body: string | FormData;
2742
+ body?: string | FormData;
2349
2743
  method: RequestMethods;
2350
2744
  }
2351
2745
  export interface SendRequestOptions {
2352
- /** The url to send the request to. */
2353
- url: string;
2354
- /** The method to use when sending the request. */
2746
+ /** The route to send the request to. */
2747
+ route: string;
2748
+ /** The method to use for sending the request. */
2355
2749
  method: RequestMethods;
2356
- /** The body to be sent in the request. */
2357
- body?: Record<string, any>;
2358
2750
  /** The amount of times this request has been retried. */
2359
2751
  retryCount: number;
2360
2752
  /** Handler to retry a request should it be rate limited. */
@@ -2366,7 +2758,12 @@ export interface SendRequestOptions {
2366
2758
  /** If this request has a bucket id which it falls under for rate limit */
2367
2759
  bucketId?: string;
2368
2760
  /** Additional request options, used for things like overriding authorization header. */
2369
- options?: Record<string, any>;
2761
+ requestBodyOptions?: CreateRequestBodyOptions;
2762
+ /**
2763
+ * Whether the request should be run through the queue.
2764
+ * Useful for routes which do not have any rate limits.
2765
+ */
2766
+ runThroughQueue?: boolean;
2370
2767
  }
2371
2768
  export interface RestRateLimitedPath {
2372
2769
  url: string;
@@ -2381,7 +2778,7 @@ export interface WebhookMessageEditor {
2381
2778
  * @param token - The webhook token, used to edit the message.
2382
2779
  * @param messageId - The ID of the message to edit.
2383
2780
  * @param options - The parameters for the edit of the message.
2384
- * @returns An instance of the edited {@link DiscordMessage}.
2781
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2385
2782
  *
2386
2783
  * @remarks
2387
2784
  * Fires a _Message Update_ gateway event.
@@ -2390,14 +2787,14 @@ export interface WebhookMessageEditor {
2390
2787
  */
2391
2788
  (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
2392
2789
  threadId?: BigString;
2393
- }): Promise<Camelize<DiscordMessage>>;
2790
+ }): Promise<CamelizedDiscordMessage>;
2394
2791
  /**
2395
2792
  * Edits the original webhook message.
2396
2793
  *
2397
2794
  * @param webhookId - The ID of the webhook to edit the original message of.
2398
2795
  * @param token - The webhook token, used to edit the message.
2399
2796
  * @param options - The parameters for the edit of the message.
2400
- * @returns An instance of the edited {@link DiscordMessage}.
2797
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2401
2798
  *
2402
2799
  * @remarks
2403
2800
  * Fires a _Message Update_ gateway event.
@@ -2406,7 +2803,7 @@ export interface WebhookMessageEditor {
2406
2803
  */
2407
2804
  original: (webhookId: BigString, token: string, options: InteractionCallbackData & {
2408
2805
  threadId?: BigString;
2409
- }) => Promise<Camelize<DiscordMessage>>;
2806
+ }) => Promise<CamelizedDiscordMessage>;
2410
2807
  }
2411
2808
  export interface RestRequestResponse {
2412
2809
  ok: boolean;