@discordeno/rest 19.0.0-next.fe00a6f → 19.0.0

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 (44) hide show
  1. package/README.md +15 -1
  2. package/dist/esm/index.js +8 -0
  3. package/dist/esm/invalidBucket.js +82 -0
  4. package/dist/esm/manager.js +1493 -0
  5. package/dist/esm/queue.js +154 -0
  6. package/dist/esm/routes.js +579 -0
  7. package/dist/esm/types.js +3 -0
  8. package/dist/esm/typings/routes.js +3 -0
  9. package/dist/types/index.d.ts.map +1 -0
  10. package/dist/{invalidBucket.d.ts → types/invalidBucket.d.ts} +5 -0
  11. package/dist/types/invalidBucket.d.ts.map +1 -0
  12. package/dist/types/manager.d.ts.map +1 -0
  13. package/dist/{queue.d.ts → types/queue.d.ts} +12 -1
  14. package/dist/types/queue.d.ts.map +1 -0
  15. package/dist/types/routes.d.ts.map +1 -0
  16. package/dist/{types.d.ts → types/types.d.ts} +798 -317
  17. package/dist/types/types.d.ts.map +1 -0
  18. package/dist/{typings → types/typings}/routes.d.ts +69 -6
  19. package/dist/types/typings/routes.d.ts.map +1 -0
  20. package/package.json +34 -30
  21. package/dist/index.d.ts.map +0 -1
  22. package/dist/index.js +0 -8
  23. package/dist/index.js.map +0 -1
  24. package/dist/invalidBucket.d.ts.map +0 -1
  25. package/dist/invalidBucket.js +0 -82
  26. package/dist/invalidBucket.js.map +0 -1
  27. package/dist/manager.d.ts.map +0 -1
  28. package/dist/manager.js +0 -1139
  29. package/dist/manager.js.map +0 -1
  30. package/dist/queue.d.ts.map +0 -1
  31. package/dist/queue.js +0 -153
  32. package/dist/queue.js.map +0 -1
  33. package/dist/routes.d.ts.map +0 -1
  34. package/dist/routes.js +0 -487
  35. package/dist/routes.js.map +0 -1
  36. package/dist/types.d.ts.map +0 -1
  37. package/dist/types.js +0 -3
  38. package/dist/types.js.map +0 -1
  39. package/dist/typings/routes.d.ts.map +0 -1
  40. package/dist/typings/routes.js +0 -3
  41. package/dist/typings/routes.js.map +0 -1
  42. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  43. /package/dist/{manager.d.ts → types/manager.d.ts} +0 -0
  44. /package/dist/{routes.d.ts → types/routes.d.ts} +0 -0
