@discordeno/rest 19.0.0-next.da74ea7 → 19.0.0-next.dbf4fda

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 (52) hide show
  1. package/README.md +15 -1
  2. package/dist/cjs/index.cjs +25 -0
  3. package/dist/cjs/invalidBucket.cjs +86 -0
  4. package/dist/cjs/manager.cjs +1535 -0
  5. package/dist/cjs/queue.cjs +164 -0
  6. package/dist/cjs/routes.cjs +589 -0
  7. package/dist/cjs/types.cjs +6 -0
  8. package/dist/cjs/typings/routes.cjs +6 -0
  9. package/dist/esm/index.js +8 -0
  10. package/dist/esm/invalidBucket.js +82 -0
  11. package/dist/esm/manager.js +1493 -0
  12. package/dist/esm/queue.js +154 -0
  13. package/dist/esm/routes.js +579 -0
  14. package/dist/esm/types.js +3 -0
  15. package/dist/esm/typings/routes.js +3 -0
  16. package/dist/types/index.d.ts.map +1 -0
  17. package/dist/{invalidBucket.d.ts → types/invalidBucket.d.ts} +11 -7
  18. package/dist/types/invalidBucket.d.ts.map +1 -0
  19. package/dist/types/manager.d.ts +12 -0
  20. package/dist/types/manager.d.ts.map +1 -0
  21. package/dist/{queue.d.ts → types/queue.d.ts} +12 -1
  22. package/dist/types/queue.d.ts.map +1 -0
  23. package/dist/types/routes.d.ts.map +1 -0
  24. package/dist/{types.d.ts → types/types.d.ts} +647 -117
  25. package/dist/types/types.d.ts.map +1 -0
  26. package/dist/{typings → types/typings}/routes.d.ts +69 -6
  27. package/dist/types/typings/routes.d.ts.map +1 -0
  28. package/package.json +33 -30
  29. package/dist/index.d.ts.map +0 -1
  30. package/dist/index.js +0 -8
  31. package/dist/index.js.map +0 -1
  32. package/dist/invalidBucket.d.ts.map +0 -1
  33. package/dist/invalidBucket.js +0 -84
  34. package/dist/invalidBucket.js.map +0 -1
  35. package/dist/manager.d.ts +0 -3
  36. package/dist/manager.d.ts.map +0 -1
  37. package/dist/manager.js +0 -1090
  38. package/dist/manager.js.map +0 -1
  39. package/dist/queue.d.ts.map +0 -1
  40. package/dist/queue.js +0 -153
  41. package/dist/queue.js.map +0 -1
  42. package/dist/routes.d.ts.map +0 -1
  43. package/dist/routes.js +0 -487
  44. package/dist/routes.js.map +0 -1
  45. package/dist/types.d.ts.map +0 -1
  46. package/dist/types.js +0 -3
  47. package/dist/types.js.map +0 -1
  48. package/dist/typings/routes.d.ts.map +0 -1
  49. package/dist/typings/routes.js +0 -3
  50. package/dist/typings/routes.js.map +0 -1
  51. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  52. /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, CamelizedDiscordApplicationCommandPermissions, CamelizedDiscordArchivedThreads, CamelizedDiscordAuditLog, CamelizedDiscordAutoModerationRule, CamelizedDiscordBan, CamelizedDiscordChannel, CamelizedDiscordEmoji, CamelizedDiscordFollowedChannel, CamelizedDiscordGetGatewayBot, CamelizedDiscordGuild, CamelizedDiscordGuildPreview, CamelizedDiscordGuildWidget, CamelizedDiscordGuildWidgetSettings, CamelizedDiscordIntegration, CamelizedDiscordInvite, CamelizedDiscordInviteMetadata, CamelizedDiscordMember, CamelizedDiscordMemberWithUser, CamelizedDiscordMessage, CamelizedDiscordModifyGuildWelcomeScreen, CamelizedDiscordPrunedCount, CamelizedDiscordRole, CamelizedDiscordScheduledEvent, CamelizedDiscordStageInstance, CamelizedDiscordSticker, CamelizedDiscordStickerPack, CamelizedDiscordTemplate, CamelizedDiscordThreadMember, CamelizedDiscordUser, CamelizedDiscordVanityUrl, CamelizedDiscordVoiceRegion, CamelizedDiscordWebhook, CamelizedDiscordWelcomeScreen, CreateApplicationCommand, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGuild, CreateGuildBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditUserVoiceState, ExecuteWebhook, FileContent, GetBans, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetReactions, GetScheduledEvents, GetScheduledEventUsers, GetWebhookMessageOptions, InteractionCallbackData, InteractionResponse, ListArchivedThreads, ListGuildMembers, MfaLevels, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildTemplate, ModifyRolePositions, ModifyWebhook, SearchMembers, StartThreadWithMessage, StartThreadWithoutMessage } from '@discordeno/types';
1
+ import type { AddDmRecipientOptions, AddGuildMemberOptions, AtLeastOne, BeginGuildPrune, BigString, Camelize, CamelizedDiscordAccessTokenResponse, CamelizedDiscordActiveThreads, CamelizedDiscordApplication, CamelizedDiscordApplicationCommand, CamelizedDiscordApplicationCommandPermissions, CamelizedDiscordApplicationRoleConnection, CamelizedDiscordArchivedThreads, CamelizedDiscordAuditLog, CamelizedDiscordAutoModerationRule, CamelizedDiscordBan, CamelizedDiscordChannel, CamelizedDiscordConnection, CamelizedDiscordCurrentAuthorization, CamelizedDiscordEmoji, CamelizedDiscordEntitlement, CamelizedDiscordFollowedChannel, CamelizedDiscordGetAnswerVotesResponse, CamelizedDiscordGetGatewayBot, CamelizedDiscordGuild, CamelizedDiscordGuildApplicationCommandPermissions, CamelizedDiscordGuildOnboarding, CamelizedDiscordGuildPreview, CamelizedDiscordGuildWidget, CamelizedDiscordGuildWidgetSettings, CamelizedDiscordIntegration, CamelizedDiscordInvite, CamelizedDiscordInviteMetadata, CamelizedDiscordMember, CamelizedDiscordMemberWithUser, CamelizedDiscordMessage, CamelizedDiscordModifyGuildWelcomeScreen, CamelizedDiscordPrunedCount, CamelizedDiscordRole, CamelizedDiscordScheduledEvent, CamelizedDiscordSku, CamelizedDiscordStageInstance, CamelizedDiscordSticker, CamelizedDiscordStickerPack, CamelizedDiscordTemplate, CamelizedDiscordThreadMember, CamelizedDiscordTokenExchange, CamelizedDiscordTokenRevocation, CamelizedDiscordUser, CamelizedDiscordVanityUrl, CamelizedDiscordVoiceRegion, CamelizedDiscordVoiceState, CamelizedDiscordWebhook, CamelizedDiscordWelcomeScreen, CreateApplicationCommand, CreateApplicationEmoji, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateEntitlement, CreateForumPostWithMessage, CreateGlobalApplicationCommandOptions, CreateGuild, CreateGuildApplicationCommandOptions, CreateGuildBan, CreateGuildBulkBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildSoundboardSound, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, DiscordActivityInstance, DiscordBulkBan, DiscordInteractionCallbackResponse, DiscordSoundboardSound, DiscordSubscription, 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
+ /** The authorization header value to attach when sending requests to the proxy. */
22
23
  authorization: string;
24
+ /**
25
+ * The authorization header name to use when sending requests to the proxy
26
+ *
27
+ * @remarks
28
+ * If the `authorization` header is used it will override any authorization that is given even if
29
+ * the requests uses OAuth2 Bearer tokens / Basic tokens
30
+ *
31
+ * @default "authorization" // For compatibility purposes
32
+ */
33
+ authorizationHeader?: string;
34
+ /**
35
+ * The endpoint to use in the rest proxy to update the bearer tokens
36
+ *
37
+ * @remarks
38
+ * Should not include a `/` in the start
39
+ *
40
+ * This value is actually required if you want to use `updateTokenQueues`
41
+ */
42
+ updateBearerTokenEndpoint?: string;
23
43
  };
