@discordeno/rest 22.0.1-next.069e4fa → 22.0.1-next.09f2dfd
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/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/invalidBucket.d.ts.map +1 -1
- package/dist/invalidBucket.js +1 -1
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +42 -20
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +14 -6
- package/dist/routes.d.ts +7 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +208 -187
- package/dist/types.d.ts +220 -171
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/typings/routes.d.ts +6 -0
- package/dist/typings/routes.d.ts.map +1 -1
- package/dist/typings/routes.js +1 -1
- package/package.json +18 -20
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,9 +393,19 @@ 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
|
+
/**
|
|
400
|
+
* Get guild role member counts
|
|
401
|
+
*
|
|
402
|
+
* Returns a map of role IDs to the number of members with the role. Does not include the \@everyone role.
|
|
403
|
+
*
|
|
404
|
+
* @param guildId - The ID of the guild to get role member counts for.
|
|
405
|
+
*
|
|
406
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
407
|
+
*/
|
|
408
|
+
getGuildRoleMemberCounts: (guildId: BigString) => Promise<Record<string, number>>;
|
|
399
409
|
/**
|
|
400
410
|
* Creates a role in a guild.
|
|
401
411
|
*
|
|
@@ -409,7 +419,7 @@ export interface RestManager {
|
|
|
409
419
|
*
|
|
410
420
|
* Fires a _Guild Role Create_ gateway event.
|
|
411
421
|
*
|
|
412
|
-
* @see {@link https://discord.com/developers/
|
|
422
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-role}
|
|
413
423
|
*/
|
|
414
424
|
createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
415
425
|
/**
|
|
@@ -427,7 +437,7 @@ export interface RestManager {
|
|
|
427
437
|
*
|
|
428
438
|
* Fires a _Guild Scheduled Event Create_ gateway event.
|
|
429
439
|
*
|
|
430
|
-
* @see {@link https://discord.com/developers/
|
|
440
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#create-guild-scheduled-event}
|
|
431
441
|
*/
|
|
432
442
|
createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
433
443
|
/**
|
|
@@ -442,7 +452,7 @@ export interface RestManager {
|
|
|
442
452
|
*
|
|
443
453
|
* Fires a _Stage Instance Create_ gateway event.
|
|
444
454
|
*
|
|
445
|
-
* @see {@link https://discord.com/developers/
|
|
455
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#create-stage-instance}
|
|
446
456
|
*/
|
|
447
457
|
createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
448
458
|
/**
|
|
@@ -460,7 +470,7 @@ export interface RestManager {
|
|
|
460
470
|
*
|
|
461
471
|
* Fires a _Webhooks Update_ gateway event.
|
|
462
472
|
*
|
|
463
|
-
* @see {@link https://discord.com/developers/
|
|
473
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#create-webhook}
|
|
464
474
|
*/
|
|
465
475
|
createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
466
476
|
/**
|
|
@@ -475,7 +485,7 @@ export interface RestManager {
|
|
|
475
485
|
*
|
|
476
486
|
* Fires an _Auto Moderation Rule Delete_ gateway event.
|
|
477
487
|
*
|
|
478
|
-
* @see {@link https://discord.com/developers/
|
|
488
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#delete-auto-moderation-rule}
|
|
479
489
|
*/
|
|
480
490
|
deleteAutomodRule: (guildId: BigString, ruleId: BigString, reason?: string) => Promise<void>;
|
|
481
491
|
/**
|
|
@@ -501,7 +511,7 @@ export interface RestManager {
|
|
|
501
511
|
*
|
|
502
512
|
* - Fires a _Channel Delete_ gateway event.
|
|
503
513
|
*
|
|
504
|
-
* @see {@link https://discord.com/developers/
|
|
514
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#deleteclose-channel}
|
|
505
515
|
*/
|
|
506
516
|
deleteChannel: (channelId: BigString, reason?: string) => Promise<void>;
|
|
507
517
|
/**
|
|
@@ -516,7 +526,7 @@ export interface RestManager {
|
|
|
516
526
|
*
|
|
517
527
|
* Fires a _Channel Update_ gateway event.
|
|
518
528
|
*
|
|
519
|
-
* @see {@link https://discord.com/developers/
|
|
529
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-permission}
|
|
520
530
|
*/
|
|
521
531
|
deleteChannelPermissionOverride: (channelId: BigString, overwriteId: BigString, reason?: string) => Promise<void>;
|
|
522
532
|
/**
|
|
@@ -532,7 +542,7 @@ export interface RestManager {
|
|
|
532
542
|
*
|
|
533
543
|
* Fires a _Guild Emojis Update_ gateway event.
|
|
534
544
|
*
|
|
535
|
-
* @see {@link https://discord.com/developers/
|
|
545
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-guild-emoji}
|
|
536
546
|
*/
|
|
537
547
|
deleteEmoji: (guildId: BigString, id: BigString, reason?: string) => Promise<void>;
|
|
538
548
|
/**
|
|
@@ -540,7 +550,7 @@ export interface RestManager {
|
|
|
540
550
|
*
|
|
541
551
|
* @param id - The ID of the emoji to delete.
|
|
542
552
|
*
|
|
543
|
-
* @see {@link https://discord.com/developers/
|
|
553
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-application-emoji}
|
|
544
554
|
*/
|
|
545
555
|
deleteApplicationEmoji: (id: BigString) => Promise<void>;
|
|
546
556
|
/**
|
|
@@ -554,7 +564,7 @@ export interface RestManager {
|
|
|
554
564
|
*
|
|
555
565
|
* Fires a _Message Delete_ event.
|
|
556
566
|
*
|
|
557
|
-
* @see {@link https://discord.com/developers/
|
|
567
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-followup-message}
|
|
558
568
|
*/
|
|
559
569
|
deleteFollowupMessage: (token: string, messageId: BigString) => Promise<void>;
|
|
560
570
|
/**
|
|
@@ -562,7 +572,7 @@ export interface RestManager {
|
|
|
562
572
|
*
|
|
563
573
|
* @param commandId - The ID of the command to delete.
|
|
564
574
|
*
|
|
565
|
-
* @see {@link https://discord.com/developers/
|
|
575
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-global-application-command}
|
|
566
576
|
*/
|
|
567
577
|
deleteGlobalApplicationCommand: (commandId: BigString) => Promise<void>;
|
|
568
578
|
/**
|
|
@@ -571,7 +581,7 @@ export interface RestManager {
|
|
|
571
581
|
* @param guildId - The ID of the guild to delete the command from.
|
|
572
582
|
* @param commandId - The ID of the command to delete from the guild.
|
|
573
583
|
*
|
|
574
|
-
* @see {@link https://discord.com/developers/
|
|
584
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-guild-application-command}
|
|
575
585
|
*/
|
|
576
586
|
deleteGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<void>;
|
|
577
587
|
/**
|
|
@@ -588,7 +598,7 @@ export interface RestManager {
|
|
|
588
598
|
* Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
|
|
589
599
|
* Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
|
|
590
600
|
*
|
|
591
|
-
* @see {@link https://discord.com/developers/
|
|
601
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#delete-guild-sticker}
|
|
592
602
|
*/
|
|
593
603
|
deleteGuildSticker: (guildId: BigString, stickerId: BigString, reason?: string) => Promise<void>;
|
|
594
604
|
/**
|
|
@@ -602,7 +612,7 @@ export interface RestManager {
|
|
|
602
612
|
*
|
|
603
613
|
* Fires a _Guild Update_ gateway event.
|
|
604
614
|
*
|
|
605
|
-
* @see {@link https://discord.com/developers/
|
|
615
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#delete-guild-template}
|
|
606
616
|
*/
|
|
607
617
|
deleteGuildTemplate: (guildId: BigString, templateCode: string) => Promise<void>;
|
|
608
618
|
/**
|
|
@@ -620,7 +630,7 @@ export interface RestManager {
|
|
|
620
630
|
* Fires a _Guild Integrations Update_ gateway event.
|
|
621
631
|
* Fires a _Integration Delete_ gateway event.
|
|
622
632
|
*
|
|
623
|
-
* @see {@link https://discord.com/developers/
|
|
633
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-integration}
|
|
624
634
|
*/
|
|
625
635
|
deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
|
|
626
636
|
/**
|
|
@@ -634,9 +644,47 @@ export interface RestManager {
|
|
|
634
644
|
*
|
|
635
645
|
* Fires an _Invite Delete_ gateway event.
|
|
636
646
|
*
|
|
637
|
-
* @see {@link https://discord.com/developers/
|
|
647
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-invite}
|
|
638
648
|
*/
|
|
639
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>>;
|
|
640
688
|
/**
|
|
641
689
|
* Deletes a message from a channel.
|
|
642
690
|
*
|
|
@@ -650,7 +698,7 @@ export interface RestManager {
|
|
|
650
698
|
*
|
|
651
699
|
* Fires a _Message Delete_ gateway event.
|
|
652
700
|
*
|
|
653
|
-
* @see {@link https://discord.com/developers/
|
|
701
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-message}
|
|
654
702
|
*/
|
|
655
703
|
deleteMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
656
704
|
/**
|
|
@@ -667,7 +715,7 @@ export interface RestManager {
|
|
|
667
715
|
*
|
|
668
716
|
* Fires a _Message Delete Bulk_ gateway event.
|
|
669
717
|
*
|
|
670
|
-
* @see {@link https://discord.com/developers/
|
|
718
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#bulk-delete-messages}
|
|
671
719
|
*/
|
|
672
720
|
deleteMessages: (channelId: BigString, messageIds: BigString[], reason?: string) => Promise<void>;
|
|
673
721
|
/**
|
|
@@ -680,7 +728,7 @@ export interface RestManager {
|
|
|
680
728
|
*
|
|
681
729
|
* Fires a _Message Delete_ event.
|
|
682
730
|
*
|
|
683
|
-
* @see {@link https://discord.com/developers/
|
|
731
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-original-interaction-response}
|
|
684
732
|
*/
|
|
685
733
|
deleteOriginalInteractionResponse: (token: string) => Promise<void>;
|
|
686
734
|
/**
|
|
@@ -695,7 +743,7 @@ export interface RestManager {
|
|
|
695
743
|
*
|
|
696
744
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
697
745
|
*
|
|
698
|
-
* @see {@link https://discord.com/developers/
|
|
746
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-own-reaction}
|
|
699
747
|
*/
|
|
700
748
|
deleteOwnReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
701
749
|
/**
|
|
@@ -711,7 +759,7 @@ export interface RestManager {
|
|
|
711
759
|
*
|
|
712
760
|
* Fires a _Message Reaction Remove All_ gateway event.
|
|
713
761
|
*
|
|
714
|
-
* @see {@link https://discord.com/developers/
|
|
762
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions}
|
|
715
763
|
*/
|
|
716
764
|
deleteReactionsAll: (channelId: BigString, messageId: BigString) => Promise<void>;
|
|
717
765
|
/**
|
|
@@ -728,7 +776,7 @@ export interface RestManager {
|
|
|
728
776
|
*
|
|
729
777
|
* Fires a _Message Reaction Remove Emoji_ gateway event.
|
|
730
778
|
*
|
|
731
|
-
* @see {@link https://discord.com/developers/
|
|
779
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions-for-emoji}
|
|
732
780
|
*/
|
|
733
781
|
deleteReactionsEmoji: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
734
782
|
/**
|
|
@@ -743,7 +791,7 @@ export interface RestManager {
|
|
|
743
791
|
*
|
|
744
792
|
* Fires a _Guild Role Delete_ gateway event.
|
|
745
793
|
*
|
|
746
|
-
* @see {@link https://discord.com/developers/
|
|
794
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-role}
|
|
747
795
|
*/
|
|
748
796
|
deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
749
797
|
/**
|
|
@@ -757,7 +805,7 @@ export interface RestManager {
|
|
|
757
805
|
*
|
|
758
806
|
* Fires a _Guild Scheduled Event Delete_ gateway event.
|
|
759
807
|
*
|
|
760
|
-
* @see {@link https://discord.com/developers/
|
|
808
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#delete-guild-scheduled-event}
|
|
761
809
|
*/
|
|
762
810
|
deleteScheduledEvent: (guildId: BigString, eventId: BigString) => Promise<void>;
|
|
763
811
|
/**
|
|
@@ -771,7 +819,7 @@ export interface RestManager {
|
|
|
771
819
|
*
|
|
772
820
|
* Fires a _Stage Instance Delete_ gateway event.
|
|
773
821
|
*
|
|
774
|
-
* @see {@link https://discord.com/developers/
|
|
822
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#delete-stage-instance}
|
|
775
823
|
*/
|
|
776
824
|
deleteStageInstance: (channelId: BigString, reason?: string) => Promise<void>;
|
|
777
825
|
/**
|
|
@@ -789,7 +837,7 @@ export interface RestManager {
|
|
|
789
837
|
*
|
|
790
838
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
791
839
|
*
|
|
792
|
-
* @see {@link https://discord.com/developers/
|
|
840
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-user-reaction}
|
|
793
841
|
*/
|
|
794
842
|
deleteUserReaction: (channelId: BigString, messageId: BigString, userId: BigString, reaction: string) => Promise<void>;
|
|
795
843
|
/**
|
|
@@ -802,7 +850,7 @@ export interface RestManager {
|
|
|
802
850
|
*
|
|
803
851
|
* Fires a _Webhooks Update_ gateway event.
|
|
804
852
|
*
|
|
805
|
-
* @see {@link https://discord.com/developers/
|
|
853
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
806
854
|
*/
|
|
807
855
|
deleteWebhook: (webhookId: BigString, reason?: string) => Promise<void>;
|
|
808
856
|
/**
|
|
@@ -816,7 +864,7 @@ export interface RestManager {
|
|
|
816
864
|
* @remarks
|
|
817
865
|
* Fires a _Message Delete_ gateway event.
|
|
818
866
|
*
|
|
819
|
-
* @see {@link https://discord.com/developers/
|
|
867
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
820
868
|
*/
|
|
821
869
|
deleteWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: DeleteWebhookMessageOptions) => Promise<void>;
|
|
822
870
|
/**
|
|
@@ -828,7 +876,7 @@ export interface RestManager {
|
|
|
828
876
|
* @remarks
|
|
829
877
|
* Fires a _Message Delete_ gateway event.
|
|
830
878
|
*
|
|
831
|
-
* @see {@link https://discord.com/developers/
|
|
879
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-with-token}
|
|
832
880
|
*/
|
|
833
881
|
deleteWebhookWithToken: (webhookId: BigString, token: string) => Promise<void>;
|
|
834
882
|
/**
|
|
@@ -843,7 +891,7 @@ export interface RestManager {
|
|
|
843
891
|
* @remarks
|
|
844
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.
|
|
845
893
|
*
|
|
846
|
-
* @see {@link https://discord.com/developers/
|
|
894
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-application-command-permissions}
|
|
847
895
|
*/
|
|
848
896
|
editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: Camelize<DiscordApplicationCommandPermissions>[]) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
849
897
|
/**
|
|
@@ -860,7 +908,7 @@ export interface RestManager {
|
|
|
860
908
|
*
|
|
861
909
|
* Fires an _Auto Moderation Rule Update_ gateway event.
|
|
862
910
|
*
|
|
863
|
-
* @see {@link https://discord.com/developers/
|
|
911
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule}
|
|
864
912
|
*/
|
|
865
913
|
editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
866
914
|
/**
|
|
@@ -917,7 +965,7 @@ export interface RestManager {
|
|
|
917
965
|
*
|
|
918
966
|
* Fires a _Channel Update_ gateway event.
|
|
919
967
|
*
|
|
920
|
-
* @see {@link https://discord.com/developers/
|
|
968
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-channel-permissions}
|
|
921
969
|
*/
|
|
922
970
|
editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
|
|
923
971
|
/**
|
|
@@ -931,7 +979,7 @@ export interface RestManager {
|
|
|
931
979
|
*
|
|
932
980
|
* Fires a _Channel Update_ gateway event for every channel impacted in this change.
|
|
933
981
|
*
|
|
934
|
-
* @see {@link https://discord.com/developers/
|
|
982
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-channel-positions}
|
|
935
983
|
*/
|
|
936
984
|
editChannelPositions: (guildId: BigString, channelPositions: ModifyGuildChannelPositions[]) => Promise<void>;
|
|
937
985
|
/**
|
|
@@ -949,7 +997,7 @@ export interface RestManager {
|
|
|
949
997
|
*
|
|
950
998
|
* Fires a `Guild Emojis Update` gateway event.
|
|
951
999
|
*
|
|
952
|
-
* @see {@link https://discord.com/developers/
|
|
1000
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-guild-emoji}
|
|
953
1001
|
*/
|
|
954
1002
|
editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
|
|
955
1003
|
/**
|
|
@@ -959,7 +1007,7 @@ export interface RestManager {
|
|
|
959
1007
|
* @param options - The parameters for the edit of the emoji.
|
|
960
1008
|
* @returns An instance of the updated {@link DiscordEmoji}.
|
|
961
1009
|
*
|
|
962
|
-
* @see {@link https://discord.com/developers/
|
|
1010
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-application-emoji}
|
|
963
1011
|
*/
|
|
964
1012
|
editApplicationEmoji: (id: BigString, options: ModifyApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
|
|
965
1013
|
/**
|
|
@@ -977,7 +1025,7 @@ export interface RestManager {
|
|
|
977
1025
|
*
|
|
978
1026
|
* Fires a _Message Update_ event.
|
|
979
1027
|
*
|
|
980
|
-
* @see {@link https://discord.com/developers/
|
|
1028
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-followup-message}
|
|
981
1029
|
*/
|
|
982
1030
|
editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
983
1031
|
/**
|
|
@@ -987,7 +1035,7 @@ export interface RestManager {
|
|
|
987
1035
|
* @param options - The parameters for the edit of the command.
|
|
988
1036
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
989
1037
|
*
|
|
990
|
-
* @see {@link https://discord.com/developers/
|
|
1038
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-global-application-command}
|
|
991
1039
|
*/
|
|
992
1040
|
editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
993
1041
|
/**
|
|
@@ -1006,7 +1054,7 @@ export interface RestManager {
|
|
|
1006
1054
|
*
|
|
1007
1055
|
* Fires a _Guild Update_ gateway event.
|
|
1008
1056
|
*
|
|
1009
|
-
* @see {@link https://discord.com/developers/
|
|
1057
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild}
|
|
1010
1058
|
*/
|
|
1011
1059
|
editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<Camelize<DiscordGuild>>;
|
|
1012
1060
|
/**
|
|
@@ -1017,7 +1065,7 @@ export interface RestManager {
|
|
|
1017
1065
|
* @param options - The parameters for the edit of the command.
|
|
1018
1066
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
1019
1067
|
*
|
|
1020
|
-
* @see {@link https://discord.com/developers/
|
|
1068
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-guild-application-command}
|
|
1021
1069
|
*/
|
|
1022
1070
|
editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1023
1071
|
/**
|
|
@@ -1032,7 +1080,7 @@ export interface RestManager {
|
|
|
1032
1080
|
* For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1033
1081
|
* Fires a Guild Stickers Update Gateway event.
|
|
1034
1082
|
*
|
|
1035
|
-
* @see {@link https://discord.com/developers/
|
|
1083
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#modify-guild-sticker}
|
|
1036
1084
|
*/
|
|
1037
1085
|
editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<Camelize<DiscordSticker>>;
|
|
1038
1086
|
/**
|
|
@@ -1048,7 +1096,7 @@ export interface RestManager {
|
|
|
1048
1096
|
*
|
|
1049
1097
|
* Fires a _Guild Update_ gateway event.
|
|
1050
1098
|
*
|
|
1051
|
-
* @see {@link https://discord.com/developers/
|
|
1099
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#modify-guild-template}
|
|
1052
1100
|
*/
|
|
1053
1101
|
editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
|
|
1054
1102
|
/**
|
|
@@ -1066,7 +1114,7 @@ export interface RestManager {
|
|
|
1066
1114
|
*
|
|
1067
1115
|
* Fires a _Message Update_ gateway event.
|
|
1068
1116
|
*
|
|
1069
|
-
* @see {@link https://discord.com/developers/
|
|
1117
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-message}
|
|
1070
1118
|
*/
|
|
1071
1119
|
editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
|
|
1072
1120
|
/**
|
|
@@ -1083,7 +1131,7 @@ export interface RestManager {
|
|
|
1083
1131
|
*
|
|
1084
1132
|
* Fires a _Message Update_ event.
|
|
1085
1133
|
*
|
|
1086
|
-
* @see {@link https://discord.com/developers/
|
|
1134
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-original-interaction-response}
|
|
1087
1135
|
*/
|
|
1088
1136
|
editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
1089
1137
|
/**
|
|
@@ -1101,7 +1149,7 @@ export interface RestManager {
|
|
|
1101
1149
|
* If attempting to request to speak:
|
|
1102
1150
|
* - Requires the `REQUEST_TO_SPEAK` permission.
|
|
1103
1151
|
*
|
|
1104
|
-
* @see {@link https://discord.com/developers/
|
|
1152
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-current-user-voice-state}
|
|
1105
1153
|
*/
|
|
1106
1154
|
editOwnVoiceState: (guildId: BigString, options: EditOwnVoiceState) => Promise<void>;
|
|
1107
1155
|
/**
|
|
@@ -1118,7 +1166,7 @@ export interface RestManager {
|
|
|
1118
1166
|
*
|
|
1119
1167
|
* Fires a _Guild Role Update_ gateway event.
|
|
1120
1168
|
*
|
|
1121
|
-
* @see {@link https://discord.com/developers/
|
|
1169
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role}
|
|
1122
1170
|
*/
|
|
1123
1171
|
editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
1124
1172
|
/**
|
|
@@ -1134,7 +1182,7 @@ export interface RestManager {
|
|
|
1134
1182
|
*
|
|
1135
1183
|
* Fires a _Guild Role Update_ gateway event for every role impacted in this change.
|
|
1136
1184
|
*
|
|
1137
|
-
* @see {@link https://discord.com/developers/
|
|
1185
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role-positions}
|
|
1138
1186
|
*/
|
|
1139
1187
|
editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<Camelize<DiscordRole>[]>;
|
|
1140
1188
|
/**
|
|
@@ -1154,7 +1202,7 @@ export interface RestManager {
|
|
|
1154
1202
|
*
|
|
1155
1203
|
* Fires a _Guild Scheduled Event Update_ gateway event.
|
|
1156
1204
|
*
|
|
1157
|
-
* @see {@link https://discord.com/developers/
|
|
1205
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
|
1158
1206
|
*/
|
|
1159
1207
|
editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
1160
1208
|
/**
|
|
@@ -1170,7 +1218,7 @@ export interface RestManager {
|
|
|
1170
1218
|
*
|
|
1171
1219
|
* Fires a _Stage Instance Update_ event.
|
|
1172
1220
|
*
|
|
1173
|
-
* @see {@link https://discord.com/developers/
|
|
1221
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance}
|
|
1174
1222
|
*/
|
|
1175
1223
|
editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
1176
1224
|
/**
|
|
@@ -1184,7 +1232,7 @@ export interface RestManager {
|
|
|
1184
1232
|
*
|
|
1185
1233
|
* Requires the `MUTE_MEMBERS` permission.
|
|
1186
1234
|
*
|
|
1187
|
-
* @see {@link https://discord.com/developers/
|
|
1235
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-user-voice-state}
|
|
1188
1236
|
*/
|
|
1189
1237
|
editUserVoiceState: (guildId: BigString, options: EditUserVoiceState) => Promise<void>;
|
|
1190
1238
|
/**
|
|
@@ -1198,7 +1246,7 @@ export interface RestManager {
|
|
|
1198
1246
|
* @remarks
|
|
1199
1247
|
* This requires the `role_connections.write` scope.
|
|
1200
1248
|
*
|
|
1201
|
-
* @see {@link https://discord.com/developers/
|
|
1249
|
+
* @see {@link https://docs.discord.com/developers/resources/user#update-user-application-role-connection}
|
|
1202
1250
|
*/
|
|
1203
1251
|
editUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString, options: Camelize<DiscordApplicationRoleConnection>) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
1204
1252
|
/**
|
|
@@ -1213,7 +1261,7 @@ export interface RestManager {
|
|
|
1213
1261
|
*
|
|
1214
1262
|
* Fires a _Webhooks Update_ gateway event.
|
|
1215
1263
|
*
|
|
1216
|
-
* @see {@link https://discord.com/developers/
|
|
1264
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook}
|
|
1217
1265
|
*/
|
|
1218
1266
|
editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
1219
1267
|
/**
|
|
@@ -1228,7 +1276,7 @@ export interface RestManager {
|
|
|
1228
1276
|
* @remarks
|
|
1229
1277
|
* Fires a _Message Update_ gateway event.
|
|
1230
1278
|
*
|
|
1231
|
-
* @see {@link https://discord.com/developers/
|
|
1279
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook-message}
|
|
1232
1280
|
*/
|
|
1233
1281
|
editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: EditWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
1234
1282
|
/**
|
|
@@ -1243,7 +1291,7 @@ export interface RestManager {
|
|
|
1243
1291
|
*
|
|
1244
1292
|
* Fires a _Webhooks Update_ gateway event.
|
|
1245
1293
|
*
|
|
1246
|
-
* @see {@link https://discord.com/developers/
|
|
1294
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token}
|
|
1247
1295
|
*/
|
|
1248
1296
|
editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
|
|
1249
1297
|
/**
|
|
@@ -1259,7 +1307,7 @@ export interface RestManager {
|
|
|
1259
1307
|
*
|
|
1260
1308
|
* Fires a _Guild Update_ gateway event.
|
|
1261
1309
|
*
|
|
1262
|
-
* @see {@link https://discord.com/developers/
|
|
1310
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-welcome-screen}
|
|
1263
1311
|
*/
|
|
1264
1312
|
editWelcomeScreen: (guildId: BigString, options: ModifyGuildWelcomeScreen, reason?: string) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
1265
1313
|
/**
|
|
@@ -1274,7 +1322,7 @@ export interface RestManager {
|
|
|
1274
1322
|
*
|
|
1275
1323
|
* Fires a _Guild Update_ gateway event.
|
|
1276
1324
|
*
|
|
1277
|
-
* @see {@link https://discord.com/developers/
|
|
1325
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-widget}
|
|
1278
1326
|
*/
|
|
1279
1327
|
editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>, reason?: string) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
1280
1328
|
/**
|
|
@@ -1288,7 +1336,7 @@ export interface RestManager {
|
|
|
1288
1336
|
* @remarks
|
|
1289
1337
|
* If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
|
|
1290
1338
|
*
|
|
1291
|
-
* @see {@link https://discord.com/developers/
|
|
1339
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#execute-webhook}
|
|
1292
1340
|
*/
|
|
1293
1341
|
executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
|
|
1294
1342
|
/**
|
|
@@ -1304,7 +1352,7 @@ export interface RestManager {
|
|
|
1304
1352
|
*
|
|
1305
1353
|
* Fires a _Webhooks Update_ gateway event.
|
|
1306
1354
|
*
|
|
1307
|
-
* @see {@link https://discord.com/developers/
|
|
1355
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#follow-announcement-channel}
|
|
1308
1356
|
*/
|
|
1309
1357
|
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<Camelize<DiscordFollowedChannel>>;
|
|
1310
1358
|
/**
|
|
@@ -1318,7 +1366,7 @@ export interface RestManager {
|
|
|
1318
1366
|
*
|
|
1319
1367
|
* Threads are ordered by the `id` property in descending order.
|
|
1320
1368
|
*
|
|
1321
|
-
* @see {@link https://discord.com/developers/
|
|
1369
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#list-active-guild-threads}
|
|
1322
1370
|
*/
|
|
1323
1371
|
getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordListActiveThreads>>;
|
|
1324
1372
|
/** Get the applications info */
|
|
@@ -1368,7 +1416,7 @@ export interface RestManager {
|
|
|
1368
1416
|
* @remarks
|
|
1369
1417
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1370
1418
|
*
|
|
1371
|
-
* @see {@link https://discord.com/developers/
|
|
1419
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-application-command-permissions}
|
|
1372
1420
|
*/
|
|
1373
1421
|
getApplicationCommandPermission: (guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
1374
1422
|
/**
|
|
@@ -1381,7 +1429,7 @@ export interface RestManager {
|
|
|
1381
1429
|
* @remarks
|
|
1382
1430
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1383
1431
|
*
|
|
1384
|
-
* @see {@link https://discord.com/developers/
|
|
1432
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command-permissions}
|
|
1385
1433
|
*/
|
|
1386
1434
|
getApplicationCommandPermissions: (guildId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>[]>;
|
|
1387
1435
|
/**
|
|
@@ -1394,7 +1442,7 @@ export interface RestManager {
|
|
|
1394
1442
|
* @remarks
|
|
1395
1443
|
* Requires the `VIEW_AUDIT_LOG` permission.
|
|
1396
1444
|
*
|
|
1397
|
-
* @see {@link https://discord.com/developers/
|
|
1445
|
+
* @see {@link https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log}
|
|
1398
1446
|
*/
|
|
1399
1447
|
getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
|
|
1400
1448
|
/**
|
|
@@ -1407,7 +1455,7 @@ export interface RestManager {
|
|
|
1407
1455
|
* @remarks
|
|
1408
1456
|
* Requires the `MANAGE_GUILD` permission.
|
|
1409
1457
|
*
|
|
1410
|
-
* @see {@link https://discord.com/developers/
|
|
1458
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#get-auto-moderation-rule}
|
|
1411
1459
|
*/
|
|
1412
1460
|
getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
1413
1461
|
/**
|
|
@@ -1419,7 +1467,7 @@ export interface RestManager {
|
|
|
1419
1467
|
* @remarks
|
|
1420
1468
|
* Requires the `MANAGE_GUILD` permission.
|
|
1421
1469
|
*
|
|
1422
|
-
* @see {@link https://discord.com/developers/
|
|
1470
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild}
|
|
1423
1471
|
*/
|
|
1424
1472
|
getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule>[]>;
|
|
1425
1473
|
/**
|
|
@@ -1438,7 +1486,7 @@ export interface RestManager {
|
|
|
1438
1486
|
* @remarks
|
|
1439
1487
|
* Requires the `BAN_MEMBERS` permission.
|
|
1440
1488
|
*
|
|
1441
|
-
* @see {@link https://discord.com/developers/
|
|
1489
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-ban}
|
|
1442
1490
|
*/
|
|
1443
1491
|
getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
|
|
1444
1492
|
/**
|
|
@@ -1453,7 +1501,7 @@ export interface RestManager {
|
|
|
1453
1501
|
*
|
|
1454
1502
|
* Users are ordered by their IDs in _ascending_ order.
|
|
1455
1503
|
*
|
|
1456
|
-
* @see {@link https://discord.com/developers/
|
|
1504
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-bans}
|
|
1457
1505
|
*/
|
|
1458
1506
|
getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan>[]>;
|
|
1459
1507
|
/**
|
|
@@ -1465,7 +1513,7 @@ export interface RestManager {
|
|
|
1465
1513
|
* @remarks
|
|
1466
1514
|
* If the channel is a thread, a {@link DiscordThreadMember} object is included in the result.
|
|
1467
1515
|
*
|
|
1468
|
-
* @see {@link https://discord.com/developers/
|
|
1516
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel}
|
|
1469
1517
|
*/
|
|
1470
1518
|
getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1471
1519
|
/**
|
|
@@ -1479,7 +1527,7 @@ export interface RestManager {
|
|
|
1479
1527
|
*
|
|
1480
1528
|
* Only usable for guild channels.
|
|
1481
1529
|
*
|
|
1482
|
-
* @see {@link https://discord.com/developers/
|
|
1530
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-invites}
|
|
1483
1531
|
*/
|
|
1484
1532
|
getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1485
1533
|
/**
|
|
@@ -1491,7 +1539,7 @@ export interface RestManager {
|
|
|
1491
1539
|
* @remarks
|
|
1492
1540
|
* Excludes threads.
|
|
1493
1541
|
*
|
|
1494
|
-
* @see {@link https://discord.com/developers/
|
|
1542
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-channels}
|
|
1495
1543
|
*/
|
|
1496
1544
|
getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel>[]>;
|
|
1497
1545
|
/**
|
|
@@ -1503,7 +1551,7 @@ export interface RestManager {
|
|
|
1503
1551
|
* @remarks
|
|
1504
1552
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1505
1553
|
*
|
|
1506
|
-
* @see {@link https://discord.com/developers/
|
|
1554
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-channel-webhooks}
|
|
1507
1555
|
*/
|
|
1508
1556
|
getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1509
1557
|
/**
|
|
@@ -1512,7 +1560,7 @@ export interface RestManager {
|
|
|
1512
1560
|
* @param userId - The ID of the user to create the DM channel with.
|
|
1513
1561
|
* @returns An instance of {@link DiscordChannel}.
|
|
1514
1562
|
*
|
|
1515
|
-
* @see {@link https://discord.com/developers/
|
|
1563
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-dm}
|
|
1516
1564
|
*/
|
|
1517
1565
|
getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1518
1566
|
/**
|
|
@@ -1528,7 +1576,7 @@ export interface RestManager {
|
|
|
1528
1576
|
*
|
|
1529
1577
|
* Fires a _Channel create_ gateway event.
|
|
1530
1578
|
*
|
|
1531
|
-
* @see {@link https://discord.com/developers/
|
|
1579
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-group-dm}
|
|
1532
1580
|
*/
|
|
1533
1581
|
getGroupDmChannel: (options: CreateGroupDmOptions) => Promise<Camelize<DiscordChannel>>;
|
|
1534
1582
|
/**
|
|
@@ -1542,7 +1590,7 @@ export interface RestManager {
|
|
|
1542
1590
|
* Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission,
|
|
1543
1591
|
* or if the bot created the emoji and has the the `CREATE_GUILD_EXPRESSIONS` permission.
|
|
1544
1592
|
*
|
|
1545
|
-
* @see {@link https://discord.com/developers/
|
|
1593
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-guild-emoji}
|
|
1546
1594
|
*/
|
|
1547
1595
|
getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1548
1596
|
/**
|
|
@@ -1554,7 +1602,7 @@ export interface RestManager {
|
|
|
1554
1602
|
* @remarks
|
|
1555
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.
|
|
1556
1604
|
*
|
|
1557
|
-
* @see {@link https://discord.com/developers/
|
|
1605
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-application-emoji}
|
|
1558
1606
|
*/
|
|
1559
1607
|
getApplicationEmoji: (emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1560
1608
|
/**
|
|
@@ -1566,7 +1614,7 @@ export interface RestManager {
|
|
|
1566
1614
|
* @remarks
|
|
1567
1615
|
* Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1568
1616
|
*
|
|
1569
|
-
* @see {@link https://discord.com/developers/
|
|
1617
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-guild-emojis}
|
|
1570
1618
|
*/
|
|
1571
1619
|
getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji>[]>;
|
|
1572
1620
|
/**
|
|
@@ -1577,7 +1625,7 @@ export interface RestManager {
|
|
|
1577
1625
|
* @remarks
|
|
1578
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.
|
|
1579
1627
|
*
|
|
1580
|
-
* @see {@link https://discord.com/developers/
|
|
1628
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-application-emojis}
|
|
1581
1629
|
*/
|
|
1582
1630
|
getApplicationEmojis: () => Promise<{
|
|
1583
1631
|
items: Camelize<DiscordEmoji>[];
|
|
@@ -1596,7 +1644,7 @@ export interface RestManager {
|
|
|
1596
1644
|
*
|
|
1597
1645
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1598
1646
|
*
|
|
1599
|
-
* @see {@link https://discord.com/developers/
|
|
1647
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-followup-message}
|
|
1600
1648
|
*/
|
|
1601
1649
|
getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1602
1650
|
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
|
|
@@ -1607,7 +1655,7 @@ export interface RestManager {
|
|
|
1607
1655
|
* @param commandId - The ID of the command to get.
|
|
1608
1656
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1609
1657
|
*
|
|
1610
|
-
* @see {@link https://discord.com/developers/
|
|
1658
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-command}
|
|
1611
1659
|
*/
|
|
1612
1660
|
getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1613
1661
|
/**
|
|
@@ -1616,7 +1664,7 @@ export interface RestManager {
|
|
|
1616
1664
|
* @param options - The parameters for the fetching of global application commands
|
|
1617
1665
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1618
1666
|
*
|
|
1619
|
-
* @see {@link https://discord.com/developers/
|
|
1667
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commands}
|
|
1620
1668
|
*/
|
|
1621
1669
|
getGlobalApplicationCommands: (options?: GetGlobalApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1622
1670
|
/**
|
|
@@ -1626,7 +1674,7 @@ export interface RestManager {
|
|
|
1626
1674
|
* @param options - The parameters for the fetching of the guild.
|
|
1627
1675
|
* @returns An instance of {@link DiscordGuild}.
|
|
1628
1676
|
*
|
|
1629
|
-
* @see {@link https://discord.com/developers/
|
|
1677
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild}
|
|
1630
1678
|
*/
|
|
1631
1679
|
getGuild: (guildId: BigString, options?: {
|
|
1632
1680
|
counts?: boolean;
|
|
@@ -1641,7 +1689,7 @@ export interface RestManager {
|
|
|
1641
1689
|
* @remarks
|
|
1642
1690
|
* If used with an access token, the token needs to have the `guilds` scope
|
|
1643
1691
|
*
|
|
1644
|
-
* @see {@link https://discord.com/developers/
|
|
1692
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guilds}
|
|
1645
1693
|
*/
|
|
1646
1694
|
getGuilds: (bearerToken?: string, options?: GetUserGuilds) => Promise<Partial<Camelize<DiscordGuild>>[]>;
|
|
1647
1695
|
/**
|
|
@@ -1651,7 +1699,7 @@ export interface RestManager {
|
|
|
1651
1699
|
* @param commandId - The ID of the command to get.
|
|
1652
1700
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1653
1701
|
*
|
|
1654
|
-
* @see {@link https://discord.com/developers/
|
|
1702
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command}
|
|
1655
1703
|
*/
|
|
1656
1704
|
getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1657
1705
|
/**
|
|
@@ -1661,7 +1709,7 @@ export interface RestManager {
|
|
|
1661
1709
|
* @param options - The parameters for the fetching of guild application commands
|
|
1662
1710
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1663
1711
|
*
|
|
1664
|
-
* @see {@link https://discord.com/developers/
|
|
1712
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commandss}
|
|
1665
1713
|
*/
|
|
1666
1714
|
getGuildApplicationCommands: (guildId: BigString, options?: GetGuildApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1667
1715
|
/**
|
|
@@ -1673,7 +1721,7 @@ export interface RestManager {
|
|
|
1673
1721
|
* @remarks
|
|
1674
1722
|
* If the bot user is not in the guild, the guild must be discoverable.
|
|
1675
1723
|
*
|
|
1676
|
-
* @see {@link https://discord.com/developers/
|
|
1724
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-preview}
|
|
1677
1725
|
*/
|
|
1678
1726
|
getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
|
|
1679
1727
|
/**
|
|
@@ -1685,7 +1733,7 @@ export interface RestManager {
|
|
|
1685
1733
|
*
|
|
1686
1734
|
* @remarks Includes the user field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1687
1735
|
*
|
|
1688
|
-
* @see {@link https://discord.com/developers/
|
|
1736
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-guild-sticker}
|
|
1689
1737
|
*/
|
|
1690
1738
|
getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
1691
1739
|
/**
|
|
@@ -1696,7 +1744,7 @@ export interface RestManager {
|
|
|
1696
1744
|
*
|
|
1697
1745
|
* @remarks Includes user fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1698
1746
|
*
|
|
1699
|
-
* @see {@link https://discord.com/developers/
|
|
1747
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-guild-stickers}
|
|
1700
1748
|
*/
|
|
1701
1749
|
getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker>[]>;
|
|
1702
1750
|
/**
|
|
@@ -1708,7 +1756,7 @@ export interface RestManager {
|
|
|
1708
1756
|
* @remarks
|
|
1709
1757
|
* Requires the `MANAGE_GUILD` permission.
|
|
1710
1758
|
*
|
|
1711
|
-
* @see {@link https://discord.com/developers/
|
|
1759
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-template}
|
|
1712
1760
|
*/
|
|
1713
1761
|
getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
|
|
1714
1762
|
/**
|
|
@@ -1720,7 +1768,7 @@ export interface RestManager {
|
|
|
1720
1768
|
* @remarks
|
|
1721
1769
|
* Requires the `MANAGE_GUILD` permission.
|
|
1722
1770
|
*
|
|
1723
|
-
* @see {@link https://discord.com/developers/
|
|
1771
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
1724
1772
|
*/
|
|
1725
1773
|
getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate>[]>;
|
|
1726
1774
|
/**
|
|
@@ -1732,7 +1780,7 @@ export interface RestManager {
|
|
|
1732
1780
|
* @remarks
|
|
1733
1781
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1734
1782
|
*
|
|
1735
|
-
* @see {@link https://discord.com/developers/
|
|
1783
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-guild-webhooks}
|
|
1736
1784
|
*/
|
|
1737
1785
|
getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1738
1786
|
/**
|
|
@@ -1744,7 +1792,7 @@ export interface RestManager {
|
|
|
1744
1792
|
* @remarks
|
|
1745
1793
|
* Requires the `MANAGE_GUILD` permission.
|
|
1746
1794
|
*
|
|
1747
|
-
* @see {@link https://discord.com/developers/
|
|
1795
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-integrations}
|
|
1748
1796
|
*/
|
|
1749
1797
|
getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration>[]>;
|
|
1750
1798
|
/**
|
|
@@ -1754,7 +1802,7 @@ export interface RestManager {
|
|
|
1754
1802
|
* @param options - The parameters for the fetching of the invite.
|
|
1755
1803
|
* @returns An instance of {@link DiscordInviteMetadata}.
|
|
1756
1804
|
*
|
|
1757
|
-
* @see {@link https://discord.com/developers/
|
|
1805
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1758
1806
|
*/
|
|
1759
1807
|
getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
|
|
1760
1808
|
/**
|
|
@@ -1766,7 +1814,7 @@ export interface RestManager {
|
|
|
1766
1814
|
* @remarks
|
|
1767
1815
|
* Requires the `MANAGE_GUILD` or `VIEW_AUDIT_LOG` permission.
|
|
1768
1816
|
*
|
|
1769
|
-
* @see {@link https://discord.com/developers/
|
|
1817
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invites}
|
|
1770
1818
|
*/
|
|
1771
1819
|
getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1772
1820
|
/**
|
|
@@ -1782,7 +1830,7 @@ export interface RestManager {
|
|
|
1782
1830
|
* If getting a message from a guild channel:
|
|
1783
1831
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1784
1832
|
*
|
|
1785
|
-
* @see {@link https://discord.com/developers/
|
|
1833
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-message}
|
|
1786
1834
|
*/
|
|
1787
1835
|
getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1788
1836
|
/**
|
|
@@ -1798,7 +1846,7 @@ export interface RestManager {
|
|
|
1798
1846
|
* If getting a messages from a guild channel:
|
|
1799
1847
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1800
1848
|
*
|
|
1801
|
-
* @see {@link https://discord.com/developers/
|
|
1849
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-messages}
|
|
1802
1850
|
*/
|
|
1803
1851
|
getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage>[]>;
|
|
1804
1852
|
/**
|
|
@@ -1806,7 +1854,7 @@ export interface RestManager {
|
|
|
1806
1854
|
*
|
|
1807
1855
|
* @returns A {@link DiscordStickerPack} object.
|
|
1808
1856
|
*
|
|
1809
|
-
* @see {@link https://discord.com/developers/
|
|
1857
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker-pack}
|
|
1810
1858
|
*/
|
|
1811
1859
|
getStickerPack: (stickerPackId: BigString) => Promise<Camelize<DiscordStickerPack>>;
|
|
1812
1860
|
/**
|
|
@@ -1814,7 +1862,7 @@ export interface RestManager {
|
|
|
1814
1862
|
*
|
|
1815
1863
|
* @returns A collection of {@link DiscordStickerPack} objects assorted by sticker ID.
|
|
1816
1864
|
*
|
|
1817
|
-
* @see {@link https://discord.com/developers/
|
|
1865
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-sticker-packs}
|
|
1818
1866
|
*/
|
|
1819
1867
|
getStickerPacks: () => Promise<Camelize<DiscordStickerPack>[]>;
|
|
1820
1868
|
/**
|
|
@@ -1830,7 +1878,7 @@ export interface RestManager {
|
|
|
1830
1878
|
*
|
|
1831
1879
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1832
1880
|
*
|
|
1833
|
-
* @see {@link https://discord.com/developers/
|
|
1881
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-original-interaction-response}
|
|
1834
1882
|
*/
|
|
1835
1883
|
getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
|
|
1836
1884
|
/**
|
|
@@ -1845,7 +1893,7 @@ export interface RestManager {
|
|
|
1845
1893
|
*
|
|
1846
1894
|
* If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned.
|
|
1847
1895
|
*
|
|
1848
|
-
* @see {@link https://discord.com/developers/
|
|
1896
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-channel-pins}
|
|
1849
1897
|
*/
|
|
1850
1898
|
getChannelPins: (channelId: BigString, options?: GetChannelPinsOptions) => Promise<Camelize<DiscordGetChannelPins>>;
|
|
1851
1899
|
/**
|
|
@@ -1860,7 +1908,7 @@ export interface RestManager {
|
|
|
1860
1908
|
* If getting a message from a guild channel:
|
|
1861
1909
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1862
1910
|
*
|
|
1863
|
-
* @see {@link https://discord.com/developers/
|
|
1911
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-pinned-messages-deprecated}
|
|
1864
1912
|
* @deprecated Use {@link getChannelPins} instead.
|
|
1865
1913
|
*/
|
|
1866
1914
|
getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage>[]>;
|
|
@@ -1879,7 +1927,7 @@ export interface RestManager {
|
|
|
1879
1927
|
*
|
|
1880
1928
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1881
1929
|
*
|
|
1882
|
-
* @see {@link https://discord.com/developers/
|
|
1930
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-private-archived-threads}
|
|
1883
1931
|
*/
|
|
1884
1932
|
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1885
1933
|
/**
|
|
@@ -1896,7 +1944,7 @@ export interface RestManager {
|
|
|
1896
1944
|
*
|
|
1897
1945
|
* Threads are ordered by the `id` property in descending order.
|
|
1898
1946
|
*
|
|
1899
|
-
* @see {@link https://discord.com/developers/
|
|
1947
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads}
|
|
1900
1948
|
*/
|
|
1901
1949
|
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1902
1950
|
/**
|
|
@@ -1909,7 +1957,7 @@ export interface RestManager {
|
|
|
1909
1957
|
* @remarks
|
|
1910
1958
|
* Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
|
|
1911
1959
|
*
|
|
1912
|
-
* @see {@link https://discord.com/developers/
|
|
1960
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-prune-count}
|
|
1913
1961
|
*/
|
|
1914
1962
|
getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
|
|
1915
1963
|
/**
|
|
@@ -1927,7 +1975,7 @@ export interface RestManager {
|
|
|
1927
1975
|
*
|
|
1928
1976
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1929
1977
|
*
|
|
1930
|
-
* @see {@link https://discord.com/developers/
|
|
1978
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-public-archived-threads}
|
|
1931
1979
|
*/
|
|
1932
1980
|
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1933
1981
|
/**
|
|
@@ -1939,7 +1987,7 @@ export interface RestManager {
|
|
|
1939
1987
|
* @remarks
|
|
1940
1988
|
* ⚠️ This endpoint should be used sparingly due to {@link DiscordRole} objects already being included in guild payloads.
|
|
1941
1989
|
*
|
|
1942
|
-
* @see {@link https://discord.com/developers/
|
|
1990
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-roles}
|
|
1943
1991
|
*/
|
|
1944
1992
|
getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole>[]>;
|
|
1945
1993
|
/**
|
|
@@ -1949,7 +1997,7 @@ export interface RestManager {
|
|
|
1949
1997
|
* @param roleId - The ID of the role.
|
|
1950
1998
|
* @returns A {@link DiscordRole} object.
|
|
1951
1999
|
*
|
|
1952
|
-
* @see {@link https://discord.com/developers/
|
|
2000
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role}
|
|
1953
2001
|
*/
|
|
1954
2002
|
getRole: (guildId: BigString, roleId: BigString) => Promise<Camelize<DiscordRole>>;
|
|
1955
2003
|
/**
|
|
@@ -1960,7 +2008,7 @@ export interface RestManager {
|
|
|
1960
2008
|
* @param options - The parameters for the fetching of the scheduled event.
|
|
1961
2009
|
* @returns An instance of {@link DiscordScheduledEvent}.
|
|
1962
2010
|
*
|
|
1963
|
-
* @see {@link https://discord.com/developers/
|
|
2011
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event}
|
|
1964
2012
|
*/
|
|
1965
2013
|
getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
|
|
1966
2014
|
withUserCount?: boolean;
|
|
@@ -1972,7 +2020,7 @@ export interface RestManager {
|
|
|
1972
2020
|
* @param options - The parameters for the fetching of the scheduled events.
|
|
1973
2021
|
* @returns A collection of {@link DiscordScheduledEvent} objects assorted by event ID.
|
|
1974
2022
|
*
|
|
1975
|
-
* @see {@link https://discord.com/developers/
|
|
2023
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#list-scheduled-events-for-guild}
|
|
1976
2024
|
*/
|
|
1977
2025
|
getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent>[]>;
|
|
1978
2026
|
/**
|
|
@@ -1988,7 +2036,7 @@ export interface RestManager {
|
|
|
1988
2036
|
*
|
|
1989
2037
|
* Users are ordered by their IDs in _ascending_ order.
|
|
1990
2038
|
*
|
|
1991
|
-
* @see {@link https://discord.com/developers/
|
|
2039
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event-users}
|
|
1992
2040
|
*/
|
|
1993
2041
|
getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
|
|
1994
2042
|
user: Camelize<DiscordUser>;
|
|
@@ -2002,7 +2050,7 @@ export interface RestManager {
|
|
|
2002
2050
|
* @param channelId - The ID of the stage channel the stage instance is associated with.
|
|
2003
2051
|
* @returns An instance of {@link DiscordStageInstance}.
|
|
2004
2052
|
*
|
|
2005
|
-
* @see {@link https://discord.com/developers/
|
|
2053
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#get-stage-instance}
|
|
2006
2054
|
*/
|
|
2007
2055
|
getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
|
|
2008
2056
|
/**
|
|
@@ -2011,7 +2059,7 @@ export interface RestManager {
|
|
|
2011
2059
|
* @param guildId - The ID of the guild to get the voice state from.
|
|
2012
2060
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2013
2061
|
*
|
|
2014
|
-
* @see {@link https://discord.com/developers/
|
|
2062
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-current-user-voice-state}
|
|
2015
2063
|
*/
|
|
2016
2064
|
getOwnVoiceState: (guildId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2017
2065
|
/**
|
|
@@ -2021,7 +2069,7 @@ export interface RestManager {
|
|
|
2021
2069
|
* @param userId - The ID of the user to get the voice state from
|
|
2022
2070
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2023
2071
|
*
|
|
2024
|
-
* @see {@link https://discord.com/developers/
|
|
2072
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-user-voice-state}
|
|
2025
2073
|
*/
|
|
2026
2074
|
getUserVoiceState: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2027
2075
|
/**
|
|
@@ -2030,7 +2078,7 @@ export interface RestManager {
|
|
|
2030
2078
|
* @param stickerId The ID of the sticker to get
|
|
2031
2079
|
* @returns A {@link DiscordSticker}
|
|
2032
2080
|
*
|
|
2033
|
-
* @see {@link https://discord.com/developers/
|
|
2081
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker}
|
|
2034
2082
|
*/
|
|
2035
2083
|
getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
2036
2084
|
/**
|
|
@@ -2041,7 +2089,7 @@ export interface RestManager {
|
|
|
2041
2089
|
* @param options - The parameters for the fetching of the thread member.
|
|
2042
2090
|
* @returns An instance of {@link DiscordThreadMember}.
|
|
2043
2091
|
*
|
|
2044
|
-
* @see {@link https://discord.com/developers/
|
|
2092
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-thread-member}
|
|
2045
2093
|
*/
|
|
2046
2094
|
getThreadMember: (channelId: BigString, userId: BigString, options?: GetThreadMember) => Promise<Camelize<DiscordThreadMember>>;
|
|
2047
2095
|
/**
|
|
@@ -2054,7 +2102,7 @@ export interface RestManager {
|
|
|
2054
2102
|
* @remarks
|
|
2055
2103
|
* Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
|
|
2056
2104
|
*
|
|
2057
|
-
* @see {@link https://discord.com/developers/
|
|
2105
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-thread-members}
|
|
2058
2106
|
*/
|
|
2059
2107
|
getThreadMembers: (channelId: BigString, options?: ListThreadMembers) => Promise<Camelize<DiscordThreadMember>[]>;
|
|
2060
2108
|
/**
|
|
@@ -2066,7 +2114,7 @@ export interface RestManager {
|
|
|
2066
2114
|
* @param options - The parameters for the fetching of the users.
|
|
2067
2115
|
* @returns A collection of {@link DiscordUser} objects assorted by user ID.
|
|
2068
2116
|
*
|
|
2069
|
-
* @see {@link https://discord.com/developers/
|
|
2117
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-reactions}
|
|
2070
2118
|
*/
|
|
2071
2119
|
getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser>[]>;
|
|
2072
2120
|
/**
|
|
@@ -2108,7 +2156,7 @@ export interface RestManager {
|
|
|
2108
2156
|
* @remarks
|
|
2109
2157
|
* The access token requires the `role_connections.write` scope.
|
|
2110
2158
|
*
|
|
2111
|
-
* @see {@link https://discord.com/developers/
|
|
2159
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-user-application-role-connection}
|
|
2112
2160
|
*/
|
|
2113
2161
|
getUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
2114
2162
|
/**
|
|
@@ -2122,7 +2170,7 @@ export interface RestManager {
|
|
|
2122
2170
|
*
|
|
2123
2171
|
* The `code` property will be `null` if the guild does not have a set vanity url.
|
|
2124
2172
|
*
|
|
2125
|
-
* @see {@link https://discord.com/developers/
|
|
2173
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-vanity-url}
|
|
2126
2174
|
*/
|
|
2127
2175
|
getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
|
|
2128
2176
|
/**
|
|
@@ -2131,7 +2179,7 @@ export interface RestManager {
|
|
|
2131
2179
|
* @param guildId - The ID of the guild to get the voice regions for.
|
|
2132
2180
|
* @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
|
|
2133
2181
|
*
|
|
2134
|
-
* @see {@link https://discord.com/developers/
|
|
2182
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-voice-regions}
|
|
2135
2183
|
*/
|
|
2136
2184
|
getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion>[]>;
|
|
2137
2185
|
/**
|
|
@@ -2143,7 +2191,7 @@ export interface RestManager {
|
|
|
2143
2191
|
* @remarks
|
|
2144
2192
|
* Requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook.
|
|
2145
2193
|
*
|
|
2146
|
-
* @see {@link https://discord.com/developers/
|
|
2194
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook}
|
|
2147
2195
|
*/
|
|
2148
2196
|
getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
|
|
2149
2197
|
/**
|
|
@@ -2155,7 +2203,7 @@ export interface RestManager {
|
|
|
2155
2203
|
* @param options - The parameters for the fetching of the message.
|
|
2156
2204
|
* @returns An instance of {@link DiscordMessage}.
|
|
2157
2205
|
*
|
|
2158
|
-
* @see {@link https://discord.com/developers/
|
|
2206
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-message}
|
|
2159
2207
|
*/
|
|
2160
2208
|
getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2161
2209
|
/**
|
|
@@ -2165,7 +2213,7 @@ export interface RestManager {
|
|
|
2165
2213
|
* @param token - The webhook token, used to get the webhook.
|
|
2166
2214
|
* @returns An instance of {@link DiscordWebhook}.
|
|
2167
2215
|
*
|
|
2168
|
-
* @see {@link https://discord.com/developers/
|
|
2216
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-with-token}
|
|
2169
2217
|
*/
|
|
2170
2218
|
getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
|
|
2171
2219
|
/**
|
|
@@ -2178,7 +2226,7 @@ export interface RestManager {
|
|
|
2178
2226
|
* If the welcome screen is not enabled:
|
|
2179
2227
|
* - Requires the `MANAGE_GUILD` permission.
|
|
2180
2228
|
*
|
|
2181
|
-
* @see {@link https://discord.com/developers/
|
|
2229
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-welcome-screen}
|
|
2182
2230
|
*/
|
|
2183
2231
|
getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
2184
2232
|
/**
|
|
@@ -2190,7 +2238,7 @@ export interface RestManager {
|
|
|
2190
2238
|
* @remarks
|
|
2191
2239
|
* Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
|
|
2192
2240
|
*
|
|
2193
|
-
* @see {@link https://discord.com/developers/
|
|
2241
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget}
|
|
2194
2242
|
*/
|
|
2195
2243
|
getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
|
|
2196
2244
|
/**
|
|
@@ -2202,7 +2250,7 @@ export interface RestManager {
|
|
|
2202
2250
|
* @remarks
|
|
2203
2251
|
* Requires the `MANAGE_GUILD` permission.
|
|
2204
2252
|
*
|
|
2205
|
-
* @see {@link https://discord.com/developers/
|
|
2253
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget-settings}
|
|
2206
2254
|
*/
|
|
2207
2255
|
getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
2208
2256
|
/**
|
|
@@ -2215,7 +2263,7 @@ export interface RestManager {
|
|
|
2215
2263
|
*
|
|
2216
2264
|
* Fires a _Thread Members Update_ gateway event.
|
|
2217
2265
|
*
|
|
2218
|
-
* @see {@link https://discord.com/developers/
|
|
2266
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#join-thread}
|
|
2219
2267
|
*/
|
|
2220
2268
|
joinThread: (channelId: BigString) => Promise<void>;
|
|
2221
2269
|
/**
|
|
@@ -2226,7 +2274,7 @@ export interface RestManager {
|
|
|
2226
2274
|
* @remarks
|
|
2227
2275
|
* Fires a _Guild Delete_ event.
|
|
2228
2276
|
*
|
|
2229
|
-
* @see {@link https://discord.com/developers/
|
|
2277
|
+
* @see {@link https://docs.discord.com/developers/resources/user#leave-guild}
|
|
2230
2278
|
*/
|
|
2231
2279
|
leaveGuild: (guildId: BigString) => Promise<void>;
|
|
2232
2280
|
/**
|
|
@@ -2239,7 +2287,7 @@ export interface RestManager {
|
|
|
2239
2287
|
*
|
|
2240
2288
|
* Fires a _Thread Members Update_ gateway event.
|
|
2241
2289
|
*
|
|
2242
|
-
* @see {@link https://discord.com/developers/
|
|
2290
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#leave-thread}
|
|
2243
2291
|
*/
|
|
2244
2292
|
leaveThread: (channelId: BigString) => Promise<void>;
|
|
2245
2293
|
/**
|
|
@@ -2257,7 +2305,7 @@ export interface RestManager {
|
|
|
2257
2305
|
*
|
|
2258
2306
|
* Fires a _Message Create_ event in the guilds the subscribed channels are in.
|
|
2259
2307
|
*
|
|
2260
|
-
* @see {@link https://discord.com/developers/
|
|
2308
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#crosspost-message}
|
|
2261
2309
|
*/
|
|
2262
2310
|
publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
2263
2311
|
/**
|
|
@@ -2273,7 +2321,7 @@ export interface RestManager {
|
|
|
2273
2321
|
*
|
|
2274
2322
|
* Fires a _Guild Member Update_ gateway event.
|
|
2275
2323
|
*
|
|
2276
|
-
* @see {@link https://discord.com/developers/
|
|
2324
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member-role}
|
|
2277
2325
|
*/
|
|
2278
2326
|
removeRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
2279
2327
|
/**
|
|
@@ -2290,7 +2338,7 @@ export interface RestManager {
|
|
|
2290
2338
|
*
|
|
2291
2339
|
* Fires a _Thread Members Update_ gateway event.
|
|
2292
2340
|
*
|
|
2293
|
-
* @see {@link https://discord.com/developers/
|
|
2341
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#remove-thread-member}
|
|
2294
2342
|
*/
|
|
2295
2343
|
removeThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2296
2344
|
/**
|
|
@@ -2299,7 +2347,7 @@ export interface RestManager {
|
|
|
2299
2347
|
* @param channelId - The ID of the channel to remove the recipient user of.
|
|
2300
2348
|
* @param userId - The user ID of the user to remove.
|
|
2301
2349
|
*
|
|
2302
|
-
* @see {@link https://discord.com/developers/
|
|
2350
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#group-dm-remove-recipient}
|
|
2303
2351
|
*/
|
|
2304
2352
|
removeDmRecipient: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2305
2353
|
/**
|
|
@@ -2326,7 +2374,7 @@ export interface RestManager {
|
|
|
2326
2374
|
*
|
|
2327
2375
|
* Fires a _Message Create_ gateway event.
|
|
2328
2376
|
*
|
|
2329
|
-
* @see {@link https://discord.com/developers/
|
|
2377
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-message}
|
|
2330
2378
|
*/
|
|
2331
2379
|
sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2332
2380
|
/**
|
|
@@ -2350,7 +2398,7 @@ export interface RestManager {
|
|
|
2350
2398
|
*
|
|
2351
2399
|
* Fires a _Message Create_ event.
|
|
2352
2400
|
*
|
|
2353
|
-
* @see {@link https://discord.com/developers/
|
|
2401
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-followup-message}
|
|
2354
2402
|
*/
|
|
2355
2403
|
sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
2356
2404
|
/**
|
|
@@ -2373,7 +2421,7 @@ export interface RestManager {
|
|
|
2373
2421
|
*
|
|
2374
2422
|
* Fires a _Message Create_ event.
|
|
2375
2423
|
*
|
|
2376
|
-
* @see {@link https://discord.com/developers/
|
|
2424
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-interaction-response}
|
|
2377
2425
|
*/
|
|
2378
2426
|
sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse, params?: InteractionCallbackOptions) => Promise<void | Camelize<DiscordInteractionCallbackResponse>>;
|
|
2379
2427
|
/**
|
|
@@ -2394,7 +2442,7 @@ export interface RestManager {
|
|
|
2394
2442
|
*
|
|
2395
2443
|
* Fires a _Thread Create_ gateway event.
|
|
2396
2444
|
*
|
|
2397
|
-
* @see {@link https://discord.com/developers/
|
|
2445
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
|
|
2398
2446
|
*/
|
|
2399
2447
|
startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2400
2448
|
/**
|
|
@@ -2410,7 +2458,7 @@ export interface RestManager {
|
|
|
2410
2458
|
*
|
|
2411
2459
|
* Fires a _Thread Create_ gateway event.
|
|
2412
2460
|
*
|
|
2413
|
-
* @see {@link https://discord.com/developers/
|
|
2461
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
|
|
2414
2462
|
*/
|
|
2415
2463
|
startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2416
2464
|
/**
|
|
@@ -2447,7 +2495,7 @@ export interface RestManager {
|
|
|
2447
2495
|
*
|
|
2448
2496
|
* Fires a _Guild Update_ gateway event.
|
|
2449
2497
|
*
|
|
2450
|
-
* @see {@link https://discord.com/developers/
|
|
2498
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
2451
2499
|
*/
|
|
2452
2500
|
syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
|
|
2453
2501
|
/**
|
|
@@ -2462,7 +2510,7 @@ export interface RestManager {
|
|
|
2462
2510
|
*
|
|
2463
2511
|
* Fires a _Typing Start_ gateway event.
|
|
2464
2512
|
*
|
|
2465
|
-
* @see {@link https://discord.com/developers/
|
|
2513
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#trigger-typing-indicator}
|
|
2466
2514
|
*/
|
|
2467
2515
|
triggerTypingIndicator: (channelId: BigString) => Promise<void>;
|
|
2468
2516
|
/**
|
|
@@ -2480,7 +2528,7 @@ export interface RestManager {
|
|
|
2480
2528
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2481
2529
|
* You will be able to update only your own application commands
|
|
2482
2530
|
*
|
|
2483
|
-
* @see {@link https://discord.com/developers/
|
|
2531
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-global-application-commands}
|
|
2484
2532
|
*/
|
|
2485
2533
|
upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2486
2534
|
/**
|
|
@@ -2499,7 +2547,7 @@ export interface RestManager {
|
|
|
2499
2547
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2500
2548
|
* You will be able to update only your own application commands
|
|
2501
2549
|
*
|
|
2502
|
-
* @see {@link https://discord.com/developers/
|
|
2550
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-guild-application-commands}
|
|
2503
2551
|
*/
|
|
2504
2552
|
upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2505
2553
|
/**
|
|
@@ -2515,7 +2563,7 @@ export interface RestManager {
|
|
|
2515
2563
|
*
|
|
2516
2564
|
* Fires a _Guild Ban Add_ gateway event.
|
|
2517
2565
|
*
|
|
2518
|
-
* @see {@link https://discord.com/developers/
|
|
2566
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-ban}
|
|
2519
2567
|
*/
|
|
2520
2568
|
banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
|
|
2521
2569
|
/**
|
|
@@ -2532,7 +2580,7 @@ export interface RestManager {
|
|
|
2532
2580
|
*
|
|
2533
2581
|
* Fires as many _Guild Ban Add_ gateway events as many user where banned.
|
|
2534
2582
|
*
|
|
2535
|
-
* @see {@link https://discord.com/developers/
|
|
2583
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#bulk-guild-ban}
|
|
2536
2584
|
*/
|
|
2537
2585
|
bulkBanMembers: (guildId: BigString, options: CreateGuildBulkBan, reason?: string) => Promise<Camelize<DiscordBulkBan>>;
|
|
2538
2586
|
/**
|
|
@@ -2546,7 +2594,7 @@ export interface RestManager {
|
|
|
2546
2594
|
* @remarks
|
|
2547
2595
|
* Fires a _Guild Member Update_ gateway event.
|
|
2548
2596
|
*
|
|
2549
|
-
* @see {@link https://discord.com/developers/
|
|
2597
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-current-member}
|
|
2550
2598
|
*/
|
|
2551
2599
|
editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2552
2600
|
/**
|
|
@@ -2563,7 +2611,7 @@ export interface RestManager {
|
|
|
2563
2611
|
*
|
|
2564
2612
|
* Fires a _Guild Member Update_ gateway event.
|
|
2565
2613
|
*
|
|
2566
|
-
* @see {@link https://discord.com/developers/
|
|
2614
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-member}
|
|
2567
2615
|
*/
|
|
2568
2616
|
editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2569
2617
|
/**
|
|
@@ -2574,7 +2622,7 @@ export interface RestManager {
|
|
|
2574
2622
|
* @param userId - The ID of the user to get the member object for.
|
|
2575
2623
|
* @returns An instance of {@link DiscordMemberWithUser}.
|
|
2576
2624
|
*
|
|
2577
|
-
* @see {@link https://discord.com/developers/
|
|
2625
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-member}
|
|
2578
2626
|
*/
|
|
2579
2627
|
getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2580
2628
|
/**
|
|
@@ -2587,7 +2635,7 @@ export interface RestManager {
|
|
|
2587
2635
|
* @remarks
|
|
2588
2636
|
* The access tokens needs the `guilds.members.read` scope
|
|
2589
2637
|
*
|
|
2590
|
-
* @see {@link https://discord.com/developers/
|
|
2638
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guild-member}
|
|
2591
2639
|
*/
|
|
2592
2640
|
getCurrentMember: (guildId: BigString, bearerToken: string) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2593
2641
|
/**
|
|
@@ -2602,11 +2650,11 @@ export interface RestManager {
|
|
|
2602
2650
|
*
|
|
2603
2651
|
* ⚠️ It is not recommended to use this endpoint with very large bots. Instead, opt to use `fetchMembers()`:
|
|
2604
2652
|
* REST communication only permits 50 requests to be made per second, while gateways allow for up to 120 requests
|
|
2605
|
-
* 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}.
|
|
2606
2654
|
*
|
|
2607
|
-
* @see {@link https://discord.com/developers/
|
|
2608
|
-
* @see {@link https://discord.com/developers/
|
|
2609
|
-
* @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}
|
|
2610
2658
|
*/
|
|
2611
2659
|
getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2612
2660
|
/**
|
|
@@ -2629,7 +2677,7 @@ export interface RestManager {
|
|
|
2629
2677
|
*
|
|
2630
2678
|
* Fires a _Guild Member Remove_ gateway event.
|
|
2631
2679
|
*
|
|
2632
|
-
* @see {@link https://discord.com/developers/
|
|
2680
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member}
|
|
2633
2681
|
*/
|
|
2634
2682
|
kickMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2635
2683
|
/**
|
|
@@ -2644,7 +2692,7 @@ export interface RestManager {
|
|
|
2644
2692
|
*
|
|
2645
2693
|
* Fires a _Channel Pins Update_ event.
|
|
2646
2694
|
*
|
|
2647
|
-
* @see {@link https://discord.com/developers/
|
|
2695
|
+
* @see {@link https://docs.discord.com/developers/resources/message#pin-message}
|
|
2648
2696
|
*/
|
|
2649
2697
|
pinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2650
2698
|
/**
|
|
@@ -2665,7 +2713,7 @@ export interface RestManager {
|
|
|
2665
2713
|
*
|
|
2666
2714
|
* Fires a _Guild Member Remove_ gateway event for every member kicked.
|
|
2667
2715
|
*
|
|
2668
|
-
* @see {@link https://discord.com/developers/
|
|
2716
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#begin-guild-prune}
|
|
2669
2717
|
*/
|
|
2670
2718
|
pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
|
|
2671
2719
|
pruned: number | null;
|
|
@@ -2679,7 +2727,7 @@ export interface RestManager {
|
|
|
2679
2727
|
* @param options - The parameters for searching through the members.
|
|
2680
2728
|
* @returns A collection of {@link DiscordMember} objects assorted by user ID.
|
|
2681
2729
|
*
|
|
2682
|
-
* @see {@link https://discord.com/developers/
|
|
2730
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#search-guild-members}
|
|
2683
2731
|
*/
|
|
2684
2732
|
searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2685
2733
|
/**
|
|
@@ -2695,7 +2743,7 @@ export interface RestManager {
|
|
|
2695
2743
|
*
|
|
2696
2744
|
* Fires a _Guild Ban Remove_ gateway event.
|
|
2697
2745
|
*
|
|
2698
|
-
* @see {@link https://discord.com/developers/
|
|
2746
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-ban}
|
|
2699
2747
|
*/
|
|
2700
2748
|
unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2701
2749
|
/**
|
|
@@ -2710,7 +2758,7 @@ export interface RestManager {
|
|
|
2710
2758
|
*
|
|
2711
2759
|
* Fires a _Channel Pins Update_ event.
|
|
2712
2760
|
*
|
|
2713
|
-
* @see {@link https://discord.com/developers/
|
|
2761
|
+
* @see {@link https://docs.discord.com/developers/resources/message#unpin-message}
|
|
2714
2762
|
*/
|
|
2715
2763
|
unpinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2716
2764
|
/**
|
|
@@ -3037,6 +3085,7 @@ export interface RestRequestRejection {
|
|
|
3037
3085
|
/** The returned body parsed if it was JSON, otherwise it will be the raw body as a string */
|
|
3038
3086
|
body?: string | object;
|
|
3039
3087
|
error?: string;
|
|
3088
|
+
errorObject?: Error;
|
|
3040
3089
|
}
|
|
3041
3090
|
export interface RestManagerEvents {
|
|
3042
3091
|
/**
|