@@ -1,10 +1,11 @@
1
- import type { ApplicationCommandPermissions, AtLeastOne, BeginGuildPrune, BigString, Camelize, CamelizedDiscordActiveThreads, CamelizedDiscordApplication, CamelizedDiscordApplicationCommand, CamelizedDiscordArchivedThreads, CamelizedDiscordAuditLog, CamelizedDiscordAutoModerationRule, CamelizedDiscordBan, CamelizedDiscordChannel, CamelizedDiscordEmoji, CamelizedDiscordFollowedChannel, CamelizedDiscordGetGatewayBot, CamelizedDiscordGuild, CamelizedDiscordGuildApplicationCommandPermissions, CamelizedDiscordGuildPreview, CamelizedDiscordGuildWidget, CamelizedDiscordGuildWidgetSettings, CamelizedDiscordIntegration, CamelizedDiscordInvite, CamelizedDiscordInviteMetadata, CamelizedDiscordMember, CamelizedDiscordMemberWithUser, CamelizedDiscordMessage, CamelizedDiscordModifyGuildWelcomeScreen, CamelizedDiscordPrunedCount, CamelizedDiscordRole, CamelizedDiscordScheduledEvent, CamelizedDiscordStageInstance, CamelizedDiscordSticker, CamelizedDiscordStickerPack, CamelizedDiscordTemplate, CamelizedDiscordThreadMember, CamelizedDiscordUser, CamelizedDiscordVanityUrl, CamelizedDiscordVoiceRegion, CamelizedDiscordWebhook, CamelizedDiscordWelcomeScreen, CreateApplicationCommand, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGuild, CreateGuildBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditUserVoiceState, ExecuteWebhook, FileContent, GetBans, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetReactions, GetScheduledEvents, GetScheduledEventUsers, GetWebhookMessageOptions, InteractionCallbackData, InteractionResponse, ListArchivedThreads, ListGuildMembers, MfaLevels, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildTemplate, ModifyRolePositions, ModifyWebhook, SearchMembers, StartThreadWithMessage, StartThreadWithoutMessage } from '@discordeno/types';
1
+ import type { AddDmRecipientOptions, AddGuildMemberOptions, AtLeastOne, BeginGuildPrune, BigString, Camelize, CreateApplicationCommand, CreateApplicationEmoji, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateEntitlement, CreateForumPostWithMessage, CreateGlobalApplicationCommandOptions, CreateGuild, CreateGuildApplicationCommandOptions, CreateGuildBan, CreateGuildBulkBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildSoundboardSound, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, CreateWebhook, DeleteWebhookMessageOptions, DiscordAccessTokenResponse, DiscordActiveThreads, DiscordActivityInstance, DiscordApplication, DiscordApplicationCommand, DiscordApplicationCommandPermissions, DiscordApplicationRoleConnection, DiscordArchivedThreads, DiscordAuditLog, DiscordAutoModerationRule, DiscordBan, DiscordBulkBan, DiscordChannel, DiscordConnection, DiscordCurrentAuthorization, DiscordEmoji, DiscordEntitlement, DiscordFollowedChannel, DiscordGetAnswerVotesResponse, DiscordGetGatewayBot, DiscordGuild, DiscordGuildApplicationCommandPermissions, DiscordGuildOnboarding, DiscordGuildPreview, DiscordGuildWidget, DiscordGuildWidgetSettings, DiscordIntegration, DiscordInteractionCallbackResponse, DiscordInvite, DiscordInviteMetadata, DiscordMember, DiscordMemberWithUser, DiscordMessage, DiscordModifyGuildWelcomeScreen, DiscordPrunedCount, DiscordRole, DiscordScheduledEvent, DiscordSku, DiscordSoundboardSound, DiscordStageInstance, DiscordSticker, DiscordStickerPack, DiscordSubscription, DiscordTemplate, DiscordThreadMember, DiscordTokenExchange, DiscordTokenRevocation, DiscordUser, DiscordVanityUrl, DiscordVoiceRegion, DiscordVoiceState, DiscordWebhook, DiscordWelcomeScreen, 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, InteractionCallbackOptions, InteractionResponse, ListArchivedThreads, ListGuildMembers, ListSkuSubscriptionsOptions, MfaLevels, ModifyApplicationEmoji, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildSoundboardSound, ModifyGuildTemplate, ModifyRolePositions, ModifyWebhook, SearchMembers, SendSoundboardSound, 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';
5
6
  export interface CreateRestManagerOptions {
6
7
  /** The bot token which will be used to make requests. */
7
- token?: string;
8
+ token: string;
8
9
  /**
9
10
  * For old bots that have a different bot id and application id.
10
11
  * @default bot id from token
@@ -18,18 +19,42 @@ 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
- authorization: string;
22
+ /** The authorization header value to attach when sending requests to the proxy. */
23
+ authorization?: string;
24
+ /**
25
+ * The authorization header name to use when sending requests to the proxy
26
+ *
27
+ * @remarks
28
+ * If the header name is set to `authorization`, 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. */
32
- token?: string;
57
+ token: string;
33
58
  /** The application id. Normally this is not required for recent bots but old bot's application id is sometimes different from the bot id so it is required for those bots. */
34
59
  applicationId: bigint;
35
60
  /** The api version to use when making requests. Only the latest supported version will be tested. */
@@ -46,8 +71,12 @@ export interface RestManager {
46
71
  * Mostly used only for intern functions.
47
72
  */
48
73
  isProxied: boolean;
49
- /** The authorization header to attach when sending requests to the proxy. */
74
+ /** The authorization header value to attach when sending requests to the proxy. */
50
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;
51
80
  /** The maximum amount of times a request should be retried. Defaults to Infinity */
52
81
  maxRetryCount: number;
53
82
  /** Whether or not the manager is rate limited globally across all requests. Defaults to false. */
@@ -64,10 +93,15 @@ export interface RestManager {
64
93
  invalidBucket: InvalidRequestBucket;
65
94
  /** The routes that are available for this manager. */
66
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>;
67
100
  /** Whether or not the rest manager should keep objects in raw snake case from discord. */
68
101
  preferSnakeCase: (enabled: boolean) => RestManager;
69
102
  /** Check the rate limits for a url or a bucket. */
70
- checkRateLimits: (url: string) => number | false;
103
+ checkRateLimits: (url: string, identifier: string) => number | false;
104
+ updateTokenQueues: (oldToken: string, newToken: string) => Promise<void>;
71
105
  /** Reshapes and modifies the obj as needed to make it ready for discords api. */
72
106
  changeToDiscordFormat: (obj: any) => any;
73
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. */
@@ -75,7 +109,7 @@ export interface RestManager {
75
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. */
76
110
  processRateLimitedPaths: () => void;
77
111
  /** Processes the rate limit headers and determines if it needs to be rate limited and returns the bucket id if available */
78
- processHeaders: (url: string, headers: Headers) => string | undefined;
112
+ processHeaders: (url: string, headers: Headers, identifier: string) => string | undefined;
79
113
  /** Sends a request to the api. */
80
114
  sendRequest: (options: SendRequestOptions) => Promise<void>;
81
115
  /** Split a url to separate rate limit buckets based on major/minor parameters. */
@@ -163,13 +197,42 @@ export interface RestManager {
163
197
  * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}
164
198
  */
165
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>;
166
229
  /**
167
230
  * Creates an automod rule in a guild.
168
231
  *
169
232
  * @param guildId - The ID of the guild to create the rule in.
170
233
  * @param options - The parameters for the creation of the rule.
171
234
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
172
- * @returns An instance of the created {@link CamelizedDiscordAutoModerationRule}.
235
+ * @returns An instance of the created {@link DiscordAutoModerationRule}.
173
236
  *
174
237
  * @remarks
175
238
  * Requires the `MANAGE_GUILD` permission.
@@ -178,14 +241,14 @@ export interface RestManager {
178
241
  *
179
242
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
180
243
  */
181
- createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
244
+ createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
182
245
  /**
183
246
  * Creates a channel within a guild.
184
247
  *
185
248
  * @param guildId - The ID of the guild to create the channel within.
186
249
  * @param options - The parameters for the creation of the channel.
187
250
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
188
- * @returns An instance of the created {@link CamelizedDiscordChannel}.
251
+ * @returns An instance of the created {@link DiscordChannel}.
189
252
  *
190
253
  * @remarks
191
254
  * Requires the `MANAGE_CHANNELS` permission.
@@ -198,17 +261,17 @@ export interface RestManager {
198
261
  *
199
262
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
200
263
  */
201
- createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
264
+ createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<Camelize<DiscordChannel>>;
202
265
  /**
203
266
  * Creates an emoji in a guild.
204
267
  *
205
268
  * @param guildId - The ID of the guild in which to create the emoji.
206
269
  * @param options - The parameters for the creation of the emoji.
207
270
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
208
- * @returns An instance of the created {@link CamelizedDiscordEmoji}.
271
+ * @returns An instance of the created {@link DiscordEmoji}.
209
272
  *
210
273
  * @remarks
211
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
274
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
212
275
  *
213
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.
214
277
  *
@@ -216,14 +279,23 @@ export interface RestManager {
216
279
  *
217
280
  * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
218
281
  */
219
- createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
282
+ createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
220
283
  /**
221
- * Creates a new thread in a forum channel, and sends a message within the created thread.
284
+ * Creates an emoji for the application.
285
+ *
286
+ * @param options - The parameters for the creation of the emoji.
287
+ * @returns An instance of the created {@link DiscordEmoji}.
288
+ *
289
+ * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
290
+ */
291
+ createApplicationEmoji: (options: CreateApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
292
+ /**
293
+ * Creates a new thread in a forum channel or media channel, and sends a message within the created thread.
222
294
  *
223
295
  * @param channelId - The ID of the forum channel to create the thread within.
224
296
  * @param options - The parameters for the creation of the thread.
225
297
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
226
- * @returns An instance of {@link CamelizedDiscordChannel} with a nested {@link Message} object.
298
+ * @returns An instance of {@link DiscordChannel} with a nested {@link DiscordChannel} object.
227
299
  *
228
300
  * @remarks
229
301
  * Requires the `CREATE_MESSAGES` permission.
@@ -231,30 +303,32 @@ export interface RestManager {
231
303
  * Fires a _Thread Create_ gateway event.
232
304
  * Fires a _Message Create_ gateway event.
233
305
  *
234
- * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
235
- *
236
- * @experimental
306
+ * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
237
307
  */
238
- createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
308
+ createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
239
309
  /**
240
310
  * Creates an application command accessible globally; across different guilds and channels.
241
311
  *
242
312
  * @param command - The command to create.
243
- * @returns An instance of the created {@link ApplicationCommand}.
313
+ * @param options - Additional options for the endpoint
314
+ * @returns An instance of the created {@link DiscordApplicationCommand}.
244
315
  *
245
316
  * @remarks
246
317
  * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
247
318
  * ⚠️ Global commands once created are cached for periods of __an hour__, so changes made to existing commands will take an hour to surface.
248
319
  * ⚠️ You can only create up to 200 _new_ commands daily.
249
320
  *
321
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
322
+ * You will be able to update only your own application commands
323
+ *
250
324
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
251
325
  */
252
- createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
326
+ createGlobalApplicationCommand: (command: CreateApplicationCommand, options?: CreateGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>>;
253
327
  /**
254
328
  * Creates a guild.
255
329
  *
256
330
  * @param options - The parameters for the creation of the guild.
257
- * @returns An instance of the created {@link CamelizedDiscordGuild}.
331
+ * @returns An instance of the created {@link DiscordGuild}.
258
332
  *
259
333
  * @remarks
260
334
  * ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
@@ -263,27 +337,31 @@ export interface RestManager {
263
337
  *
264
338
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
265
339
  */
266
- createGuild: (options: CreateGuild) => Promise<CamelizedDiscordGuild>;
340
+ createGuild: (options: CreateGuild) => Promise<Camelize<DiscordGuild>>;
267
341
  /**
268
342
  * Creates an application command only accessible in a specific guild.
269
343
  *
270
344
  * @param command - The command to create.
271
345
  * @param guildId - The ID of the guild to create the command for.
272
- * @returns An instance of the created {@link ApplicationCommand}.
346
+ * @param options - Additional options for the endpoint
347
+ * @returns An instance of the created {@link DiscordApplicationCommand}.
273
348
  *
274
349
  * @remarks
275
350
  * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
276
351
  * ⚠️ You can only create up to 200 _new_ commands daily.
277
352
  *
353
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
354
+ * You will be able to update only your own application commands
355
+ *
278
356
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
279
357
  */
280
- createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
358
+ createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString, options?: CreateGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>>;
281
359
  /**
282
360
  * Creates a guild from a template.
283
361
  *
284
362
  * @param templateCode - The code of the template.
285
363
  * @param options - The parameters for the creation of the guild.
286
- * @returns An instance of the created {@link Guild}.
364
+ * @returns An instance of the created {@link DiscordGuild}.
287
365
  *
288
366
  * @remarks
289
367
  * ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
@@ -292,29 +370,29 @@ export interface RestManager {
292
370
  *
293
371
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
294
372
  */
295
- createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<CamelizedDiscordGuild>;
373
+ createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<Camelize<DiscordGuild>>;
296
374
  /**
297
375
  * Create a new sticker for the guild.
298
376
  *
299
377
  * @param guildId The ID of the guild to get
300
378
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
301
- * @return A {@link CamelizedDiscordSticker}
379
+ * @return A {@link DiscordSticker}
302
380
  *
303
381
  * @remarks
304
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
382
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
305
383
  * Fires a Guild Stickers Update Gateway event.
306
384
  * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
307
385
  * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
308
386
  *
309
387
  * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}
310
388
  */
311
- createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<CamelizedDiscordSticker>;
389
+ createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<Camelize<DiscordSticker>>;
312
390
  /**
313
391
  * Creates a template from a guild.
314
392
  *
315
393
  * @param guildId - The ID of the guild to create the template from.
316
394
  * @param options - The parameters for the creation of the template.
317
- * @returns An instance of the created {@link Template}.
395
+ * @returns An instance of the created {@link DiscordTemplate}.
318
396
  *
319
397
  * @remarks
320
398
  * Requires the `MANAGE_GUILD` permission.
@@ -323,14 +401,14 @@ export interface RestManager {
323
401
  *
324
402
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
325
403
  */
326
- createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<CamelizedDiscordTemplate>;
404
+ createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Camelize<DiscordTemplate>>;
327
405
  /**
328
406
  * Creates an invite to a channel in a guild.
329
407
  *
330
408
  * @param channelId - The ID of the channel to create the invite to.
331
409
  * @param options - The parameters for the creation of the invite.
332
410
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
333
- * @returns An instance of the created {@link CamelizedDiscordInvite}.
411
+ * @returns An instance of the created {@link DiscordInvite}.
334
412
  *
335
413
  * @remarks
336
414
  * Requires the `CREATE_INSTANT_INVITE` permission.
@@ -342,14 +420,14 @@ export interface RestManager {
342
420
  *
343
421
  * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
344
422
  */
345
- createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<CamelizedDiscordInvite>;
423
+ createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<Camelize<DiscordInvite>>;
346
424
  /**
347
425
  * Creates a role in a guild.
348
426
  *
349
427
  * @param guildId - The ID of the guild to create the role in.
350
428
  * @param options - The parameters for the creation of the role.
351
429
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
352
- * @returns An instance of the created {@link CamelizedDiscordRole}.
430
+ * @returns An instance of the created {@link DiscordRole}.
353
431
  *
354
432
  * @remarks
355
433
  * Requires the `MANAGE_ROLES` permission.
@@ -358,31 +436,31 @@ export interface RestManager {
358
436
  *
359
437
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
360
438
  */
361
- createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
439
+ createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
362
440
  /**
363
441
  * Creates a scheduled event in a guild.
364
442
  *
365
443
  * @param guildId - The ID of the guild to create the scheduled event in.
366
444
  * @param options - The parameters for the creation of the scheduled event.
367
445
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
368
- * @returns An instance of the created {@link ScheduledEvent}.
446
+ * @returns An instance of the created {@link DiscordScheduledEvent}.
369
447
  *
370
448
  * @remarks
371
449
  * Requires the `MANAGE_EVENTS` permission.
372
450
  *
373
- * A guild can only have a maximum of 100 events with a status of {@link ScheduledEventStatus.Active} or {@link ScheduledEventStatus.Scheduled} (inclusive).
451
+ * A guild can only have a maximum of 100 events with a status of {@link ScheduledEventStatus}.Active or {@link ScheduledEventStatus}.Scheduled (inclusive).
374
452
  *
375
453
  * Fires a _Guild Scheduled Event Create_ gateway event.
376
454
  *
377
455
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
378
456
  */
379
- createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
457
+ createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
380
458
  /**
381
459
  * Creates a stage instance associated with a stage channel.
382
460
  *
383
461
  * @param options - The parameters for the creation of the stage instance.
384
462
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
385
- * @returns An instance of the created {@link CamelizedDiscordStageInstance}.
463
+ * @returns An instance of the created {@link DiscordStageInstance}.
386
464
  *
387
465
  * @remarks
388
466
  * Requires the user to be a moderator of the stage channel.
@@ -391,14 +469,14 @@ export interface RestManager {
391
469
  *
392
470
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance}
393
471
  */
394
- createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<CamelizedDiscordStageInstance>;
472
+ createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
395
473
  /**
396
474
  * Creates a webhook.
397
475
  *
398
476
  * @param channelId - The ID of the channel to create the webhook in.
399
477
  * @param options - The parameters for the creation of the webhook.
400
478
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
401
- * @returns An instance of the created {@link CamelizedDiscordWebhook}.
479
+ * @returns An instance of the created {@link DiscordWebhook}.
402
480
  *
403
481
  * @remarks
404
482
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -409,7 +487,7 @@ export interface RestManager {
409
487
  *
410
488
  * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
411
489
  */
412
- createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
490
+ createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
413
491
  /**
414
492
  * Deletes an automod rule.
415
493
  *
@@ -430,7 +508,7 @@ export interface RestManager {
430
508
  *
431
509
  * @param channelId - The ID of the channel to delete.
432
510
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
433
- * @returns An instance of the deleted {@link Channel}.
511
+ * @returns nothing
434
512
  *
435
513
  * @remarks
436
514
  * For community guilds, the _Rules_, _Guidelines_ and _Community Update_ channels cannot be deleted.
@@ -474,13 +552,22 @@ export interface RestManager {
474
552
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
475
553
  *
476
554
  * @remarks
477
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
555
+ * For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
556
+ * For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
478
557
  *
479
558
  * Fires a _Guild Emojis Update_ gateway event.
480
559
  *
481
560
  * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji}
482
561
  */
483
562
  deleteEmoji: (guildId: BigString, id: BigString, reason?: string) => Promise<void>;
563
+ /**
564
+ * Deletes an emoji from the application.
565
+ *
566
+ * @param id - The ID of the emoji to delete.
567
+ *
568
+ * @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
569
+ */
570
+ deleteApplicationEmoji: (id: BigString) => Promise<void>;
484
571
  /**
485
572
  * Deletes a follow-up message to an interaction.
486
573
  *
@@ -530,10 +617,11 @@ export interface RestManager {
530
617
  *
531
618
  * @param guildId The ID of the guild to get
532
619
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
533
- * @return A {@link CamelizedDiscordSticker}
620
+ * @return A {@link DiscordSticker}
534
621
  *
535
622
  * @remarks
536
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
623
+ * For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
624
+ * For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
537
625
  * Fires a Guild Stickers Update Gateway event.
538
626
  * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
539
627
  * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
@@ -788,14 +876,14 @@ export interface RestManager {
788
876
  * @param commandId - The ID of the command to edit the permissions of.
789
877
  * @param bearerToken - The bearer token to use to make the request.
790
878
  * @param options - The parameters for the edit of the command permissions.
791
- * @returns An instance of the edited {@link ApplicationCommandPermission}.
879
+ * @returns An instance of the edited {@link DiscordGuildApplicationCommandPermissions}.
792
880
  *
793
881
  * @remarks
794
882
  * 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.
795
883
  *
796
884
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
797
885
  */
798
- editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<CamelizedDiscordGuildApplicationCommandPermissions>;
886
+ editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: Camelize<DiscordApplicationCommandPermissions>[]) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
799
887
  /**
800
888
  * Edits an automod rule.
801
889
  *
@@ -803,7 +891,7 @@ export interface RestManager {
803
891
  * @param ruleId - The ID of the rule to edit.
804
892
  * @param options - The parameters for the edit of the rule.
805
893
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
806
- * @returns An instance of the edited {@link CamelizedDiscordAutoModerationRule}.
894
+ * @returns An instance of the edited {@link DiscordAutoModerationRule}.
807
895
  *
808
896
  * @remarks
809
897
  * Requires the `MANAGE_GUILD` permission.
@@ -812,25 +900,26 @@ export interface RestManager {
812
900
  *
813
901
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
814
902
  */
815
- editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
903
+ editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
816
904
  /**
817
- * Modifies the bot's username or avatar.
905
+ * Modifies the bot's username, avatar or banner.
818
906
  * NOTE: username: if changed may cause the bot's discriminator to be randomized.
819
907
  */
820
908
  editBotProfile: (options: {
821
909
  username?: string;
822
910
  botAvatarURL?: string | null;
823
- }) => Promise<CamelizedDiscordUser>;
911
+ botBannerURL?: string | null;
912
+ }) => Promise<Camelize<DiscordUser>>;
824
913
  /**
825
914
  * Edits a channel's settings.
826
915
  *
827
916
  * @param channelId - The ID of the channel to edit.
828
917
  * @param options - The parameters for the edit of the channel.
829
918
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
830
- * @returns An instance of the edited {@link CamelizedDiscordChannel}.
919
+ * @returns An instance of the edited {@link DiscordChannel}.
831
920
  *
832
921
  * @remarks
833
- * If editing a channel of type {@link ChannelTypes.GroupDm}:
922
+ * If editing a channel of type {@link ChannelTypes}.GroupDm:
834
923
  * - Fires a _Channel Update_ gateway event.
835
924
  *
836
925
  * If editing a thread channel:
@@ -846,12 +935,12 @@ export interface RestManager {
846
935
  *
847
936
  * - 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.
848
937
  *
849
- * - If modifying a channel of type {@link ChannelTypes.GuildCategory}:
938
+ * - If modifying a channel of type {@link ChannelTypes}.GuildCategory:
850
939
  * - Fires a _Channel Update_ gateway event for each child channel impacted in this change.
851
940
  * - Otherwise:
852
941
  * - Fires a _Channel Update_ gateway event.
853
942
  */
854
- editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
943
+ editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<Camelize<DiscordChannel>>;
855
944
  /**
856
945
  * Edits the permission overrides for a user or role in a channel.
857
946
  *
@@ -890,23 +979,34 @@ export interface RestManager {
890
979
  * @param id - The ID of the emoji to edit.
891
980
  * @param options - The parameters for the edit of the emoji.
892
981
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
893
- * @returns An instance of the updated {@link CamelizedDiscordEmoji}.
982
+ * @returns An instance of the updated {@link DiscordEmoji}.
894
983
  *
895
984
  * @remarks
896
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
985
+ * For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
986
+ * For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
897
987
  *
898
988
  * Fires a `Guild Emojis Update` gateway event.
899
989
  *
900
990
  * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
901
991
  */
902
- editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
992
+ editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
993
+ /**
994
+ * Edits an application emoji.
995
+ *
996
+ * @param id - The ID of the emoji to edit.
997
+ * @param options - The parameters for the edit of the emoji.
998
+ * @returns An instance of the updated {@link DiscordEmoji}.
999
+ *
1000
+ * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
1001
+ */
1002
+ editApplicationEmoji: (id: BigString, options: ModifyApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
903
1003
  /**
904
1004
  * Edits a follow-up message to an interaction.
905
1005
  *
906
1006
  * @param token - The interaction token to use, provided in the original interaction.
907
1007
  * @param messageId - The ID of the message to edit.
908
1008
  * @param options - The parameters for the edit of the message.
909
- * @returns An instance of the edited {@link Message}.
1009
+ * @returns An instance of the edited {@link DiscordMessage}.
910
1010
  *
911
1011
  * @remarks
912
1012
  * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
@@ -917,48 +1017,47 @@ export interface RestManager {
917
1017
  *
918
1018
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
919
1019
  */
920
- editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
1020
+ editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
921
1021
  /**
922
1022
  * Edits a global application command.
923
1023
  *
924
1024
  * @param commandId - The ID of the command to edit.
925
1025
  * @param options - The parameters for the edit of the command.
926
- * @returns An instance of the edited {@link ApplicationCommand}.
1026
+ * @returns An instance of the edited {@link DiscordApplicationCommand}.
927
1027
  *
928
1028
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
929
1029
  */
930
- editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
1030
+ editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
931
1031
  /**
932
1032
  * Edits a guild's settings.
933
1033
  *
934
1034
  * @param guildId - The ID of the guild to edit.
935
- * @param shardId - The ID of the shard the guild is in.
936
1035
  * @param options - The parameters for the edit of the guild.
937
1036
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
938
- * @returns An instance of the edited {@link Guild}.
1037
+ * @returns An instance of the edited {@link DiscordGuild}.
939
1038
  *
940
1039
  * @remarks
941
1040
  * Requires the `MANAGE_GUILD` permission.
942
1041
  *
943
- * If attempting to add or remove the {@link GuildFeatures.Community} feature:
1042
+ * If attempting to add or remove the {@link GuildFeatures}.Community feature:
944
1043
  * - Requires the `ADMINISTRATOR` permission.
945
1044
  *
946
1045
  * Fires a _Guild Update_ gateway event.
947
1046
  *
948
1047
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
949
1048
  */
950
- editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<CamelizedDiscordGuild>;
1049
+ editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<Camelize<DiscordGuild>>;
951
1050
  /**
952
1051
  * Edits an application command registered in a guild.
953
1052
  *
954
1053
  * @param guildId - The ID of the guild the command is registered in.
955
1054
  * @param commandId - The ID of the command to edit.
956
1055
  * @param options - The parameters for the edit of the command.
957
- * @returns An instance of the edited {@link ApplicationCommand}.
1056
+ * @returns An instance of the edited {@link DiscordApplicationCommand}.
958
1057
  *
959
1058
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
960
1059
  */
961
- editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
1060
+ editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
962
1061
  /** Modify a guild's MFA level. Requires guild ownership.
963
1062
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
964
1063
  */
@@ -968,22 +1067,23 @@ export interface RestManager {
968
1067
  *
969
1068
  * @param guildId The ID of the guild to get
970
1069
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
971
- * @return A {@link CamelizedDiscordSticker}
1070
+ * @return A {@link DiscordSticker}
972
1071
  *
973
1072
  * @remarks
974
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
1073
+ * For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1074
+ * For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
975
1075
  * Fires a Guild Stickers Update Gateway event.
976
1076
  *
977
1077
  * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
978
1078
  */
979
- editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<CamelizedDiscordSticker>;
1079
+ editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<Camelize<DiscordSticker>>;
980
1080
  /**
981
1081
  * Edits a template's settings.
982
1082
  *
983
1083
  * @param guildId - The ID of the guild to edit a template of.
984
1084
  * @param templateCode - The code of the template to edit.
985
1085
  * @param options - The parameters for the edit of the template.
986
- * @returns An instance of the edited {@link Template}.
1086
+ * @returns An instance of the edited {@link DiscordTemplate}.
987
1087
  *
988
1088
  * @remarks
989
1089
  * Requires the `MANAGE_GUILD` permission.
@@ -992,14 +1092,14 @@ export interface RestManager {
992
1092
  *
993
1093
  * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}
994
1094
  */
995
- editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<CamelizedDiscordTemplate>;
1095
+ editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
996
1096
  /**
997
1097
  * Edits a message.
998
1098
  *
999
1099
  * @param channelId - The ID of the channel to edit the message in.
1000
1100
  * @param messageId - The IDs of the message to edit.
1001
1101
  * @param options - The parameters for the edit of the message.
1002
- * @returns An instance of the edited {@link Message}.
1102
+ * @returns An instance of the edited {@link DiscordMessage}.
1003
1103
  *
1004
1104
  * @remarks
1005
1105
  * If editing another user's message:
@@ -1010,13 +1110,13 @@ export interface RestManager {
1010
1110
  *
1011
1111
  * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
1012
1112
  */
1013
- editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<CamelizedDiscordMessage>;
1113
+ editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
1014
1114
  /**
1015
1115
  * Edits the initial message response to an interaction.
1016
1116
  *
1017
1117
  * @param token - The interaction token to use, provided in the original interaction.
1018
1118
  * @param options - The parameters for the edit of the response.
1019
- * @returns An instance of the edited {@link Message}.
1119
+ * @returns An instance of the edited {@link DiscordMessage}.
1020
1120
  *
1021
1121
  * @remarks
1022
1122
  * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
@@ -1027,14 +1127,14 @@ export interface RestManager {
1027
1127
  *
1028
1128
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
1029
1129
  */
1030
- editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
1130
+ editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
1031
1131
  /**
1032
1132
  * Edits the original webhook message.
1033
1133
  *
1034
1134
  * @param webhookId - The ID of the webhook to edit the original message of.
1035
1135
  * @param token - The webhook token, used to edit the message.
1036
1136
  * @param options - The parameters for the edit of the message.
1037
- * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1137
+ * @returns An instance of the edited {@link DiscordMessage}.
1038
1138
  *
1039
1139
  * @remarks
1040
1140
  * Fires a _Message Update_ gateway event.
@@ -1043,7 +1143,7 @@ export interface RestManager {
1043
1143
  */
1044
1144
  editOriginalWebhookMessage: (webhookId: BigString, token: string, options: InteractionCallbackData & {
1045
1145
  threadId?: BigString;
1046
- }) => Promise<CamelizedDiscordMessage>;
1146
+ }) => Promise<Camelize<DiscordMessage>>;
1047
1147
  /**
1048
1148
  * Edits the voice state of the bot user.
1049
1149
  *
@@ -1059,7 +1159,7 @@ export interface RestManager {
1059
1159
  * If attempting to request to speak:
1060
1160
  * - Requires the `REQUEST_TO_SPEAK` permission.
1061
1161
  *
1062
- * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
1162
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state}
1063
1163
  */
1064
1164
  editOwnVoiceState: (guildId: BigString, options: EditOwnVoiceState) => Promise<void>;
1065
1165
  /**
@@ -1069,7 +1169,7 @@ export interface RestManager {
1069
1169
  * @param roleId - The ID of the role to edit.
1070
1170
  * @param options - The parameters for the edit of the role.
1071
1171
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1072
- * @returns An instance of the edited {@link CamelizedDiscordRole}.
1172
+ * @returns An instance of the edited {@link DiscordRole}.
1073
1173
  *
1074
1174
  * @remarks
1075
1175
  * Requires the `MANAGE_ROLES` permission.
@@ -1078,14 +1178,14 @@ export interface RestManager {
1078
1178
  *
1079
1179
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
1080
1180
  */
1081
- editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
1181
+ editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
1082
1182
  /**
1083
1183
  * Edits the positions of a set of roles.
1084
1184
  *
1085
1185
  * @param guildId - The ID of the guild to edit the role positions in.
1086
1186
  * @param options - The parameters for the edit of the role positions.
1087
1187
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1088
- * @returns A collection of {@link CamelizedDiscordRole} objects assorted by role ID.
1188
+ * @returns A collection of {@link DiscordRole} objects assorted by role ID.
1089
1189
  *
1090
1190
  * @remarks
1091
1191
  * Requires the `MANAGE_ROLES` permission.
@@ -1094,34 +1194,34 @@ export interface RestManager {
1094
1194
  *
1095
1195
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
1096
1196
  */
1097
- editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<CamelizedDiscordRole[]>;
1197
+ editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<Camelize<DiscordRole>[]>;
1098
1198
  /**
1099
1199
  * Edits a scheduled event.
1100
1200
  *
1101
1201
  * @param guildId - The ID of the guild to edit the scheduled event in.
1102
1202
  * @param eventId - The ID of the scheduled event to edit.
1103
1203
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1104
- * @returns An instance of the edited {@link ScheduledEvent}.
1204
+ * @returns An instance of the edited {@link DiscordScheduledEvent}.
1105
1205
  *
1106
1206
  * @remarks
1107
1207
  * Requires the `MANAGE_EVENTS` permission.
1108
1208
  *
1109
1209
  * To start or end an event, modify the event's `status` property.
1110
1210
  *
1111
- * The `entity_metadata` property is discarded for events whose `entity_type` is not {@link ScheduledEventEntityType.External}.
1211
+ * The `entity_metadata` property is discarded for events whose `entity_type` is not {@link ScheduledEventEntityType}.External.
1112
1212
  *
1113
1213
  * Fires a _Guild Scheduled Event Update_ gateway event.
1114
1214
  *
1115
1215
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
1116
1216
  */
1117
- editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
1217
+ editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
1118
1218
  /**
1119
1219
  * Edits a stage instance.
1120
1220
  *
1121
1221
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1122
1222
  * @param topic - Topic of the Stage instance (1-120 characters).
1123
1223
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1124
- * @returns An instance of the updated {@link CamelizedDiscordStageInstance}.
1224
+ * @returns An instance of the updated {@link DiscordStageInstance}.
1125
1225
  *
1126
1226
  * @remarks
1127
1227
  * Requires the user to be a moderator of the stage channel.
@@ -1130,7 +1230,7 @@ export interface RestManager {
1130
1230
  *
1131
1231
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance}
1132
1232
  */
1133
- editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<CamelizedDiscordStageInstance>;
1233
+ editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
1134
1234
  /**
1135
1235
  * Edits the voice state of another user.
1136
1236
  *
@@ -1142,15 +1242,29 @@ export interface RestManager {
1142
1242
  *
1143
1243
  * Requires the `MUTE_MEMBERS` permission.
1144
1244
  *
1145
- * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
1245
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state}
1146
1246
  */
1147
1247
  editUserVoiceState: (guildId: BigString, options: EditUserVoiceState) => Promise<void>;
1248
+ /**
1249
+ * Edit the current user application role connection for the application.
1250
+ *
1251
+ * @param bearerToken - The access token of the user
1252
+ * @param applicationId - The id of the application to edit the role connection
1253
+ * @param options - The options to edit
1254
+ * @returns {DiscordApplicationRoleConnection}
1255
+ *
1256
+ * @remarks
1257
+ * This requires the `role_connections.write` scope.
1258
+ *
1259
+ * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}
1260
+ */
1261
+ editUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString, options: Camelize<DiscordApplicationRoleConnection>) => Promise<Camelize<DiscordApplicationRoleConnection>>;
1148
1262
  /**
1149
1263
  * Edits a webhook.
1150
1264
  *
1151
1265
  * @param webhookId - The ID of the webhook to edit.
1152
1266
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1153
- * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1267
+ * @returns An instance of the edited {@link DiscordWebhook}.
1154
1268
  *
1155
1269
  * @remarks
1156
1270
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1159,7 +1273,7 @@ export interface RestManager {
1159
1273
  *
1160
1274
  * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook}
1161
1275
  */
1162
- editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
1276
+ editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
1163
1277
  /**
1164
1278
  * Edits a webhook message.
1165
1279
  *
@@ -1167,7 +1281,7 @@ export interface RestManager {
1167
1281
  * @param token - The webhook token, used to edit the message.
1168
1282
  * @param messageId - The ID of the message to edit.
1169
1283
  * @param options - The parameters for the edit of the message.
1170
- * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1284
+ * @returns An instance of the edited {@link DiscordMessage}.
1171
1285
  *
1172
1286
  * @remarks
1173
1287
  * Fires a _Message Update_ gateway event.
@@ -1176,13 +1290,13 @@ export interface RestManager {
1176
1290
  */
1177
1291
  editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
1178
1292
  threadId?: BigString;
1179
- }) => Promise<CamelizedDiscordMessage>;
1293
+ }) => Promise<Camelize<DiscordMessage>>;
1180
1294
  /**
1181
1295
  * Edits a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1182
1296
  *
1183
1297
  * @param webhookId - The ID of the webhook to edit.
1184
1298
  * @param token - The webhook token, used to edit the webhook.
1185
- * @returns An instance of the edited {@link CamelizedDiscordWebhook}.
1299
+ * @returns An instance of the edited {@link DiscordWebhook}.
1186
1300
  *
1187
1301
  * @remarks
1188
1302
  * Requires the `MANAGE_WEBHOOKS` permission.
@@ -1191,14 +1305,14 @@ export interface RestManager {
1191
1305
  *
1192
1306
  * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
1193
1307
  */
