@discordeno/rest 22.0.1-next.e41b0bc → 22.0.1-next.e8cf59e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +39 -20
- package/dist/queue.js +10 -3
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +7 -1
- package/dist/types.d.ts +212 -173
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/typings/routes.d.ts +4 -0
- package/dist/typings/routes.d.ts.map +1 -1
- package/dist/typings/routes.js +1 -1
- package/package.json +12 -12
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddDmRecipientOptions, AddGuildMemberOptions, AddLobbyMember, AtLeastOne, BeginGuildPrune, BigString, Camelize, CreateApplicationCommand, CreateApplicationEmoji, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGlobalApplicationCommandOptions, CreateGroupDmOptions, CreateGuildApplicationCommandOptions, CreateGuildBan, CreateGuildBulkBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildRole, CreateGuildSoundboardSound, CreateGuildStickerOptions, CreateLobby, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, CreateTestEntitlement, CreateWebhook, DeleteWebhookMessageOptions, DiscordAccessTokenResponse, DiscordActivityInstance, DiscordApplication, DiscordApplicationCommand, DiscordApplicationCommandPermissions, DiscordApplicationRoleConnection, DiscordApplicationRoleConnectionMetadata, DiscordAuditLog, DiscordAutoModerationRule, DiscordBan, DiscordBulkBan, DiscordChannel, DiscordConnection, DiscordCurrentAuthorization, DiscordEmoji, DiscordEntitlement, DiscordFollowedChannel, DiscordGetAnswerVotesResponse, DiscordGetChannelPins, DiscordGetGatewayBot, DiscordGuild, DiscordGuildApplicationCommandPermissions, DiscordGuildOnboarding, DiscordGuildPreview, DiscordGuildWidget, DiscordGuildWidgetSettings, DiscordIncidentsData, DiscordIntegration, DiscordInteractionCallbackResponse, DiscordInvite, DiscordInviteMetadata, DiscordListActiveThreads, DiscordListArchivedThreads, DiscordLobby, DiscordLobbyMember, DiscordMember, DiscordMemberWithUser, DiscordMessage, DiscordPrunedCount, DiscordRole, DiscordScheduledEvent, DiscordSku, DiscordSoundboardSound, DiscordStageInstance, DiscordSticker, DiscordStickerPack, DiscordSubscription, DiscordTemplate, DiscordThreadMember, DiscordTokenExchange, DiscordTokenRevocation, DiscordUser, DiscordVanityUrl, DiscordVoiceRegion, DiscordVoiceState, DiscordWebhook, DiscordWelcomeScreen, EditApplication, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildOnboarding, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditUserVoiceState, EditWebhookMessageOptions, ExecuteWebhook, FileContent, GetApplicationCommandPermissionOptions, GetBans, GetChannelPinsOptions, GetEntitlements, GetGlobalApplicationCommandsOptions, GetGuildApplicationCommandsOptions, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetPollAnswerVotes, GetReactions, GetScheduledEvents, GetScheduledEventUsers, GetThreadMember, GetUserGuilds, GetWebhookMessageOptions, InteractionCallbackData, InteractionCallbackOptions, InteractionResponse, LinkChannelToLobby, ListArchivedThreads, ListGuildMembers, ListSkuSubscriptionsOptions, ListThreadMembers, ModifyApplicationEmoji, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildIncidentActions, ModifyGuildMember, ModifyGuildSoundboardSound, ModifyGuildTemplate, ModifyGuildWelcomeScreen, ModifyLobby, ModifyRolePositions, ModifyWebhook, SearchMembers, SendSoundboardSound, StartThreadWithMessage, StartThreadWithoutMessage, UpsertGlobalApplicationCommandOptions, UpsertGuildApplicationCommandOptions } from '@discordeno/types';
|
|
1
|
+
import type { AddDmRecipientOptions, AddGuildMemberOptions, AddLobbyMember, AtLeastOne, BeginGuildPrune, BigString, Camelize, CreateApplicationCommand, CreateApplicationEmoji, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGlobalApplicationCommandOptions, CreateGroupDmOptions, CreateGuildApplicationCommandOptions, CreateGuildBan, CreateGuildBulkBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildRole, CreateGuildSoundboardSound, CreateGuildStickerOptions, CreateLobby, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, CreateTestEntitlement, CreateWebhook, DeleteWebhookMessageOptions, DiscordAccessTokenResponse, DiscordActivityInstance, DiscordApplication, DiscordApplicationCommand, DiscordApplicationCommandPermissions, DiscordApplicationRoleConnection, DiscordApplicationRoleConnectionMetadata, DiscordAuditLog, DiscordAutoModerationRule, DiscordBan, DiscordBulkBan, DiscordChannel, DiscordConnection, DiscordCurrentAuthorization, DiscordEmoji, DiscordEntitlement, DiscordFollowedChannel, DiscordGetAnswerVotesResponse, DiscordGetChannelPins, DiscordGetGatewayBot, DiscordGuild, DiscordGuildApplicationCommandPermissions, DiscordGuildOnboarding, DiscordGuildPreview, DiscordGuildWidget, DiscordGuildWidgetSettings, DiscordIncidentsData, DiscordIntegration, DiscordInteractionCallbackResponse, DiscordInvite, DiscordInviteMetadata, DiscordListActiveThreads, DiscordListArchivedThreads, DiscordLobby, DiscordLobbyMember, DiscordMember, DiscordMemberWithUser, DiscordMessage, DiscordPrunedCount, DiscordRole, DiscordScheduledEvent, DiscordSku, DiscordSoundboardSound, DiscordStageInstance, DiscordSticker, DiscordStickerPack, DiscordSubscription, DiscordTargetUsersJobStatus, DiscordTemplate, DiscordThreadMember, DiscordTokenExchange, DiscordTokenRevocation, DiscordUser, DiscordVanityUrl, DiscordVoiceRegion, DiscordVoiceState, DiscordWebhook, DiscordWelcomeScreen, EditApplication, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildOnboarding, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditUserVoiceState, EditWebhookMessageOptions, ExecuteWebhook, FileContent, GetApplicationCommandPermissionOptions, GetBans, GetChannelPinsOptions, GetEntitlements, GetGlobalApplicationCommandsOptions, GetGuildApplicationCommandsOptions, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetPollAnswerVotes, GetReactions, GetScheduledEvents, GetScheduledEventUsers, GetThreadMember, GetUserGuilds, GetWebhookMessageOptions, InteractionCallbackData, InteractionCallbackOptions, InteractionResponse, LinkChannelToLobby, ListArchivedThreads, ListGuildMembers, ListSkuSubscriptionsOptions, ListThreadMembers, ModifyApplicationEmoji, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildIncidentActions, ModifyGuildMember, ModifyGuildSoundboardSound, ModifyGuildTemplate, ModifyGuildWelcomeScreen, ModifyLobby, ModifyRolePositions, ModifyWebhook, SearchMembers, SendSoundboardSound, StartThreadWithMessage, StartThreadWithoutMessage, UpsertGlobalApplicationCommandOptions, UpsertGuildApplicationCommandOptions } from '@discordeno/types';
|
|
2
2
|
import type { logger } from '@discordeno/utils';
|
|
3
3
|
import type { InvalidRequestBucket } from './invalidBucket.js';
|
|
4
4
|
import type { Queue } from './queue.js';
|
|
@@ -148,7 +148,7 @@ export interface RestManager {
|
|
|
148
148
|
*
|
|
149
149
|
* Fires a _Message Reaction Add_ gateway event.
|
|
150
150
|
*
|
|
151
|
-
* @see {@link https://discord.com/developers/
|
|
151
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-reaction}
|
|
152
152
|
*/
|
|
153
153
|
addReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
154
154
|
/**
|
|
@@ -183,7 +183,7 @@ export interface RestManager {
|
|
|
183
183
|
*
|
|
184
184
|
* Fires a _Guild Member Update_ gateway event.
|
|
185
185
|
*
|
|
186
|
-
* @see {@link https://discord.com/developers/
|
|
186
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#add-guild-member-role}
|
|
187
187
|
*/
|
|
188
188
|
addRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
189
189
|
/**
|
|
@@ -198,7 +198,7 @@ export interface RestManager {
|
|
|
198
198
|
*
|
|
199
199
|
* Fires a _Thread Members Update_ gateway event.
|
|
200
200
|
*
|
|
201
|
-
* @see {@link https://discord.com/developers/
|
|
201
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#add-thread-member}
|
|
202
202
|
*/
|
|
203
203
|
addThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
204
204
|
/**
|
|
@@ -211,7 +211,7 @@ export interface RestManager {
|
|
|
211
211
|
* @remarks
|
|
212
212
|
* Requires an OAuth2 access token with the `gdm.join` scope
|
|
213
213
|
*
|
|
214
|
-
* @see {@link https://discord.com/developers/
|
|
214
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#group-dm-add-recipient}
|
|
215
215
|
*/
|
|
216
216
|
addDmRecipient: (channelId: BigString, userId: BigString, options: AddDmRecipientOptions) => Promise<void>;
|
|
217
217
|
/**
|
|
@@ -227,7 +227,7 @@ export interface RestManager {
|
|
|
227
227
|
*
|
|
228
228
|
* Fires a _Guild Member Add_ gateway event.
|
|
229
229
|
*
|
|
230
|
-
* @see {@link https://discord.com/developers/
|
|
230
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#add-guild-member}
|
|
231
231
|
*/
|
|
232
232
|
addGuildMember: (guildId: BigString, userId: BigString, options: AddGuildMemberOptions) => Promise<void>;
|
|
233
233
|
/**
|
|
@@ -243,7 +243,7 @@ export interface RestManager {
|
|
|
243
243
|
*
|
|
244
244
|
* Fires an _Auto Moderation Rule Create_ gateway event.
|
|
245
245
|
*
|
|
246
|
-
* @see {@link https://discord.com/developers/
|
|
246
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#create-auto-moderation-rule}
|
|
247
247
|
*/
|
|
248
248
|
createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
249
249
|
/**
|
|
@@ -263,7 +263,7 @@ export interface RestManager {
|
|
|
263
263
|
*
|
|
264
264
|
* Fires a _Channel Create_ gateway event.
|
|
265
265
|
*
|
|
266
|
-
* @see {@link https://discord.com/developers/
|
|
266
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-channel}
|
|
267
267
|
*/
|
|
268
268
|
createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
269
269
|
/**
|
|
@@ -281,7 +281,7 @@ export interface RestManager {
|
|
|
281
281
|
*
|
|
282
282
|
* Fires a _Guild Emojis Update_ gateway event.
|
|
283
283
|
*
|
|
284
|
-
* @see {@link https://discord.com/developers/
|
|
284
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#create-guild-emoji}
|
|
285
285
|
*/
|
|
286
286
|
createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
|
|
287
287
|
/**
|
|
@@ -290,7 +290,7 @@ export interface RestManager {
|
|
|
290
290
|
* @param options - The parameters for the creation of the emoji.
|
|
291
291
|
* @returns An instance of the created {@link DiscordEmoji}.
|
|
292
292
|
*
|
|
293
|
-
* @see {@link https://discord.com/developers/
|
|
293
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#create-application-emoji}
|
|
294
294
|
*/
|
|
295
295
|
createApplicationEmoji: (options: CreateApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
|
|
296
296
|
/**
|
|
@@ -307,7 +307,7 @@ export interface RestManager {
|
|
|
307
307
|
* Fires a _Thread Create_ gateway event.
|
|
308
308
|
* Fires a _Message Create_ gateway event.
|
|
309
309
|
*
|
|
310
|
-
* @see {@link https://discord.com/developers/
|
|
310
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
|
|
311
311
|
*/
|
|
312
312
|
createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
313
313
|
/**
|
|
@@ -325,7 +325,7 @@ export interface RestManager {
|
|
|
325
325
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
326
326
|
* You will be able to update only your own application commands
|
|
327
327
|
*
|
|
328
|
-
* @see {@link https://discord.com/developers/
|
|
328
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#create-global-application-command}
|
|
329
329
|
*/
|
|
330
330
|
createGlobalApplicationCommand: (command: CreateApplicationCommand, options?: CreateGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
331
331
|
/**
|
|
@@ -343,7 +343,7 @@ export interface RestManager {
|
|
|
343
343
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
344
344
|
* You will be able to update only your own application commands
|
|
345
345
|
*
|
|
346
|
-
* @see {@link https://discord.com/developers/
|
|
346
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#create-guild-application-command}
|
|
347
347
|
*/
|
|
348
348
|
createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString, options?: CreateGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
349
349
|
/**
|
|
@@ -359,7 +359,7 @@ export interface RestManager {
|
|
|
359
359
|
* Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
|
|
360
360
|
* Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
|
|
361
361
|
*
|
|
362
|
-
* @see {@link https://discord.com/developers/
|
|
362
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#create-guild-sticker}
|
|
363
363
|
*/
|
|
364
364
|
createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<Camelize<DiscordSticker>>;
|
|
365
365
|
/**
|
|
@@ -374,7 +374,7 @@ export interface RestManager {
|
|
|
374
374
|
*
|
|
375
375
|
* Fires a _Guild Update_ gateway event.
|
|
376
376
|
*
|
|
377
|
-
* @see {@link https://discord.com/developers/
|
|
377
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#create-guild-template}
|
|
378
378
|
*/
|
|
379
379
|
createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Camelize<DiscordTemplate>>;
|
|
380
380
|
/**
|
|
@@ -393,7 +393,7 @@ export interface RestManager {
|
|
|
393
393
|
* @privateRemarks
|
|
394
394
|
* The request body is not optional, and an empty JSON object must be sent regardless of whether any fields are being transmitted.
|
|
395
395
|
*
|
|
396
|
-
* @see {@link https://discord.com/developers/
|
|
396
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-channel-invite}
|
|
397
397
|
*/
|
|
398
398
|
createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<Camelize<DiscordInvite>>;
|
|
399
399
|
/**
|
|
@@ -403,7 +403,7 @@ export interface RestManager {
|
|
|
403
403
|
*
|
|
404
404
|
* @param guildId - The ID of the guild to get role member counts for.
|
|
405
405
|
*
|
|
406
|
-
* @see {@link https://discord.com/developers/
|
|
406
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
407
407
|
*/
|
|
408
408
|
getGuildRoleMemberCounts: (guildId: BigString) => Promise<Record<string, number>>;
|
|
409
409
|
/**
|
|
@@ -419,7 +419,7 @@ export interface RestManager {
|
|
|
419
419
|
*
|
|
420
420
|
* Fires a _Guild Role Create_ gateway event.
|
|
421
421
|
*
|
|
422
|
-
* @see {@link https://discord.com/developers/
|
|
422
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-role}
|
|
423
423
|
*/
|
|
424
424
|
createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
425
425
|
/**
|
|
@@ -437,7 +437,7 @@ export interface RestManager {
|
|
|
437
437
|
*
|
|
438
438
|
* Fires a _Guild Scheduled Event Create_ gateway event.
|
|
439
439
|
*
|
|
440
|
-
* @see {@link https://discord.com/developers/
|
|
440
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#create-guild-scheduled-event}
|
|
441
441
|
*/
|
|
442
442
|
createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
443
443
|
/**
|
|
@@ -452,7 +452,7 @@ export interface RestManager {
|
|
|
452
452
|
*
|
|
453
453
|
* Fires a _Stage Instance Create_ gateway event.
|
|
454
454
|
*
|
|
455
|
-
* @see {@link https://discord.com/developers/
|
|
455
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#create-stage-instance}
|
|
456
456
|
*/
|
|
457
457
|
createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
458
458
|
/**
|
|
@@ -470,7 +470,7 @@ export interface RestManager {
|
|
|
470
470
|
*
|
|
471
471
|
* Fires a _Webhooks Update_ gateway event.
|
|
472
472
|
*
|
|
473
|
-
* @see {@link https://discord.com/developers/
|
|
473
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#create-webhook}
|
|
474
474
|
*/
|
|
475
475
|
createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
476
476
|
/**
|
|
@@ -485,7 +485,7 @@ export interface RestManager {
|
|
|
485
485
|
*
|
|
486
486
|
* Fires an _Auto Moderation Rule Delete_ gateway event.
|
|
487
487
|
*
|
|
488
|
-
* @see {@link https://discord.com/developers/
|
|
488
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#delete-auto-moderation-rule}
|
|
489
489
|
*/
|
|
490
490
|
deleteAutomodRule: (guildId: BigString, ruleId: BigString, reason?: string) => Promise<void>;
|
|
491
491
|
/**
|
|
@@ -511,7 +511,7 @@ export interface RestManager {
|
|
|
511
511
|
*
|
|
512
512
|
* - Fires a _Channel Delete_ gateway event.
|
|
513
513
|
*
|
|
514
|
-
* @see {@link https://discord.com/developers/
|
|
514
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#deleteclose-channel}
|
|
515
515
|
*/
|
|
516
516
|
deleteChannel: (channelId: BigString, reason?: string) => Promise<void>;
|
|
517
517
|
/**
|
|
@@ -526,7 +526,7 @@ export interface RestManager {
|
|
|
526
526
|
*
|
|
527
527
|
* Fires a _Channel Update_ gateway event.
|
|
528
528
|
*
|
|
529
|
-
* @see {@link https://discord.com/developers/
|
|
529
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-permission}
|
|
530
530
|
*/
|
|
531
531
|
deleteChannelPermissionOverride: (channelId: BigString, overwriteId: BigString, reason?: string) => Promise<void>;
|
|
532
532
|
/**
|
|
@@ -542,7 +542,7 @@ export interface RestManager {
|
|
|
542
542
|
*
|
|
543
543
|
* Fires a _Guild Emojis Update_ gateway event.
|
|
544
544
|
*
|
|
545
|
-
* @see {@link https://discord.com/developers/
|
|
545
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-guild-emoji}
|
|
546
546
|
*/
|
|
547
547
|
deleteEmoji: (guildId: BigString, id: BigString, reason?: string) => Promise<void>;
|
|
548
548
|
/**
|
|
@@ -550,7 +550,7 @@ export interface RestManager {
|
|
|
550
550
|
*
|
|
551
551
|
* @param id - The ID of the emoji to delete.
|
|
552
552
|
*
|
|
553
|
-
* @see {@link https://discord.com/developers/
|
|
553
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-application-emoji}
|
|
554
554
|
*/
|
|
555
555
|
deleteApplicationEmoji: (id: BigString) => Promise<void>;
|
|
556
556
|
/**
|
|
@@ -564,7 +564,7 @@ export interface RestManager {
|
|
|
564
564
|
*
|
|
565
565
|
* Fires a _Message Delete_ event.
|
|
566
566
|
*
|
|
567
|
-
* @see {@link https://discord.com/developers/
|
|
567
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-followup-message}
|
|
568
568
|
*/
|
|
569
569
|
deleteFollowupMessage: (token: string, messageId: BigString) => Promise<void>;
|
|
570
570
|
/**
|
|
@@ -572,7 +572,7 @@ export interface RestManager {
|
|
|
572
572
|
*
|
|
573
573
|
* @param commandId - The ID of the command to delete.
|
|
574
574
|
*
|
|
575
|
-
* @see {@link https://discord.com/developers/
|
|
575
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-global-application-command}
|
|
576
576
|
*/
|
|
577
577
|
deleteGlobalApplicationCommand: (commandId: BigString) => Promise<void>;
|
|
578
578
|
/**
|
|
@@ -581,7 +581,7 @@ export interface RestManager {
|
|
|
581
581
|
* @param guildId - The ID of the guild to delete the command from.
|
|
582
582
|
* @param commandId - The ID of the command to delete from the guild.
|
|
583
583
|
*
|
|
584
|
-
* @see {@link https://discord.com/developers/
|
|
584
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-guild-application-command}
|
|
585
585
|
*/
|
|
586
586
|
deleteGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<void>;
|
|
587
587
|
/**
|
|
@@ -598,7 +598,7 @@ export interface RestManager {
|
|
|
598
598
|
* Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
|
|
599
599
|
* Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
|
|
600
600
|
*
|
|
601
|
-
* @see {@link https://discord.com/developers/
|
|
601
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#delete-guild-sticker}
|
|
602
602
|
*/
|
|
603
603
|
deleteGuildSticker: (guildId: BigString, stickerId: BigString, reason?: string) => Promise<void>;
|
|
604
604
|
/**
|
|
@@ -612,7 +612,7 @@ export interface RestManager {
|
|
|
612
612
|
*
|
|
613
613
|
* Fires a _Guild Update_ gateway event.
|
|
614
614
|
*
|
|
615
|
-
* @see {@link https://discord.com/developers/
|
|
615
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#delete-guild-template}
|
|
616
616
|
*/
|
|
617
617
|
deleteGuildTemplate: (guildId: BigString, templateCode: string) => Promise<void>;
|
|
618
618
|
/**
|
|
@@ -630,7 +630,7 @@ export interface RestManager {
|
|
|
630
630
|
* Fires a _Guild Integrations Update_ gateway event.
|
|
631
631
|
* Fires a _Integration Delete_ gateway event.
|
|
632
632
|
*
|
|
633
|
-
* @see {@link https://discord.com/developers/
|
|
633
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-integration}
|
|
634
634
|
*/
|
|
635
635
|
deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
|
|
636
636
|
/**
|
|
@@ -644,9 +644,47 @@ export interface RestManager {
|
|
|
644
644
|
*
|
|
645
645
|
* Fires an _Invite Delete_ gateway event.
|
|
646
646
|
*
|
|
647
|
-
* @see {@link https://discord.com/developers/
|
|
647
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-invite}
|
|
648
648
|
*/
|
|
649
649
|
deleteInvite: (inviteCode: string, reason?: string) => Promise<void>;
|
|
650
|
+
/**
|
|
651
|
+
* Gets the users allowed to see and accept this invite.
|
|
652
|
+
*
|
|
653
|
+
* @param inviteCode - The invite code of the invite to update.
|
|
654
|
+
* @returns CSV file containing the user IDs with the header `user_id` and each user ID from the original file
|
|
655
|
+
*
|
|
656
|
+
* @remarks
|
|
657
|
+
* Requires called to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
658
|
+
*
|
|
659
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
660
|
+
*/
|
|
661
|
+
getTargetUsers: (inviteCode: string) => Promise<string>;
|
|
662
|
+
/**
|
|
663
|
+
* Updates the users allowed to see and accept this invite.
|
|
664
|
+
*
|
|
665
|
+
* @param inviteCode - The invite code of the invite to update.
|
|
666
|
+
* @param targetUsersFile - A CSV file with a single column of user IDs for all the users able to accept this invite
|
|
667
|
+
*
|
|
668
|
+
* @remarks
|
|
669
|
+
* Requires the caller to be the inviter or have the `MANAGE_GUILD` permission.
|
|
670
|
+
*
|
|
671
|
+
* Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described.
|
|
672
|
+
*
|
|
673
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
674
|
+
*/
|
|
675
|
+
updateTargetUsers: (inviteCode: string, targetUsersFile: Blob) => Promise<void>;
|
|
676
|
+
/**
|
|
677
|
+
* Processing target users from a CSV when creating or updating an invite is done asynchronously. This endpoint allows you to check the status of that job.
|
|
678
|
+
*
|
|
679
|
+
* @param inviteCode - The invite code of the invite to check the target users job status for.
|
|
680
|
+
* @returns An object containing the status of the target users job.
|
|
681
|
+
*
|
|
682
|
+
* @remarks
|
|
683
|
+
* Requires the caller to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
684
|
+
*
|
|
685
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
686
|
+
*/
|
|
687
|
+
getTargetUsersJobStatus: (inviteCode: string) => Promise<Camelize<DiscordTargetUsersJobStatus>>;
|
|
650
688
|
/**
|
|
651
689
|
* Deletes a message from a channel.
|
|
652
690
|
*
|
|
@@ -660,7 +698,7 @@ export interface RestManager {
|
|
|
660
698
|
*
|
|
661
699
|
* Fires a _Message Delete_ gateway event.
|
|
662
700
|
*
|
|
663
|
-
* @see {@link https://discord.com/developers/
|
|
701
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-message}
|
|
664
702
|
*/
|
|
665
703
|
deleteMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
666
704
|
/**
|
|
@@ -677,7 +715,7 @@ export interface RestManager {
|
|
|
677
715
|
*
|
|
678
716
|
* Fires a _Message Delete Bulk_ gateway event.
|
|
679
717
|
*
|
|
680
|
-
* @see {@link https://discord.com/developers/
|
|
718
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#bulk-delete-messages}
|
|
681
719
|
*/
|
|
682
720
|
deleteMessages: (channelId: BigString, messageIds: BigString[], reason?: string) => Promise<void>;
|
|
683
721
|
/**
|
|
@@ -690,7 +728,7 @@ export interface RestManager {
|
|
|
690
728
|
*
|
|
691
729
|
* Fires a _Message Delete_ event.
|
|
692
730
|
*
|
|
693
|
-
* @see {@link https://discord.com/developers/
|
|
731
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-original-interaction-response}
|
|
694
732
|
*/
|
|
695
733
|
deleteOriginalInteractionResponse: (token: string) => Promise<void>;
|
|
696
734
|
/**
|
|
@@ -705,7 +743,7 @@ export interface RestManager {
|
|
|
705
743
|
*
|
|
706
744
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
707
745
|
*
|
|
708
|
-
* @see {@link https://discord.com/developers/
|
|
746
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-own-reaction}
|
|
709
747
|
*/
|
|
710
748
|
deleteOwnReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
711
749
|
/**
|
|
@@ -721,7 +759,7 @@ export interface RestManager {
|
|
|
721
759
|
*
|
|
722
760
|
* Fires a _Message Reaction Remove All_ gateway event.
|
|
723
761
|
*
|
|
724
|
-
* @see {@link https://discord.com/developers/
|
|
762
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions}
|
|
725
763
|
*/
|
|
726
764
|
deleteReactionsAll: (channelId: BigString, messageId: BigString) => Promise<void>;
|
|
727
765
|
/**
|
|
@@ -738,7 +776,7 @@ export interface RestManager {
|
|
|
738
776
|
*
|
|
739
777
|
* Fires a _Message Reaction Remove Emoji_ gateway event.
|
|
740
778
|
*
|
|
741
|
-
* @see {@link https://discord.com/developers/
|
|
779
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions-for-emoji}
|
|
742
780
|
*/
|
|
743
781
|
deleteReactionsEmoji: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
744
782
|
/**
|
|
@@ -753,7 +791,7 @@ export interface RestManager {
|
|
|
753
791
|
*
|
|
754
792
|
* Fires a _Guild Role Delete_ gateway event.
|
|
755
793
|
*
|
|
756
|
-
* @see {@link https://discord.com/developers/
|
|
794
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-role}
|
|
757
795
|
*/
|
|
758
796
|
deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
759
797
|
/**
|
|
@@ -767,7 +805,7 @@ export interface RestManager {
|
|
|
767
805
|
*
|
|
768
806
|
* Fires a _Guild Scheduled Event Delete_ gateway event.
|
|
769
807
|
*
|
|
770
|
-
* @see {@link https://discord.com/developers/
|
|
808
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#delete-guild-scheduled-event}
|
|
771
809
|
*/
|
|
772
810
|
deleteScheduledEvent: (guildId: BigString, eventId: BigString) => Promise<void>;
|
|
773
811
|
/**
|
|
@@ -781,7 +819,7 @@ export interface RestManager {
|
|
|
781
819
|
*
|
|
782
820
|
* Fires a _Stage Instance Delete_ gateway event.
|
|
783
821
|
*
|
|
784
|
-
* @see {@link https://discord.com/developers/
|
|
822
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#delete-stage-instance}
|
|
785
823
|
*/
|
|
786
824
|
deleteStageInstance: (channelId: BigString, reason?: string) => Promise<void>;
|
|
787
825
|
/**
|
|
@@ -799,7 +837,7 @@ export interface RestManager {
|
|
|
799
837
|
*
|
|
800
838
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
801
839
|
*
|
|
802
|
-
* @see {@link https://discord.com/developers/
|
|
840
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-user-reaction}
|
|
803
841
|
*/
|
|
804
842
|
deleteUserReaction: (channelId: BigString, messageId: BigString, userId: BigString, reaction: string) => Promise<void>;
|
|
805
843
|
/**
|
|
@@ -812,7 +850,7 @@ export interface RestManager {
|
|
|
812
850
|
*
|
|
813
851
|
* Fires a _Webhooks Update_ gateway event.
|
|
814
852
|
*
|
|
815
|
-
* @see {@link https://discord.com/developers/
|
|
853
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
816
854
|
*/
|
|
817
855
|
deleteWebhook: (webhookId: BigString, reason?: string) => Promise<void>;
|
|
818
856
|
/**
|
|
@@ -826,7 +864,7 @@ export interface RestManager {
|
|
|
826
864
|
* @remarks
|
|
827
865
|
* Fires a _Message Delete_ gateway event.
|
|
828
866
|
*
|
|
829
|
-
* @see {@link https://discord.com/developers/
|
|
867
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
830
868
|
*/
|
|
831
869
|
deleteWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: DeleteWebhookMessageOptions) => Promise<void>;
|
|
832
870
|
/**
|
|
@@ -838,7 +876,7 @@ export interface RestManager {
|
|
|
838
876
|
* @remarks
|
|
839
877
|
* Fires a _Message Delete_ gateway event.
|
|
840
878
|
*
|
|
841
|
-
* @see {@link https://discord.com/developers/
|
|
879
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-with-token}
|
|
842
880
|
*/
|
|
843
881
|
deleteWebhookWithToken: (webhookId: BigString, token: string) => Promise<void>;
|
|
844
882
|
/**
|
|
@@ -853,7 +891,7 @@ export interface RestManager {
|
|
|
853
891
|
* @remarks
|
|
854
892
|
* 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.
|
|
855
893
|
*
|
|
856
|
-
* @see {@link https://discord.com/developers/
|
|
894
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-application-command-permissions}
|
|
857
895
|
*/
|
|
858
896
|
editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: Camelize<DiscordApplicationCommandPermissions>[]) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
859
897
|
/**
|
|
@@ -870,7 +908,7 @@ export interface RestManager {
|
|
|
870
908
|
*
|
|
871
909
|
* Fires an _Auto Moderation Rule Update_ gateway event.
|
|
872
910
|
*
|
|
873
|
-
* @see {@link https://discord.com/developers/
|
|
911
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule}
|
|
874
912
|
*/
|
|
875
913
|
editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
876
914
|
/**
|
|
@@ -927,7 +965,7 @@ export interface RestManager {
|
|
|
927
965
|
*
|
|
928
966
|
* Fires a _Channel Update_ gateway event.
|
|
929
967
|
*
|
|
930
|
-
* @see {@link https://discord.com/developers/
|
|
968
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-channel-permissions}
|
|
931
969
|
*/
|
|
932
970
|
editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
|
|
933
971
|
/**
|
|
@@ -941,7 +979,7 @@ export interface RestManager {
|
|
|
941
979
|
*
|
|
942
980
|
* Fires a _Channel Update_ gateway event for every channel impacted in this change.
|
|
943
981
|
*
|
|
944
|
-
* @see {@link https://discord.com/developers/
|
|
982
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-channel-positions}
|
|
945
983
|
*/
|
|
946
984
|
editChannelPositions: (guildId: BigString, channelPositions: ModifyGuildChannelPositions[]) => Promise<void>;
|
|
947
985
|
/**
|
|
@@ -959,7 +997,7 @@ export interface RestManager {
|
|
|
959
997
|
*
|
|
960
998
|
* Fires a `Guild Emojis Update` gateway event.
|
|
961
999
|
*
|
|
962
|
-
* @see {@link https://discord.com/developers/
|
|
1000
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-guild-emoji}
|
|
963
1001
|
*/
|
|
964
1002
|
editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
|
|
965
1003
|
/**
|
|
@@ -969,7 +1007,7 @@ export interface RestManager {
|
|
|
969
1007
|
* @param options - The parameters for the edit of the emoji.
|
|
970
1008
|
* @returns An instance of the updated {@link DiscordEmoji}.
|
|
971
1009
|
*
|
|
972
|
-
* @see {@link https://discord.com/developers/
|
|
1010
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-application-emoji}
|
|
973
1011
|
*/
|
|
974
1012
|
editApplicationEmoji: (id: BigString, options: ModifyApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
|
|
975
1013
|
/**
|
|
@@ -987,7 +1025,7 @@ export interface RestManager {
|
|
|
987
1025
|
*
|
|
988
1026
|
* Fires a _Message Update_ event.
|
|
989
1027
|
*
|
|
990
|
-
* @see {@link https://discord.com/developers/
|
|
1028
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-followup-message}
|
|
991
1029
|
*/
|
|
992
1030
|
editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
993
1031
|
/**
|
|
@@ -997,7 +1035,7 @@ export interface RestManager {
|
|
|
997
1035
|
* @param options - The parameters for the edit of the command.
|
|
998
1036
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
999
1037
|
*
|
|
1000
|
-
* @see {@link https://discord.com/developers/
|
|
1038
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-global-application-command}
|
|
1001
1039
|
*/
|
|
1002
1040
|
editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1003
1041
|
/**
|
|
@@ -1016,7 +1054,7 @@ export interface RestManager {
|
|
|
1016
1054
|
*
|
|
1017
1055
|
* Fires a _Guild Update_ gateway event.
|
|
1018
1056
|
*
|
|
1019
|
-
* @see {@link https://discord.com/developers/
|
|
1057
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild}
|
|
1020
1058
|
*/
|
|
1021
1059
|
editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<Camelize<DiscordGuild>>;
|
|
1022
1060
|
/**
|
|
@@ -1027,7 +1065,7 @@ export interface RestManager {
|
|
|
1027
1065
|
* @param options - The parameters for the edit of the command.
|
|
1028
1066
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
1029
1067
|
*
|
|
1030
|
-
* @see {@link https://discord.com/developers/
|
|
1068
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-guild-application-command}
|
|
1031
1069
|
*/
|
|
1032
1070
|
editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1033
1071
|
/**
|
|
@@ -1042,7 +1080,7 @@ export interface RestManager {
|
|
|
1042
1080
|
* For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1043
1081
|
* Fires a Guild Stickers Update Gateway event.
|
|
1044
1082
|
*
|
|
1045
|
-
* @see {@link https://discord.com/developers/
|
|
1083
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#modify-guild-sticker}
|
|
1046
1084
|
*/
|
|
1047
1085
|
editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<Camelize<DiscordSticker>>;
|
|
1048
1086
|
/**
|
|
@@ -1058,7 +1096,7 @@ export interface RestManager {
|
|
|
1058
1096
|
*
|
|
1059
1097
|
* Fires a _Guild Update_ gateway event.
|
|
1060
1098
|
*
|
|
1061
|
-
* @see {@link https://discord.com/developers/
|
|
1099
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#modify-guild-template}
|
|
1062
1100
|
*/
|
|
1063
1101
|
editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
|
|
1064
1102
|
/**
|
|
@@ -1076,7 +1114,7 @@ export interface RestManager {
|
|
|
1076
1114
|
*
|
|
1077
1115
|
* Fires a _Message Update_ gateway event.
|
|
1078
1116
|
*
|
|
1079
|
-
* @see {@link https://discord.com/developers/
|
|
1117
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-message}
|
|
1080
1118
|
*/
|
|
1081
1119
|
editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
|
|
1082
1120
|
/**
|
|
@@ -1093,7 +1131,7 @@ export interface RestManager {
|
|
|
1093
1131
|
*
|
|
1094
1132
|
* Fires a _Message Update_ event.
|
|
1095
1133
|
*
|
|
1096
|
-
* @see {@link https://discord.com/developers/
|
|
1134
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-original-interaction-response}
|
|
1097
1135
|
*/
|
|
1098
1136
|
editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
1099
1137
|
/**
|
|
@@ -1111,7 +1149,7 @@ export interface RestManager {
|
|
|
1111
1149
|
* If attempting to request to speak:
|
|
1112
1150
|
* - Requires the `REQUEST_TO_SPEAK` permission.
|
|
1113
1151
|
*
|
|
1114
|
-
* @see {@link https://discord.com/developers/
|
|
1152
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-current-user-voice-state}
|
|
1115
1153
|
*/
|
|
1116
1154
|
editOwnVoiceState: (guildId: BigString, options: EditOwnVoiceState) => Promise<void>;
|
|
1117
1155
|
/**
|
|
@@ -1128,7 +1166,7 @@ export interface RestManager {
|
|
|
1128
1166
|
*
|
|
1129
1167
|
* Fires a _Guild Role Update_ gateway event.
|
|
1130
1168
|
*
|
|
1131
|
-
* @see {@link https://discord.com/developers/
|
|
1169
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role}
|
|
1132
1170
|
*/
|
|
1133
1171
|
editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
1134
1172
|
/**
|
|
@@ -1144,7 +1182,7 @@ export interface RestManager {
|
|
|
1144
1182
|
*
|
|
1145
1183
|
* Fires a _Guild Role Update_ gateway event for every role impacted in this change.
|
|
1146
1184
|
*
|
|
1147
|
-
* @see {@link https://discord.com/developers/
|
|
1185
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role-positions}
|
|
1148
1186
|
*/
|
|
1149
1187
|
editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<Camelize<DiscordRole>[]>;
|
|
1150
1188
|
/**
|
|
@@ -1164,7 +1202,7 @@ export interface RestManager {
|
|
|
1164
1202
|
*
|
|
1165
1203
|
* Fires a _Guild Scheduled Event Update_ gateway event.
|
|
1166
1204
|
*
|
|
1167
|
-
* @see {@link https://discord.com/developers/
|
|
1205
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
|
1168
1206
|
*/
|
|
1169
1207
|
editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
1170
1208
|
/**
|
|
@@ -1180,7 +1218,7 @@ export interface RestManager {
|
|
|
1180
1218
|
*
|
|
1181
1219
|
* Fires a _Stage Instance Update_ event.
|
|
1182
1220
|
*
|
|
1183
|
-
* @see {@link https://discord.com/developers/
|
|
1221
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance}
|
|
1184
1222
|
*/
|
|
1185
1223
|
editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
1186
1224
|
/**
|
|
@@ -1194,7 +1232,7 @@ export interface RestManager {
|
|
|
1194
1232
|
*
|
|
1195
1233
|
* Requires the `MUTE_MEMBERS` permission.
|
|
1196
1234
|
*
|
|
1197
|
-
* @see {@link https://discord.com/developers/
|
|
1235
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-user-voice-state}
|
|
1198
1236
|
*/
|
|
1199
1237
|
editUserVoiceState: (guildId: BigString, options: EditUserVoiceState) => Promise<void>;
|
|
1200
1238
|
/**
|
|
@@ -1208,7 +1246,7 @@ export interface RestManager {
|
|
|
1208
1246
|
* @remarks
|
|
1209
1247
|
* This requires the `role_connections.write` scope.
|
|
1210
1248
|
*
|
|
1211
|
-
* @see {@link https://discord.com/developers/
|
|
1249
|
+
* @see {@link https://docs.discord.com/developers/resources/user#update-user-application-role-connection}
|
|
1212
1250
|
*/
|
|
1213
1251
|
editUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString, options: Camelize<DiscordApplicationRoleConnection>) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
1214
1252
|
/**
|
|
@@ -1223,7 +1261,7 @@ export interface RestManager {
|
|
|
1223
1261
|
*
|
|
1224
1262
|
* Fires a _Webhooks Update_ gateway event.
|
|
1225
1263
|
*
|
|
1226
|
-
* @see {@link https://discord.com/developers/
|
|
1264
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook}
|
|
1227
1265
|
*/
|
|
1228
1266
|
editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
1229
1267
|
/**
|
|
@@ -1238,7 +1276,7 @@ export interface RestManager {
|
|
|
1238
1276
|
* @remarks
|
|
1239
1277
|
* Fires a _Message Update_ gateway event.
|
|
1240
1278
|
*
|
|
1241
|
-
* @see {@link https://discord.com/developers/
|
|
1279
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook-message}
|
|
1242
1280
|
*/
|
|
1243
1281
|
editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: EditWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
1244
1282
|
/**
|
|
@@ -1253,7 +1291,7 @@ export interface RestManager {
|
|
|
1253
1291
|
*
|
|
1254
1292
|
* Fires a _Webhooks Update_ gateway event.
|
|
1255
1293
|
*
|
|
1256
|
-
* @see {@link https://discord.com/developers/
|
|
1294
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token}
|
|
1257
1295
|
*/
|
|
1258
1296
|
editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
|
|
1259
1297
|
/**
|
|
@@ -1269,7 +1307,7 @@ export interface RestManager {
|
|
|
1269
1307
|
*
|
|
1270
1308
|
* Fires a _Guild Update_ gateway event.
|
|
1271
1309
|
*
|
|
1272
|
-
* @see {@link https://discord.com/developers/
|
|
1310
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-welcome-screen}
|
|
1273
1311
|
*/
|
|
1274
1312
|
editWelcomeScreen: (guildId: BigString, options: ModifyGuildWelcomeScreen, reason?: string) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
1275
1313
|
/**
|
|
@@ -1284,7 +1322,7 @@ export interface RestManager {
|
|
|
1284
1322
|
*
|
|
1285
1323
|
* Fires a _Guild Update_ gateway event.
|
|
1286
1324
|
*
|
|
1287
|
-
* @see {@link https://discord.com/developers/
|
|
1325
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-widget}
|
|
1288
1326
|
*/
|
|
1289
1327
|
editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>, reason?: string) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
1290
1328
|
/**
|
|
@@ -1298,7 +1336,7 @@ export interface RestManager {
|
|
|
1298
1336
|
* @remarks
|
|
1299
1337
|
* If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
|
|
1300
1338
|
*
|
|
1301
|
-
* @see {@link https://discord.com/developers/
|
|
1339
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#execute-webhook}
|
|
1302
1340
|
*/
|
|
1303
1341
|
executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
|
|
1304
1342
|
/**
|
|
@@ -1314,7 +1352,7 @@ export interface RestManager {
|
|
|
1314
1352
|
*
|
|
1315
1353
|
* Fires a _Webhooks Update_ gateway event.
|
|
1316
1354
|
*
|
|
1317
|
-
* @see {@link https://discord.com/developers/
|
|
1355
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#follow-announcement-channel}
|
|
1318
1356
|
*/
|
|
1319
1357
|
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<Camelize<DiscordFollowedChannel>>;
|
|
1320
1358
|
/**
|
|
@@ -1328,7 +1366,7 @@ export interface RestManager {
|
|
|
1328
1366
|
*
|
|
1329
1367
|
* Threads are ordered by the `id` property in descending order.
|
|
1330
1368
|
*
|
|
1331
|
-
* @see {@link https://discord.com/developers/
|
|
1369
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#list-active-guild-threads}
|
|
1332
1370
|
*/
|
|
1333
1371
|
getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordListActiveThreads>>;
|
|
1334
1372
|
/** Get the applications info */
|
|
@@ -1378,7 +1416,7 @@ export interface RestManager {
|
|
|
1378
1416
|
* @remarks
|
|
1379
1417
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1380
1418
|
*
|
|
1381
|
-
* @see {@link https://discord.com/developers/
|
|
1419
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-application-command-permissions}
|
|
1382
1420
|
*/
|
|
1383
1421
|
getApplicationCommandPermission: (guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
1384
1422
|
/**
|
|
@@ -1391,7 +1429,7 @@ export interface RestManager {
|
|
|
1391
1429
|
* @remarks
|
|
1392
1430
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1393
1431
|
*
|
|
1394
|
-
* @see {@link https://discord.com/developers/
|
|
1432
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command-permissions}
|
|
1395
1433
|
*/
|
|
1396
1434
|
getApplicationCommandPermissions: (guildId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>[]>;
|
|
1397
1435
|
/**
|
|
@@ -1404,7 +1442,7 @@ export interface RestManager {
|
|
|
1404
1442
|
* @remarks
|
|
1405
1443
|
* Requires the `VIEW_AUDIT_LOG` permission.
|
|
1406
1444
|
*
|
|
1407
|
-
* @see {@link https://discord.com/developers/
|
|
1445
|
+
* @see {@link https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log}
|
|
1408
1446
|
*/
|
|
1409
1447
|
getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
|
|
1410
1448
|
/**
|
|
@@ -1417,7 +1455,7 @@ export interface RestManager {
|
|
|
1417
1455
|
* @remarks
|
|
1418
1456
|
* Requires the `MANAGE_GUILD` permission.
|
|
1419
1457
|
*
|
|
1420
|
-
* @see {@link https://discord.com/developers/
|
|
1458
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#get-auto-moderation-rule}
|
|
1421
1459
|
*/
|
|
1422
1460
|
getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
1423
1461
|
/**
|
|
@@ -1429,7 +1467,7 @@ export interface RestManager {
|
|
|
1429
1467
|
* @remarks
|
|
1430
1468
|
* Requires the `MANAGE_GUILD` permission.
|
|
1431
1469
|
*
|
|
1432
|
-
* @see {@link https://discord.com/developers/
|
|
1470
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild}
|
|
1433
1471
|
*/
|
|
1434
1472
|
getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule>[]>;
|
|
1435
1473
|
/**
|
|
@@ -1448,7 +1486,7 @@ export interface RestManager {
|
|
|
1448
1486
|
* @remarks
|
|
1449
1487
|
* Requires the `BAN_MEMBERS` permission.
|
|
1450
1488
|
*
|
|
1451
|
-
* @see {@link https://discord.com/developers/
|
|
1489
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-ban}
|
|
1452
1490
|
*/
|
|
1453
1491
|
getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
|
|
1454
1492
|
/**
|
|
@@ -1463,7 +1501,7 @@ export interface RestManager {
|
|
|
1463
1501
|
*
|
|
1464
1502
|
* Users are ordered by their IDs in _ascending_ order.
|
|
1465
1503
|
*
|
|
1466
|
-
* @see {@link https://discord.com/developers/
|
|
1504
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-bans}
|
|
1467
1505
|
*/
|
|
1468
1506
|
getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan>[]>;
|
|
1469
1507
|
/**
|
|
@@ -1475,7 +1513,7 @@ export interface RestManager {
|
|
|
1475
1513
|
* @remarks
|
|
1476
1514
|
* If the channel is a thread, a {@link DiscordThreadMember} object is included in the result.
|
|
1477
1515
|
*
|
|
1478
|
-
* @see {@link https://discord.com/developers/
|
|
1516
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel}
|
|
1479
1517
|
*/
|
|
1480
1518
|
getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1481
1519
|
/**
|
|
@@ -1489,7 +1527,7 @@ export interface RestManager {
|
|
|
1489
1527
|
*
|
|
1490
1528
|
* Only usable for guild channels.
|
|
1491
1529
|
*
|
|
1492
|
-
* @see {@link https://discord.com/developers/
|
|
1530
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-invites}
|
|
1493
1531
|
*/
|
|
1494
1532
|
getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1495
1533
|
/**
|
|
@@ -1501,7 +1539,7 @@ export interface RestManager {
|
|
|
1501
1539
|
* @remarks
|
|
1502
1540
|
* Excludes threads.
|
|
1503
1541
|
*
|
|
1504
|
-
* @see {@link https://discord.com/developers/
|
|
1542
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-channels}
|
|
1505
1543
|
*/
|
|
1506
1544
|
getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel>[]>;
|
|
1507
1545
|
/**
|
|
@@ -1513,7 +1551,7 @@ export interface RestManager {
|
|
|
1513
1551
|
* @remarks
|
|
1514
1552
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1515
1553
|
*
|
|
1516
|
-
* @see {@link https://discord.com/developers/
|
|
1554
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-channel-webhooks}
|
|
1517
1555
|
*/
|
|
1518
1556
|
getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1519
1557
|
/**
|
|
@@ -1522,7 +1560,7 @@ export interface RestManager {
|
|
|
1522
1560
|
* @param userId - The ID of the user to create the DM channel with.
|
|
1523
1561
|
* @returns An instance of {@link DiscordChannel}.
|
|
1524
1562
|
*
|
|
1525
|
-
* @see {@link https://discord.com/developers/
|
|
1563
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-dm}
|
|
1526
1564
|
*/
|
|
1527
1565
|
getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1528
1566
|
/**
|
|
@@ -1538,7 +1576,7 @@ export interface RestManager {
|
|
|
1538
1576
|
*
|
|
1539
1577
|
* Fires a _Channel create_ gateway event.
|
|
1540
1578
|
*
|
|
1541
|
-
* @see {@link https://discord.com/developers/
|
|
1579
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-group-dm}
|
|
1542
1580
|
*/
|
|
1543
1581
|
getGroupDmChannel: (options: CreateGroupDmOptions) => Promise<Camelize<DiscordChannel>>;
|
|
1544
1582
|
/**
|
|
@@ -1550,9 +1588,9 @@ export interface RestManager {
|
|
|
1550
1588
|
*
|
|
1551
1589
|
* @remarks
|
|
1552
1590
|
* Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission,
|
|
1553
|
-
* or if the bot created the emoji and has the
|
|
1591
|
+
* or if the bot created the emoji and has the `CREATE_GUILD_EXPRESSIONS` permission.
|
|
1554
1592
|
*
|
|
1555
|
-
* @see {@link https://discord.com/developers/
|
|
1593
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-guild-emoji}
|
|
1556
1594
|
*/
|
|
1557
1595
|
getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1558
1596
|
/**
|
|
@@ -1564,7 +1602,7 @@ export interface RestManager {
|
|
|
1564
1602
|
* @remarks
|
|
1565
1603
|
* 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.
|
|
1566
1604
|
*
|
|
1567
|
-
* @see {@link https://discord.com/developers/
|
|
1605
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-application-emoji}
|
|
1568
1606
|
*/
|
|
1569
1607
|
getApplicationEmoji: (emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1570
1608
|
/**
|
|
@@ -1576,7 +1614,7 @@ export interface RestManager {
|
|
|
1576
1614
|
* @remarks
|
|
1577
1615
|
* Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1578
1616
|
*
|
|
1579
|
-
* @see {@link https://discord.com/developers/
|
|
1617
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-guild-emojis}
|
|
1580
1618
|
*/
|
|
1581
1619
|
getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji>[]>;
|
|
1582
1620
|
/**
|
|
@@ -1587,7 +1625,7 @@ export interface RestManager {
|
|
|
1587
1625
|
* @remarks
|
|
1588
1626
|
* 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.
|
|
1589
1627
|
*
|
|
1590
|
-
* @see {@link https://discord.com/developers/
|
|
1628
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-application-emojis}
|
|
1591
1629
|
*/
|
|
1592
1630
|
getApplicationEmojis: () => Promise<{
|
|
1593
1631
|
items: Camelize<DiscordEmoji>[];
|
|
@@ -1606,7 +1644,7 @@ export interface RestManager {
|
|
|
1606
1644
|
*
|
|
1607
1645
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1608
1646
|
*
|
|
1609
|
-
* @see {@link https://discord.com/developers/
|
|
1647
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-followup-message}
|
|
1610
1648
|
*/
|
|
1611
1649
|
getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1612
1650
|
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
|
|
@@ -1617,7 +1655,7 @@ export interface RestManager {
|
|
|
1617
1655
|
* @param commandId - The ID of the command to get.
|
|
1618
1656
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1619
1657
|
*
|
|
1620
|
-
* @see {@link https://discord.com/developers/
|
|
1658
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-command}
|
|
1621
1659
|
*/
|
|
1622
1660
|
getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1623
1661
|
/**
|
|
@@ -1626,7 +1664,7 @@ export interface RestManager {
|
|
|
1626
1664
|
* @param options - The parameters for the fetching of global application commands
|
|
1627
1665
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1628
1666
|
*
|
|
1629
|
-
* @see {@link https://discord.com/developers/
|
|
1667
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commands}
|
|
1630
1668
|
*/
|
|
1631
1669
|
getGlobalApplicationCommands: (options?: GetGlobalApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1632
1670
|
/**
|
|
@@ -1636,7 +1674,7 @@ export interface RestManager {
|
|
|
1636
1674
|
* @param options - The parameters for the fetching of the guild.
|
|
1637
1675
|
* @returns An instance of {@link DiscordGuild}.
|
|
1638
1676
|
*
|
|
1639
|
-
* @see {@link https://discord.com/developers/
|
|
1677
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild}
|
|
1640
1678
|
*/
|
|
1641
1679
|
getGuild: (guildId: BigString, options?: {
|
|
1642
1680
|
counts?: boolean;
|
|
@@ -1651,7 +1689,7 @@ export interface RestManager {
|
|
|
1651
1689
|
* @remarks
|
|
1652
1690
|
* If used with an access token, the token needs to have the `guilds` scope
|
|
1653
1691
|
*
|
|
1654
|
-
* @see {@link https://discord.com/developers/
|
|
1692
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guilds}
|
|
1655
1693
|
*/
|
|
1656
1694
|
getGuilds: (bearerToken?: string, options?: GetUserGuilds) => Promise<Partial<Camelize<DiscordGuild>>[]>;
|
|
1657
1695
|
/**
|
|
@@ -1661,7 +1699,7 @@ export interface RestManager {
|
|
|
1661
1699
|
* @param commandId - The ID of the command to get.
|
|
1662
1700
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1663
1701
|
*
|
|
1664
|
-
* @see {@link https://discord.com/developers/
|
|
1702
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command}
|
|
1665
1703
|
*/
|
|
1666
1704
|
getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1667
1705
|
/**
|
|
@@ -1671,7 +1709,7 @@ export interface RestManager {
|
|
|
1671
1709
|
* @param options - The parameters for the fetching of guild application commands
|
|
1672
1710
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1673
1711
|
*
|
|
1674
|
-
* @see {@link https://discord.com/developers/
|
|
1712
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commandss}
|
|
1675
1713
|
*/
|
|
1676
1714
|
getGuildApplicationCommands: (guildId: BigString, options?: GetGuildApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1677
1715
|
/**
|
|
@@ -1683,7 +1721,7 @@ export interface RestManager {
|
|
|
1683
1721
|
* @remarks
|
|
1684
1722
|
* If the bot user is not in the guild, the guild must be discoverable.
|
|
1685
1723
|
*
|
|
1686
|
-
* @see {@link https://discord.com/developers/
|
|
1724
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-preview}
|
|
1687
1725
|
*/
|
|
1688
1726
|
getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
|
|
1689
1727
|
/**
|
|
@@ -1695,7 +1733,7 @@ export interface RestManager {
|
|
|
1695
1733
|
*
|
|
1696
1734
|
* @remarks Includes the user field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1697
1735
|
*
|
|
1698
|
-
* @see {@link https://discord.com/developers/
|
|
1736
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-guild-sticker}
|
|
1699
1737
|
*/
|
|
1700
1738
|
getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
1701
1739
|
/**
|
|
@@ -1706,7 +1744,7 @@ export interface RestManager {
|
|
|
1706
1744
|
*
|
|
1707
1745
|
* @remarks Includes user fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1708
1746
|
*
|
|
1709
|
-
* @see {@link https://discord.com/developers/
|
|
1747
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-guild-stickers}
|
|
1710
1748
|
*/
|
|
1711
1749
|
getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker>[]>;
|
|
1712
1750
|
/**
|
|
@@ -1718,7 +1756,7 @@ export interface RestManager {
|
|
|
1718
1756
|
* @remarks
|
|
1719
1757
|
* Requires the `MANAGE_GUILD` permission.
|
|
1720
1758
|
*
|
|
1721
|
-
* @see {@link https://discord.com/developers/
|
|
1759
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-template}
|
|
1722
1760
|
*/
|
|
1723
1761
|
getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
|
|
1724
1762
|
/**
|
|
@@ -1730,7 +1768,7 @@ export interface RestManager {
|
|
|
1730
1768
|
* @remarks
|
|
1731
1769
|
* Requires the `MANAGE_GUILD` permission.
|
|
1732
1770
|
*
|
|
1733
|
-
* @see {@link https://discord.com/developers/
|
|
1771
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
1734
1772
|
*/
|
|
1735
1773
|
getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate>[]>;
|
|
1736
1774
|
/**
|
|
@@ -1742,7 +1780,7 @@ export interface RestManager {
|
|
|
1742
1780
|
* @remarks
|
|
1743
1781
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1744
1782
|
*
|
|
1745
|
-
* @see {@link https://discord.com/developers/
|
|
1783
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-guild-webhooks}
|
|
1746
1784
|
*/
|
|
1747
1785
|
getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1748
1786
|
/**
|
|
@@ -1754,7 +1792,7 @@ export interface RestManager {
|
|
|
1754
1792
|
* @remarks
|
|
1755
1793
|
* Requires the `MANAGE_GUILD` permission.
|
|
1756
1794
|
*
|
|
1757
|
-
* @see {@link https://discord.com/developers/
|
|
1795
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-integrations}
|
|
1758
1796
|
*/
|
|
1759
1797
|
getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration>[]>;
|
|
1760
1798
|
/**
|
|
@@ -1764,7 +1802,7 @@ export interface RestManager {
|
|
|
1764
1802
|
* @param options - The parameters for the fetching of the invite.
|
|
1765
1803
|
* @returns An instance of {@link DiscordInviteMetadata}.
|
|
1766
1804
|
*
|
|
1767
|
-
* @see {@link https://discord.com/developers/
|
|
1805
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1768
1806
|
*/
|
|
1769
1807
|
getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
|
|
1770
1808
|
/**
|
|
@@ -1776,7 +1814,7 @@ export interface RestManager {
|
|
|
1776
1814
|
* @remarks
|
|
1777
1815
|
* Requires the `MANAGE_GUILD` or `VIEW_AUDIT_LOG` permission.
|
|
1778
1816
|
*
|
|
1779
|
-
* @see {@link https://discord.com/developers/
|
|
1817
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invites}
|
|
1780
1818
|
*/
|
|
1781
1819
|
getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1782
1820
|
/**
|
|
@@ -1792,7 +1830,7 @@ export interface RestManager {
|
|
|
1792
1830
|
* If getting a message from a guild channel:
|
|
1793
1831
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1794
1832
|
*
|
|
1795
|
-
* @see {@link https://discord.com/developers/
|
|
1833
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-message}
|
|
1796
1834
|
*/
|
|
1797
1835
|
getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1798
1836
|
/**
|
|
@@ -1808,7 +1846,7 @@ export interface RestManager {
|
|
|
1808
1846
|
* If getting a messages from a guild channel:
|
|
1809
1847
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1810
1848
|
*
|
|
1811
|
-
* @see {@link https://discord.com/developers/
|
|
1849
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-messages}
|
|
1812
1850
|
*/
|
|
1813
1851
|
getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage>[]>;
|
|
1814
1852
|
/**
|
|
@@ -1816,7 +1854,7 @@ export interface RestManager {
|
|
|
1816
1854
|
*
|
|
1817
1855
|
* @returns A {@link DiscordStickerPack} object.
|
|
1818
1856
|
*
|
|
1819
|
-
* @see {@link https://discord.com/developers/
|
|
1857
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker-pack}
|
|
1820
1858
|
*/
|
|
1821
1859
|
getStickerPack: (stickerPackId: BigString) => Promise<Camelize<DiscordStickerPack>>;
|
|
1822
1860
|
/**
|
|
@@ -1824,7 +1862,7 @@ export interface RestManager {
|
|
|
1824
1862
|
*
|
|
1825
1863
|
* @returns A collection of {@link DiscordStickerPack} objects assorted by sticker ID.
|
|
1826
1864
|
*
|
|
1827
|
-
* @see {@link https://discord.com/developers/
|
|
1865
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-sticker-packs}
|
|
1828
1866
|
*/
|
|
1829
1867
|
getStickerPacks: () => Promise<Camelize<DiscordStickerPack>[]>;
|
|
1830
1868
|
/**
|
|
@@ -1840,7 +1878,7 @@ export interface RestManager {
|
|
|
1840
1878
|
*
|
|
1841
1879
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1842
1880
|
*
|
|
1843
|
-
* @see {@link https://discord.com/developers/
|
|
1881
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-original-interaction-response}
|
|
1844
1882
|
*/
|
|
1845
1883
|
getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
|
|
1846
1884
|
/**
|
|
@@ -1855,7 +1893,7 @@ export interface RestManager {
|
|
|
1855
1893
|
*
|
|
1856
1894
|
* If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned.
|
|
1857
1895
|
*
|
|
1858
|
-
* @see {@link https://discord.com/developers/
|
|
1896
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-channel-pins}
|
|
1859
1897
|
*/
|
|
1860
1898
|
getChannelPins: (channelId: BigString, options?: GetChannelPinsOptions) => Promise<Camelize<DiscordGetChannelPins>>;
|
|
1861
1899
|
/**
|
|
@@ -1870,7 +1908,7 @@ export interface RestManager {
|
|
|
1870
1908
|
* If getting a message from a guild channel:
|
|
1871
1909
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1872
1910
|
*
|
|
1873
|
-
* @see {@link https://discord.com/developers/
|
|
1911
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-pinned-messages-deprecated}
|
|
1874
1912
|
* @deprecated Use {@link getChannelPins} instead.
|
|
1875
1913
|
*/
|
|
1876
1914
|
getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage>[]>;
|
|
@@ -1889,7 +1927,7 @@ export interface RestManager {
|
|
|
1889
1927
|
*
|
|
1890
1928
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1891
1929
|
*
|
|
1892
|
-
* @see {@link https://discord.com/developers/
|
|
1930
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-private-archived-threads}
|
|
1893
1931
|
*/
|
|
1894
1932
|
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1895
1933
|
/**
|
|
@@ -1906,7 +1944,7 @@ export interface RestManager {
|
|
|
1906
1944
|
*
|
|
1907
1945
|
* Threads are ordered by the `id` property in descending order.
|
|
1908
1946
|
*
|
|
1909
|
-
* @see {@link https://discord.com/developers/
|
|
1947
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads}
|
|
1910
1948
|
*/
|
|
1911
1949
|
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1912
1950
|
/**
|
|
@@ -1919,7 +1957,7 @@ export interface RestManager {
|
|
|
1919
1957
|
* @remarks
|
|
1920
1958
|
* Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
|
|
1921
1959
|
*
|
|
1922
|
-
* @see {@link https://discord.com/developers/
|
|
1960
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-prune-count}
|
|
1923
1961
|
*/
|
|
1924
1962
|
getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
|
|
1925
1963
|
/**
|
|
@@ -1937,7 +1975,7 @@ export interface RestManager {
|
|
|
1937
1975
|
*
|
|
1938
1976
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1939
1977
|
*
|
|
1940
|
-
* @see {@link https://discord.com/developers/
|
|
1978
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-public-archived-threads}
|
|
1941
1979
|
*/
|
|
1942
1980
|
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1943
1981
|
/**
|
|
@@ -1949,7 +1987,7 @@ export interface RestManager {
|
|
|
1949
1987
|
* @remarks
|
|
1950
1988
|
* ⚠️ This endpoint should be used sparingly due to {@link DiscordRole} objects already being included in guild payloads.
|
|
1951
1989
|
*
|
|
1952
|
-
* @see {@link https://discord.com/developers/
|
|
1990
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-roles}
|
|
1953
1991
|
*/
|
|
1954
1992
|
getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole>[]>;
|
|
1955
1993
|
/**
|
|
@@ -1959,7 +1997,7 @@ export interface RestManager {
|
|
|
1959
1997
|
* @param roleId - The ID of the role.
|
|
1960
1998
|
* @returns A {@link DiscordRole} object.
|
|
1961
1999
|
*
|
|
1962
|
-
* @see {@link https://discord.com/developers/
|
|
2000
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role}
|
|
1963
2001
|
*/
|
|
1964
2002
|
getRole: (guildId: BigString, roleId: BigString) => Promise<Camelize<DiscordRole>>;
|
|
1965
2003
|
/**
|
|
@@ -1970,7 +2008,7 @@ export interface RestManager {
|
|
|
1970
2008
|
* @param options - The parameters for the fetching of the scheduled event.
|
|
1971
2009
|
* @returns An instance of {@link DiscordScheduledEvent}.
|
|
1972
2010
|
*
|
|
1973
|
-
* @see {@link https://discord.com/developers/
|
|
2011
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event}
|
|
1974
2012
|
*/
|
|
1975
2013
|
getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
|
|
1976
2014
|
withUserCount?: boolean;
|
|
@@ -1982,7 +2020,7 @@ export interface RestManager {
|
|
|
1982
2020
|
* @param options - The parameters for the fetching of the scheduled events.
|
|
1983
2021
|
* @returns A collection of {@link DiscordScheduledEvent} objects assorted by event ID.
|
|
1984
2022
|
*
|
|
1985
|
-
* @see {@link https://discord.com/developers/
|
|
2023
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#list-scheduled-events-for-guild}
|
|
1986
2024
|
*/
|
|
1987
2025
|
getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent>[]>;
|
|
1988
2026
|
/**
|
|
@@ -1998,7 +2036,7 @@ export interface RestManager {
|
|
|
1998
2036
|
*
|
|
1999
2037
|
* Users are ordered by their IDs in _ascending_ order.
|
|
2000
2038
|
*
|
|
2001
|
-
* @see {@link https://discord.com/developers/
|
|
2039
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event-users}
|
|
2002
2040
|
*/
|
|
2003
2041
|
getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
|
|
2004
2042
|
user: Camelize<DiscordUser>;
|
|
@@ -2012,7 +2050,7 @@ export interface RestManager {
|
|
|
2012
2050
|
* @param channelId - The ID of the stage channel the stage instance is associated with.
|
|
2013
2051
|
* @returns An instance of {@link DiscordStageInstance}.
|
|
2014
2052
|
*
|
|
2015
|
-
* @see {@link https://discord.com/developers/
|
|
2053
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#get-stage-instance}
|
|
2016
2054
|
*/
|
|
2017
2055
|
getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
|
|
2018
2056
|
/**
|
|
@@ -2021,7 +2059,7 @@ export interface RestManager {
|
|
|
2021
2059
|
* @param guildId - The ID of the guild to get the voice state from.
|
|
2022
2060
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2023
2061
|
*
|
|
2024
|
-
* @see {@link https://discord.com/developers/
|
|
2062
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-current-user-voice-state}
|
|
2025
2063
|
*/
|
|
2026
2064
|
getOwnVoiceState: (guildId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2027
2065
|
/**
|
|
@@ -2031,7 +2069,7 @@ export interface RestManager {
|
|
|
2031
2069
|
* @param userId - The ID of the user to get the voice state from
|
|
2032
2070
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2033
2071
|
*
|
|
2034
|
-
* @see {@link https://discord.com/developers/
|
|
2072
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-user-voice-state}
|
|
2035
2073
|
*/
|
|
2036
2074
|
getUserVoiceState: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2037
2075
|
/**
|
|
@@ -2040,7 +2078,7 @@ export interface RestManager {
|
|
|
2040
2078
|
* @param stickerId The ID of the sticker to get
|
|
2041
2079
|
* @returns A {@link DiscordSticker}
|
|
2042
2080
|
*
|
|
2043
|
-
* @see {@link https://discord.com/developers/
|
|
2081
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker}
|
|
2044
2082
|
*/
|
|
2045
2083
|
getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
2046
2084
|
/**
|
|
@@ -2051,7 +2089,7 @@ export interface RestManager {
|
|
|
2051
2089
|
* @param options - The parameters for the fetching of the thread member.
|
|
2052
2090
|
* @returns An instance of {@link DiscordThreadMember}.
|
|
2053
2091
|
*
|
|
2054
|
-
* @see {@link https://discord.com/developers/
|
|
2092
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-thread-member}
|
|
2055
2093
|
*/
|
|
2056
2094
|
getThreadMember: (channelId: BigString, userId: BigString, options?: GetThreadMember) => Promise<Camelize<DiscordThreadMember>>;
|
|
2057
2095
|
/**
|
|
@@ -2064,7 +2102,7 @@ export interface RestManager {
|
|
|
2064
2102
|
* @remarks
|
|
2065
2103
|
* Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
|
|
2066
2104
|
*
|
|
2067
|
-
* @see {@link https://discord.com/developers/
|
|
2105
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-thread-members}
|
|
2068
2106
|
*/
|
|
2069
2107
|
getThreadMembers: (channelId: BigString, options?: ListThreadMembers) => Promise<Camelize<DiscordThreadMember>[]>;
|
|
2070
2108
|
/**
|
|
@@ -2076,7 +2114,7 @@ export interface RestManager {
|
|
|
2076
2114
|
* @param options - The parameters for the fetching of the users.
|
|
2077
2115
|
* @returns A collection of {@link DiscordUser} objects assorted by user ID.
|
|
2078
2116
|
*
|
|
2079
|
-
* @see {@link https://discord.com/developers/
|
|
2117
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-reactions}
|
|
2080
2118
|
*/
|
|
2081
2119
|
getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser>[]>;
|
|
2082
2120
|
/**
|
|
@@ -2118,7 +2156,7 @@ export interface RestManager {
|
|
|
2118
2156
|
* @remarks
|
|
2119
2157
|
* The access token requires the `role_connections.write` scope.
|
|
2120
2158
|
*
|
|
2121
|
-
* @see {@link https://discord.com/developers/
|
|
2159
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-user-application-role-connection}
|
|
2122
2160
|
*/
|
|
2123
2161
|
getUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
2124
2162
|
/**
|
|
@@ -2132,7 +2170,7 @@ export interface RestManager {
|
|
|
2132
2170
|
*
|
|
2133
2171
|
* The `code` property will be `null` if the guild does not have a set vanity url.
|
|
2134
2172
|
*
|
|
2135
|
-
* @see {@link https://discord.com/developers/
|
|
2173
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-vanity-url}
|
|
2136
2174
|
*/
|
|
2137
2175
|
getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
|
|
2138
2176
|
/**
|
|
@@ -2141,7 +2179,7 @@ export interface RestManager {
|
|
|
2141
2179
|
* @param guildId - The ID of the guild to get the voice regions for.
|
|
2142
2180
|
* @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
|
|
2143
2181
|
*
|
|
2144
|
-
* @see {@link https://discord.com/developers/
|
|
2182
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-voice-regions}
|
|
2145
2183
|
*/
|
|
2146
2184
|
getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion>[]>;
|
|
2147
2185
|
/**
|
|
@@ -2153,7 +2191,7 @@ export interface RestManager {
|
|
|
2153
2191
|
* @remarks
|
|
2154
2192
|
* Requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook.
|
|
2155
2193
|
*
|
|
2156
|
-
* @see {@link https://discord.com/developers/
|
|
2194
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook}
|
|
2157
2195
|
*/
|
|
2158
2196
|
getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
|
|
2159
2197
|
/**
|
|
@@ -2165,7 +2203,7 @@ export interface RestManager {
|
|
|
2165
2203
|
* @param options - The parameters for the fetching of the message.
|
|
2166
2204
|
* @returns An instance of {@link DiscordMessage}.
|
|
2167
2205
|
*
|
|
2168
|
-
* @see {@link https://discord.com/developers/
|
|
2206
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-message}
|
|
2169
2207
|
*/
|
|
2170
2208
|
getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2171
2209
|
/**
|
|
@@ -2175,7 +2213,7 @@ export interface RestManager {
|
|
|
2175
2213
|
* @param token - The webhook token, used to get the webhook.
|
|
2176
2214
|
* @returns An instance of {@link DiscordWebhook}.
|
|
2177
2215
|
*
|
|
2178
|
-
* @see {@link https://discord.com/developers/
|
|
2216
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-with-token}
|
|
2179
2217
|
*/
|
|
2180
2218
|
getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
|
|
2181
2219
|
/**
|
|
@@ -2188,7 +2226,7 @@ export interface RestManager {
|
|
|
2188
2226
|
* If the welcome screen is not enabled:
|
|
2189
2227
|
* - Requires the `MANAGE_GUILD` permission.
|
|
2190
2228
|
*
|
|
2191
|
-
* @see {@link https://discord.com/developers/
|
|
2229
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-welcome-screen}
|
|
2192
2230
|
*/
|
|
2193
2231
|
getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
2194
2232
|
/**
|
|
@@ -2200,7 +2238,7 @@ export interface RestManager {
|
|
|
2200
2238
|
* @remarks
|
|
2201
2239
|
* Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
|
|
2202
2240
|
*
|
|
2203
|
-
* @see {@link https://discord.com/developers/
|
|
2241
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget}
|
|
2204
2242
|
*/
|
|
2205
2243
|
getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
|
|
2206
2244
|
/**
|
|
@@ -2212,7 +2250,7 @@ export interface RestManager {
|
|
|
2212
2250
|
* @remarks
|
|
2213
2251
|
* Requires the `MANAGE_GUILD` permission.
|
|
2214
2252
|
*
|
|
2215
|
-
* @see {@link https://discord.com/developers/
|
|
2253
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget-settings}
|
|
2216
2254
|
*/
|
|
2217
2255
|
getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
2218
2256
|
/**
|
|
@@ -2225,7 +2263,7 @@ export interface RestManager {
|
|
|
2225
2263
|
*
|
|
2226
2264
|
* Fires a _Thread Members Update_ gateway event.
|
|
2227
2265
|
*
|
|
2228
|
-
* @see {@link https://discord.com/developers/
|
|
2266
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#join-thread}
|
|
2229
2267
|
*/
|
|
2230
2268
|
joinThread: (channelId: BigString) => Promise<void>;
|
|
2231
2269
|
/**
|
|
@@ -2236,7 +2274,7 @@ export interface RestManager {
|
|
|
2236
2274
|
* @remarks
|
|
2237
2275
|
* Fires a _Guild Delete_ event.
|
|
2238
2276
|
*
|
|
2239
|
-
* @see {@link https://discord.com/developers/
|
|
2277
|
+
* @see {@link https://docs.discord.com/developers/resources/user#leave-guild}
|
|
2240
2278
|
*/
|
|
2241
2279
|
leaveGuild: (guildId: BigString) => Promise<void>;
|
|
2242
2280
|
/**
|
|
@@ -2249,7 +2287,7 @@ export interface RestManager {
|
|
|
2249
2287
|
*
|
|
2250
2288
|
* Fires a _Thread Members Update_ gateway event.
|
|
2251
2289
|
*
|
|
2252
|
-
* @see {@link https://discord.com/developers/
|
|
2290
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#leave-thread}
|
|
2253
2291
|
*/
|
|
2254
2292
|
leaveThread: (channelId: BigString) => Promise<void>;
|
|
2255
2293
|
/**
|
|
@@ -2267,7 +2305,7 @@ export interface RestManager {
|
|
|
2267
2305
|
*
|
|
2268
2306
|
* Fires a _Message Create_ event in the guilds the subscribed channels are in.
|
|
2269
2307
|
*
|
|
2270
|
-
* @see {@link https://discord.com/developers/
|
|
2308
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#crosspost-message}
|
|
2271
2309
|
*/
|
|
2272
2310
|
publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
2273
2311
|
/**
|
|
@@ -2283,7 +2321,7 @@ export interface RestManager {
|
|
|
2283
2321
|
*
|
|
2284
2322
|
* Fires a _Guild Member Update_ gateway event.
|
|
2285
2323
|
*
|
|
2286
|
-
* @see {@link https://discord.com/developers/
|
|
2324
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member-role}
|
|
2287
2325
|
*/
|
|
2288
2326
|
removeRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
2289
2327
|
/**
|
|
@@ -2300,7 +2338,7 @@ export interface RestManager {
|
|
|
2300
2338
|
*
|
|
2301
2339
|
* Fires a _Thread Members Update_ gateway event.
|
|
2302
2340
|
*
|
|
2303
|
-
* @see {@link https://discord.com/developers/
|
|
2341
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#remove-thread-member}
|
|
2304
2342
|
*/
|
|
2305
2343
|
removeThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2306
2344
|
/**
|
|
@@ -2309,7 +2347,7 @@ export interface RestManager {
|
|
|
2309
2347
|
* @param channelId - The ID of the channel to remove the recipient user of.
|
|
2310
2348
|
* @param userId - The user ID of the user to remove.
|
|
2311
2349
|
*
|
|
2312
|
-
* @see {@link https://discord.com/developers/
|
|
2350
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#group-dm-remove-recipient}
|
|
2313
2351
|
*/
|
|
2314
2352
|
removeDmRecipient: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2315
2353
|
/**
|
|
@@ -2336,7 +2374,7 @@ export interface RestManager {
|
|
|
2336
2374
|
*
|
|
2337
2375
|
* Fires a _Message Create_ gateway event.
|
|
2338
2376
|
*
|
|
2339
|
-
* @see {@link https://discord.com/developers/
|
|
2377
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-message}
|
|
2340
2378
|
*/
|
|
2341
2379
|
sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2342
2380
|
/**
|
|
@@ -2360,7 +2398,7 @@ export interface RestManager {
|
|
|
2360
2398
|
*
|
|
2361
2399
|
* Fires a _Message Create_ event.
|
|
2362
2400
|
*
|
|
2363
|
-
* @see {@link https://discord.com/developers/
|
|
2401
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-followup-message}
|
|
2364
2402
|
*/
|
|
2365
2403
|
sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
2366
2404
|
/**
|
|
@@ -2383,7 +2421,7 @@ export interface RestManager {
|
|
|
2383
2421
|
*
|
|
2384
2422
|
* Fires a _Message Create_ event.
|
|
2385
2423
|
*
|
|
2386
|
-
* @see {@link https://discord.com/developers/
|
|
2424
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-interaction-response}
|
|
2387
2425
|
*/
|
|
2388
2426
|
sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse, params?: InteractionCallbackOptions) => Promise<void | Camelize<DiscordInteractionCallbackResponse>>;
|
|
2389
2427
|
/**
|
|
@@ -2404,7 +2442,7 @@ export interface RestManager {
|
|
|
2404
2442
|
*
|
|
2405
2443
|
* Fires a _Thread Create_ gateway event.
|
|
2406
2444
|
*
|
|
2407
|
-
* @see {@link https://discord.com/developers/
|
|
2445
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
|
|
2408
2446
|
*/
|
|
2409
2447
|
startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2410
2448
|
/**
|
|
@@ -2420,7 +2458,7 @@ export interface RestManager {
|
|
|
2420
2458
|
*
|
|
2421
2459
|
* Fires a _Thread Create_ gateway event.
|
|
2422
2460
|
*
|
|
2423
|
-
* @see {@link https://discord.com/developers/
|
|
2461
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
|
|
2424
2462
|
*/
|
|
2425
2463
|
startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2426
2464
|
/**
|
|
@@ -2457,7 +2495,7 @@ export interface RestManager {
|
|
|
2457
2495
|
*
|
|
2458
2496
|
* Fires a _Guild Update_ gateway event.
|
|
2459
2497
|
*
|
|
2460
|
-
* @see {@link https://discord.com/developers/
|
|
2498
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
2461
2499
|
*/
|
|
2462
2500
|
syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
|
|
2463
2501
|
/**
|
|
@@ -2472,7 +2510,7 @@ export interface RestManager {
|
|
|
2472
2510
|
*
|
|
2473
2511
|
* Fires a _Typing Start_ gateway event.
|
|
2474
2512
|
*
|
|
2475
|
-
* @see {@link https://discord.com/developers/
|
|
2513
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#trigger-typing-indicator}
|
|
2476
2514
|
*/
|
|
2477
2515
|
triggerTypingIndicator: (channelId: BigString) => Promise<void>;
|
|
2478
2516
|
/**
|
|
@@ -2490,7 +2528,7 @@ export interface RestManager {
|
|
|
2490
2528
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2491
2529
|
* You will be able to update only your own application commands
|
|
2492
2530
|
*
|
|
2493
|
-
* @see {@link https://discord.com/developers/
|
|
2531
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-global-application-commands}
|
|
2494
2532
|
*/
|
|
2495
2533
|
upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2496
2534
|
/**
|
|
@@ -2509,7 +2547,7 @@ export interface RestManager {
|
|
|
2509
2547
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2510
2548
|
* You will be able to update only your own application commands
|
|
2511
2549
|
*
|
|
2512
|
-
* @see {@link https://discord.com/developers/
|
|
2550
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-guild-application-commands}
|
|
2513
2551
|
*/
|
|
2514
2552
|
upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2515
2553
|
/**
|
|
@@ -2525,7 +2563,7 @@ export interface RestManager {
|
|
|
2525
2563
|
*
|
|
2526
2564
|
* Fires a _Guild Ban Add_ gateway event.
|
|
2527
2565
|
*
|
|
2528
|
-
* @see {@link https://discord.com/developers/
|
|
2566
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-ban}
|
|
2529
2567
|
*/
|
|
2530
2568
|
banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
|
|
2531
2569
|
/**
|
|
@@ -2542,7 +2580,7 @@ export interface RestManager {
|
|
|
2542
2580
|
*
|
|
2543
2581
|
* Fires as many _Guild Ban Add_ gateway events as many user where banned.
|
|
2544
2582
|
*
|
|
2545
|
-
* @see {@link https://discord.com/developers/
|
|
2583
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#bulk-guild-ban}
|
|
2546
2584
|
*/
|
|
2547
2585
|
bulkBanMembers: (guildId: BigString, options: CreateGuildBulkBan, reason?: string) => Promise<Camelize<DiscordBulkBan>>;
|
|
2548
2586
|
/**
|
|
@@ -2556,7 +2594,7 @@ export interface RestManager {
|
|
|
2556
2594
|
* @remarks
|
|
2557
2595
|
* Fires a _Guild Member Update_ gateway event.
|
|
2558
2596
|
*
|
|
2559
|
-
* @see {@link https://discord.com/developers/
|
|
2597
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-current-member}
|
|
2560
2598
|
*/
|
|
2561
2599
|
editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2562
2600
|
/**
|
|
@@ -2573,7 +2611,7 @@ export interface RestManager {
|
|
|
2573
2611
|
*
|
|
2574
2612
|
* Fires a _Guild Member Update_ gateway event.
|
|
2575
2613
|
*
|
|
2576
|
-
* @see {@link https://discord.com/developers/
|
|
2614
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-member}
|
|
2577
2615
|
*/
|
|
2578
2616
|
editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2579
2617
|
/**
|
|
@@ -2584,7 +2622,7 @@ export interface RestManager {
|
|
|
2584
2622
|
* @param userId - The ID of the user to get the member object for.
|
|
2585
2623
|
* @returns An instance of {@link DiscordMemberWithUser}.
|
|
2586
2624
|
*
|
|
2587
|
-
* @see {@link https://discord.com/developers/
|
|
2625
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-member}
|
|
2588
2626
|
*/
|
|
2589
2627
|
getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2590
2628
|
/**
|
|
@@ -2597,7 +2635,7 @@ export interface RestManager {
|
|
|
2597
2635
|
* @remarks
|
|
2598
2636
|
* The access tokens needs the `guilds.members.read` scope
|
|
2599
2637
|
*
|
|
2600
|
-
* @see {@link https://discord.com/developers/
|
|
2638
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guild-member}
|
|
2601
2639
|
*/
|
|
2602
2640
|
getCurrentMember: (guildId: BigString, bearerToken: string) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2603
2641
|
/**
|
|
@@ -2612,11 +2650,11 @@ export interface RestManager {
|
|
|
2612
2650
|
*
|
|
2613
2651
|
* ⚠️ It is not recommended to use this endpoint with very large bots. Instead, opt to use `fetchMembers()`:
|
|
2614
2652
|
* REST communication only permits 50 requests to be made per second, while gateways allow for up to 120 requests
|
|
2615
|
-
* per minute per shard. For more information, read {@link https://discord.com/developers/
|
|
2653
|
+
* per minute per shard. For more information, read {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}.
|
|
2616
2654
|
*
|
|
2617
|
-
* @see {@link https://discord.com/developers/
|
|
2618
|
-
* @see {@link https://discord.com/developers/
|
|
2619
|
-
* @see {@link https://discord.com/developers/
|
|
2655
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#list-guild-members}
|
|
2656
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#request-guild-members}
|
|
2657
|
+
* @see {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}
|
|
2620
2658
|
*/
|
|
2621
2659
|
getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2622
2660
|
/**
|
|
@@ -2639,7 +2677,7 @@ export interface RestManager {
|
|
|
2639
2677
|
*
|
|
2640
2678
|
* Fires a _Guild Member Remove_ gateway event.
|
|
2641
2679
|
*
|
|
2642
|
-
* @see {@link https://discord.com/developers/
|
|
2680
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member}
|
|
2643
2681
|
*/
|
|
2644
2682
|
kickMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2645
2683
|
/**
|
|
@@ -2654,7 +2692,7 @@ export interface RestManager {
|
|
|
2654
2692
|
*
|
|
2655
2693
|
* Fires a _Channel Pins Update_ event.
|
|
2656
2694
|
*
|
|
2657
|
-
* @see {@link https://discord.com/developers/
|
|
2695
|
+
* @see {@link https://docs.discord.com/developers/resources/message#pin-message}
|
|
2658
2696
|
*/
|
|
2659
2697
|
pinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2660
2698
|
/**
|
|
@@ -2675,7 +2713,7 @@ export interface RestManager {
|
|
|
2675
2713
|
*
|
|
2676
2714
|
* Fires a _Guild Member Remove_ gateway event for every member kicked.
|
|
2677
2715
|
*
|
|
2678
|
-
* @see {@link https://discord.com/developers/
|
|
2716
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#begin-guild-prune}
|
|
2679
2717
|
*/
|
|
2680
2718
|
pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
|
|
2681
2719
|
pruned: number | null;
|
|
@@ -2689,7 +2727,7 @@ export interface RestManager {
|
|
|
2689
2727
|
* @param options - The parameters for searching through the members.
|
|
2690
2728
|
* @returns A collection of {@link DiscordMember} objects assorted by user ID.
|
|
2691
2729
|
*
|
|
2692
|
-
* @see {@link https://discord.com/developers/
|
|
2730
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#search-guild-members}
|
|
2693
2731
|
*/
|
|
2694
2732
|
searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2695
2733
|
/**
|
|
@@ -2705,7 +2743,7 @@ export interface RestManager {
|
|
|
2705
2743
|
*
|
|
2706
2744
|
* Fires a _Guild Ban Remove_ gateway event.
|
|
2707
2745
|
*
|
|
2708
|
-
* @see {@link https://discord.com/developers/
|
|
2746
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-ban}
|
|
2709
2747
|
*/
|
|
2710
2748
|
unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2711
2749
|
/**
|
|
@@ -2720,7 +2758,7 @@ export interface RestManager {
|
|
|
2720
2758
|
*
|
|
2721
2759
|
* Fires a _Channel Pins Update_ event.
|
|
2722
2760
|
*
|
|
2723
|
-
* @see {@link https://discord.com/developers/
|
|
2761
|
+
* @see {@link https://docs.discord.com/developers/resources/message#unpin-message}
|
|
2724
2762
|
*/
|
|
2725
2763
|
unpinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2726
2764
|
/**
|
|
@@ -3047,6 +3085,7 @@ export interface RestRequestRejection {
|
|
|
3047
3085
|
/** The returned body parsed if it was JSON, otherwise it will be the raw body as a string */
|
|
3048
3086
|
body?: string | object;
|
|
3049
3087
|
error?: string;
|
|
3088
|
+
errorObject?: Error;
|
|
3050
3089
|
}
|
|
3051
3090
|
export interface RestManagerEvents {
|
|
3052
3091
|
/**
|