24
44
  /**
25
45
  * The api versions which can be used to make requests.
26
46
  * @default 10
27
47
  */
28
48
  version?: ApiVersions;
49
+ /**
50
+ * The logger that the rest manager will use
51
+ * @default logger // The logger exported by `@discordeno/utils`
52
+ */
53
+ logger?: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
29
54
  }
30
55
  export interface RestManager {
31
56
  /** The bot token which will be used to make requests. */
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. */
@@ -40,8 +65,18 @@ export interface RestManager {
40
65
  * @default https://discord.com/api
41
66
  */
42
67
  baseUrl: string;
43
- /** The authorization header to attach when sending requests to the proxy. */
68
+ /**
69
+ * `true` if the `baseUrl` does not start with `https://discord.com/api`.
70
+ *
71
+ * Mostly used only for intern functions.
72
+ */
73
+ isProxied: boolean;
74
+ /** The authorization header value to attach when sending requests to the proxy. */
44
75
  authorization?: string;
76
+ /** The authorization header name to attach when sending requests to the proxy */
77
+ authorizationHeader: string;
78
+ /** The endpoint to use for `updateTokenQueues` when working with a rest proxy */
79
+ updateBearerTokenEndpoint?: string;
45
80
  /** The maximum amount of times a request should be retried. Defaults to Infinity */
46
81
  maxRetryCount: number;
47
82
  /** Whether or not the manager is rate limited globally across all requests. Defaults to false. */
@@ -58,8 +93,15 @@ export interface RestManager {
58
93
  invalidBucket: InvalidRequestBucket;
59
94
  /** The routes that are available for this manager. */
60
95
  routes: RestRoutes;
96
+ /** The logger to use for the rest manager */
97
+ logger: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
98
+ /** Allows the user to inject custom headers that will be sent with every request. */
99
+ createBaseHeaders: () => Record<string, string>;
100
+ /** Whether or not the rest manager should keep objects in raw snake case from discord. */
101
+ preferSnakeCase: (enabled: boolean) => RestManager;
61
102
  /** Check the rate limits for a url or a bucket. */
62
- checkRateLimits: (url: string) => number | false;
103
+ checkRateLimits: (url: string, identifier: string) => number | false;
104
+ updateTokenQueues: (oldToken: string, newToken: string) => Promise<void>;
63
105
  /** Reshapes and modifies the obj as needed to make it ready for discords api. */
64
106
  changeToDiscordFormat: (obj: any) => any;
65
107
  /** Creates the request body and headers that are necessary to send a request. Will handle different types of methods and everything necessary for discord. */
@@ -67,7 +109,7 @@ export interface RestManager {
67
109
  /** This will create a infinite loop running in 1 seconds using tail recursion to keep rate limits clean. When a rate limit resets, this will remove it so the queue can proceed. */
68
110
  processRateLimitedPaths: () => void;
69
111
  /** Processes the rate limit headers and determines if it needs to be rate limited and returns the bucket id if available */
70
- processHeaders: (url: string, headers: Headers) => string | undefined;
112
+ processHeaders: (url: string, headers: Headers, identifier: string) => string | undefined;
71
113
  /** Sends a request to the api. */
72
114
  sendRequest: (options: SendRequestOptions) => Promise<void>;
73
115
  /** Split a url to separate rate limit buckets based on major/minor parameters. */
@@ -155,6 +197,35 @@ export interface RestManager {
155
197
  * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}
156
198
  */
157
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>;
158
229
  /**
159
230
  * Creates an automod rule in a guild.
160
231
  *
@@ -200,7 +271,7 @@ export interface RestManager {
200
271
  * @returns An instance of the created {@link CamelizedDiscordEmoji}.
201
272
  *
202
273
  * @remarks
203
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
274
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
204
275
  *
205
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.
206
277
  *
@@ -210,12 +281,21 @@ export interface RestManager {
210
281
  */
211
282
  createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
212
283
  /**
213
- * 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 CamelizedDiscordEmoji}.
288
+ *
289
+ * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
290
+ */
291
+ createApplicationEmoji: (options: CreateApplicationEmoji) => Promise<CamelizedDiscordEmoji>;
292
+ /**
293
+ * Creates a new thread in a forum channel or media channel, and sends a message within the created thread.
214
294
  *
215
295
  * @param channelId - The ID of the forum channel to create the thread within.
216
296
  * @param options - The parameters for the creation of the thread.
217
297
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
218
- * @returns An instance of {@link CamelizedDiscordChannel} with a nested {@link Message} object.
298
+ * @returns An instance of {@link CamelizedDiscordChannel} with a nested {@link CamelizedDiscordChannel} object.
219
299
  *
220
300
  * @remarks
221
301
  * Requires the `CREATE_MESSAGES` permission.
@@ -223,25 +303,27 @@ export interface RestManager {
223
303
  * Fires a _Thread Create_ gateway event.
224
304
  * Fires a _Message Create_ gateway event.
225
305
  *
226
- * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
227
- *
228
- * @experimental
306
+ * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
229
307
  */
230
308
  createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
231
309
  /**
232
310
  * Creates an application command accessible globally; across different guilds and channels.
233
311
  *
234
312
  * @param command - The command to create.
235
- * @returns An instance of the created {@link ApplicationCommand}.
313
+ * @param options - Additional options for the endpoint
314
+ * @returns An instance of the created {@link CamelizedDiscordApplicationCommand}.
236
315
  *
237
316
  * @remarks
238
317
  * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
239
318
  * ⚠️ Global commands once created are cached for periods of __an hour__, so changes made to existing commands will take an hour to surface.
240
319
  * ⚠️ You can only create up to 200 _new_ commands daily.
241
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
+ *
242
324
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
243
325
  */
244
- createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
326
+ createGlobalApplicationCommand: (command: CreateApplicationCommand, options?: CreateGlobalApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand>;
245
327
  /**
246
328
  * Creates a guild.
247
329
  *
@@ -261,21 +343,25 @@ export interface RestManager {
261
343
  *
262
344
  * @param command - The command to create.
263
345
  * @param guildId - The ID of the guild to create the command for.
264
- * @returns An instance of the created {@link ApplicationCommand}.
346
+ * @param options - Additional options for the endpoint
347
+ * @returns An instance of the created {@link CamelizedDiscordApplicationCommand}.
265
348
  *
266
349
  * @remarks
267
350
  * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
268
351
  * ⚠️ You can only create up to 200 _new_ commands daily.
269
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
+ *
270
356
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
271
357
  */
272
- createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
358
+ createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString, options?: CreateGuildApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand>;
273
359
  /**
274
360
  * Creates a guild from a template.
275
361
  *
276
362
  * @param templateCode - The code of the template.
277
363
  * @param options - The parameters for the creation of the guild.
278
- * @returns An instance of the created {@link Guild}.
364
+ * @returns An instance of the created {@link CamelizedDiscordGuild}.
279
365
  *
280
366
  * @remarks
281
367
  * ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
@@ -293,7 +379,7 @@ export interface RestManager {
293
379
  * @return A {@link CamelizedDiscordSticker}
294
380
  *
295
381
  * @remarks
296
- * Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
382
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
297
383
  * Fires a Guild Stickers Update Gateway event.
298
384
  * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
299
385
  * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
@@ -306,7 +392,7 @@ export interface RestManager {
306
392
  *
307
393
  * @param guildId - The ID of the guild to create the template from.
308
394
  * @param options - The parameters for the creation of the template.
309
- * @returns An instance of the created {@link Template}.
395
+ * @returns An instance of the created {@link CamelizedDiscordTemplate}.
310
396
  *
311
397
  * @remarks
312
398
  * Requires the `MANAGE_GUILD` permission.
@@ -357,12 +443,12 @@ export interface RestManager {
357
443
  * @param guildId - The ID of the guild to create the scheduled event in.
358
444
  * @param options - The parameters for the creation of the scheduled event.
359
445
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
360
- * @returns An instance of the created {@link ScheduledEvent}.
446
+ * @returns An instance of the created {@link CamelizedDiscordScheduledEvent}.
361
447
  *
362
448
  * @remarks
363
449
  * Requires the `MANAGE_EVENTS` permission.
364
450
  *
365
- * 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).
366
452
  *
367
453
  * Fires a _Guild Scheduled Event Create_ gateway event.
368
454
  *
@@ -422,7 +508,7 @@ export interface RestManager {
422
508
  *
423
509
  * @param channelId - The ID of the channel to delete.
424
510
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
425
- * @returns An instance of the deleted {@link Channel}.
511
+ * @returns nothing
426
512
  *
427
513
  * @remarks
428
514
  * For community guilds, the _Rules_, _Guidelines_ and _Community Update_ channels cannot be deleted.
@@ -466,13 +552,22 @@ export interface RestManager {
466
552
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
467
553
  *
468
554
  * @remarks
469
- * 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.
470
557
  *
471
558
  * Fires a _Guild Emojis Update_ gateway event.
472
559
  *
473
560
  * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji}
474
561
  */
475
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>;
476
571
  /**
477
572
  * Deletes a follow-up message to an interaction.
478
573
  *
@@ -525,7 +620,8 @@ export interface RestManager {
525
620
  * @return A {@link CamelizedDiscordSticker}
526
621
  *
527
622
  * @remarks
528
- * 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.
529
625
  * Fires a Guild Stickers Update Gateway event.
530
626
  * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
531
627
  * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
@@ -780,14 +876,14 @@ export interface RestManager {
780
876
  * @param commandId - The ID of the command to edit the permissions of.
781
877
  * @param bearerToken - The bearer token to use to make the request.
782
878
  * @param options - The parameters for the edit of the command permissions.
783
- * @returns An instance of the edited {@link ApplicationCommandPermission}.
879
+ * @returns An instance of the edited {@link CamelizedDiscordGuildApplicationCommandPermissions}.
784
880
  *
785
881
  * @remarks
786
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.
787
883
  *
788
884
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
789
885
  */
790
- editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<CamelizedDiscordApplicationCommandPermissions>;
886
+ editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: CamelizedDiscordApplicationCommandPermissions[]) => Promise<CamelizedDiscordGuildApplicationCommandPermissions>;
791
887
  /**
792
888
  * Edits an automod rule.
793
889
  *
@@ -806,12 +902,13 @@ export interface RestManager {
806
902
  */
807
903
  editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
808
904
  /**
809
- * Modifies the bot's username or avatar.
905
+ * Modifies the bot's username, avatar or banner.
810
906
  * NOTE: username: if changed may cause the bot's discriminator to be randomized.
811
907
  */
812
908
  editBotProfile: (options: {
813
909
  username?: string;
814
910
  botAvatarURL?: string | null;
911
+ botBannerURL?: string | null;
815
912
  }) => Promise<CamelizedDiscordUser>;
816
913
  /**
817
914
  * Edits a channel's settings.
@@ -822,7 +919,7 @@ export interface RestManager {
822
919
  * @returns An instance of the edited {@link CamelizedDiscordChannel}.
823
920
  *
824
921
  * @remarks
825
- * If editing a channel of type {@link ChannelTypes.GroupDm}:
922
+ * If editing a channel of type {@link ChannelTypes}.GroupDm:
826
923
  * - Fires a _Channel Update_ gateway event.
827
924
  *
828
925
  * If editing a thread channel:
@@ -838,7 +935,7 @@ export interface RestManager {
838
935
  *
839
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.
840
937
  *
841
- * - If modifying a channel of type {@link ChannelTypes.GuildCategory}:
938
+ * - If modifying a channel of type {@link ChannelTypes}.GuildCategory:
842
939
  * - Fires a _Channel Update_ gateway event for each child channel impacted in this change.
843
940
  * - Otherwise:
844
941
  * - Fires a _Channel Update_ gateway event.
@@ -885,20 +982,31 @@ export interface RestManager {
885
982
  * @returns An instance of the updated {@link CamelizedDiscordEmoji}.
886
983
  *
887
984
  * @remarks
888
- * 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.
889
987
  *
890
988
  * Fires a `Guild Emojis Update` gateway event.
891
989
  *
892
990
  * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
893
991
  */
894
992
  editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
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 CamelizedDiscordEmoji}.
999
+ *
1000
+ * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
1001
+ */
1002
+ editApplicationEmoji: (id: BigString, options: ModifyApplicationEmoji) => Promise<CamelizedDiscordEmoji>;
895
1003
  /**
896
1004
  * Edits a follow-up message to an interaction.
897
1005
  *
898
1006
  * @param token - The interaction token to use, provided in the original interaction.
899
1007
  * @param messageId - The ID of the message to edit.
900
1008
  * @param options - The parameters for the edit of the message.
901
- * @returns An instance of the edited {@link Message}.
1009
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
902
1010
  *
903
1011
  * @remarks
904
1012
  * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
@@ -915,7 +1023,7 @@ export interface RestManager {
915
1023
  *
916
1024
  * @param commandId - The ID of the command to edit.
917
1025
  * @param options - The parameters for the edit of the command.
918
- * @returns An instance of the edited {@link ApplicationCommand}.
1026
+ * @returns An instance of the edited {@link CamelizedDiscordApplicationCommand}.
919
1027
  *
920
1028
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
921
1029
  */
@@ -924,15 +1032,14 @@ export interface RestManager {
924
1032
  * Edits a guild's settings.
925
1033
  *
926
1034
  * @param guildId - The ID of the guild to edit.
927
- * @param shardId - The ID of the shard the guild is in.
928
1035
  * @param options - The parameters for the edit of the guild.
929
1036
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
930
- * @returns An instance of the edited {@link Guild}.
1037
+ * @returns An instance of the edited {@link CamelizedDiscordGuild}.
931
1038
  *
932
1039
  * @remarks
933
1040
  * Requires the `MANAGE_GUILD` permission.
934
1041
  *
935
- * If attempting to add or remove the {@link GuildFeatures.Community} feature:
1042
+ * If attempting to add or remove the {@link GuildFeatures}.Community feature:
936
1043
  * - Requires the `ADMINISTRATOR` permission.
937
1044
  *
938
1045
  * Fires a _Guild Update_ gateway event.
@@ -946,7 +1053,7 @@ export interface RestManager {
946
1053
  * @param guildId - The ID of the guild the command is registered in.
947
1054
  * @param commandId - The ID of the command to edit.
948
1055
  * @param options - The parameters for the edit of the command.
949
- * @returns An instance of the edited {@link ApplicationCommand}.
1056
+ * @returns An instance of the edited {@link CamelizedDiscordApplicationCommand}.
950
1057
  *
951
1058
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
952
1059
  */
@@ -963,7 +1070,8 @@ export interface RestManager {
963
1070
  * @return A {@link CamelizedDiscordSticker}
964
1071
  *
965
1072
  * @remarks
966
- * 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.
967
1075
  * Fires a Guild Stickers Update Gateway event.
968
1076
  *
969
1077
  * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
@@ -975,7 +1083,7 @@ export interface RestManager {
975
1083
  * @param guildId - The ID of the guild to edit a template of.
976
1084
  * @param templateCode - The code of the template to edit.
977
1085
  * @param options - The parameters for the edit of the template.
978
- * @returns An instance of the edited {@link Template}.
1086
+ * @returns An instance of the edited {@link CamelizedDiscordTemplate}.
979
1087
  *
980
1088
  * @remarks
981
1089
  * Requires the `MANAGE_GUILD` permission.
@@ -991,7 +1099,7 @@ export interface RestManager {
991
1099
  * @param channelId - The ID of the channel to edit the message in.
992
1100
  * @param messageId - The IDs of the message to edit.
993
1101
  * @param options - The parameters for the edit of the message.
994
- * @returns An instance of the edited {@link Message}.
1102
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
995
1103
  *
996
1104
  * @remarks
997
1105
  * If editing another user's message:
@@ -1008,7 +1116,7 @@ export interface RestManager {
1008
1116
  *
1009
1117
  * @param token - The interaction token to use, provided in the original interaction.
1010
1118
  * @param options - The parameters for the edit of the response.
1011
- * @returns An instance of the edited {@link Message}.
1119
+ * @returns An instance of the edited {@link CamelizedDiscordMessage}.
1012
1120
  *
1013
1121
  * @remarks
1014
1122
  * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
@@ -1019,7 +1127,7 @@ export interface RestManager {
1019
1127
  *
1020
1128
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
1021
1129
  */
1022
- editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage | undefined>;
1130
+ editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
1023
1131
  /**
1024
1132
  * Edits the original webhook message.
1025
1133
  *
@@ -1051,7 +1159,7 @@ export interface RestManager {
1051
1159
  * If attempting to request to speak:
1052
1160
  * - Requires the `REQUEST_TO_SPEAK` permission.
1053
1161
  *
1054
- * @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}
1055
1163
  */
1056
1164
  editOwnVoiceState: (guildId: BigString, options: EditOwnVoiceState) => Promise<void>;
1057
1165
  /**
@@ -1093,14 +1201,14 @@ export interface RestManager {
1093
1201
  * @param guildId - The ID of the guild to edit the scheduled event in.
1094
1202
  * @param eventId - The ID of the scheduled event to edit.
1095
1203
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1096
- * @returns An instance of the edited {@link ScheduledEvent}.
1204
+ * @returns An instance of the edited {@link CamelizedDiscordScheduledEvent}.
1097
1205
  *
1098
1206
  * @remarks
1099
1207
  * Requires the `MANAGE_EVENTS` permission.
1100
1208
  *
1101
1209
  * To start or end an event, modify the event's `status` property.
1102
1210
  *
1103
- * 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.
1104
1212
  *
1105
1213
  * Fires a _Guild Scheduled Event Update_ gateway event.
1106
1214
  *
@@ -1134,9 +1242,23 @@ export interface RestManager {
1134
1242
  *
1135
1243
  * Requires the `MUTE_MEMBERS` permission.
1136
1244
  *
1137
- * @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}
1138
1246
  */
1139
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 {CamelizedDiscordApplicationRoleConnection}
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: CamelizedDiscordApplicationRoleConnection) => Promise<CamelizedDiscordApplicationRoleConnection>;
1140
1262
  /**
1141
1263
  * Edits a webhook.
1142
1264
  *
@@ -1190,7 +1312,7 @@ export interface RestManager {
1190
1312
  * @param guildId - The ID of the guild to edit the welcome screen of.
1191
1313
  * @param options - The parameters for the edit of the welcome screen.
1192
1314
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1193
- * @returns An instance of the edited {@link WelcomeScreen}.
1315
+ * @returns An instance of the edited {@link CamelizedDiscordWelcomeScreen}.
1194
1316
  *
1195
1317
  * @remarks
1196
1318
  * Requires the `MANAGE_GUILD` permission.
@@ -1205,7 +1327,7 @@ export interface RestManager {
1205
1327
  *
1206
1328
  * @param guildId - The ID of the guild to edit the settings of the widget of.
1207
1329
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1208
- * @returns An instance of the edited {@link GuildWidgetSettings}.
1330
+ * @returns An instance of the edited {@link CamelizedDiscordGuildWidgetSettings}.
1209
1331
  *
1210
1332
  * @remarks
1211
1333
  * Requires the `MANAGE_GUILD` permission.
@@ -1234,6 +1356,7 @@ export interface RestManager {
1234
1356
  *
1235
1357
  * @param sourceChannelId - The ID of the announcement channel to follow.
1236
1358
  * @param targetChannelId - The ID of the target channel - the channel to cross-post to.
1359
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1237
1360
  * @returns An instance of {@link CamelizedDiscordFollowedChannel}.
1238
1361
  *
1239
1362
  * @remarks
@@ -1243,7 +1366,7 @@ export interface RestManager {
1243
1366
  *
1244
1367
  * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
1245
1368
  */
1246
- followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>;
1369
+ followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<CamelizedDiscordFollowedChannel>;
1247
1370
  /**
1248
1371
  * Gets the list of all active threads for a guild.
1249
1372
  *
@@ -1260,31 +1383,73 @@ export interface RestManager {
1260
1383
  getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>;
1261
1384
  /** Get the applications info */
1262
1385
  getApplicationInfo: () => Promise<CamelizedDiscordApplication>;
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<CamelizedDiscordApplication>;
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 CamelizedDiscordCurrentAuthorization}
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<CamelizedDiscordCurrentAuthorization>;
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: CamelizedDiscordTokenExchange) => Promise<CamelizedDiscordAccessTokenResponse>;
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: CamelizedDiscordTokenRevocation) => Promise<void>;
1263
1420
  /**
1264
1421
  * Gets the permissions of a guild application command.
1265
1422
  *
1266
1423
  * @param guildId - The ID of the guild the command is registered in.
1267
1424
  * @param commandId - The ID of the command to get the permissions of.
1268
- * @returns An instance of {@link ApplicationCommandPermission}.
1425
+ * @param options - The OAuth2 related optional parameters for the endpoint
1426
+ * @returns An instance of {@link CamelizedDiscordGuildApplicationCommandPermissions}.
1427
+ *
1428
+ * @remarks
1429
+ * Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
1269
1430
  *
1270
1431
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
1271
1432
  */
1272
- getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions>;
1433
+ getApplicationCommandPermission: (guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<CamelizedDiscordGuildApplicationCommandPermissions>;
1273
1434
  /**
1274
- * 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.
1275
1436
  *
1276
1437
  * @param guildId - The ID of the guild to get the permissions objects of.
1277
- * @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 CamelizedDiscordGuildApplicationCommandPermissions} 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`
1278
1443
  *
1279
1444
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
1280
1445
  */
1281
- getApplicationCommandPermissions: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions[]>;
1446
+ getApplicationCommandPermissions: (guildId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<CamelizedDiscordGuildApplicationCommandPermissions[]>;
1282
1447
  /**
1283
1448
  * Gets a guild's audit log.
1284
1449
  *
1285
1450
  * @param guildId - The ID of the guild to get the audit log of.
1286
1451
  * @param options - The parameters for the fetching of the audit log.
1287
- * @returns An instance of {@link AuditLog}.
1452
+ * @returns An instance of {@link CamelizedDiscordAuditLog}.
1288
1453
  *
1289
1454
  * @remarks
1290
1455
  * Requires the `VIEW_AUDIT_LOG` permission.
@@ -1320,7 +1485,7 @@ export interface RestManager {
1320
1485
  /**
1321
1486
  * Gets the list of available voice regions.
1322
1487
  *
1323
- * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
1488
+ * @returns A collection of {@link CamelizedDiscordVoiceRegion} objects assorted by voice region ID.
1324
1489
  */
1325
1490
  getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>;
1326
1491
  /**
@@ -1358,7 +1523,7 @@ export interface RestManager {
1358
1523
  * @returns An instance of {@link CamelizedDiscordChannel}.
1359
1524
  *
1360
1525
  * @remarks
1361
- * If the channel is a thread, a {@link ThreadMember} object is included in the result.
1526
+ * If the channel is a thread, a {@link CamelizedDiscordThreadMember} object is included in the result.
1362
1527
  *
1363
1528
  * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
1364
1529
  */
@@ -1410,6 +1575,22 @@ export interface RestManager {
1410
1575
  * @see {@link https://discord.com/developers/docs/resources/user#create-dm}
1411
1576
  */
1412
1577
  getDmChannel: (userId: BigString) => Promise<CamelizedDiscordChannel>;
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 CamelizedDiscordChannel}.
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<CamelizedDiscordChannel>;
1413
1594
  /**
1414
1595
  * Gets an emoji by its ID.
1415
1596
  *
@@ -1417,24 +1598,56 @@ export interface RestManager {
1417
1598
  * @param emojiId - The ID of the emoji to get.
1418
1599
  * @returns An instance of {@link CamelizedDiscordEmoji}.
1419
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.
1604
+ *
1420
1605
  * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
1421
1606
  */
1422
1607
  getEmoji: (guildId: BigString, emojiId: BigString) => Promise<CamelizedDiscordEmoji>;
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 CamelizedDiscordEmoji}.
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<CamelizedDiscordEmoji>;
1423
1620
  /**
1424
1621
  * Gets the list of emojis for a guild.
1425
1622
  *
1426
1623
  * @param guildId - The ID of the guild which to get the emojis of.
1427
1624
  * @returns A collection of {@link CamelizedDiscordEmoji} objects assorted by emoji ID.
1428
1625
  *
1626
+ * @remarks
1627
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1628
+ *
1429
1629
  * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
1430
1630
  */
1431
1631
  getEmojis: (guildId: BigString) => Promise<CamelizedDiscordEmoji[]>;
1632
+ /**
1633
+ * Gets the list of emojis for an application.
1634
+ *
1635
+ * @returns An object with the array of {@link CamelizedDiscordEmoji} 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: CamelizedDiscordEmoji[];
1644
+ }>;
1432
1645
  /**
1433
1646
  * Gets a follow-up message to an interaction by the ID of the message.
1434
1647
  *
1435
1648
  * @param token - The interaction token to use, provided in the original interaction.
1436
1649
  * @param messageId - The ID of the message to get.
1437
- * @returns An instance of {@link Message}.
1650
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1438
1651
  *
1439
1652
  * @remarks
1440
1653
  * Unlike `getMessage()`, this endpoint allows the bot user to act without:
@@ -1452,7 +1665,7 @@ export interface RestManager {
1452
1665
  * Gets a global application command by its ID.
1453
1666
  *
1454
1667
  * @param commandId - The ID of the command to get.
1455
- * @returns An instance of {@link ApplicationCommand}.
1668
+ * @returns An instance of {@link CamelizedDiscordApplicationCommand}.
1456
1669
  *
1457
1670
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
1458
1671
  */
@@ -1460,7 +1673,7 @@ export interface RestManager {
1460
1673
  /**
1461
1674
  * Gets the list of your bot's global application commands.
1462
1675
  *
1463
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
1676
+ * @returns A collection of {@link CamelizedDiscordApplicationCommand} objects assorted by command ID.
1464
1677
  *
1465
1678
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
1466
1679
  */
@@ -1470,19 +1683,32 @@ export interface RestManager {
1470
1683
  *
1471
1684
  * @param guildId - The ID of the guild to get.
1472
1685
  * @param options - The parameters for the fetching of the guild.
1473
- * @returns An instance of {@link Guild}.
1686
+ * @returns An instance of {@link CamelizedDiscordGuild}.
1474
1687
  *
1475
1688
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
1476
1689
  */
1477
1690
  getGuild: (guildId: BigString, options?: {
1478
1691
  counts?: boolean;
1479
1692
  }) => Promise<CamelizedDiscordGuild>;
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 CamelizedDiscordGuild}.
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<CamelizedDiscordGuild>[]>;
1480
1706
  /**
1481
1707
  * Gets a guild application command by its ID.
1482
1708
  *
1483
1709
  * @param guildId - The ID of the guild the command is registered in.
1484
1710
  * @param commandId - The ID of the command to get.
1485
- * @returns An instance of {@link ApplicationCommand}.
1711
+ * @returns An instance of {@link CamelizedDiscordApplicationCommand}.
1486
1712
  *
1487
1713
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}
1488
1714
  */
@@ -1491,7 +1717,7 @@ export interface RestManager {
1491
1717
  * Gets the list of application commands registered by your bot in a guild.
1492
1718
  *
1493
1719
  * @param guildId - The ID of the guild the commands are registered in.
1494
- * @returns A collection of {@link ApplicationCommand} objects assorted by command ID.
1720
+ * @returns A collection of {@link CamelizedDiscordApplicationCommand} objects assorted by command ID.
1495
1721
  *
1496
1722
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commandss}
1497
1723
  */
@@ -1500,10 +1726,10 @@ export interface RestManager {
1500
1726
  * Gets the preview of a guild by a guild's ID.
1501
1727
  *
1502
1728
  * @param guildId - The ID of the guild to get the preview of.
1503
- * @returns An instance of {@link GuildPreview}.
1729
+ * @returns An instance of {@link CamelizedDiscordGuildPreview}.
1504
1730
  *
1505
1731
  * @remarks
1506
- * 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.
1507
1733
  *
1508
1734
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
1509
1735
  */
@@ -1515,7 +1741,7 @@ export interface RestManager {
1515
1741
  * @param stickerId The ID of the sticker to get
1516
1742
  * @return A {@link CamelizedDiscordSticker}
1517
1743
  *
1518
- * @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.
1519
1745
  *
1520
1746
  * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
1521
1747
  */
@@ -1526,7 +1752,7 @@ export interface RestManager {
1526
1752
  * @param guildId The ID of the guild to get
1527
1753
  * @returns A collection of {@link CamelizedDiscordSticker} objects assorted by sticker ID.
1528
1754
  *
1529
- * @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.
1530
1756
  *
1531
1757
  * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
1532
1758
  */
@@ -1535,7 +1761,7 @@ export interface RestManager {
1535
1761
  * Gets a template by its code.
1536
1762
  *
1537
1763
  * @param templateCode - The code of the template to get.
1538
- * @returns An instance of {@link Template}.
1764
+ * @returns An instance of {@link CamelizedDiscordTemplate}.
1539
1765
  *
1540
1766
  * @remarks
1541
1767
  * Requires the `MANAGE_GUILD` permission.
@@ -1547,7 +1773,7 @@ export interface RestManager {
1547
1773
  * Gets the list of templates for a guild.
1548
1774
  *
1549
1775
  * @param guildId - The ID of the guild to get the list of templates for.
1550
- * @returns A collection of {@link Template} objects assorted by template code.
1776
+ * @returns A collection of {@link CamelizedDiscordTemplate} objects assorted by template code.
1551
1777
  *
1552
1778
  * @remarks
1553
1779
  * Requires the `MANAGE_GUILD` permission.
@@ -1571,7 +1797,7 @@ export interface RestManager {
1571
1797
  * Gets the list of integrations attached to a guild.
1572
1798
  *
1573
1799
  * @param guildId - The ID of the guild to get the list of integrations from.
1574
- * @returns A collection of {@link Integration} objects assorted by integration ID.
1800
+ * @returns A collection of {@link CamelizedDiscordIntegration} objects assorted by integration ID.
1575
1801
  *
1576
1802
  * @remarks
1577
1803
  * Requires the `MANAGE_GUILD` permission.
@@ -1593,7 +1819,7 @@ export interface RestManager {
1593
1819
  * Gets the list of invites for a guild.
1594
1820
  *
1595
1821
  * @param guildId - The ID of the guild to get the invites from.
1596
- * @returns A collection of {@link InviteMetadata | Invite} objects assorted by invite code.
1822
+ * @returns A collection of {@link CamelizedDiscordInviteMetadata} objects assorted by invite code.
1597
1823
  *
1598
1824
  * @remarks
1599
1825
  * Requires the `MANAGE_GUILD` permission.
@@ -1606,7 +1832,7 @@ export interface RestManager {
1606
1832
  *
1607
1833
  * @param channelId - The ID of the channel from which to get the message.
1608
1834
  * @param messageId - The ID of the message to get.
1609
- * @returns An instance of {@link Message}.
1835
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1610
1836
  *
1611
1837
  * @remarks
1612
1838
  * Requires that the bot user be able to see the contents of the channel in which the message was posted.
@@ -1622,7 +1848,7 @@ export interface RestManager {
1622
1848
  *
1623
1849
  * @param channelId - The ID of the channel from which to get the messages.
1624
1850
  * @param options - The parameters for the fetching of the messages.
1625
- * @returns A collection of {@link Message} objects assorted by message ID.
1851
+ * @returns A collection of {@link CamelizedDiscordMessage} objects assorted by message ID.
1626
1852
  *
1627
1853
  * @remarks
1628
1854
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -1634,18 +1860,26 @@ export interface RestManager {
1634
1860
  */
1635
1861
  getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<CamelizedDiscordMessage[]>;
1636
1862
  /**
1637
- * Returns the list of sticker packs available to Nitro subscribers.
1863
+ * Returns a sticker pack for the given ID.
1864
+ *
1865
+ * @returns A {@link CamelizedDiscordStickerPack} object.
1866
+ *
1867
+ * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker-pack}
1868
+ */
1869
+ getStickerPack: (stickerPackId: BigString) => Promise<CamelizedDiscordStickerPack>;
1870
+ /**
1871
+ * Returns the list of sticker packs available.
1638
1872
  *
1639
- * @returns A collection of {@link StickerPack} objects assorted by sticker ID.
1873
+ * @returns A collection of {@link CamelizedDiscordStickerPack} objects assorted by sticker ID.
1640
1874
  *
1641
- * @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}
1642
1876
  */
1643
- getNitroStickerPacks: () => Promise<CamelizedDiscordStickerPack[]>;
1877
+ getStickerPacks: () => Promise<CamelizedDiscordStickerPack[]>;
1644
1878
  /**
1645
1879
  * Gets the initial message response to an interaction.
1646
1880
  *
1647
1881
  * @param token - The interaction token to use, provided in the original interaction.
1648
- * @returns An instance of {@link Message}.
1882
+ * @returns An instance of {@link CamelizedDiscordMessage}.
1649
1883
  *
1650
1884
  * @remarks
1651
1885
  * Unlike `getMessage()`, this endpoint allows the bot user to act without:
@@ -1661,7 +1895,7 @@ export interface RestManager {
1661
1895
  * Gets the pinned messages for a channel.
1662
1896
  *
1663
1897
  * @param channelId - The ID of the channel to get the pinned messages for.
1664
- * @returns A collection of {@link Message} objects assorted by message ID.
1898
+ * @returns A collection of {@link CamelizedDiscordMessage} objects assorted by message ID.
1665
1899
  *
1666
1900
  * @remarks
1667
1901
  * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
@@ -1683,7 +1917,7 @@ export interface RestManager {
1683
1917
  * Requires the `READ_MESSAGE_HISTORY` permission.
1684
1918
  * Requires the `MANAGE_THREADS` permission.
1685
1919
  *
1686
- * Returns threads of type {@link ChannelTypes.GuildPrivateThread}.
1920
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1687
1921
  *
1688
1922
  * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1689
1923
  *
@@ -1700,7 +1934,7 @@ export interface RestManager {
1700
1934
  * @remarks
1701
1935
  * Requires the `READ_MESSAGE_HISTORY` permission.
1702
1936
  *
1703
- * Returns threads of type {@link ChannelTypes.GuildPrivateThread}.
1937
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1704
1938
  *
1705
1939
  * Threads are ordered by the `id` property in descending order.
1706
1940
  *
@@ -1715,7 +1949,7 @@ export interface RestManager {
1715
1949
  * @returns A number indicating the number of members that would be kicked.
1716
1950
  *
1717
1951
  * @remarks
1718
- * Requires the `KICK_MEMBERS` permission.
1952
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
1719
1953
  *
1720
1954
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
1721
1955
  */
@@ -1725,13 +1959,13 @@ export interface RestManager {
1725
1959
  *
1726
1960
  * @param channelId - The ID of the channel to get the archived threads for.
1727
1961
  * @param options - The parameters for the fetching of threads.
1728
- * @returns An instance of {@link ArchivedThreads}.
1962
+ * @returns An instance of {@link CamelizedDiscordArchivedThreads}.
1729
1963
  *
1730
1964
  * @remarks
1731
1965
  * Requires the `READ_MESSAGE_HISTORY` permission.
1732
1966
  *
1733
- * If called on a channel of type {@link ChannelTypes.GuildText}, returns threads of type {@link ChannelTypes.GuildPublicThread}.
1734
- * 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.
1735
1969
  *
1736
1970
  * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1737
1971
  *
@@ -1742,21 +1976,31 @@ export interface RestManager {
1742
1976
  * Gets the list of roles for a guild.
1743
1977
  *
1744
1978
  * @param guildId - The ID of the guild to get the list of roles for.
1745
- * @returns A collection of {@link DisorcRole} objects assorted by role ID.
1979
+ * @returns A collection of {@link CamelizedDiscordRole} objects assorted by role ID.
1746
1980
  *
1747
1981
  * @remarks
1748
- * ⚠️ 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 CamelizedDiscordRole} objects already being included in guild payloads.
1749
1983
  *
1750
1984
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
1751
1985
  */
1752
1986
  getRoles: (guildId: BigString) => Promise<CamelizedDiscordRole[]>;
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 CamelizedDiscordRole} object.
1993
+ *
1994
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
1995
+ */
1996
+ getRole: (guildId: BigString, roleId: BigString) => Promise<CamelizedDiscordRole>;
1753
1997
  /**
1754
1998
  * Gets a scheduled event by its ID.
1755
1999
  *
1756
2000
  * @param guildId - The ID of the guild to get the scheduled event from.
1757
2001
  * @param eventId - The ID of the scheduled event to get.
1758
2002
  * @param options - The parameters for the fetching of the scheduled event.
1759
- * @returns An instance of {@link ScheduledEvent}.
2003
+ * @returns An instance of {@link CamelizedDiscordScheduledEvent}.
1760
2004
  *
1761
2005
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}
1762
2006
  */
@@ -1768,7 +2012,7 @@ export interface RestManager {
1768
2012
  *
1769
2013
  * @param guildId - The ID of the guild to get the scheduled events from.
1770
2014
  * @param options - The parameters for the fetching of the scheduled events.
1771
- * @returns A collection of {@link ScheduledEvent} objects assorted by event ID.
2015
+ * @returns A collection of {@link CamelizedDiscordScheduledEvent} objects assorted by event ID.
1772
2016
  *
1773
2017
  * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
1774
2018
  */
@@ -1779,7 +2023,7 @@ export interface RestManager {
1779
2023
  * @param guildId - The ID of the guild to get the subscribers to the scheduled event from.
1780
2024
  * @param eventId - The ID of the scheduled event to get the subscribers of.
1781
2025
  * @param options - The parameters for the fetching of the subscribers.
1782
- * @returns A collection of {@link User} objects assorted by user ID.
2026
+ * @returns A collection of {@link CamelizedDiscordUser} objects assorted by user ID.
1783
2027
  *
1784
2028
  * @remarks
1785
2029
  * Requires the `MANAGE_EVENTS` permission.
@@ -1803,6 +2047,25 @@ export interface RestManager {
1803
2047
  * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
1804
2048
  */
1805
2049
  getStageInstance: (channelId: BigString) => Promise<CamelizedDiscordStageInstance>;
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 CamelizedDiscordVoiceState}.
2055
+ *
2056
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-current-user-voice-state}
2057
+ */
2058
+ getOwnVoiceState: (guildId: BigString) => Promise<CamelizedDiscordVoiceState>;
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 CamelizedDiscordVoiceState}.
2065
+ *
2066
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-user-voice-state}
2067
+ */
2068
+ getUserVoiceState: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordVoiceState>;
1806
2069
  /**
1807
2070
  * Returns a sticker object for the given sticker ID.
1808
2071
  *
@@ -1841,7 +2104,7 @@ export interface RestManager {
1841
2104
  * @param messageId - The ID of the message to get the users for.
1842
2105
  * @param reaction - The reaction for which to get the users.
1843
2106
  * @param options - The parameters for the fetching of the users.
1844
- * @returns A collection of {@link User} objects assorted by user ID.
2107
+ * @returns A collection of {@link CamelizedDiscordUser} objects assorted by user ID.
1845
2108
  *
1846
2109
  * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
1847
2110
  */
@@ -1853,11 +2116,46 @@ export interface RestManager {
1853
2116
  * @returns {CamelizedDiscordUser}
1854
2117
  */
1855
2118
  getUser: (id: BigString) => Promise<CamelizedDiscordUser>;
2119
+ /**
2120
+ * Get the current user data.
2121
+ *
2122
+ * @param bearerToken - The access token of the user
2123
+ * @returns {CamelizedDiscordUser}
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<CamelizedDiscordUser>;
2131
+ /**
2132
+ * Get the current user connections.
2133
+ *
2134
+ * @param bearerToken - The access token of the user
2135
+ * @returns {CamelizedDiscordConnection[]}
2136
+ *
2137
+ * @remarks
2138
+ * This requires the `connections` scope.
2139
+ */
2140
+ getUserConnections: (bearerToken: string) => Promise<CamelizedDiscordConnection[]>;
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 {CamelizedDiscordApplicationRoleConnection}
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<CamelizedDiscordApplicationRoleConnection>;
1856
2154
  /**
1857
2155
  * Gets information about the vanity url of a guild.
1858
2156
  *
1859
2157
  * @param guildId - The ID of the guild to get the vanity url information for.
1860
- * @returns An instance of {@link VanityUrl}.
2158
+ * @returns An instance of {@link CamelizedDiscordVanityUrl}.
1861
2159
  *
1862
2160
  * @remarks
1863
2161
  * Requires the `MANAGE_GUILD` permission.
@@ -1871,7 +2169,7 @@ export interface RestManager {
1871
2169
  * Gets the list of voice regions for a guild.
1872
2170
  *
1873
2171
  * @param guildId - The ID of the guild to get the voice regions for.
1874
- * @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
2172
+ * @returns A collection of {@link CamelizedDiscordVoiceRegion} objects assorted by voice region ID.
1875
2173
  *
1876
2174
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
1877
2175
  */
@@ -1883,7 +2181,7 @@ export interface RestManager {
1883
2181
  * @returns An instance of {@link CamelizedDiscordWebhook}.
1884
2182
  *
1885
2183
  * @remarks
1886
- * Requires the `MANAGE_WEBHOOKS` permission.
2184
+ * Requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook.
1887
2185
  *
1888
2186
  * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}
1889
2187
  */
@@ -1914,7 +2212,7 @@ export interface RestManager {
1914
2212
  * Gets the welcome screen for a guild.
1915
2213
  *
1916
2214
  * @param guildId - The ID of the guild to get the welcome screen for.
1917
- * @returns An instance of {@link WelcomeScreen}.
2215
+ * @returns An instance of {@link CamelizedDiscordWelcomeScreen}.
1918
2216
  *
1919
2217
  * @remarks
1920
2218
  * If the welcome screen is not enabled:
@@ -1927,7 +2225,10 @@ export interface RestManager {
1927
2225
  * Gets the guild widget by guild ID.
1928
2226
  *
1929
2227
  * @param guildId - The ID of the guild to get the widget of.
1930
- * @returns An instance of {@link GuildWidget}.
2228
+ * @returns An instance of {@link CamelizedDiscordGuildWidget}.
2229
+ *
2230
+ * @remarks
2231
+ * Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
1931
2232
  *
1932
2233
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
1933
2234
  */
@@ -1936,7 +2237,7 @@ export interface RestManager {
1936
2237
  * Gets the settings of a guild's widget.
1937
2238
  *
1938
2239
  * @param guildId - The ID of the guild to get the widget of.
1939
- * @returns An instance of {@link GuildWidgetSettings}.
2240
+ * @returns An instance of {@link CamelizedDiscordGuildWidgetSettings}.
1940
2241
  *
1941
2242
  * @remarks
1942
2243
  * Requires the `MANAGE_GUILD` permission.
@@ -1986,7 +2287,7 @@ export interface RestManager {
1986
2287
  *
1987
2288
  * @param channelId - The ID of the announcement channel.
1988
2289
  * @param messageId - The ID of the message to cross-post.
1989
- * @returns An instance of the cross-posted {@link Message}.
2290
+ * @returns An instance of the cross-posted {@link CamelizedDiscordMessage}.
1990
2291
  *
1991
2292
  * @remarks
1992
2293
  * Requires the `SEND_MESSAGES` permission.
@@ -2022,7 +2323,7 @@ export interface RestManager {
2022
2323
  * @param userId - The user ID of the thread member to remove.
2023
2324
  *
2024
2325
  * @remarks
2025
- * 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.
2026
2327
  * Otherwise, requires the `MANAGE_THREADS` permission.
2027
2328
  *
2028
2329
  * Requires the thread not be archived.
@@ -2032,6 +2333,15 @@ export interface RestManager {
2032
2333
  * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}
2033
2334
  */
2034
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>;
2035
2345
  /**
2036
2346
  * Sends a message to a channel.
2037
2347
  *
@@ -2064,7 +2374,7 @@ export interface RestManager {
2064
2374
  *
2065
2375
  * @param token - The interaction token to use, provided in the original interaction.
2066
2376
  * @param options - The parameters for the creation of the message.
2067
- * @returns An instance of the created {@link Message}.
2377
+ * @returns An instance of the created {@link CamelizedDiscordMessage}.
2068
2378
  *
2069
2379
  * @remarks
2070
2380
  * ⚠️ Interaction tokens are only valid for _15 minutes_.
@@ -2075,6 +2385,9 @@ export interface RestManager {
2075
2385
  * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.)
2076
2386
  * - Requiring the `MESSAGE_CONTENT` intent.
2077
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
+ *
2078
2391
  * Fires a _Message Create_ event.
2079
2392
  *
2080
2393
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
@@ -2086,7 +2399,8 @@ export interface RestManager {
2086
2399
  * @param interactionId - The ID of the interaction to respond to.
2087
2400
  * @param token - The interaction token to use, provided in the original interaction.
2088
2401
  * @param options - The parameters for the creation of the message.
2089
- * @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
2090
2404
  *
2091
2405
  * @remarks
2092
2406
  * ⚠️ Interaction tokens are only valid for _15 minutes_.
@@ -2101,7 +2415,7 @@ export interface RestManager {
2101
2415
  *
2102
2416
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
2103
2417
  */
2104
- sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse) => Promise<void>;
2418
+ sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse, params?: InteractionCallbackOptions) => Promise<void | Camelize<DiscordInteractionCallbackResponse>>;
2105
2419
  /**
2106
2420
  * Creates a thread, using an existing message as its point of origin.
2107
2421
  *
@@ -2109,12 +2423,12 @@ export interface RestManager {
2109
2423
  * @param messageId - The ID of the message to use as the thread's point of origin.
2110
2424
  * @param options - The parameters to use for the creation of the thread.
2111
2425
  * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2112
- * @returns An instance of the created {@link Channel | Thread}.
2426
+ * @returns An instance of the created {@link CamelizedDiscordChannel}.
2113
2427
  *
2114
2428
  * @remarks
2115
- * If called on a channel of type {@link ChannelTypes.GuildText}, creates a {@link ChannelTypes.GuildPublicThread}.
2116
- * If called on a channel of type {@link ChannelTypes.GuildNews}, creates a {@link ChannelTypes.GuildNewsThread}.
2117
- * 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.
2118
2432
  *
2119
2433
  * The ID of the created thread will be the same as the ID of the source message.
2120
2434
  *
@@ -2139,11 +2453,34 @@ export interface RestManager {
2139
2453
  * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
2140
2454
  */
2141
2455
  startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
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<CamelizedDiscordGetAnswerVotesResponse>;
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<CamelizedDiscordMessage>;
2142
2479
  /**
2143
2480
  * Synchronises a template with the current state of a guild.
2144
2481
  *
2145
2482
  * @param guildId - The ID of the guild to synchronise a template of.
2146
- * @returns An instance of the edited {@link Template}.
2483
+ * @returns An instance of the edited {@link CamelizedDiscordTemplate}.
2147
2484
  *
2148
2485
  * @remarks
2149
2486
  * Requires the `MANAGE_GUILD` permission.
@@ -2154,12 +2491,14 @@ export interface RestManager {
2154
2491
  */
2155
2492
  syncGuildTemplate: (guildId: BigString) => Promise<CamelizedDiscordTemplate>;
2156
2493
  /**
2157
- * Triggers a typing indicator for the bot user.
2494
+ * Triggers a typing indicator for the specified channel, which expires after 10 seconds.
2158
2495
  *
2159
2496
  * @param channelId - The ID of the channel in which to trigger the typing indicator.
2160
2497
  *
2161
2498
  * @remarks
2162
- * 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.
2163
2502
  *
2164
2503
  * Fires a _Typing Start_ gateway event.
2165
2504
  *
@@ -2170,38 +2509,46 @@ export interface RestManager {
2170
2509
  * Re-registers the list of global application commands, overwriting the previous commands completely.
2171
2510
  *
2172
2511
  * @param commands - The list of commands to use to overwrite the previous list.
2173
- * @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 CamelizedDiscordApplicationCommand} objects assorted by command ID.
2174
2514
  *
2175
2515
  * @remarks
2176
2516
  * ❗ Commands that are not present in the `commands` array will be __deleted__.
2177
2517
  *
2178
2518
  * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2179
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
+ *
2180
2523
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
2181
2524
  */
2182
- upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2525
+ upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand[]>;
2183
2526
  /**
2184
2527
  * Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
2185
2528
  *
2186
2529
  * @param guildId - The ID of the guild whose list of commands to overwrite.
2187
2530
  * @param commands - The list of commands to use to overwrite the previous list.
2188
- * @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 CamelizedDiscordApplicationCommand} objects assorted by command ID.
2189
2533
  *
2190
2534
  * @remarks
2191
2535
  * ❗ Commands that are not present in the `commands` array will be __deleted__.
2192
2536
  *
2193
2537
  * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2194
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
+ *
2195
2542
  * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
2196
2543
  */
2197
- upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
2544
+ upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions) => Promise<CamelizedDiscordApplicationCommand[]>;
2198
2545
  /**
2199
2546
  * Bans a user from a guild.
2200
2547
  *
2201
2548
  * @param guildId - The ID of the guild to ban the user from.
2202
2549
  * @param userId - The ID of the user to ban from the guild.
2203
- * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2204
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.
2205
2552
  *
2206
2553
  * @remarks
2207
2554
  * Requires the `BAN_MEMBERS` permission.
@@ -2211,6 +2558,23 @@ export interface RestManager {
2211
2558
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
2212
2559
  */
2213
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>>;
2214
2578
  /**
2215
2579
  * Edits the nickname of the bot user.
2216
2580
  *
@@ -2253,6 +2617,19 @@ export interface RestManager {
2253
2617
  * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
2254
2618
  */
2255
2619
  getMember: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordMemberWithUser>;
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 CamelizedDiscordMemberWithUser}.
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<CamelizedDiscordMemberWithUser>;
2256
2633
  /**
2257
2634
  * Gets the list of members for a guild.
2258
2635
  *
@@ -2272,6 +2649,13 @@ export interface RestManager {
2272
2649
  * @see {@link https://discord.com/developers/docs/topics/rate-limits#rate-limits}
2273
2650
  */
2274
2651
  getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<CamelizedDiscordMemberWithUser[]>;
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>>;
2275
2659
  /**
2276
2660
  * Kicks a member from a guild.
2277
2661
  *
@@ -2317,7 +2701,7 @@ export interface RestManager {
2317
2701
  * @returns A number indicating how many members were pruned.
2318
2702
  *
2319
2703
  * @remarks
2320
- * Requires the `KICK_MEMBERS` permission.
2704
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
2321
2705
  *
2322
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.
2323
2707
  *
@@ -2375,6 +2759,152 @@ export interface RestManager {
2375
2759
  * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
2376
2760
  */
2377
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<CamelizedDiscordGuildOnboarding>;
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<CamelizedDiscordGuildOnboarding>;
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<CamelizedDiscordEntitlement[]>;
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<CamelizedDiscordEntitlement>>;
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<CamelizedDiscordSku[]>;
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>;
2378
2908
  }
2379
2909
  export type RequestMethods = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT';
2380
2910
  export type ApiVersions = 9 | 10;
@@ -2398,8 +2928,8 @@ export interface RequestBody {
2398
2928
  method: RequestMethods;
2399
2929
  }
2400
2930
  export interface SendRequestOptions {
2401
- /** The url to send the request to. */
2402
- url: string;
2931
+ /** The route to send the request to. */
2932
+ route: string;
2403
2933
  /** The method to use for sending the request. */
2404
2934
  method: RequestMethods;
2405
2935
  /** The amount of times this request has been retried. */