1194
- editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<CamelizedDiscordWebhook>;
1308
+ editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
1195
1309
  /**
1196
1310
  * Edits a guild's welcome screen.
1197
1311
  *
1198
1312
  * @param guildId - The ID of the guild to edit the welcome screen of.
1199
1313
  * @param options - The parameters for the edit of the welcome screen.
1200
1314
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1201
- * @returns An instance of the edited {@link WelcomeScreen}.
1315
+ * @returns An instance of the edited {@link DiscordWelcomeScreen}.
1202
1316
  *
1203
1317
  * @remarks
1204
1318
  * Requires the `MANAGE_GUILD` permission.
@@ -1207,13 +1321,13 @@ export interface RestManager {
1207
1321
  *
1208
1322
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
1209
1323
  */
1210
- editWelcomeScreen: (guildId: BigString, options: CamelizedDiscordModifyGuildWelcomeScreen, reason?: string) => Promise<CamelizedDiscordWelcomeScreen>;
1324
+ editWelcomeScreen: (guildId: BigString, options: Camelize<DiscordModifyGuildWelcomeScreen>, reason?: string) => Promise<Camelize<DiscordWelcomeScreen>>;
1211
1325
  /**
1212
1326
  * Edits the settings of a guild's widget.
1213
1327
  *
1214
1328
  * @param guildId - The ID of the guild to edit the settings of the widget of.
1215
1329
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1216
- * @returns An instance of the edited {@link GuildWidgetSettings}.
1330
+ * @returns An instance of the edited {@link DiscordGuildWidgetSettings}.
1217
1331
  *
1218
1332
  * @remarks
1219
1333
  * Requires the `MANAGE_GUILD` permission.
@@ -1222,27 +1336,28 @@ export interface RestManager {
1222
1336
  *
1223
1337
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
1224
1338
  */
1225
- editWidgetSettings: (guildId: BigString, options: CamelizedDiscordGuildWidgetSettings, reason?: string) => Promise<CamelizedDiscordGuildWidgetSettings>;
1339
+ editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>, reason?: string) => Promise<Camelize<DiscordGuildWidgetSettings>>;
1226
1340
  /**
1227
1341
  * Executes a webhook, causing a message to be posted in the channel configured for the webhook.
1228
1342
  *
1229
1343
  * @param webhookId - The ID of the webhook to execute.
1230
1344
  * @param token - The webhook token, used to execute the webhook.
1231
1345
  * @param options - The parameters for the execution of the webhook.
1232
- * @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`.
1346
+ * @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`.
1233
1347
  *
1234
1348
  * @remarks
1235
1349
  * If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
1236
1350
  *
1237
1351
  * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
1238
1352
  */
1239
- executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<CamelizedDiscordMessage | undefined>;
1353
+ executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
1240
1354
  /**
1241
1355
  * Follows an announcement channel, allowing messages posted within it to be cross-posted into the target channel.
1242
1356
  *
1243
1357
  * @param sourceChannelId - The ID of the announcement channel to follow.
1244
1358
  * @param targetChannelId - The ID of the target channel - the channel to cross-post to.
1245
- * @returns An instance of {@link CamelizedDiscordFollowedChannel}.
1359
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1360
+ * @returns An instance of {@link DiscordFollowedChannel}.
1246
1361
  *
1247
1362
  * @remarks
1248
1363
  * Requires the `MANAGE_WEBHOOKS` permission in the __target channel__.
@@ -1251,12 +1366,12 @@ export interface RestManager {
1251
1366
  *
1252
1367
  * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
1253
1368
  */
1254
- followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>;
1369
+ followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<Camelize<DiscordFollowedChannel>>;
1255
1370
  /**
1256
1371
  * Gets the list of all active threads for a guild.
1257
1372
  *
1258
1373
  * @param guildId - The ID of the guild to get the threads of.
1259
- * @returns An instance of {@link CamelizedDiscordActiveThreads}.
1374
+ * @returns An instance of {@link DiscordActiveThreads}.
1260
1375
  *
1261
1376
  * @remarks
1262
1377
  * Returns both public and private threads.
@@ -1265,91 +1380,133 @@ export interface RestManager {
1265
1380
  *
1266
1381
  * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
1267
1382
  */
1268
- getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>;
1383
+ getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordActiveThreads>>;
1269
1384
  /** Get the applications info */
1270
- getApplicationInfo: () => Promise<CamelizedDiscordApplication>;
1385
+ getApplicationInfo: () => Promise<Camelize<DiscordApplication>>;
1386
+ /**
1387
+ * Edit properties of the app associated with the requesting bot user.
1388
+ *
1389
+ * @remarks
1390
+ * Only properties that are passed will be updated.
1391
+ */
1392
+ editApplicationInfo: (body: EditApplication) => Promise<Camelize<DiscordApplication>>;
1393
+ /**
1394
+ * Get the current authentication info for the authenticated user
1395
+ *
1396
+ * @param bearerToken - Any OAuth2 derived access token
1397
+ * @returns An instance of {@link DiscordCurrentAuthorization}
1398
+ *
1399
+ * @remarks
1400
+ * The user object is not defined if the scopes do not include `identify`.
1401
+ * In the user object, if defined, the email is not included if the scopes do not include `email`
1402
+ */
1403
+ getCurrentAuthenticationInfo: (bearerToken: string) => Promise<Camelize<DiscordCurrentAuthorization>>;
1404
+ /**
1405
+ * Exchange the information to get a OAuth2 accessToken token
1406
+ *
1407
+ * @param clientId - Application's client id
1408
+ * @param clientSecret - application's client secret
1409
+ * @param options - The options to make the exchange with discord
1410
+ */
1411
+ exchangeToken: (clientId: BigString, clientSecret: string, options: Camelize<DiscordTokenExchange>) => Promise<Camelize<DiscordAccessTokenResponse>>;
1412
+ /**
1413
+ * Revoke an access_token
1414
+ *
1415
+ * @param clientId - Application's client id
1416
+ * @param clientSecret - application's client secret
1417
+ * @param options - The options to revoke the access_token
1418
+ */
1419
+ revokeToken: (clientId: BigString, clientSecret: string, options: Camelize<DiscordTokenRevocation>) => Promise<void>;
1271
1420
  /**
1272
1421
  * Gets the permissions of a guild application command.
1273
1422
  *
1274
1423
  * @param guildId - The ID of the guild the command is registered in.
1275
1424
  * @param commandId - The ID of the command to get the permissions of.
1276
- * @returns An instance of {@link ApplicationCommandPermission}.
1425
+ * @param options - The OAuth2 related optional parameters for the endpoint
1426
+ * @returns An instance of {@link DiscordGuildApplicationCommandPermissions}.
1427
+ *
1428
+ * @remarks
1429
+ * Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
1277
1430
  *
1278
1431
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
1279
1432
  */
1280
- getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<CamelizedDiscordGuildApplicationCommandPermissions>;
1433
+ getApplicationCommandPermission: (guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
1281
1434
  /**
1282
- * Gets the permissions of all application commands registered in a guild by the ID of the guild.
1435
+ * Gets the permissions of all application commands registered in a guild by the ID of the guild and optionally an external application.
1283
1436
  *
1284
1437
  * @param guildId - The ID of the guild to get the permissions objects of.
1285
- * @returns A collection of {@link ApplicationCommandPermission} objects assorted by command ID.
1438
+ * @param options - The OAuth2 related optional parameters for the endpoint
1439
+ * @returns A collection of {@link DiscordGuildApplicationCommandPermissions} objects assorted by command ID.
1440
+ *
1441
+ * @remarks
1442
+ * Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
1286
1443
  *
1287
1444
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
1288
1445
  */
1289
- getApplicationCommandPermissions: (guildId: BigString) => Promise<CamelizedDiscordGuildApplicationCommandPermissions[]>;
1446
+ getApplicationCommandPermissions: (guildId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>[]>;
1290
1447
  /**
1291
1448
  * Gets a guild's audit log.
1292
1449
  *
1293
1450
  * @param guildId - The ID of the guild to get the audit log of.
1294
1451
  * @param options - The parameters for the fetching of the audit log.
1295
- * @returns An instance of {@link AuditLog}.
1452
+ * @returns An instance of {@link DiscordAuditLog}.
1296
1453
  *
1297
1454
  * @remarks
1298
1455
  * Requires the `VIEW_AUDIT_LOG` permission.
1299
1456
  *
1300
1457
  * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
1301
1458
  */
1302
- getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<CamelizedDiscordAuditLog>;
1459
+ getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
1303
1460
  /**
1304
1461
  * Gets an automod rule by its ID.
1305
1462
  *
1306
1463
  * @param guildId - The ID of the guild to get the rule of.
1307
1464
  * @param ruleId - The ID of the rule to get.
1308
- * @returns An instance of {@link CamelizedDiscordAutoModerationRule}.
1465
+ * @returns An instance of {@link DiscordAutoModerationRule}.
1309
1466
  *
1310
1467
  * @remarks
1311
1468
  * Requires the `MANAGE_GUILD` permission.
1312
1469
  *
1313
1470
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
1314
1471
  */
1315
- getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<CamelizedDiscordAutoModerationRule>;
1472
+ getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
1316
1473
  /**
1317
1474
  * Gets the list of automod rules for a guild.
1318
1475
  *
1319
1476
  * @param guildId - The ID of the guild to get the rules from.
1320
- * @returns A collection of {@link CamelizedDiscordAutoModerationRule} objects assorted by rule ID.
1477
+ * @returns A collection of {@link DiscordAutoModerationRule} objects assorted by rule ID.
1321
1478
  *
1322
1479
  * @remarks
1323
1480
  * Requires the `MANAGE_GUILD` permission.
1324
1481
  *
1325
1482
  * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
1326
1483
  */
1327
- getAutomodRules: (guildId: BigString) => Promise<CamelizedDiscordAutoModerationRule[]>;
1484
+ getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule>[]>;
1328
1485
  /**
1329
1486
  * Gets the list of available voice regions.
1330
1487
  *
1331
- * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
1488
+ * @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
1332
1489
  */
1333
- getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>;
1490
+ getAvailableVoiceRegions: () => Promise<Camelize<DiscordVoiceRegion>[]>;
1334
1491
  /**
1335
1492
  * Gets a ban by user ID.
1336
1493
  *
1337
1494
  * @param guildId - The ID of the guild to get the ban from.
1338
1495
  * @param userId - The ID of the user to get the ban for.
1339
- * @returns An instance of {@link CamelizedDiscordBan}.
1496
+ * @returns An instance of {@link DiscordBan}.
1340
1497
  *
1341
1498
  * @remarks
1342
1499
  * Requires the `BAN_MEMBERS` permission.
1343
1500
  *
1344
1501
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
1345
1502
  */
1346
- getBan: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordBan>;
1503
+ getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
1347
1504
  /**
1348
1505
  * Gets the list of bans for a guild.
1349
1506
  *
1350
1507
  * @param guildId - The ID of the guild to get the list of bans for.
1351
1508
  * @param options - The parameters for the fetching of the list of bans.
1352
- * @returns A collection of {@link CamelizedDiscordBan} objects assorted by user ID.
1509
+ * @returns A collection of {@link DiscordBan} objects assorted by user ID.
1353
1510
  *
1354
1511
  * @remarks
1355
1512
  * Requires the `BAN_MEMBERS` permission.
@@ -1358,24 +1515,24 @@ export interface RestManager {
1358
1515
  *
1359
1516
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
1360
1517
  */
1361
- getBans: (guildId: BigString, options?: GetBans) => Promise<CamelizedDiscordBan[]>;
1518
+ getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan>[]>;
1362
1519
  /**
1363
1520
  * Gets a channel by its ID.
1364
1521
  *
1365
1522
  * @param channelId - The ID of the channel to get.
1366
- * @returns An instance of {@link CamelizedDiscordChannel}.
1523
+ * @returns An instance of {@link DiscordChannel}.
1367
1524
  *
1368
1525
  * @remarks
1369
- * If the channel is a thread, a {@link ThreadMember} object is included in the result.
1526
+ * If the channel is a thread, a {@link DiscordThreadMember} object is included in the result.
1370
1527
  *
1371
1528
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
1372
1529
  */
1373
- getChannel: (channelId: BigString) => Promise<CamelizedDiscordChannel>;
1530
+ getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
1374
1531
  /**
1375
1532
  * Gets the list of invites for a channel.
1376
1533
  *
1377
1534
  * @param channelId - The ID of the channel to get the invites of.
1378
- * @returns A collection of {@link CamelizedDiscordInviteMetadata} objects assorted by invite code.
1535
+ * @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
1379
1536
  *
1380
1537
  * @remarks
1381
1538
  * Requires the `MANAGE_CHANNELS` permission.
@@ -1384,65 +1541,113 @@ export interface RestManager {
1384
1541
  *
1385
1542
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
1386
1543
  */
1387
- getChannelInvites: (channelId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1544
+ getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
1388
1545
  /**
1389
1546
  * Gets the list of channels for a guild.
1390
1547
  *
1391
1548
  * @param guildId - The ID of the guild to get the channels of.
1392
- * @returns A collection of {@link CamelizedDiscordChannel} objects assorted by channel ID.
1549
+ * @returns A collection of {@link DiscordChannel} objects assorted by channel ID.
1393
1550
  *
1394
1551
  * @remarks
1395
1552
  * Excludes threads.
1396
1553
  *
1397
1554
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
1398
1555
  */
1399
- getChannels: (guildId: BigString) => Promise<CamelizedDiscordChannel[]>;
1556
+ getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel>[]>;
1400
1557
  /**
1401
1558
  * Gets a list of webhooks for a channel.
1402
1559
  *
1403
1560
  * @param channelId - The ID of the channel which to get the webhooks of.
1404
- * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1561
+ * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1405
1562
  *
1406
1563
  * @remarks
1407
1564
  * Requires the `MANAGE_WEBHOOKS` permission.
1408
1565
  *
1409
1566
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks}
1410
1567
  */
1411
- getChannelWebhooks: (channelId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1568
+ getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
1412
1569
  /**
1413
1570
  * Gets or creates a DM channel with a user.
1414
1571
  *
1415
1572
  * @param userId - The ID of the user to create the DM channel with.
1416
- * @returns An instance of {@link CamelizedDiscordChannel}.
1573
+ * @returns An instance of {@link DiscordChannel}.
1417
1574
  *
1418
1575
  * @see {@link https://discord.com/developers/docs/resources/user#create-dm}
1419
1576
  */
1420
- getDmChannel: (userId: BigString) => Promise<CamelizedDiscordChannel>;
1577
+ getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
1578
+ /**
1579
+ * Create a new group DM channel with multiple users.
1580
+ *
1581
+ * @param options - The options for create a new group dm
1582
+ * @returns An instance of {@link DiscordChannel}.
1583
+ *
1584
+ * @remarks
1585
+ * The access tokens require to have the `gdm.join` scope
1586
+ *
1587
+ * This endpoint is limited to 10 active group DMs.
1588
+ *
1589
+ * Fires a _Channel create_ gateway event.
1590
+ *
1591
+ * @see {@link https://discord.com/developers/docs/resources/user#create-group-dm}
1592
+ */
1593
+ getGroupDmChannel: (options: GetGroupDmOptions) => Promise<Camelize<DiscordChannel>>;
1421
1594
  /**
1422
1595
  * Gets an emoji by its ID.
1423
1596
  *
1424
1597
  * @param guildId - The ID of the guild from which to get the emoji.
1425
1598
  * @param emojiId - The ID of the emoji to get.
1426
- * @returns An instance of {@link CamelizedDiscordEmoji}.
1599
+ * @returns An instance of {@link DiscordEmoji}.
1600
+ *
1601
+ * @remarks
1602
+ * Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission,
1603
+ * or if the bot created the emoji and has the the `CREATE_GUILD_EXPRESSIONS` permission.
1427
1604
  *
1428
1605
  * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
1429
1606
  */
1430
- getEmoji: (guildId: BigString, emojiId: BigString) => Promise<CamelizedDiscordEmoji>;
1607
+ getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
1608
+ /**
1609
+ * Gets an application emoji by its ID.
1610
+ *
1611
+ * @param emojiId - The ID of the emoji to get.
1612
+ * @returns An instance of {@link DiscordEmoji}.
1613
+ *
1614
+ * @remarks
1615
+ * Always includes the `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API.
1616
+ *
1617
+ * @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
1618
+ */
1619
+ getApplicationEmoji: (emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
1431
1620
  /**
1432
1621
  * Gets the list of emojis for a guild.
1433
1622
  *
1434
1623
  * @param guildId - The ID of the guild which to get the emojis of.
1435
- * @returns A collection of {@link CamelizedDiscordEmoji} objects assorted by emoji ID.
1624
+ * @returns A collection of {@link DiscordEmoji} objects assorted by emoji ID.
1625
+ *
1626
+ * @remarks
1627
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1436
1628
  *
1437
1629
  * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
1438
1630
  */
1439
- getEmojis: (guildId: BigString) => Promise<CamelizedDiscordEmoji[]>;
1631
+ getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji>[]>;
1632
+ /**
1633
+ * Gets the list of emojis for an application.
1634
+ *
1635
+ * @returns An object with the array of {@link DiscordEmoji} objects.
1636
+ *
1637
+ * @remarks
1638
+ * Always includes the `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API.
1639
+ *
1640
+ * @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
1641
+ */
1642
+ getApplicationEmojis: () => Promise<{
1643
+ items: Camelize<DiscordEmoji>[];
1644
+ }>;
1440
1645
  /**
1441
1646
  * Gets a follow-up message to an interaction by the ID of the message.
1442
1647
  *
1443
1648
  * @param token - The interaction token to use, provided in the original interaction.
1444
1649
  * @param messageId - The ID of the message to get.
1445
- * @returns An instance of {@link Message}.
1650
+ * @returns An instance of {@link DiscordMessage}.
1446
1651
  *
1447
1652
  * @remarks
1448
1653
  * Unlike `getMessage()`, this endpoint allows the bot user to act without:
@@ -1453,168 +1658,181 @@ export interface RestManager {
1453
1658
  *
1454
1659
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message}
1455
1660
  */
1456
- getFollowupMessage: (token: string, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1661
+ getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1457
1662
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1458
- getGatewayBot: () => Promise<CamelizedDiscordGetGatewayBot>;
1663
+ getGatewayBot: () => Promise<Camelize<DiscordGetGatewayBot>>;
1459
1664
  /**
1460
1665
  * Gets a global application command by its ID.
1461
1666
  *
1462
1667
  * @param commandId - The ID of the command to get.
1463
- * @returns An instance of {@link ApplicationCommand}.
1668
+ * @returns An instance of {@link DiscordApplicationCommand}.
1464
1669
  *
1465
1670
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
1466
1671
  */
1467
- getGlobalApplicationCommand: (commandId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1672
+ getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1468
1673
  /**
1469
1674
  * Gets the list of your bot's global application commands.
1470
1675
  *
1471
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
1676
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
1472
1677
  *
1473
1678
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
1474
1679
  */
1475
- getGlobalApplicationCommands: () => Promise<CamelizedDiscordApplicationCommand[]>;
1680
+ getGlobalApplicationCommands: () => Promise<Camelize<DiscordApplicationCommand>[]>;
1476
1681
  /**
1477
1682
  * Gets a guild by its ID.
1478
1683
  *
1479
1684
  * @param guildId - The ID of the guild to get.
1480
1685
  * @param options - The parameters for the fetching of the guild.
1481
- * @returns An instance of {@link Guild}.
1686
+ * @returns An instance of {@link DiscordGuild}.
1482
1687
  *
1483
1688
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
1484
1689
  */
1485
1690
  getGuild: (guildId: BigString, options?: {
1486
1691
  counts?: boolean;
1487
- }) => Promise<CamelizedDiscordGuild>;
1692
+ }) => Promise<Camelize<DiscordGuild>>;
1693
+ /**
1694
+ * Get the user guilds.
1695
+ *
1696
+ * @param bearerToken - The access token of the user, if unspecified the bot token is used instead
1697
+ * @param options - The parameters for the fetching of the guild.
1698
+ * @returns An array of partial {@link DiscordGuild}.
1699
+ *
1700
+ * @remarks
1701
+ * If used with an access token, the token needs to have the `guilds` scope
1702
+ *
1703
+ * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
1704
+ */
1705
+ getGuilds: (bearerToken?: string, options?: GetUserGuilds) => Promise<Partial<Camelize<DiscordGuild>>[]>;
1488
1706
  /**
1489
1707
  * Gets a guild application command by its ID.
1490
1708
  *
1491
1709
  * @param guildId - The ID of the guild the command is registered in.
1492
1710
  * @param commandId - The ID of the command to get.
1493
- * @returns An instance of {@link ApplicationCommand}.
1711
+ * @returns An instance of {@link DiscordApplicationCommand}.
1494
1712
  *
1495
1713
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}
1496
1714
  */
1497
- getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
1715
+ getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
1498
1716
  /**
1499
1717
  * Gets the list of application commands registered by your bot in a guild.
1500
1718
  *
1501
1719
  * @param guildId - The ID of the guild the commands are registered in.
1502
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
1720
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
1503
1721
  *
1504
1722
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commandss}
1505
1723
  */
1506
- getGuildApplicationCommands: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommand[]>;
1724
+ getGuildApplicationCommands: (guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>[]>;
1507
1725
  /**
1508
1726
  * Gets the preview of a guild by a guild's ID.
1509
1727
  *
1510
1728
  * @param guildId - The ID of the guild to get the preview of.
1511
- * @returns An instance of {@link GuildPreview}.
1729
+ * @returns An instance of {@link DiscordGuildPreview}.
1512
1730
  *
1513
1731
  * @remarks
1514
- * If the bot user is not in the guild, the guild must be lurkable.
1732
+ * If the bot user is not in the guild, the guild must be discoverable.
1515
1733
  *
1516
1734
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
1517
1735
  */
1518
- getGuildPreview: (guildId: BigString) => Promise<CamelizedDiscordGuildPreview>;
1736
+ getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
1519
1737
  /**
1520
1738
  * Returns a sticker object for the given guild and sticker IDs.
1521
1739
  *
1522
1740
  * @param guildId The ID of the guild to get
1523
1741
  * @param stickerId The ID of the sticker to get
1524
- * @return A {@link CamelizedDiscordSticker}
1742
+ * @return A {@link DiscordSticker}
1525
1743
  *
1526
- * @remarks Includes the user field if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1744
+ * @remarks Includes the user field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1527
1745
  *
1528
1746
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
1529
1747
  */
1530
- getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<CamelizedDiscordSticker>;
1748
+ getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1531
1749
  /**
1532
1750
  * Returns an array of sticker objects for the given guild.
1533
1751
  *
1534
1752
  * @param guildId The ID of the guild to get
1535
- * @returns A collection of {@link CamelizedDiscordSticker} objects assorted by sticker ID.
1753
+ * @returns A collection of {@link DiscordSticker} objects assorted by sticker ID.
1536
1754
  *
1537
- * @remarks Includes user fields if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
1755
+ * @remarks Includes user fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1538
1756
  *
1539
1757
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
1540
1758
  */
1541
- getGuildStickers: (guildId: BigString) => Promise<CamelizedDiscordSticker[]>;
1759
+ getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker>[]>;
1542
1760
  /**
1543
1761
  * Gets a template by its code.
1544
1762
  *
1545
1763
  * @param templateCode - The code of the template to get.
1546
- * @returns An instance of {@link Template}.
1764
+ * @returns An instance of {@link DiscordTemplate}.
1547
1765
  *
1548
1766
  * @remarks
1549
1767
  * Requires the `MANAGE_GUILD` permission.
1550
1768
  *
1551
1769
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}
1552
1770
  */
1553
- getGuildTemplate: (templateCode: string) => Promise<CamelizedDiscordTemplate>;
1771
+ getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
1554
1772
  /**
1555
1773
  * Gets the list of templates for a guild.
1556
1774
  *
1557
1775
  * @param guildId - The ID of the guild to get the list of templates for.
1558
- * @returns A collection of {@link Template} objects assorted by template code.
1776
+ * @returns A collection of {@link DiscordTemplate} objects assorted by template code.
1559
1777
  *
1560
1778
  * @remarks
1561
1779
  * Requires the `MANAGE_GUILD` permission.
1562
1780
  *
1563
1781
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
1564
1782
  */
1565
- getGuildTemplates: (guildId: BigString) => Promise<CamelizedDiscordTemplate[]>;
1783
+ getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate>[]>;
1566
1784
  /**
1567
1785
  * Gets the list of webhooks for a guild.
1568
1786
  *
1569
1787
  * @param guildId - The ID of the guild to get the list of webhooks for.
1570
- * @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
1788
+ * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1571
1789
  *
1572
1790
  * @remarks
1573
1791
  * Requires the `MANAGE_WEBHOOKS` permission.
1574
1792
  *
1575
1793
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks}
1576
1794
  */
1577
- getGuildWebhooks: (guildId: BigString) => Promise<CamelizedDiscordWebhook[]>;
1795
+ getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
1578
1796
  /**
1579
1797
  * Gets the list of integrations attached to a guild.
1580
1798
  *
1581
1799
  * @param guildId - The ID of the guild to get the list of integrations from.
1582
- * @returns A collection of {@link Integration} objects assorted by integration ID.
1800
+ * @returns A collection of {@link DiscordIntegration} objects assorted by integration ID.
1583
1801
  *
1584
1802
  * @remarks
1585
1803
  * Requires the `MANAGE_GUILD` permission.
1586
1804
  *
1587
1805
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
1588
1806
  */
1589
- getIntegrations: (guildId: BigString) => Promise<CamelizedDiscordIntegration[]>;
1807
+ getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration>[]>;
1590
1808
  /**
1591
1809
  * Gets an invite to a channel by its invite code.
1592
1810
  *
1593
1811
  * @param inviteCode - The invite code of the invite to get.
1594
1812
  * @param options - The parameters for the fetching of the invite.
1595
- * @returns An instance of {@link CamelizedDiscordInviteMetadata}.
1813
+ * @returns An instance of {@link DiscordInviteMetadata}.
1596
1814
  *
1597
1815
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
1598
1816
  */
1599
- getInvite: (inviteCode: string, options?: GetInvite) => Promise<CamelizedDiscordInviteMetadata>;
1817
+ getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
1600
1818
  /**
1601
1819
  * Gets the list of invites for a guild.
1602
1820
  *
1603
1821
  * @param guildId - The ID of the guild to get the invites from.
1604
- * @returns A collection of {@link InviteMetadata | Invite} objects assorted by invite code.
1822
+ * @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
1605
1823
  *
1606
1824
  * @remarks
1607
1825
  * Requires the `MANAGE_GUILD` permission.
1608
1826
  *
1609
1827
  * @see {@link https://discord.com/developers/docs/resources/invite#get-invites}
1610
1828
  */
1611
- getInvites: (guildId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
1829
+ getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
1612
1830
  /**
1613
1831
  * Gets a message from a channel by the ID of the message.
1614
1832
  *
1615
1833
  * @param channelId - The ID of the channel from which to get the message.
1616
1834
  * @param messageId - The ID of the message to get.
1617
- * @returns An instance of {@link Message}.
1835
+ * @returns An instance of {@link DiscordMessage}.
1618
1836
  *
1619
1837
  * @remarks
1620
1838
  * Requires that the bot user be able to see the contents of the channel in which the message was posted.
@@ -1624,13 +1842,13 @@ export interface RestManager {
1624
1842
  *
1625
1843
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
1626
1844
  */
1627
- getMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
1845
+ getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
1628
1846
  /**
1629
1847
  * Gets multiple messages from a channel.
1630
1848
  *
1631
1849
  * @param channelId - The ID of the channel from which to get the messages.
1632
1850
  * @param options - The parameters for the fetching of the messages.
1633
- * @returns A collection of {@link Message} objects assorted by message ID.
1851
+ * @returns A collection of {@link DiscordMessage} objects assorted by message ID.
1634
1852
  *
1635
1853
  * @remarks
1636
1854
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -1640,20 +1858,28 @@ export interface RestManager {
1640
1858
  *
1641
1859
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
1642
1860
  */
1643
- getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<CamelizedDiscordMessage[]>;
1861
+ getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage>[]>;
1862
+ /**
1863
+ * Returns a sticker pack for the given ID.
1864
+ *
1865
+ * @returns A {@link DiscordStickerPack} object.
1866
+ *
1867
+ * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker-pack}
1868
+ */
1869
+ getStickerPack: (stickerPackId: BigString) => Promise<Camelize<DiscordStickerPack>>;
1644
1870
  /**
1645
- * Returns the list of sticker packs available to Nitro subscribers.
1871
+ * Returns the list of sticker packs available.
1646
1872
  *
1647
- * @returns A collection of {@link StickerPack} objects assorted by sticker ID.
1873
+ * @returns A collection of {@link DiscordStickerPack} objects assorted by sticker ID.
1648
1874
  *
1649
- * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
1875
+ * @see {@link https://discord.com/developers/docs/resources/sticker#list-sticker-packs}
1650
1876
  */
1651
- getNitroStickerPacks: () => Promise<CamelizedDiscordStickerPack[]>;
1877
+ getStickerPacks: () => Promise<Camelize<DiscordStickerPack>[]>;
1652
1878
  /**
1653
1879
  * Gets the initial message response to an interaction.
1654
1880
  *
1655
1881
  * @param token - The interaction token to use, provided in the original interaction.
1656
- * @returns An instance of {@link Message}.
1882
+ * @returns An instance of {@link DiscordMessage}.
1657
1883
  *
1658
1884
  * @remarks
1659
1885
  * Unlike `getMessage()`, this endpoint allows the bot user to act without:
@@ -1664,12 +1890,12 @@ export interface RestManager {
1664
1890
  *
1665
1891
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
1666
1892
  */
1667
- getOriginalInteractionResponse: (token: string) => Promise<CamelizedDiscordMessage>;
1893
+ getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
1668
1894
  /**
1669
1895
  * Gets the pinned messages for a channel.
1670
1896
  *
1671
1897
  * @param channelId - The ID of the channel to get the pinned messages for.
1672
- * @returns A collection of {@link Message} objects assorted by message ID.
1898
+ * @returns A collection of {@link DiscordMessage} objects assorted by message ID.
1673
1899
  *
1674
1900
  * @remarks
1675
1901
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -1679,42 +1905,42 @@ export interface RestManager {
1679
1905
  *
1680
1906
  * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
1681
1907
  */
1682
- getPinnedMessages: (channelId: BigString) => Promise<CamelizedDiscordMessage[]>;
1908
+ getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage>[]>;
1683
1909
  /**
1684
1910
  * Gets the list of private archived threads for a channel.
1685
1911
  *
1686
1912
  * @param channelId - The ID of the channel to get the archived threads for.
1687
1913
  * @param options - The parameters for the fetching of threads.
1688
- * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1914
+ * @returns An instance of {@link DiscordArchivedThreads}.
1689
1915
  *
1690
1916
  * @remarks
1691
1917
  * Requires the `READ_MESSAGE_HISTORY` permission.
1692
1918
  * Requires the `MANAGE_THREADS` permission.
1693
1919
  *
1694
- * Returns threads of type {@link ChannelTypes.GuildPrivateThread}.
1920
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1695
1921
  *
1696
1922
  * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1697
1923
  *
1698
1924
  * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
1699
1925
  */
1700
- getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1926
+ getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1701
1927
  /**
1702
1928
  * Gets the list of private archived threads the bot is a member of for a channel.
1703
1929
  *
1704
1930
  * @param channelId - The ID of the channel to get the archived threads for.
1705
1931
  * @param options - The parameters for the fetching of threads.
1706
- * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1932
+ * @returns An instance of {@link DiscordArchivedThreads}.
1707
1933
  *
1708
1934
  * @remarks
1709
1935
  * Requires the `READ_MESSAGE_HISTORY` permission.
1710
1936
  *
1711
- * Returns threads of type {@link ChannelTypes.GuildPrivateThread}.
1937
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1712
1938
  *
1713
1939
  * Threads are ordered by the `id` property in descending order.
1714
1940
  *
1715
1941
  * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
1716
1942
  */
1717
- getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1943
+ getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1718
1944
  /**
1719
1945
  * Gets the number of members that would be kicked from a guild during pruning.
1720
1946
  *
@@ -1723,71 +1949,81 @@ export interface RestManager {
1723
1949
  * @returns A number indicating the number of members that would be kicked.
1724
1950
  *
1725
1951
  * @remarks
1726
- * Requires the `KICK_MEMBERS` permission.
1952
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
1727
1953
  *
1728
1954
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
1729
1955
  */
1730
- getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<CamelizedDiscordPrunedCount>;
1956
+ getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
1731
1957
  /**
1732
1958
  * Gets the list of public archived threads for a channel.
1733
1959
  *
1734
1960
  * @param channelId - The ID of the channel to get the archived threads for.
1735
1961
  * @param options - The parameters for the fetching of threads.
1736
- * @returns An instance of {@link ArchivedThreads}.
1962
+ * @returns An instance of {@link DiscordArchivedThreads}.
1737
1963
  *
1738
1964
  * @remarks
1739
1965
  * Requires the `READ_MESSAGE_HISTORY` permission.
1740
1966
  *
1741
- * If called on a channel of type {@link ChannelTypes.GuildText}, returns threads of type {@link ChannelTypes.GuildPublicThread}.
1742
- * If called on a channel of type {@link ChannelTypes.GuildNews}, returns threads of type {@link ChannelTypes.GuildNewsThread}.
1967
+ * If called on a channel of type {@link ChannelTypes}.GuildText, returns threads of type {@link ChannelTypes}.GuildPublicThread.
1968
+ * If called on a channel of type {@link ChannelTypes}.GuildNews, returns threads of type {@link ChannelTypes}.GuildNewsThread.
1743
1969
  *
1744
1970
  * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1745
1971
  *
1746
1972
  * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
1747
1973
  */
1748
- getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
1974
+ getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>;
1749
1975
  /**
1750
1976
  * Gets the list of roles for a guild.
1751
1977
  *
1752
1978
  * @param guildId - The ID of the guild to get the list of roles for.
1753
- * @returns A collection of {@link DisorcRole} objects assorted by role ID.
1979
+ * @returns A collection of {@link DiscordRole} objects assorted by role ID.
1754
1980
  *
1755
1981
  * @remarks
1756
- * ⚠️ This endpoint should be used sparingly due to {@link User} objects already being included in guild payloads.
1982
+ * ⚠️ This endpoint should be used sparingly due to {@link DiscordRole} objects already being included in guild payloads.
1757
1983
  *
1758
1984
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
1759
1985
  */
1760
- getRoles: (guildId: BigString) => Promise<CamelizedDiscordRole[]>;
1986
+ getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole>[]>;
1987
+ /**
1988
+ * Gets a role by id for a guild.
1989
+ *
1990
+ * @param guildId - The ID of the guild to get role for.
1991
+ * @param roleId - The ID of the role.
1992
+ * @returns A {@link DiscordRole} object.
1993
+ *
1994
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
1995
+ */
1996
+ getRole: (guildId: BigString, roleId: BigString) => Promise<Camelize<DiscordRole>>;
1761
1997
  /**
1762
1998
  * Gets a scheduled event by its ID.
1763
1999
  *
1764
2000
  * @param guildId - The ID of the guild to get the scheduled event from.
1765
2001
  * @param eventId - The ID of the scheduled event to get.
1766
2002
  * @param options - The parameters for the fetching of the scheduled event.
1767
- * @returns An instance of {@link ScheduledEvent}.
2003
+ * @returns An instance of {@link DiscordScheduledEvent}.
1768
2004
  *
1769
2005
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}
1770
2006
  */
1771
2007
  getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
1772
2008
  withUserCount?: boolean;
1773
- }) => Promise<CamelizedDiscordScheduledEvent>;
2009
+ }) => Promise<Camelize<DiscordScheduledEvent>>;
1774
2010
  /**
1775
2011
  * Gets the list of scheduled events for a guild.
1776
2012
  *
1777
2013
  * @param guildId - The ID of the guild to get the scheduled events from.
1778
2014
  * @param options - The parameters for the fetching of the scheduled events.
1779
- * @returns A collection of {@link ScheduledEvent} objects assorted by event ID.
2015
+ * @returns A collection of {@link DiscordScheduledEvent} objects assorted by event ID.
1780
2016
  *
1781
2017
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
1782
2018
  */
1783
- getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<CamelizedDiscordScheduledEvent[]>;
2019
+ getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent>[]>;
1784
2020
  /**
1785
2021
  * Gets the list of subscribers to a scheduled event from a guild.
1786
2022
  *
1787
2023
  * @param guildId - The ID of the guild to get the subscribers to the scheduled event from.
1788
2024
  * @param eventId - The ID of the scheduled event to get the subscribers of.
1789
2025
  * @param options - The parameters for the fetching of the subscribers.
1790
- * @returns A collection of {@link User} objects assorted by user ID.
2026
+ * @returns A collection of {@link DiscordUser} objects assorted by user ID.
1791
2027
  *
1792
2028
  * @remarks
1793
2029
  * Requires the `MANAGE_EVENTS` permission.
@@ -1797,51 +2033,70 @@ export interface RestManager {
1797
2033
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
1798
2034
  */
1799
2035
  getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
1800
- user: CamelizedDiscordUser;
1801
- member?: CamelizedDiscordMember;
2036
+ user: Camelize<DiscordUser>;
2037
+ member?: Camelize<DiscordMember>;
1802
2038
  }>>;
1803
2039
  /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1804
- getSessionInfo: () => Promise<CamelizedDiscordGetGatewayBot>;
2040
+ getSessionInfo: () => Promise<Camelize<DiscordGetGatewayBot>>;
1805
2041
  /**
1806
2042
  * Gets the stage instance associated with a stage channel, if one exists.
1807
2043
  *
1808
2044
  * @param channelId - The ID of the stage channel the stage instance is associated with.
1809
- * @returns An instance of {@link CamelizedDiscordStageInstance}.
2045
+ * @returns An instance of {@link DiscordStageInstance}.
1810
2046
  *
1811
2047
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
1812
2048
  */
1813
- getStageInstance: (channelId: BigString) => Promise<CamelizedDiscordStageInstance>;
2049
+ getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
2050
+ /**
2051
+ * Returns the current user's voice state in the guild.
2052
+ *
2053
+ * @param guildId - The ID of the guild to get the voice state from.
2054
+ * @returns An instance of {@link DiscordVoiceState}.
2055
+ *
2056
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-current-user-voice-state}
2057
+ */
2058
+ getOwnVoiceState: (guildId: BigString) => Promise<Camelize<DiscordVoiceState>>;
2059
+ /**
2060
+ * Returns the specified user's voice state in the guild.
2061
+ *
2062
+ * @param guildId - The ID of the guild to get the voice state from.
2063
+ * @param userId - The ID of the user to get the voice state from
2064
+ * @returns An instance of {@link DiscordVoiceState}.
2065
+ *
2066
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-user-voice-state}
2067
+ */
2068
+ getUserVoiceState: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordVoiceState>>;
1814
2069
  /**
1815
2070
  * Returns a sticker object for the given sticker ID.
1816
2071
  *
1817
2072
  * @param stickerId The ID of the sticker to get
1818
- * @returns A {@link CamelizedDiscordSticker}
2073
+ * @returns A {@link DiscordSticker}
1819
2074
  *
1820
2075
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
1821
2076
  */
1822
- getSticker: (stickerId: BigString) => Promise<CamelizedDiscordSticker>;
2077
+ getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
1823
2078
  /**
1824
2079
  * Gets a thread member by their user ID.
1825
2080
  *
1826
2081
  * @param channelId - The ID of the thread to get the thread member of.
1827
2082
  * @param userId - The user ID of the thread member to get.
1828
- * @returns An instance of {@link CamelizedDiscordThreadMember}.
2083
+ * @returns An instance of {@link DiscordThreadMember}.
1829
2084
  *
1830
2085
  * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
1831
2086
  */
1832
- getThreadMember: (channelId: BigString, userId: BigString) => Promise<CamelizedDiscordThreadMember>;
2087
+ getThreadMember: (channelId: BigString, userId: BigString) => Promise<Camelize<DiscordThreadMember>>;
1833
2088
  /**
1834
2089
  * Gets the list of thread members for a thread.
1835
2090
  *
1836
2091
  * @param channelId - The ID of the thread to get the thread members of.
1837
- * @returns A collection of {@link CamelizedDiscordThreadMember} assorted by user ID.
2092
+ * @returns A collection of {@link DiscordThreadMember} assorted by user ID.
1838
2093
  *
1839
2094
  * @remarks
1840
2095
  * Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
1841
2096
  *
1842
2097
  * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
1843
2098
  */
1844
- getThreadMembers: (channelId: BigString) => Promise<CamelizedDiscordThreadMember[]>;
2099
+ getThreadMembers: (channelId: BigString) => Promise<Camelize<DiscordThreadMember>[]>;
1845
2100
  /**
1846
2101
  * Gets the list of users that reacted with an emoji to a message.
1847
2102
  *
@@ -1849,23 +2104,58 @@ export interface RestManager {
1849
2104
  * @param messageId - The ID of the message to get the users for.
1850
2105
  * @param reaction - The reaction for which to get the users.
1851
2106
  * @param options - The parameters for the fetching of the users.
1852
- * @returns A collection of {@link User} objects assorted by user ID.
2107
+ * @returns A collection of {@link DiscordUser} objects assorted by user ID.
1853
2108
  *
1854
2109
  * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
1855
2110
  */
1856
- getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<CamelizedDiscordUser[]>;
2111
+ getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser>[]>;
1857
2112
  /**
1858
2113
  * Get a user's data from the api
1859
2114
  *
1860
2115
  * @param id The user's id
1861
- * @returns {CamelizedDiscordUser}
2116
+ * @returns {DiscordUser}
1862
2117
  */
1863
- getUser: (id: BigString) => Promise<CamelizedDiscordUser>;
2118
+ getUser: (id: BigString) => Promise<Camelize<DiscordUser>>;
2119
+ /**
2120
+ * Get the current user data.
2121
+ *
2122
+ * @param bearerToken - The access token of the user
2123
+ * @returns {DiscordUser}
2124
+ *
2125
+ * @remarks
2126
+ * This requires the `identify` scope.
2127
+ *
2128
+ * To get the mail this also requires the `email` scope
2129
+ */
2130
+ getCurrentUser: (bearerToken: string) => Promise<Camelize<DiscordUser>>;
2131
+ /**
2132
+ * Get the current user connections.
2133
+ *
2134
+ * @param bearerToken - The access token of the user
2135
+ * @returns {DiscordConnection[]}
2136
+ *
2137
+ * @remarks
2138
+ * This requires the `connections` scope.
2139
+ */
2140
+ getUserConnections: (bearerToken: string) => Promise<Camelize<DiscordConnection>[]>;
2141
+ /**
2142
+ * Get the current user application role connection for the application.
2143
+ *
2144
+ * @param bearerToken - The access token of the user
2145
+ * @param applicationId - The id of the application to get the role connection
2146
+ * @returns {DiscordApplicationRoleConnection}
2147
+ *
2148
+ * @remarks
2149
+ * The access token requires the `role_connections.write` scope.
2150
+ *
2151
+ * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection}
2152
+ */
2153
+ getUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString) => Promise<Camelize<DiscordApplicationRoleConnection>>;
1864
2154
  /**
1865
2155
  * Gets information about the vanity url of a guild.
1866
2156
  *
1867
2157
  * @param guildId - The ID of the guild to get the vanity url information for.
1868
- * @returns An instance of {@link VanityUrl}.
2158
+ * @returns An instance of {@link DiscordVanityUrl}.
1869
2159
  *
1870
2160
  * @remarks
1871
2161
  * Requires the `MANAGE_GUILD` permission.
@@ -1874,28 +2164,28 @@ export interface RestManager {
1874
2164
  *
1875
2165
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
1876
2166
  */
1877
- getVanityUrl: (guildId: BigString) => Promise<CamelizedDiscordVanityUrl>;
2167
+ getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
1878
2168
  /**
1879
2169
  * Gets the list of voice regions for a guild.
1880
2170
  *
1881
2171
  * @param guildId - The ID of the guild to get the voice regions for.
1882
- * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
2172
+ * @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
1883
2173
  *
1884
2174
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
1885
2175
  */
1886
- getVoiceRegions: (guildId: BigString) => Promise<CamelizedDiscordVoiceRegion[]>;
2176
+ getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion>[]>;
1887
2177
  /**
1888
2178
  * Gets a webhook by its ID.
1889
2179
  *
1890
2180
  * @param webhookId - The ID of the webhook to get.
1891
- * @returns An instance of {@link CamelizedDiscordWebhook}.
2181
+ * @returns An instance of {@link DiscordWebhook}.
1892
2182
  *
1893
2183
  * @remarks
1894
- * Requires the `MANAGE_WEBHOOKS` permission.
2184
+ * Requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook.
1895
2185
  *
1896
2186
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}
1897
2187
  */
1898
- getWebhook: (webhookId: BigString) => Promise<CamelizedDiscordWebhook>;
2188
+ getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
1899
2189
  /**
1900
2190
  * Gets a webhook message by its ID.
1901
2191
  *
@@ -1903,26 +2193,26 @@ export interface RestManager {
1903
2193
  * @param token - The webhook token, used to get webhook messages.
1904
2194
  * @param messageId - the ID of the webhook message to get.
1905
2195
  * @param options - The parameters for the fetching of the message.
1906
- * @returns An instance of {@link CamelizedDiscordMessage}.
2196
+ * @returns An instance of {@link DiscordMessage}.
1907
2197
  *
1908
2198
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}
1909
2199
  */
1910
- getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<CamelizedDiscordMessage>;
2200
+ getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
1911
2201
  /**
1912
2202
  * Gets a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1913
2203
  *
1914
2204
  * @param webhookId - The ID of the webhook to get.
1915
2205
  * @param token - The webhook token, used to get the webhook.
1916
- * @returns An instance of {@link CamelizedDiscordWebhook}.
2206
+ * @returns An instance of {@link DiscordWebhook}.
1917
2207
  *
1918
2208
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
1919
2209
  */
1920
- getWebhookWithToken: (webhookId: BigString, token: string) => Promise<CamelizedDiscordWebhook>;
2210
+ getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
1921
2211
  /**
1922
2212
  * Gets the welcome screen for a guild.
1923
2213
  *
1924
2214
  * @param guildId - The ID of the guild to get the welcome screen for.
1925
- * @returns An instance of {@link WelcomeScreen}.
2215
+ * @returns An instance of {@link DiscordWelcomeScreen}.
1926
2216
  *
1927
2217
  * @remarks
1928
2218
  * If the welcome screen is not enabled:
@@ -1930,28 +2220,31 @@ export interface RestManager {
1930
2220
  *
1931
2221
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
1932
2222
  */
1933
- getWelcomeScreen: (guildId: BigString) => Promise<CamelizedDiscordWelcomeScreen>;
2223
+ getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
1934
2224
  /**
1935
2225
  * Gets the guild widget by guild ID.
1936
2226
  *
1937
2227
  * @param guildId - The ID of the guild to get the widget of.
1938
- * @returns An instance of {@link GuildWidget}.
2228
+ * @returns An instance of {@link DiscordGuildWidget}.
2229
+ *
2230
+ * @remarks
2231
+ * Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
1939
2232
  *
1940
2233
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
1941
2234
  */
1942
- getWidget: (guildId: BigString) => Promise<CamelizedDiscordGuildWidget>;
2235
+ getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
1943
2236
  /**
1944
2237
  * Gets the settings of a guild's widget.
1945
2238
  *
1946
2239
  * @param guildId - The ID of the guild to get the widget of.
1947
- * @returns An instance of {@link GuildWidgetSettings}.
2240
+ * @returns An instance of {@link DiscordGuildWidgetSettings}.
1948
2241
  *
1949
2242
  * @remarks
1950
2243
  * Requires the `MANAGE_GUILD` permission.
1951
2244
  *
1952
2245
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
1953
2246
  */
1954
- getWidgetSettings: (guildId: BigString) => Promise<CamelizedDiscordGuildWidgetSettings>;
2247
+ getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
1955
2248
  /**
1956
2249
  * Adds the bot user to a thread.
1957
2250
  *
@@ -1994,7 +2287,7 @@ export interface RestManager {
1994
2287
  *
1995
2288
  * @param channelId - The ID of the announcement channel.
1996
2289
  * @param messageId - The ID of the message to cross-post.
1997
- * @returns An instance of the cross-posted {@link Message}.
2290
+ * @returns An instance of the cross-posted {@link DiscordMessage}.
1998
2291
  *
1999
2292
  * @remarks
2000
2293
  * Requires the `SEND_MESSAGES` permission.
@@ -2006,7 +2299,7 @@ export interface RestManager {
2006
2299
  *
2007
2300
  * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
2008
2301
  */
2009
- publishMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
2302
+ publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
2010
2303
  /**
2011
2304
  * Removes a role from a member.
2012
2305
  *
@@ -2030,7 +2323,7 @@ export interface RestManager {
2030
2323
  * @param userId - The user ID of the thread member to remove.
2031
2324
  *
2032
2325
  * @remarks
2033
- * If the thread is of type {@link ChannelTypes.GuildPrivateThread}, requires to be the creator of the thread.
2326
+ * If the thread is of type {@link ChannelTypes}.GuildPrivateThread, requires to be the creator of the thread.
2034
2327
  * Otherwise, requires the `MANAGE_THREADS` permission.
2035
2328
  *
2036
2329
  * Requires the thread not be archived.
@@ -2040,12 +2333,21 @@ export interface RestManager {
2040
2333
  * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}
2041
2334
  */
2042
2335
  removeThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
2336
+ /**
2337
+ * Removes a member from a Group DM.
2338
+ *
2339
+ * @param channelId - The ID of the channel to remove the recipient user of.
2340
+ * @param userId - The user ID of the user to remove.
2341
+ *
2342
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient}
2343
+ */
2344
+ removeDmRecipient: (channelId: BigString, userId: BigString) => Promise<void>;
2043
2345
  /**
2044
2346
  * Sends a message to a channel.
2045
2347
  *
2046
2348
  * @param channelId - The ID of the channel to send the message in.
2047
2349
  * @param options - The parameters for the creation of the message.
2048
- * @returns An instance of the created {@link CamelizedDiscordMessage}.
2350
+ * @returns An instance of the created {@link DiscordMessage}.
2049
2351
  *
2050
2352
  * @remarks
2051
2353
  * Requires that the bot user be able to see the contents of the channel the message is to be sent in.
@@ -2066,13 +2368,13 @@ export interface RestManager {
2066
2368
  *
2067
2369
  * @see {@link https://discord.com/developers/docs/resources/channel#create-message}
2068
2370
  */
2069
- sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<CamelizedDiscordMessage>;
2371
+ sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
2070
2372
  /**
2071
2373
  * Sends a follow-up message to an interaction.
2072
2374
  *
2073
2375
  * @param token - The interaction token to use, provided in the original interaction.
2074
2376
  * @param options - The parameters for the creation of the message.
2075
- * @returns An instance of the created {@link Message}.
2377
+ * @returns An instance of the created {@link DiscordMessage}.
2076
2378
  *
2077
2379
  * @remarks
2078
2380
  * ⚠️ Interaction tokens are only valid for _15 minutes_.
@@ -2083,18 +2385,22 @@ export interface RestManager {
2083
2385
  * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.)
2084
2386
  * - Requiring the `MESSAGE_CONTENT` intent.
2085
2387
  *
2388
+ * 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
2389
+ * 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}.
2390
+ *
2086
2391
  * Fires a _Message Create_ event.
2087
2392
  *
2088
2393
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
2089
2394
  */
2090
- sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
2395
+ sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
2091
2396
  /**
2092
2397
  * Sends a response to an interaction.
2093
2398
  *
2094
2399
  * @param interactionId - The ID of the interaction to respond to.
2095
2400
  * @param token - The interaction token to use, provided in the original interaction.
2096
2401
  * @param options - The parameters for the creation of the message.
2097
- * @returns An instance of the created {@link Message}.
2402
+ * @param params - The query parameters for the response of the callback
2403
+ * @returns Nothing or the {@link DiscordInteractionCallbackResponse} if withResponse param is true
2098
2404
  *
2099
2405
  * @remarks
2100
2406
  * ⚠️ Interaction tokens are only valid for _15 minutes_.
@@ -2109,7 +2415,7 @@ export interface RestManager {
2109
2415
  *
2110
2416
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
2111
2417
  */
2112
- sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse) => Promise<void>;
2418
+ sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse, params?: InteractionCallbackOptions) => Promise<void | Camelize<DiscordInteractionCallbackResponse>>;
2113
2419
  /**
2114
2420
  * Creates a thread, using an existing message as its point of origin.
2115
2421
  *
@@ -2117,12 +2423,12 @@ export interface RestManager {
2117
2423
  * @param messageId - The ID of the message to use as the thread's point of origin.
2118
2424
  * @param options - The parameters to use for the creation of the thread.
2119
2425
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2120
- * @returns An instance of the created {@link Channel | Thread}.
2426
+ * @returns An instance of the created {@link DiscordChannel}.
2121
2427
  *
2122
2428
  * @remarks
2123
- * If called on a channel of type {@link ChannelTypes.GuildText}, creates a {@link ChannelTypes.GuildPublicThread}.
2124
- * If called on a channel of type {@link ChannelTypes.GuildNews}, creates a {@link ChannelTypes.GuildNewsThread}.
2125
- * Does not work on channels of type {@link ChannelTypes.GuildForum}.
2429
+ * If called on a channel of type {@link ChannelTypes}.GuildText, creates a {@link ChannelTypes}.GuildPublicThread.
2430
+ * If called on a channel of type {@link ChannelTypes}.GuildNews, creates a {@link ChannelTypes}.GuildNewsThread.
2431
+ * Does not work on channels of type {@link ChannelTypes}.GuildForum.
2126
2432
  *
2127
2433
  * The ID of the created thread will be the same as the ID of the source message.
2128
2434
  *
@@ -2130,14 +2436,14 @@ export interface RestManager {
2130
2436
  *
2131
2437
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
2132
2438
  */
2133
- startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2439
+ startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
2134
2440
  /**
2135
2441
  * Creates a thread without using a message as the thread's point of origin.
2136
2442
  *
2137
2443
  * @param channelId - The ID of the channel in which to create the thread.
2138
2444
  * @param options - The parameters to use for the creation of the thread.
2139
2445
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2140
- * @returns An instance of the created {@link CamelizedDiscordChannel | Thread}.
2446
+ * @returns An instance of the created {@link DiscordChannel | Thread}.
2141
2447
  *
2142
2448
  * @remarks
2143
2449
  * Creating a private thread requires the server to be boosted.
@@ -2146,12 +2452,35 @@ export interface RestManager {
2146
2452
  *
2147
2453
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
2148
2454
  */
2149
- startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
2455
+ startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
2456
+ /**
2457
+ * Get a list of users that voted for this specific answer.
2458
+ *
2459
+ * @param channelId - The ID of the channel in which the message with the poll lives
2460
+ * @param messageId - The ID of the message in which the poll lives
2461
+ * @param answerId - The ID of the answer to get the users that voted that answer
2462
+ * @param options - The options for the request
2463
+ * @returns The list of users that voted for the specific answer.
2464
+ */
2465
+ getPollAnswerVoters: (channelId: BigString, messageId: BigString, answerId: number, options?: GetPollAnswerVotes) => Promise<Camelize<DiscordGetAnswerVotesResponse>>;
2466
+ /**
2467
+ * Immediately ends the poll.
2468
+ *
2469
+ * @param channelId - The ID of the channel in which the message with the poll lives
2470
+ * @param messageId - The ID of the message in which the poll lives
2471
+ * @returns The message with the expired poll
2472
+ *
2473
+ * @remarks
2474
+ * You cannot end polls from other users.
2475
+ *
2476
+ * Fires a _Message Update_ gateway event
2477
+ */
2478
+ endPoll: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
2150
2479
  /**
2151
2480
  * Synchronises a template with the current state of a guild.
2152
2481
  *
2153
2482
  * @param guildId - The ID of the guild to synchronise a template of.
2154
- * @returns An instance of the edited {@link Template}.
2483
+ * @returns An instance of the edited {@link DiscordTemplate}.
2155
2484
  *
2156
2485
  * @remarks
2157
2486
  * Requires the `MANAGE_GUILD` permission.
@@ -2160,14 +2489,16 @@ export interface RestManager {
2160
2489
  *
2161
2490
  * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
2162
2491
  */
2163
- syncGuildTemplate: (guildId: BigString) => Promise<CamelizedDiscordTemplate>;
2492
+ syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
2164
2493
  /**
2165
- * Triggers a typing indicator for the bot user.
2494
+ * Triggers a typing indicator for the specified channel, which expires after 10 seconds.
2166
2495
  *
2167
2496
  * @param channelId - The ID of the channel in which to trigger the typing indicator.
2168
2497
  *
2169
2498
  * @remarks
2170
- * Generally, bots should _not_ use this route.
2499
+ * Generally bots should **not** use this route.
2500
+ * However, if a bot is responding to a command and expects the computation to take a few seconds,
2501
+ * this endpoint may be called to let the user know that the bot is processing their message.
2171
2502
  *
2172
2503
  * Fires a _Typing Start_ gateway event.
2173
2504
  *
@@ -2178,38 +2509,46 @@ export interface RestManager {
2178
2509
  * Re-registers the list of global application commands, overwriting the previous commands completely.
2179
2510
  *
2180
2511
  * @param commands - The list of commands to use to overwrite the previous list.
2181
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
2512
+ * @param options - Additional options for the endpoint.
2513
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
2182
2514
  *
2183
2515
  * @remarks
2184
2516
  * ❗ Commands that are not present in the `commands` array will be __deleted__.
2185
2517
  *
2186
2518
  * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2187
2519
  *
2520
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
2521
+ * You will be able to update only your own application commands
2522
+ *
2188
2523
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
2189
2524
  */
2190
- upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2525
+ upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
2191
2526
  /**
2192
2527
  * Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
2193
2528
  *
2194
2529
  * @param guildId - The ID of the guild whose list of commands to overwrite.
2195
2530
  * @param commands - The list of commands to use to overwrite the previous list.
2196
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
2531
+ * @param options - Additional options for the endpoint.
2532
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
2197
2533
  *
2198
2534
  * @remarks
2199
2535
  * ❗ Commands that are not present in the `commands` array will be __deleted__.
2200
2536
  *
2201
2537
  * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2202
2538
  *
2539
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
2540
+ * You will be able to update only your own application commands
2541
+ *
2203
2542
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
2204
2543
  */
2205
- upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2544
+ upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
2206
2545
  /**
2207
2546
  * Bans a user from a guild.
2208
2547
  *
2209
2548
  * @param guildId - The ID of the guild to ban the user from.
2210
2549
  * @param userId - The ID of the user to ban from the guild.
2211
- * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2212
2550
  * @param options - The parameters for the creation of the ban.
2551
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2213
2552
  *
2214
2553
  * @remarks
2215
2554
  * Requires the `BAN_MEMBERS` permission.
@@ -2219,20 +2558,37 @@ export interface RestManager {
2219
2558
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
2220
2559
  */
2221
2560
  banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
2561
+ /**
2562
+ * Bans up to 200 users from a guild.
2563
+ *
2564
+ * @param guildId - The ID of the guild to ban the users from.
2565
+ * @param options - The users to ban and the other options for the ban.
2566
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2567
+ *
2568
+ * @remarks
2569
+ * Requires the `BAN_MEMBERS` and `MANAGE_GUILD` permissions.
2570
+ *
2571
+ * If all provided users fail to be banned, discord will respond with an error (code: `500000: Failed to ban users`)
2572
+ *
2573
+ * Fires as many _Guild Ban Add_ gateway events as many user where banned.
2574
+ *
2575
+ * @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban}
2576
+ */
2577
+ bulkBanMembers: (guildId: BigString, options: CreateGuildBulkBan, reason?: string) => Promise<Camelize<DiscordBulkBan>>;
2222
2578
  /**
2223
2579
  * Edits the nickname of the bot user.
2224
2580
  *
2225
2581
  * @param guildId - The ID of the guild to edit the nickname of the bot user in.
2226
2582
  * @param options - The parameters for the edit of the nickname.
2227
2583
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2228
- * @returns An instance of the edited {@link CamelizedDiscordMember}
2584
+ * @returns An instance of the edited {@link DiscordMember}
2229
2585
  *
2230
2586
  * @remarks
2231
2587
  * Fires a _Guild Member Update_ gateway event.
2232
2588
  *
2233
2589
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
2234
2590
  */
2235
- editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<CamelizedDiscordMember>;
2591
+ editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<Camelize<DiscordMember>>;
2236
2592
  /**
2237
2593
  * Edits a member's properties.
2238
2594
  *
@@ -2249,24 +2605,37 @@ export interface RestManager {
2249
2605
  *
2250
2606
  * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
2251
2607
  */
2252
- editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<CamelizedDiscordMember>;
2608
+ editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<Camelize<DiscordMember>>;
2253
2609
  /**
2254
2610
  * Gets the member object by user ID.
2255
2611
  *
2256
2612
 
2257
2613
  * @param guildId - The ID of the guild to get the member object for.
2258
2614
  * @param userId - The ID of the user to get the member object for.
2259
- * @returns An instance of {@link CamelizedDiscordMemberWithUser}.
2615
+ * @returns An instance of {@link DiscordMemberWithUser}.
2260
2616
  *
2261
2617
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
2262
2618
  */
2263
- getMember: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordMemberWithUser>;
2619
+ getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
2620
+ /**
2621
+ * Gets the current member object.
2622
+ *
2623
+ * @param bearerToken - The access token of the user
2624
+ * @param guildId - The ID of the guild to get the member object for.
2625
+ * @returns An instance of {@link DiscordMemberWithUser}.
2626
+ *
2627
+ * @remarks
2628
+ * The access tokens needs the `guilds.members.read` scope
2629
+ *
2630
+ * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}
2631
+ */
2632
+ getCurrentMember: (guildId: BigString, bearerToken: string) => Promise<Camelize<DiscordMemberWithUser>>;
2264
2633
  /**
2265
2634
  * Gets the list of members for a guild.
2266
2635
  *
2267
2636
  * @param guildId - The ID of the guild to get the list of members for.
2268
2637
  * @param options - The parameters for the fetching of the members.
2269
- * @returns A collection of {@link CamelizedDiscordMemberWithUser} objects assorted by user ID.
2638
+ * @returns A collection of {@link DiscordMemberWithUser} objects assorted by user ID.
2270
2639
  *
2271
2640
  * @remarks
2272
2641
  * Requires the `GUILD_MEMBERS` intent.
@@ -2279,7 +2648,14 @@ export interface RestManager {
2279
2648
  * @see {@link https://discord.com/developers/docs/topics/gateway#request-guild-members}
2280
2649
  * @see {@link https://discord.com/developers/docs/topics/rate-limits#rate-limits}
2281
2650
  */
2282
- getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<CamelizedDiscordMemberWithUser[]>;
2651
+ getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser>[]>;
2652
+ /**
2653
+ * Returns a serialized activity instance, if it exists. Useful for preventing unwanted activity sessions.
2654
+ *
2655
+ * @param applicationId - The ID of the application
2656
+ * @param instanceId - The ID of the activity instance
2657
+ */
2658
+ getApplicationActivityInstance: (applicationId: BigString, instanceId: string) => Promise<Camelize<DiscordActivityInstance>>;
2283
2659
  /**
2284
2660
  * Kicks a member from a guild.
2285
2661
  *
@@ -2325,7 +2701,7 @@ export interface RestManager {
2325
2701
  * @returns A number indicating how many members were pruned.
2326
2702
  *
2327
2703
  * @remarks
2328
- * Requires the `KICK_MEMBERS` permission.
2704
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
2329
2705
  *
2330
2706
  * ❗ 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.
2331
2707
  *
@@ -2345,11 +2721,11 @@ export interface RestManager {
2345
2721
  * @param guildId - The ID of the guild to search in.
2346
2722
  * @param query - The string to match usernames or nicknames against.
2347
2723
  * @param options - The parameters for searching through the members.
2348
- * @returns A collection of {@link CamelizedDiscordMember} objects assorted by user ID.
2724
+ * @returns A collection of {@link DiscordMember} objects assorted by user ID.
2349
2725
  *
2350
2726
  * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
2351
2727
  */
2352
- searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<CamelizedDiscordMemberWithUser[]>;
2728
+ searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser>[]>;
2353
2729
  /**
2354
2730
  * Unbans a user from a guild.
2355
2731
  *
@@ -2383,15 +2759,155 @@ export interface RestManager {
2383
2759
  * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
2384
2760
  */
2385
2761
  unpinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
2762
+ /**
2763
+ * Get the guild onboarding
2764
+ *
2765
+ * @param guildId - The guild to get the onboarding from
2766
+ */
2767
+ getGuildOnboarding: (guildId: BigString) => Promise<Camelize<DiscordGuildOnboarding>>;
2768
+ /**
2769
+ * Modifies the onboarding configuration of the guild.
2770
+ *
2771
+ * @param guildId - The guild to get the onboarding from
2772
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2773
+ *
2774
+ * @remarks
2775
+ * Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions.
2776
+ *
2777
+ * Onboarding enforces constraints when enabled. These constraints are:
2778
+ * - at least 7 default channels
2779
+ * - at least 5 of the 7 channels must allow sending messages to the \@everyone role
2780
+ *
2781
+ * The `mode` field modifies what is considered when enforcing these constraints.
2782
+ */
2783
+ editGuildOnboarding: (guildId: BigString, options: EditGuildOnboarding, reason?: string) => Promise<Camelize<DiscordGuildOnboarding>>;
2784
+ /**
2785
+ * Returns all entitlements for a given app, active and expired.
2786
+ *
2787
+ * @param applicationId - The id of the application to get the entitlements
2788
+ * @param {GetEntitlements} [options] - The optional query params for the endpoint
2789
+ */
2790
+ listEntitlements: (applicationId: BigString, options?: GetEntitlements) => Promise<Camelize<DiscordEntitlement>[]>;
2791
+ /**
2792
+ * 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.
2793
+ *
2794
+ * @param applicationId - The id of the application to create the entitlement
2795
+ * @param body - The options for new entitlement
2796
+ *
2797
+ * @remarks
2798
+ * This endpoint returns a partial entitlement object.
2799
+ * It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity.
2800
+ */
2801
+ createTestEntitlement: (applicationId: BigString, body: CreateEntitlement) => Promise<Partial<Camelize<DiscordEntitlement>>>;
2802
+ /**
2803
+ * Deletes a currently-active test entitlement. Discord will act as though that user or guild no longer has entitlement to your premium offering.
2804
+ *
2805
+ * @param applicationId - The id of the application from where delete the entitlement
2806
+ * @param entitlementId - The id of the entitlement to delete
2807
+ */
2808
+ deleteTestEntitlement: (applicationId: BigString, entitlementId: BigString) => Promise<void>;
2809
+ /**
2810
+ * 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}
2811
+ */
2812
+ consumeEntitlement: (applicationId: BigString, entitlementId: BigString) => Promise<void>;
2813
+ /**
2814
+ * Returns all SKUs for a given application
2815
+ *
2816
+ * @param applicationId - The id of the application to get the SKUs
2817
+ */
2818
+ listSkus: (applicationId: BigString) => Promise<Camelize<DiscordSku>[]>;
2819
+ /**
2820
+ * Returns all subscriptions containing the SKU, filtered by user.
2821
+ *
2822
+ * @param skuId - The id of the sku of get the subscriptions for
2823
+ */
2824
+ listSubscriptions: (skuId: BigString, options?: ListSkuSubscriptionsOptions) => Promise<Camelize<DiscordSubscription[]>>;
2825
+ /**
2826
+ * Get a subscription by its ID.
2827
+ *
2828
+ * @param skuId - The id of the sku of get the subscriptions for
2829
+ */
2830
+ getSubscription: (skuId: BigString, subscriptionId: BigString) => Promise<Camelize<DiscordSubscription>>;
2831
+ /**
2832
+ * Send a soundboard sound to a voice channel the user is connected to.
2833
+ *
2834
+ * @param channelId - The id of the voice channel
2835
+ *
2836
+ * @remarks
2837
+ * Fires a _Voice Channel Effect Send_ Gateway event.
2838
+ *
2839
+ * Requires the `SPEAK` and `USE_SOUNDBOARD` permissions, and also the `USE_EXTERNAL_SOUNDS` permission if the sound is from a different server.
2840
+ * Additionally, requires the user to be connected to the voice channel, having a voice state without `deaf`, `self_deaf`, `mute`, or `suppress` enabled.
2841
+ */
2842
+ sendSoundboardSound: (channelId: BigString, options: SendSoundboardSound) => Promise<void>;
2843
+ /** Returns an array of soundboard sound objects that can be used by all users. */
2844
+ listDefaultSoundboardSounds: () => Promise<Camelize<DiscordSoundboardSound>[]>;
2845
+ /**
2846
+ * Returns a list of the guild's soundboard sounds.
2847
+ *
2848
+ * @param guildId - The guild to get the sounds from
2849
+ *
2850
+ * @remarks
2851
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2852
+ */
2853
+ listGuildSoundboardSounds: (guildId: BigString) => Promise<{
2854
+ items: Camelize<DiscordSoundboardSound>[];
2855
+ }>;
2856
+ /**
2857
+ * Returns a soundboard sound object for the given sound id.
2858
+ *
2859
+ * @param guildId - The guild to get the sounds from
2860
+ * @param soundId - The sound id
2861
+ *
2862
+ * @remarks
2863
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2864
+ */
2865
+ getGuildSoundboardSound: (guildId: BigString, soundId: BigString) => Promise<Camelize<DiscordSoundboardSound>>;
2866
+ /**
2867
+ * Create a new soundboard sound for the guild.
2868
+ *
2869
+ * @param guildId - The guild to create the sounds in
2870
+ * @param options - The options to create the sound
2871
+ * @param reason - The audit log reason
2872
+ *
2873
+ * @remarks
2874
+ * Fires a _Guild Soundboard Sound Create_ Gateway event.
2875
+ *
2876
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
2877
+ */
2878
+ createGuildSoundboardSound: (guildId: BigString, options: CreateGuildSoundboardSound, reason?: string) => Promise<Camelize<DiscordSoundboardSound>>;
2879
+ /**
2880
+ * Modify the given soundboard sound.
2881
+ *
2882
+ * @param guildId - The guild to create the sounds in
2883
+ * @param soundId - The sound id to update
2884
+ * @param options - The options to update the sound
2885
+ * @param reason - The audit log reason
2886
+ *
2887
+ * @remarks
2888
+ * Fires a _Guild Soundboard Sound Update_ Gateway event.
2889
+ *
2890
+ * For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2891
+ * For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
2892
+ */
2893
+ modifyGuildSoundboardSound: (guildId: BigString, soundId: BigString, options: ModifyGuildSoundboardSound, reason?: string) => Promise<Camelize<DiscordSoundboardSound>>;
2894
+ /**
2895
+ * Delete the given soundboard sound.
2896
+ *
2897
+ * @param guildId - The guild to create the sounds in
2898
+ * @param soundId - The sound id to delete
2899
+ * @param reason - The audit log reason
2900
+ *
2901
+ * @remarks
2902
+ * Fires a _Guild Soundboard Sound Delete_ Gateway event.
2903
+ *
2904
+ * For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2905
+ * For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
2906
+ */
2907
+ deleteGuildSoundboardSound: (guildId: BigString, soundId: BigString, reason?: string) => Promise<void>;
2386
2908
  }
2387
2909
  export type RequestMethods = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT';
2388
2910
  export type ApiVersions = 9 | 10;
2389
- export interface CreateWebhook {
2390
- /** Name of the webhook (1-80 characters) */
2391
- name: string;
2392
- /** Image url for the default webhook avatar */
2393
- avatar?: string | null;
2394
- }
2395
2911
  export interface CreateRequestBodyOptions {
2396
2912
  headers?: Record<string, string>;
2397
2913
  body?: any;
@@ -2433,41 +2949,6 @@ export interface RestRateLimitedPath {
2433
2949
  resetTimestamp: number;
2434
2950
  bucketId?: string;
2435
2951
  }
2436
- export interface WebhookMessageEditor {
2437
- /**
2438
- * Edits a webhook message.
2439
- *
2440
- * @param webhookId - The ID of the webhook to edit the message of.
2441
- * @param token - The webhook token, used to edit the message.
2442
- * @param messageId - The ID of the message to edit.
2443
- * @param options - The parameters for the edit of the message.
2444
- * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2445
- *
2446
- * @remarks
2447
- * Fires a _Message Update_ gateway event.
2448
- *
2449
- * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message}
2450
- */
2451
- (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
2452
- threadId?: BigString;
2453
- }): Promise<CamelizedDiscordMessage>;
2454
- /**
2455
- * Edits the original webhook message.
2456
- *
2457
- * @param webhookId - The ID of the webhook to edit the original message of.
2458
- * @param token - The webhook token, used to edit the message.
2459
- * @param options - The parameters for the edit of the message.
2460
- * @returns An instance of the edited {@link CamelizedDiscordMessage}.
2461
- *
2462
- * @remarks
2463
- * Fires a _Message Update_ gateway event.
2464
- *
2465
- * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message}
2466
- */
2467
- original: (webhookId: BigString, token: string, options: InteractionCallbackData & {
2468
- threadId?: BigString;
2469
- }) => Promise<CamelizedDiscordMessage>;
2470
- }
2471
2952
  export interface RestRequestResponse {
2472
2953
  ok: boolean;
2473
2954
  status: number;