@discordeno/rest 22.0.1-next.f2e8d7e → 22.0.1-next.f334bb8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +86 -37
- package/dist/types.d.ts +210 -192
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/package.json +13 -13
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, DiscordTargetUsersJobStatus, DiscordTemplate, DiscordThreadMember, DiscordTokenExchange, DiscordTokenRevocation, DiscordUser, DiscordVanityUrl, DiscordVoiceRegion, DiscordVoiceState, DiscordWebhook, DiscordWelcomeScreen, EditApplication, EditAutoModerationRuleOptions,
|
|
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, 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, ModifyCurrentMember, 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';
|
|
@@ -15,7 +15,6 @@ export interface CreateRestManagerOptions {
|
|
|
15
15
|
proxy?: {
|
|
16
16
|
/**
|
|
17
17
|
* The base url to connect to. If you create a proxy rest, that url would go here.
|
|
18
|
-
* IT SHOULD NOT END WITH A /
|
|
19
18
|
* @default https://discord.com/api
|
|
20
19
|
*/
|
|
21
20
|
baseUrl: string;
|
|
@@ -53,6 +52,23 @@ export interface CreateRestManagerOptions {
|
|
|
53
52
|
logger?: Pick<typeof logger, 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
|
|
54
53
|
/** Events for the rest manager */
|
|
55
54
|
events?: Partial<RestManagerEvents>;
|
|
55
|
+
/**
|
|
56
|
+
* The maximum time in milliseconds a single request attempt may take before it is aborted.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This is a total deadline for each attempt (it also covers reading the response body), not a per-chunk timeout.
|
|
60
|
+
* When an attempt times out it is retried through the queue up to {@link RestManager.maxRetryCount} times before failing.
|
|
61
|
+
* Without it, a connection that stalls after connecting could keep a queue from ever progressing.
|
|
62
|
+
*
|
|
63
|
+
* Because it is a total deadline rather than a per-chunk one, a slow but healthy request (e.g. uploading a
|
|
64
|
+
* large attachment over a slow connection) can legitimately exceed it and be aborted/retried. Raise this value
|
|
65
|
+
* for upload-heavy bots if you see such requests timing out.
|
|
66
|
+
*
|
|
67
|
+
* Set to `0` to disable it and rely on the runtime's default fetch timeouts.
|
|
68
|
+
*
|
|
69
|
+
* @default 30000 // 30 seconds
|
|
70
|
+
*/
|
|
71
|
+
requestTimeout?: number;
|
|
56
72
|
}
|
|
57
73
|
export interface RestManager {
|
|
58
74
|
/** The bot token which will be used to make requests. */
|
|
@@ -81,6 +97,8 @@ export interface RestManager {
|
|
|
81
97
|
updateBearerTokenEndpoint?: string;
|
|
82
98
|
/** The maximum amount of times a request should be retried. Defaults to Infinity */
|
|
83
99
|
maxRetryCount: number;
|
|
100
|
+
/** The maximum time in milliseconds a single request attempt may take before it is aborted and retried. Defaults to 30000 (30 seconds). Set to 0 to disable. */
|
|
101
|
+
requestTimeout: number;
|
|
84
102
|
/** Whether or not the manager is rate limited globally across all requests. Defaults to false. */
|
|
85
103
|
globallyRateLimited: boolean;
|
|
86
104
|
/** Whether or not the rate limited paths are being processed to allow requests to be made once time is up. Defaults to false. */
|
|
@@ -148,7 +166,7 @@ export interface RestManager {
|
|
|
148
166
|
*
|
|
149
167
|
* Fires a _Message Reaction Add_ gateway event.
|
|
150
168
|
*
|
|
151
|
-
* @see {@link https://discord.com/developers/
|
|
169
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-reaction}
|
|
152
170
|
*/
|
|
153
171
|
addReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
154
172
|
/**
|
|
@@ -183,7 +201,7 @@ export interface RestManager {
|
|
|
183
201
|
*
|
|
184
202
|
* Fires a _Guild Member Update_ gateway event.
|
|
185
203
|
*
|
|
186
|
-
* @see {@link https://discord.com/developers/
|
|
204
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#add-guild-member-role}
|
|
187
205
|
*/
|
|
188
206
|
addRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
189
207
|
/**
|
|
@@ -198,7 +216,7 @@ export interface RestManager {
|
|
|
198
216
|
*
|
|
199
217
|
* Fires a _Thread Members Update_ gateway event.
|
|
200
218
|
*
|
|
201
|
-
* @see {@link https://discord.com/developers/
|
|
219
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#add-thread-member}
|
|
202
220
|
*/
|
|
203
221
|
addThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
204
222
|
/**
|
|
@@ -211,7 +229,7 @@ export interface RestManager {
|
|
|
211
229
|
* @remarks
|
|
212
230
|
* Requires an OAuth2 access token with the `gdm.join` scope
|
|
213
231
|
*
|
|
214
|
-
* @see {@link https://discord.com/developers/
|
|
232
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#group-dm-add-recipient}
|
|
215
233
|
*/
|
|
216
234
|
addDmRecipient: (channelId: BigString, userId: BigString, options: AddDmRecipientOptions) => Promise<void>;
|
|
217
235
|
/**
|
|
@@ -227,7 +245,7 @@ export interface RestManager {
|
|
|
227
245
|
*
|
|
228
246
|
* Fires a _Guild Member Add_ gateway event.
|
|
229
247
|
*
|
|
230
|
-
* @see {@link https://discord.com/developers/
|
|
248
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#add-guild-member}
|
|
231
249
|
*/
|
|
232
250
|
addGuildMember: (guildId: BigString, userId: BigString, options: AddGuildMemberOptions) => Promise<void>;
|
|
233
251
|
/**
|
|
@@ -243,7 +261,7 @@ export interface RestManager {
|
|
|
243
261
|
*
|
|
244
262
|
* Fires an _Auto Moderation Rule Create_ gateway event.
|
|
245
263
|
*
|
|
246
|
-
* @see {@link https://discord.com/developers/
|
|
264
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#create-auto-moderation-rule}
|
|
247
265
|
*/
|
|
248
266
|
createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
249
267
|
/**
|
|
@@ -263,7 +281,7 @@ export interface RestManager {
|
|
|
263
281
|
*
|
|
264
282
|
* Fires a _Channel Create_ gateway event.
|
|
265
283
|
*
|
|
266
|
-
* @see {@link https://discord.com/developers/
|
|
284
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-channel}
|
|
267
285
|
*/
|
|
268
286
|
createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
269
287
|
/**
|
|
@@ -281,7 +299,7 @@ export interface RestManager {
|
|
|
281
299
|
*
|
|
282
300
|
* Fires a _Guild Emojis Update_ gateway event.
|
|
283
301
|
*
|
|
284
|
-
* @see {@link https://discord.com/developers/
|
|
302
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#create-guild-emoji}
|
|
285
303
|
*/
|
|
286
304
|
createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
|
|
287
305
|
/**
|
|
@@ -290,7 +308,7 @@ export interface RestManager {
|
|
|
290
308
|
* @param options - The parameters for the creation of the emoji.
|
|
291
309
|
* @returns An instance of the created {@link DiscordEmoji}.
|
|
292
310
|
*
|
|
293
|
-
* @see {@link https://discord.com/developers/
|
|
311
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#create-application-emoji}
|
|
294
312
|
*/
|
|
295
313
|
createApplicationEmoji: (options: CreateApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
|
|
296
314
|
/**
|
|
@@ -307,7 +325,7 @@ export interface RestManager {
|
|
|
307
325
|
* Fires a _Thread Create_ gateway event.
|
|
308
326
|
* Fires a _Message Create_ gateway event.
|
|
309
327
|
*
|
|
310
|
-
* @see {@link https://discord.com/developers/
|
|
328
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
|
|
311
329
|
*/
|
|
312
330
|
createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
313
331
|
/**
|
|
@@ -325,7 +343,7 @@ export interface RestManager {
|
|
|
325
343
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
326
344
|
* You will be able to update only your own application commands
|
|
327
345
|
*
|
|
328
|
-
* @see {@link https://discord.com/developers/
|
|
346
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#create-global-application-command}
|
|
329
347
|
*/
|
|
330
348
|
createGlobalApplicationCommand: (command: CreateApplicationCommand, options?: CreateGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
331
349
|
/**
|
|
@@ -343,7 +361,7 @@ export interface RestManager {
|
|
|
343
361
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
344
362
|
* You will be able to update only your own application commands
|
|
345
363
|
*
|
|
346
|
-
* @see {@link https://discord.com/developers/
|
|
364
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#create-guild-application-command}
|
|
347
365
|
*/
|
|
348
366
|
createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString, options?: CreateGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
349
367
|
/**
|
|
@@ -359,7 +377,7 @@ export interface RestManager {
|
|
|
359
377
|
* Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
|
|
360
378
|
* Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
|
|
361
379
|
*
|
|
362
|
-
* @see {@link https://discord.com/developers/
|
|
380
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#create-guild-sticker}
|
|
363
381
|
*/
|
|
364
382
|
createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<Camelize<DiscordSticker>>;
|
|
365
383
|
/**
|
|
@@ -374,7 +392,7 @@ export interface RestManager {
|
|
|
374
392
|
*
|
|
375
393
|
* Fires a _Guild Update_ gateway event.
|
|
376
394
|
*
|
|
377
|
-
* @see {@link https://discord.com/developers/
|
|
395
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#create-guild-template}
|
|
378
396
|
*/
|
|
379
397
|
createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<Camelize<DiscordTemplate>>;
|
|
380
398
|
/**
|
|
@@ -393,7 +411,7 @@ export interface RestManager {
|
|
|
393
411
|
* @privateRemarks
|
|
394
412
|
* The request body is not optional, and an empty JSON object must be sent regardless of whether any fields are being transmitted.
|
|
395
413
|
*
|
|
396
|
-
* @see {@link https://discord.com/developers/
|
|
414
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-channel-invite}
|
|
397
415
|
*/
|
|
398
416
|
createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<Camelize<DiscordInvite>>;
|
|
399
417
|
/**
|
|
@@ -403,7 +421,7 @@ export interface RestManager {
|
|
|
403
421
|
*
|
|
404
422
|
* @param guildId - The ID of the guild to get role member counts for.
|
|
405
423
|
*
|
|
406
|
-
* @see {@link https://discord.com/developers/
|
|
424
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
407
425
|
*/
|
|
408
426
|
getGuildRoleMemberCounts: (guildId: BigString) => Promise<Record<string, number>>;
|
|
409
427
|
/**
|
|
@@ -419,7 +437,7 @@ export interface RestManager {
|
|
|
419
437
|
*
|
|
420
438
|
* Fires a _Guild Role Create_ gateway event.
|
|
421
439
|
*
|
|
422
|
-
* @see {@link https://discord.com/developers/
|
|
440
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-role}
|
|
423
441
|
*/
|
|
424
442
|
createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
425
443
|
/**
|
|
@@ -437,7 +455,7 @@ export interface RestManager {
|
|
|
437
455
|
*
|
|
438
456
|
* Fires a _Guild Scheduled Event Create_ gateway event.
|
|
439
457
|
*
|
|
440
|
-
* @see {@link https://discord.com/developers/
|
|
458
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#create-guild-scheduled-event}
|
|
441
459
|
*/
|
|
442
460
|
createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
443
461
|
/**
|
|
@@ -452,7 +470,7 @@ export interface RestManager {
|
|
|
452
470
|
*
|
|
453
471
|
* Fires a _Stage Instance Create_ gateway event.
|
|
454
472
|
*
|
|
455
|
-
* @see {@link https://discord.com/developers/
|
|
473
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#create-stage-instance}
|
|
456
474
|
*/
|
|
457
475
|
createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
458
476
|
/**
|
|
@@ -470,7 +488,7 @@ export interface RestManager {
|
|
|
470
488
|
*
|
|
471
489
|
* Fires a _Webhooks Update_ gateway event.
|
|
472
490
|
*
|
|
473
|
-
* @see {@link https://discord.com/developers/
|
|
491
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#create-webhook}
|
|
474
492
|
*/
|
|
475
493
|
createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
476
494
|
/**
|
|
@@ -485,7 +503,7 @@ export interface RestManager {
|
|
|
485
503
|
*
|
|
486
504
|
* Fires an _Auto Moderation Rule Delete_ gateway event.
|
|
487
505
|
*
|
|
488
|
-
* @see {@link https://discord.com/developers/
|
|
506
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#delete-auto-moderation-rule}
|
|
489
507
|
*/
|
|
490
508
|
deleteAutomodRule: (guildId: BigString, ruleId: BigString, reason?: string) => Promise<void>;
|
|
491
509
|
/**
|
|
@@ -511,7 +529,7 @@ export interface RestManager {
|
|
|
511
529
|
*
|
|
512
530
|
* - Fires a _Channel Delete_ gateway event.
|
|
513
531
|
*
|
|
514
|
-
* @see {@link https://discord.com/developers/
|
|
532
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#deleteclose-channel}
|
|
515
533
|
*/
|
|
516
534
|
deleteChannel: (channelId: BigString, reason?: string) => Promise<void>;
|
|
517
535
|
/**
|
|
@@ -526,7 +544,7 @@ export interface RestManager {
|
|
|
526
544
|
*
|
|
527
545
|
* Fires a _Channel Update_ gateway event.
|
|
528
546
|
*
|
|
529
|
-
* @see {@link https://discord.com/developers/
|
|
547
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-permission}
|
|
530
548
|
*/
|
|
531
549
|
deleteChannelPermissionOverride: (channelId: BigString, overwriteId: BigString, reason?: string) => Promise<void>;
|
|
532
550
|
/**
|
|
@@ -542,7 +560,7 @@ export interface RestManager {
|
|
|
542
560
|
*
|
|
543
561
|
* Fires a _Guild Emojis Update_ gateway event.
|
|
544
562
|
*
|
|
545
|
-
* @see {@link https://discord.com/developers/
|
|
563
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-guild-emoji}
|
|
546
564
|
*/
|
|
547
565
|
deleteEmoji: (guildId: BigString, id: BigString, reason?: string) => Promise<void>;
|
|
548
566
|
/**
|
|
@@ -550,7 +568,7 @@ export interface RestManager {
|
|
|
550
568
|
*
|
|
551
569
|
* @param id - The ID of the emoji to delete.
|
|
552
570
|
*
|
|
553
|
-
* @see {@link https://discord.com/developers/
|
|
571
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-application-emoji}
|
|
554
572
|
*/
|
|
555
573
|
deleteApplicationEmoji: (id: BigString) => Promise<void>;
|
|
556
574
|
/**
|
|
@@ -564,7 +582,7 @@ export interface RestManager {
|
|
|
564
582
|
*
|
|
565
583
|
* Fires a _Message Delete_ event.
|
|
566
584
|
*
|
|
567
|
-
* @see {@link https://discord.com/developers/
|
|
585
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-followup-message}
|
|
568
586
|
*/
|
|
569
587
|
deleteFollowupMessage: (token: string, messageId: BigString) => Promise<void>;
|
|
570
588
|
/**
|
|
@@ -572,7 +590,7 @@ export interface RestManager {
|
|
|
572
590
|
*
|
|
573
591
|
* @param commandId - The ID of the command to delete.
|
|
574
592
|
*
|
|
575
|
-
* @see {@link https://discord.com/developers/
|
|
593
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-global-application-command}
|
|
576
594
|
*/
|
|
577
595
|
deleteGlobalApplicationCommand: (commandId: BigString) => Promise<void>;
|
|
578
596
|
/**
|
|
@@ -581,7 +599,7 @@ export interface RestManager {
|
|
|
581
599
|
* @param guildId - The ID of the guild to delete the command from.
|
|
582
600
|
* @param commandId - The ID of the command to delete from the guild.
|
|
583
601
|
*
|
|
584
|
-
* @see {@link https://discord.com/developers/
|
|
602
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-guild-application-command}
|
|
585
603
|
*/
|
|
586
604
|
deleteGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<void>;
|
|
587
605
|
/**
|
|
@@ -598,7 +616,7 @@ export interface RestManager {
|
|
|
598
616
|
* Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
|
|
599
617
|
* Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
|
|
600
618
|
*
|
|
601
|
-
* @see {@link https://discord.com/developers/
|
|
619
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#delete-guild-sticker}
|
|
602
620
|
*/
|
|
603
621
|
deleteGuildSticker: (guildId: BigString, stickerId: BigString, reason?: string) => Promise<void>;
|
|
604
622
|
/**
|
|
@@ -612,7 +630,7 @@ export interface RestManager {
|
|
|
612
630
|
*
|
|
613
631
|
* Fires a _Guild Update_ gateway event.
|
|
614
632
|
*
|
|
615
|
-
* @see {@link https://discord.com/developers/
|
|
633
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#delete-guild-template}
|
|
616
634
|
*/
|
|
617
635
|
deleteGuildTemplate: (guildId: BigString, templateCode: string) => Promise<void>;
|
|
618
636
|
/**
|
|
@@ -630,7 +648,7 @@ export interface RestManager {
|
|
|
630
648
|
* Fires a _Guild Integrations Update_ gateway event.
|
|
631
649
|
* Fires a _Integration Delete_ gateway event.
|
|
632
650
|
*
|
|
633
|
-
* @see {@link https://discord.com/developers/
|
|
651
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-integration}
|
|
634
652
|
*/
|
|
635
653
|
deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
|
|
636
654
|
/**
|
|
@@ -644,19 +662,19 @@ export interface RestManager {
|
|
|
644
662
|
*
|
|
645
663
|
* Fires an _Invite Delete_ gateway event.
|
|
646
664
|
*
|
|
647
|
-
* @see {@link https://discord.com/developers/
|
|
665
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-invite}
|
|
648
666
|
*/
|
|
649
667
|
deleteInvite: (inviteCode: string, reason?: string) => Promise<void>;
|
|
650
668
|
/**
|
|
651
669
|
* Gets the users allowed to see and accept this invite.
|
|
652
670
|
*
|
|
653
671
|
* @param inviteCode - The invite code of the invite to update.
|
|
654
|
-
* @returns CSV file with
|
|
672
|
+
* @returns CSV file containing the user IDs with the header `user_id` and each user ID from the original file
|
|
655
673
|
*
|
|
656
674
|
* @remarks
|
|
657
|
-
* Requires the `MANAGE_GUILD` permission.
|
|
675
|
+
* Requires called to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
658
676
|
*
|
|
659
|
-
* @see {@link https://discord.com/developers/
|
|
677
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
660
678
|
*/
|
|
661
679
|
getTargetUsers: (inviteCode: string) => Promise<string>;
|
|
662
680
|
/**
|
|
@@ -666,11 +684,11 @@ export interface RestManager {
|
|
|
666
684
|
* @param targetUsersFile - A CSV file with a single column of user IDs for all the users able to accept this invite
|
|
667
685
|
*
|
|
668
686
|
* @remarks
|
|
669
|
-
* Requires the `MANAGE_GUILD` permission.
|
|
687
|
+
* Requires the caller to be the inviter or have the `MANAGE_GUILD` permission.
|
|
670
688
|
*
|
|
671
689
|
* Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described.
|
|
672
690
|
*
|
|
673
|
-
* @see {@link https://discord.com/developers/
|
|
691
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
674
692
|
*/
|
|
675
693
|
updateTargetUsers: (inviteCode: string, targetUsersFile: Blob) => Promise<void>;
|
|
676
694
|
/**
|
|
@@ -680,9 +698,9 @@ export interface RestManager {
|
|
|
680
698
|
* @returns An object containing the status of the target users job.
|
|
681
699
|
*
|
|
682
700
|
* @remarks
|
|
683
|
-
* Requires the `MANAGE_GUILD` permission.
|
|
701
|
+
* Requires the caller to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
684
702
|
*
|
|
685
|
-
* @see {@link https://discord.com/developers/
|
|
703
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
686
704
|
*/
|
|
687
705
|
getTargetUsersJobStatus: (inviteCode: string) => Promise<Camelize<DiscordTargetUsersJobStatus>>;
|
|
688
706
|
/**
|
|
@@ -698,7 +716,7 @@ export interface RestManager {
|
|
|
698
716
|
*
|
|
699
717
|
* Fires a _Message Delete_ gateway event.
|
|
700
718
|
*
|
|
701
|
-
* @see {@link https://discord.com/developers/
|
|
719
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-message}
|
|
702
720
|
*/
|
|
703
721
|
deleteMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
704
722
|
/**
|
|
@@ -715,7 +733,7 @@ export interface RestManager {
|
|
|
715
733
|
*
|
|
716
734
|
* Fires a _Message Delete Bulk_ gateway event.
|
|
717
735
|
*
|
|
718
|
-
* @see {@link https://discord.com/developers/
|
|
736
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#bulk-delete-messages}
|
|
719
737
|
*/
|
|
720
738
|
deleteMessages: (channelId: BigString, messageIds: BigString[], reason?: string) => Promise<void>;
|
|
721
739
|
/**
|
|
@@ -728,7 +746,7 @@ export interface RestManager {
|
|
|
728
746
|
*
|
|
729
747
|
* Fires a _Message Delete_ event.
|
|
730
748
|
*
|
|
731
|
-
* @see {@link https://discord.com/developers/
|
|
749
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-original-interaction-response}
|
|
732
750
|
*/
|
|
733
751
|
deleteOriginalInteractionResponse: (token: string) => Promise<void>;
|
|
734
752
|
/**
|
|
@@ -743,7 +761,7 @@ export interface RestManager {
|
|
|
743
761
|
*
|
|
744
762
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
745
763
|
*
|
|
746
|
-
* @see {@link https://discord.com/developers/
|
|
764
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-own-reaction}
|
|
747
765
|
*/
|
|
748
766
|
deleteOwnReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
749
767
|
/**
|
|
@@ -759,7 +777,7 @@ export interface RestManager {
|
|
|
759
777
|
*
|
|
760
778
|
* Fires a _Message Reaction Remove All_ gateway event.
|
|
761
779
|
*
|
|
762
|
-
* @see {@link https://discord.com/developers/
|
|
780
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions}
|
|
763
781
|
*/
|
|
764
782
|
deleteReactionsAll: (channelId: BigString, messageId: BigString) => Promise<void>;
|
|
765
783
|
/**
|
|
@@ -776,7 +794,7 @@ export interface RestManager {
|
|
|
776
794
|
*
|
|
777
795
|
* Fires a _Message Reaction Remove Emoji_ gateway event.
|
|
778
796
|
*
|
|
779
|
-
* @see {@link https://discord.com/developers/
|
|
797
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions-for-emoji}
|
|
780
798
|
*/
|
|
781
799
|
deleteReactionsEmoji: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
782
800
|
/**
|
|
@@ -791,7 +809,7 @@ export interface RestManager {
|
|
|
791
809
|
*
|
|
792
810
|
* Fires a _Guild Role Delete_ gateway event.
|
|
793
811
|
*
|
|
794
|
-
* @see {@link https://discord.com/developers/
|
|
812
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-role}
|
|
795
813
|
*/
|
|
796
814
|
deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
797
815
|
/**
|
|
@@ -805,7 +823,7 @@ export interface RestManager {
|
|
|
805
823
|
*
|
|
806
824
|
* Fires a _Guild Scheduled Event Delete_ gateway event.
|
|
807
825
|
*
|
|
808
|
-
* @see {@link https://discord.com/developers/
|
|
826
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#delete-guild-scheduled-event}
|
|
809
827
|
*/
|
|
810
828
|
deleteScheduledEvent: (guildId: BigString, eventId: BigString) => Promise<void>;
|
|
811
829
|
/**
|
|
@@ -819,7 +837,7 @@ export interface RestManager {
|
|
|
819
837
|
*
|
|
820
838
|
* Fires a _Stage Instance Delete_ gateway event.
|
|
821
839
|
*
|
|
822
|
-
* @see {@link https://discord.com/developers/
|
|
840
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#delete-stage-instance}
|
|
823
841
|
*/
|
|
824
842
|
deleteStageInstance: (channelId: BigString, reason?: string) => Promise<void>;
|
|
825
843
|
/**
|
|
@@ -837,7 +855,7 @@ export interface RestManager {
|
|
|
837
855
|
*
|
|
838
856
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
839
857
|
*
|
|
840
|
-
* @see {@link https://discord.com/developers/
|
|
858
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-user-reaction}
|
|
841
859
|
*/
|
|
842
860
|
deleteUserReaction: (channelId: BigString, messageId: BigString, userId: BigString, reaction: string) => Promise<void>;
|
|
843
861
|
/**
|
|
@@ -850,7 +868,7 @@ export interface RestManager {
|
|
|
850
868
|
*
|
|
851
869
|
* Fires a _Webhooks Update_ gateway event.
|
|
852
870
|
*
|
|
853
|
-
* @see {@link https://discord.com/developers/
|
|
871
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
854
872
|
*/
|
|
855
873
|
deleteWebhook: (webhookId: BigString, reason?: string) => Promise<void>;
|
|
856
874
|
/**
|
|
@@ -864,7 +882,7 @@ export interface RestManager {
|
|
|
864
882
|
* @remarks
|
|
865
883
|
* Fires a _Message Delete_ gateway event.
|
|
866
884
|
*
|
|
867
|
-
* @see {@link https://discord.com/developers/
|
|
885
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
868
886
|
*/
|
|
869
887
|
deleteWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: DeleteWebhookMessageOptions) => Promise<void>;
|
|
870
888
|
/**
|
|
@@ -876,7 +894,7 @@ export interface RestManager {
|
|
|
876
894
|
* @remarks
|
|
877
895
|
* Fires a _Message Delete_ gateway event.
|
|
878
896
|
*
|
|
879
|
-
* @see {@link https://discord.com/developers/
|
|
897
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-with-token}
|
|
880
898
|
*/
|
|
881
899
|
deleteWebhookWithToken: (webhookId: BigString, token: string) => Promise<void>;
|
|
882
900
|
/**
|
|
@@ -891,7 +909,7 @@ export interface RestManager {
|
|
|
891
909
|
* @remarks
|
|
892
910
|
* 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.
|
|
893
911
|
*
|
|
894
|
-
* @see {@link https://discord.com/developers/
|
|
912
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-application-command-permissions}
|
|
895
913
|
*/
|
|
896
914
|
editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: Camelize<DiscordApplicationCommandPermissions>[]) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
897
915
|
/**
|
|
@@ -908,7 +926,7 @@ export interface RestManager {
|
|
|
908
926
|
*
|
|
909
927
|
* Fires an _Auto Moderation Rule Update_ gateway event.
|
|
910
928
|
*
|
|
911
|
-
* @see {@link https://discord.com/developers/
|
|
929
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule}
|
|
912
930
|
*/
|
|
913
931
|
editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
914
932
|
/**
|
|
@@ -965,7 +983,7 @@ export interface RestManager {
|
|
|
965
983
|
*
|
|
966
984
|
* Fires a _Channel Update_ gateway event.
|
|
967
985
|
*
|
|
968
|
-
* @see {@link https://discord.com/developers/
|
|
986
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-channel-permissions}
|
|
969
987
|
*/
|
|
970
988
|
editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
|
|
971
989
|
/**
|
|
@@ -979,7 +997,7 @@ export interface RestManager {
|
|
|
979
997
|
*
|
|
980
998
|
* Fires a _Channel Update_ gateway event for every channel impacted in this change.
|
|
981
999
|
*
|
|
982
|
-
* @see {@link https://discord.com/developers/
|
|
1000
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-channel-positions}
|
|
983
1001
|
*/
|
|
984
1002
|
editChannelPositions: (guildId: BigString, channelPositions: ModifyGuildChannelPositions[]) => Promise<void>;
|
|
985
1003
|
/**
|
|
@@ -997,7 +1015,7 @@ export interface RestManager {
|
|
|
997
1015
|
*
|
|
998
1016
|
* Fires a `Guild Emojis Update` gateway event.
|
|
999
1017
|
*
|
|
1000
|
-
* @see {@link https://discord.com/developers/
|
|
1018
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-guild-emoji}
|
|
1001
1019
|
*/
|
|
1002
1020
|
editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
|
|
1003
1021
|
/**
|
|
@@ -1007,7 +1025,7 @@ export interface RestManager {
|
|
|
1007
1025
|
* @param options - The parameters for the edit of the emoji.
|
|
1008
1026
|
* @returns An instance of the updated {@link DiscordEmoji}.
|
|
1009
1027
|
*
|
|
1010
|
-
* @see {@link https://discord.com/developers/
|
|
1028
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-application-emoji}
|
|
1011
1029
|
*/
|
|
1012
1030
|
editApplicationEmoji: (id: BigString, options: ModifyApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
|
|
1013
1031
|
/**
|
|
@@ -1025,7 +1043,7 @@ export interface RestManager {
|
|
|
1025
1043
|
*
|
|
1026
1044
|
* Fires a _Message Update_ event.
|
|
1027
1045
|
*
|
|
1028
|
-
* @see {@link https://discord.com/developers/
|
|
1046
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-followup-message}
|
|
1029
1047
|
*/
|
|
1030
1048
|
editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
1031
1049
|
/**
|
|
@@ -1035,7 +1053,7 @@ export interface RestManager {
|
|
|
1035
1053
|
* @param options - The parameters for the edit of the command.
|
|
1036
1054
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
1037
1055
|
*
|
|
1038
|
-
* @see {@link https://discord.com/developers/
|
|
1056
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-global-application-command}
|
|
1039
1057
|
*/
|
|
1040
1058
|
editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1041
1059
|
/**
|
|
@@ -1054,7 +1072,7 @@ export interface RestManager {
|
|
|
1054
1072
|
*
|
|
1055
1073
|
* Fires a _Guild Update_ gateway event.
|
|
1056
1074
|
*
|
|
1057
|
-
* @see {@link https://discord.com/developers/
|
|
1075
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild}
|
|
1058
1076
|
*/
|
|
1059
1077
|
editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<Camelize<DiscordGuild>>;
|
|
1060
1078
|
/**
|
|
@@ -1065,7 +1083,7 @@ export interface RestManager {
|
|
|
1065
1083
|
* @param options - The parameters for the edit of the command.
|
|
1066
1084
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
1067
1085
|
*
|
|
1068
|
-
* @see {@link https://discord.com/developers/
|
|
1086
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-guild-application-command}
|
|
1069
1087
|
*/
|
|
1070
1088
|
editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1071
1089
|
/**
|
|
@@ -1080,7 +1098,7 @@ export interface RestManager {
|
|
|
1080
1098
|
* For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1081
1099
|
* Fires a Guild Stickers Update Gateway event.
|
|
1082
1100
|
*
|
|
1083
|
-
* @see {@link https://discord.com/developers/
|
|
1101
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#modify-guild-sticker}
|
|
1084
1102
|
*/
|
|
1085
1103
|
editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<Camelize<DiscordSticker>>;
|
|
1086
1104
|
/**
|
|
@@ -1096,7 +1114,7 @@ export interface RestManager {
|
|
|
1096
1114
|
*
|
|
1097
1115
|
* Fires a _Guild Update_ gateway event.
|
|
1098
1116
|
*
|
|
1099
|
-
* @see {@link https://discord.com/developers/
|
|
1117
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#modify-guild-template}
|
|
1100
1118
|
*/
|
|
1101
1119
|
editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
|
|
1102
1120
|
/**
|
|
@@ -1114,7 +1132,7 @@ export interface RestManager {
|
|
|
1114
1132
|
*
|
|
1115
1133
|
* Fires a _Message Update_ gateway event.
|
|
1116
1134
|
*
|
|
1117
|
-
* @see {@link https://discord.com/developers/
|
|
1135
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-message}
|
|
1118
1136
|
*/
|
|
1119
1137
|
editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
|
|
1120
1138
|
/**
|
|
@@ -1131,7 +1149,7 @@ export interface RestManager {
|
|
|
1131
1149
|
*
|
|
1132
1150
|
* Fires a _Message Update_ event.
|
|
1133
1151
|
*
|
|
1134
|
-
* @see {@link https://discord.com/developers/
|
|
1152
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-original-interaction-response}
|
|
1135
1153
|
*/
|
|
1136
1154
|
editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
1137
1155
|
/**
|
|
@@ -1149,7 +1167,7 @@ export interface RestManager {
|
|
|
1149
1167
|
* If attempting to request to speak:
|
|
1150
1168
|
* - Requires the `REQUEST_TO_SPEAK` permission.
|
|
1151
1169
|
*
|
|
1152
|
-
* @see {@link https://discord.com/developers/
|
|
1170
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-current-user-voice-state}
|
|
1153
1171
|
*/
|
|
1154
1172
|
editOwnVoiceState: (guildId: BigString, options: EditOwnVoiceState) => Promise<void>;
|
|
1155
1173
|
/**
|
|
@@ -1166,7 +1184,7 @@ export interface RestManager {
|
|
|
1166
1184
|
*
|
|
1167
1185
|
* Fires a _Guild Role Update_ gateway event.
|
|
1168
1186
|
*
|
|
1169
|
-
* @see {@link https://discord.com/developers/
|
|
1187
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role}
|
|
1170
1188
|
*/
|
|
1171
1189
|
editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
1172
1190
|
/**
|
|
@@ -1182,7 +1200,7 @@ export interface RestManager {
|
|
|
1182
1200
|
*
|
|
1183
1201
|
* Fires a _Guild Role Update_ gateway event for every role impacted in this change.
|
|
1184
1202
|
*
|
|
1185
|
-
* @see {@link https://discord.com/developers/
|
|
1203
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role-positions}
|
|
1186
1204
|
*/
|
|
1187
1205
|
editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<Camelize<DiscordRole>[]>;
|
|
1188
1206
|
/**
|
|
@@ -1202,7 +1220,7 @@ export interface RestManager {
|
|
|
1202
1220
|
*
|
|
1203
1221
|
* Fires a _Guild Scheduled Event Update_ gateway event.
|
|
1204
1222
|
*
|
|
1205
|
-
* @see {@link https://discord.com/developers/
|
|
1223
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
|
1206
1224
|
*/
|
|
1207
1225
|
editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
1208
1226
|
/**
|
|
@@ -1218,7 +1236,7 @@ export interface RestManager {
|
|
|
1218
1236
|
*
|
|
1219
1237
|
* Fires a _Stage Instance Update_ event.
|
|
1220
1238
|
*
|
|
1221
|
-
* @see {@link https://discord.com/developers/
|
|
1239
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance}
|
|
1222
1240
|
*/
|
|
1223
1241
|
editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
1224
1242
|
/**
|
|
@@ -1232,7 +1250,7 @@ export interface RestManager {
|
|
|
1232
1250
|
*
|
|
1233
1251
|
* Requires the `MUTE_MEMBERS` permission.
|
|
1234
1252
|
*
|
|
1235
|
-
* @see {@link https://discord.com/developers/
|
|
1253
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-user-voice-state}
|
|
1236
1254
|
*/
|
|
1237
1255
|
editUserVoiceState: (guildId: BigString, options: EditUserVoiceState) => Promise<void>;
|
|
1238
1256
|
/**
|
|
@@ -1246,7 +1264,7 @@ export interface RestManager {
|
|
|
1246
1264
|
* @remarks
|
|
1247
1265
|
* This requires the `role_connections.write` scope.
|
|
1248
1266
|
*
|
|
1249
|
-
* @see {@link https://discord.com/developers/
|
|
1267
|
+
* @see {@link https://docs.discord.com/developers/resources/user#update-user-application-role-connection}
|
|
1250
1268
|
*/
|
|
1251
1269
|
editUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString, options: Camelize<DiscordApplicationRoleConnection>) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
1252
1270
|
/**
|
|
@@ -1261,7 +1279,7 @@ export interface RestManager {
|
|
|
1261
1279
|
*
|
|
1262
1280
|
* Fires a _Webhooks Update_ gateway event.
|
|
1263
1281
|
*
|
|
1264
|
-
* @see {@link https://discord.com/developers/
|
|
1282
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook}
|
|
1265
1283
|
*/
|
|
1266
1284
|
editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
1267
1285
|
/**
|
|
@@ -1276,7 +1294,7 @@ export interface RestManager {
|
|
|
1276
1294
|
* @remarks
|
|
1277
1295
|
* Fires a _Message Update_ gateway event.
|
|
1278
1296
|
*
|
|
1279
|
-
* @see {@link https://discord.com/developers/
|
|
1297
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook-message}
|
|
1280
1298
|
*/
|
|
1281
1299
|
editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: EditWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
1282
1300
|
/**
|
|
@@ -1291,7 +1309,7 @@ export interface RestManager {
|
|
|
1291
1309
|
*
|
|
1292
1310
|
* Fires a _Webhooks Update_ gateway event.
|
|
1293
1311
|
*
|
|
1294
|
-
* @see {@link https://discord.com/developers/
|
|
1312
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token}
|
|
1295
1313
|
*/
|
|
1296
1314
|
editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
|
|
1297
1315
|
/**
|
|
@@ -1307,7 +1325,7 @@ export interface RestManager {
|
|
|
1307
1325
|
*
|
|
1308
1326
|
* Fires a _Guild Update_ gateway event.
|
|
1309
1327
|
*
|
|
1310
|
-
* @see {@link https://discord.com/developers/
|
|
1328
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-welcome-screen}
|
|
1311
1329
|
*/
|
|
1312
1330
|
editWelcomeScreen: (guildId: BigString, options: ModifyGuildWelcomeScreen, reason?: string) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
1313
1331
|
/**
|
|
@@ -1322,7 +1340,7 @@ export interface RestManager {
|
|
|
1322
1340
|
*
|
|
1323
1341
|
* Fires a _Guild Update_ gateway event.
|
|
1324
1342
|
*
|
|
1325
|
-
* @see {@link https://discord.com/developers/
|
|
1343
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-widget}
|
|
1326
1344
|
*/
|
|
1327
1345
|
editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>, reason?: string) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
1328
1346
|
/**
|
|
@@ -1336,7 +1354,7 @@ export interface RestManager {
|
|
|
1336
1354
|
* @remarks
|
|
1337
1355
|
* If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
|
|
1338
1356
|
*
|
|
1339
|
-
* @see {@link https://discord.com/developers/
|
|
1357
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#execute-webhook}
|
|
1340
1358
|
*/
|
|
1341
1359
|
executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
|
|
1342
1360
|
/**
|
|
@@ -1352,7 +1370,7 @@ export interface RestManager {
|
|
|
1352
1370
|
*
|
|
1353
1371
|
* Fires a _Webhooks Update_ gateway event.
|
|
1354
1372
|
*
|
|
1355
|
-
* @see {@link https://discord.com/developers/
|
|
1373
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#follow-announcement-channel}
|
|
1356
1374
|
*/
|
|
1357
1375
|
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<Camelize<DiscordFollowedChannel>>;
|
|
1358
1376
|
/**
|
|
@@ -1366,7 +1384,7 @@ export interface RestManager {
|
|
|
1366
1384
|
*
|
|
1367
1385
|
* Threads are ordered by the `id` property in descending order.
|
|
1368
1386
|
*
|
|
1369
|
-
* @see {@link https://discord.com/developers/
|
|
1387
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#list-active-guild-threads}
|
|
1370
1388
|
*/
|
|
1371
1389
|
getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordListActiveThreads>>;
|
|
1372
1390
|
/** Get the applications info */
|
|
@@ -1416,7 +1434,7 @@ export interface RestManager {
|
|
|
1416
1434
|
* @remarks
|
|
1417
1435
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1418
1436
|
*
|
|
1419
|
-
* @see {@link https://discord.com/developers/
|
|
1437
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-application-command-permissions}
|
|
1420
1438
|
*/
|
|
1421
1439
|
getApplicationCommandPermission: (guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
1422
1440
|
/**
|
|
@@ -1429,7 +1447,7 @@ export interface RestManager {
|
|
|
1429
1447
|
* @remarks
|
|
1430
1448
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1431
1449
|
*
|
|
1432
|
-
* @see {@link https://discord.com/developers/
|
|
1450
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command-permissions}
|
|
1433
1451
|
*/
|
|
1434
1452
|
getApplicationCommandPermissions: (guildId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>[]>;
|
|
1435
1453
|
/**
|
|
@@ -1442,7 +1460,7 @@ export interface RestManager {
|
|
|
1442
1460
|
* @remarks
|
|
1443
1461
|
* Requires the `VIEW_AUDIT_LOG` permission.
|
|
1444
1462
|
*
|
|
1445
|
-
* @see {@link https://discord.com/developers/
|
|
1463
|
+
* @see {@link https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log}
|
|
1446
1464
|
*/
|
|
1447
1465
|
getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
|
|
1448
1466
|
/**
|
|
@@ -1455,7 +1473,7 @@ export interface RestManager {
|
|
|
1455
1473
|
* @remarks
|
|
1456
1474
|
* Requires the `MANAGE_GUILD` permission.
|
|
1457
1475
|
*
|
|
1458
|
-
* @see {@link https://discord.com/developers/
|
|
1476
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#get-auto-moderation-rule}
|
|
1459
1477
|
*/
|
|
1460
1478
|
getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
1461
1479
|
/**
|
|
@@ -1467,7 +1485,7 @@ export interface RestManager {
|
|
|
1467
1485
|
* @remarks
|
|
1468
1486
|
* Requires the `MANAGE_GUILD` permission.
|
|
1469
1487
|
*
|
|
1470
|
-
* @see {@link https://discord.com/developers/
|
|
1488
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild}
|
|
1471
1489
|
*/
|
|
1472
1490
|
getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule>[]>;
|
|
1473
1491
|
/**
|
|
@@ -1486,7 +1504,7 @@ export interface RestManager {
|
|
|
1486
1504
|
* @remarks
|
|
1487
1505
|
* Requires the `BAN_MEMBERS` permission.
|
|
1488
1506
|
*
|
|
1489
|
-
* @see {@link https://discord.com/developers/
|
|
1507
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-ban}
|
|
1490
1508
|
*/
|
|
1491
1509
|
getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
|
|
1492
1510
|
/**
|
|
@@ -1501,7 +1519,7 @@ export interface RestManager {
|
|
|
1501
1519
|
*
|
|
1502
1520
|
* Users are ordered by their IDs in _ascending_ order.
|
|
1503
1521
|
*
|
|
1504
|
-
* @see {@link https://discord.com/developers/
|
|
1522
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-bans}
|
|
1505
1523
|
*/
|
|
1506
1524
|
getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan>[]>;
|
|
1507
1525
|
/**
|
|
@@ -1513,7 +1531,7 @@ export interface RestManager {
|
|
|
1513
1531
|
* @remarks
|
|
1514
1532
|
* If the channel is a thread, a {@link DiscordThreadMember} object is included in the result.
|
|
1515
1533
|
*
|
|
1516
|
-
* @see {@link https://discord.com/developers/
|
|
1534
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel}
|
|
1517
1535
|
*/
|
|
1518
1536
|
getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1519
1537
|
/**
|
|
@@ -1527,7 +1545,7 @@ export interface RestManager {
|
|
|
1527
1545
|
*
|
|
1528
1546
|
* Only usable for guild channels.
|
|
1529
1547
|
*
|
|
1530
|
-
* @see {@link https://discord.com/developers/
|
|
1548
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-invites}
|
|
1531
1549
|
*/
|
|
1532
1550
|
getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1533
1551
|
/**
|
|
@@ -1539,7 +1557,7 @@ export interface RestManager {
|
|
|
1539
1557
|
* @remarks
|
|
1540
1558
|
* Excludes threads.
|
|
1541
1559
|
*
|
|
1542
|
-
* @see {@link https://discord.com/developers/
|
|
1560
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-channels}
|
|
1543
1561
|
*/
|
|
1544
1562
|
getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel>[]>;
|
|
1545
1563
|
/**
|
|
@@ -1551,7 +1569,7 @@ export interface RestManager {
|
|
|
1551
1569
|
* @remarks
|
|
1552
1570
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1553
1571
|
*
|
|
1554
|
-
* @see {@link https://discord.com/developers/
|
|
1572
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-channel-webhooks}
|
|
1555
1573
|
*/
|
|
1556
1574
|
getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1557
1575
|
/**
|
|
@@ -1560,7 +1578,7 @@ export interface RestManager {
|
|
|
1560
1578
|
* @param userId - The ID of the user to create the DM channel with.
|
|
1561
1579
|
* @returns An instance of {@link DiscordChannel}.
|
|
1562
1580
|
*
|
|
1563
|
-
* @see {@link https://discord.com/developers/
|
|
1581
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-dm}
|
|
1564
1582
|
*/
|
|
1565
1583
|
getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1566
1584
|
/**
|
|
@@ -1576,7 +1594,7 @@ export interface RestManager {
|
|
|
1576
1594
|
*
|
|
1577
1595
|
* Fires a _Channel create_ gateway event.
|
|
1578
1596
|
*
|
|
1579
|
-
* @see {@link https://discord.com/developers/
|
|
1597
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-group-dm}
|
|
1580
1598
|
*/
|
|
1581
1599
|
getGroupDmChannel: (options: CreateGroupDmOptions) => Promise<Camelize<DiscordChannel>>;
|
|
1582
1600
|
/**
|
|
@@ -1588,9 +1606,9 @@ export interface RestManager {
|
|
|
1588
1606
|
*
|
|
1589
1607
|
* @remarks
|
|
1590
1608
|
* Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission,
|
|
1591
|
-
* or if the bot created the emoji and has the
|
|
1609
|
+
* or if the bot created the emoji and has the `CREATE_GUILD_EXPRESSIONS` permission.
|
|
1592
1610
|
*
|
|
1593
|
-
* @see {@link https://discord.com/developers/
|
|
1611
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-guild-emoji}
|
|
1594
1612
|
*/
|
|
1595
1613
|
getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1596
1614
|
/**
|
|
@@ -1602,7 +1620,7 @@ export interface RestManager {
|
|
|
1602
1620
|
* @remarks
|
|
1603
1621
|
* 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.
|
|
1604
1622
|
*
|
|
1605
|
-
* @see {@link https://discord.com/developers/
|
|
1623
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-application-emoji}
|
|
1606
1624
|
*/
|
|
1607
1625
|
getApplicationEmoji: (emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1608
1626
|
/**
|
|
@@ -1614,7 +1632,7 @@ export interface RestManager {
|
|
|
1614
1632
|
* @remarks
|
|
1615
1633
|
* Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1616
1634
|
*
|
|
1617
|
-
* @see {@link https://discord.com/developers/
|
|
1635
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-guild-emojis}
|
|
1618
1636
|
*/
|
|
1619
1637
|
getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji>[]>;
|
|
1620
1638
|
/**
|
|
@@ -1625,7 +1643,7 @@ export interface RestManager {
|
|
|
1625
1643
|
* @remarks
|
|
1626
1644
|
* 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.
|
|
1627
1645
|
*
|
|
1628
|
-
* @see {@link https://discord.com/developers/
|
|
1646
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-application-emojis}
|
|
1629
1647
|
*/
|
|
1630
1648
|
getApplicationEmojis: () => Promise<{
|
|
1631
1649
|
items: Camelize<DiscordEmoji>[];
|
|
@@ -1644,7 +1662,7 @@ export interface RestManager {
|
|
|
1644
1662
|
*
|
|
1645
1663
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1646
1664
|
*
|
|
1647
|
-
* @see {@link https://discord.com/developers/
|
|
1665
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-followup-message}
|
|
1648
1666
|
*/
|
|
1649
1667
|
getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1650
1668
|
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
|
|
@@ -1655,7 +1673,7 @@ export interface RestManager {
|
|
|
1655
1673
|
* @param commandId - The ID of the command to get.
|
|
1656
1674
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1657
1675
|
*
|
|
1658
|
-
* @see {@link https://discord.com/developers/
|
|
1676
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-command}
|
|
1659
1677
|
*/
|
|
1660
1678
|
getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1661
1679
|
/**
|
|
@@ -1664,7 +1682,7 @@ export interface RestManager {
|
|
|
1664
1682
|
* @param options - The parameters for the fetching of global application commands
|
|
1665
1683
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1666
1684
|
*
|
|
1667
|
-
* @see {@link https://discord.com/developers/
|
|
1685
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commands}
|
|
1668
1686
|
*/
|
|
1669
1687
|
getGlobalApplicationCommands: (options?: GetGlobalApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1670
1688
|
/**
|
|
@@ -1674,7 +1692,7 @@ export interface RestManager {
|
|
|
1674
1692
|
* @param options - The parameters for the fetching of the guild.
|
|
1675
1693
|
* @returns An instance of {@link DiscordGuild}.
|
|
1676
1694
|
*
|
|
1677
|
-
* @see {@link https://discord.com/developers/
|
|
1695
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild}
|
|
1678
1696
|
*/
|
|
1679
1697
|
getGuild: (guildId: BigString, options?: {
|
|
1680
1698
|
counts?: boolean;
|
|
@@ -1689,7 +1707,7 @@ export interface RestManager {
|
|
|
1689
1707
|
* @remarks
|
|
1690
1708
|
* If used with an access token, the token needs to have the `guilds` scope
|
|
1691
1709
|
*
|
|
1692
|
-
* @see {@link https://discord.com/developers/
|
|
1710
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guilds}
|
|
1693
1711
|
*/
|
|
1694
1712
|
getGuilds: (bearerToken?: string, options?: GetUserGuilds) => Promise<Partial<Camelize<DiscordGuild>>[]>;
|
|
1695
1713
|
/**
|
|
@@ -1699,7 +1717,7 @@ export interface RestManager {
|
|
|
1699
1717
|
* @param commandId - The ID of the command to get.
|
|
1700
1718
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1701
1719
|
*
|
|
1702
|
-
* @see {@link https://discord.com/developers/
|
|
1720
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command}
|
|
1703
1721
|
*/
|
|
1704
1722
|
getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1705
1723
|
/**
|
|
@@ -1709,7 +1727,7 @@ export interface RestManager {
|
|
|
1709
1727
|
* @param options - The parameters for the fetching of guild application commands
|
|
1710
1728
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1711
1729
|
*
|
|
1712
|
-
* @see {@link https://discord.com/developers/
|
|
1730
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commandss}
|
|
1713
1731
|
*/
|
|
1714
1732
|
getGuildApplicationCommands: (guildId: BigString, options?: GetGuildApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1715
1733
|
/**
|
|
@@ -1721,7 +1739,7 @@ export interface RestManager {
|
|
|
1721
1739
|
* @remarks
|
|
1722
1740
|
* If the bot user is not in the guild, the guild must be discoverable.
|
|
1723
1741
|
*
|
|
1724
|
-
* @see {@link https://discord.com/developers/
|
|
1742
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-preview}
|
|
1725
1743
|
*/
|
|
1726
1744
|
getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
|
|
1727
1745
|
/**
|
|
@@ -1733,7 +1751,7 @@ export interface RestManager {
|
|
|
1733
1751
|
*
|
|
1734
1752
|
* @remarks Includes the user field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1735
1753
|
*
|
|
1736
|
-
* @see {@link https://discord.com/developers/
|
|
1754
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-guild-sticker}
|
|
1737
1755
|
*/
|
|
1738
1756
|
getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
1739
1757
|
/**
|
|
@@ -1744,7 +1762,7 @@ export interface RestManager {
|
|
|
1744
1762
|
*
|
|
1745
1763
|
* @remarks Includes user fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1746
1764
|
*
|
|
1747
|
-
* @see {@link https://discord.com/developers/
|
|
1765
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-guild-stickers}
|
|
1748
1766
|
*/
|
|
1749
1767
|
getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker>[]>;
|
|
1750
1768
|
/**
|
|
@@ -1756,7 +1774,7 @@ export interface RestManager {
|
|
|
1756
1774
|
* @remarks
|
|
1757
1775
|
* Requires the `MANAGE_GUILD` permission.
|
|
1758
1776
|
*
|
|
1759
|
-
* @see {@link https://discord.com/developers/
|
|
1777
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-template}
|
|
1760
1778
|
*/
|
|
1761
1779
|
getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
|
|
1762
1780
|
/**
|
|
@@ -1768,7 +1786,7 @@ export interface RestManager {
|
|
|
1768
1786
|
* @remarks
|
|
1769
1787
|
* Requires the `MANAGE_GUILD` permission.
|
|
1770
1788
|
*
|
|
1771
|
-
* @see {@link https://discord.com/developers/
|
|
1789
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
1772
1790
|
*/
|
|
1773
1791
|
getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate>[]>;
|
|
1774
1792
|
/**
|
|
@@ -1780,7 +1798,7 @@ export interface RestManager {
|
|
|
1780
1798
|
* @remarks
|
|
1781
1799
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1782
1800
|
*
|
|
1783
|
-
* @see {@link https://discord.com/developers/
|
|
1801
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-guild-webhooks}
|
|
1784
1802
|
*/
|
|
1785
1803
|
getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1786
1804
|
/**
|
|
@@ -1792,7 +1810,7 @@ export interface RestManager {
|
|
|
1792
1810
|
* @remarks
|
|
1793
1811
|
* Requires the `MANAGE_GUILD` permission.
|
|
1794
1812
|
*
|
|
1795
|
-
* @see {@link https://discord.com/developers/
|
|
1813
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-integrations}
|
|
1796
1814
|
*/
|
|
1797
1815
|
getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration>[]>;
|
|
1798
1816
|
/**
|
|
@@ -1802,7 +1820,7 @@ export interface RestManager {
|
|
|
1802
1820
|
* @param options - The parameters for the fetching of the invite.
|
|
1803
1821
|
* @returns An instance of {@link DiscordInviteMetadata}.
|
|
1804
1822
|
*
|
|
1805
|
-
* @see {@link https://discord.com/developers/
|
|
1823
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1806
1824
|
*/
|
|
1807
1825
|
getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
|
|
1808
1826
|
/**
|
|
@@ -1814,7 +1832,7 @@ export interface RestManager {
|
|
|
1814
1832
|
* @remarks
|
|
1815
1833
|
* Requires the `MANAGE_GUILD` or `VIEW_AUDIT_LOG` permission.
|
|
1816
1834
|
*
|
|
1817
|
-
* @see {@link https://discord.com/developers/
|
|
1835
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invites}
|
|
1818
1836
|
*/
|
|
1819
1837
|
getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1820
1838
|
/**
|
|
@@ -1830,7 +1848,7 @@ export interface RestManager {
|
|
|
1830
1848
|
* If getting a message from a guild channel:
|
|
1831
1849
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1832
1850
|
*
|
|
1833
|
-
* @see {@link https://discord.com/developers/
|
|
1851
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-message}
|
|
1834
1852
|
*/
|
|
1835
1853
|
getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1836
1854
|
/**
|
|
@@ -1846,7 +1864,7 @@ export interface RestManager {
|
|
|
1846
1864
|
* If getting a messages from a guild channel:
|
|
1847
1865
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1848
1866
|
*
|
|
1849
|
-
* @see {@link https://discord.com/developers/
|
|
1867
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-messages}
|
|
1850
1868
|
*/
|
|
1851
1869
|
getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage>[]>;
|
|
1852
1870
|
/**
|
|
@@ -1854,7 +1872,7 @@ export interface RestManager {
|
|
|
1854
1872
|
*
|
|
1855
1873
|
* @returns A {@link DiscordStickerPack} object.
|
|
1856
1874
|
*
|
|
1857
|
-
* @see {@link https://discord.com/developers/
|
|
1875
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker-pack}
|
|
1858
1876
|
*/
|
|
1859
1877
|
getStickerPack: (stickerPackId: BigString) => Promise<Camelize<DiscordStickerPack>>;
|
|
1860
1878
|
/**
|
|
@@ -1862,7 +1880,7 @@ export interface RestManager {
|
|
|
1862
1880
|
*
|
|
1863
1881
|
* @returns A collection of {@link DiscordStickerPack} objects assorted by sticker ID.
|
|
1864
1882
|
*
|
|
1865
|
-
* @see {@link https://discord.com/developers/
|
|
1883
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-sticker-packs}
|
|
1866
1884
|
*/
|
|
1867
1885
|
getStickerPacks: () => Promise<Camelize<DiscordStickerPack>[]>;
|
|
1868
1886
|
/**
|
|
@@ -1878,7 +1896,7 @@ export interface RestManager {
|
|
|
1878
1896
|
*
|
|
1879
1897
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1880
1898
|
*
|
|
1881
|
-
* @see {@link https://discord.com/developers/
|
|
1899
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-original-interaction-response}
|
|
1882
1900
|
*/
|
|
1883
1901
|
getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
|
|
1884
1902
|
/**
|
|
@@ -1893,7 +1911,7 @@ export interface RestManager {
|
|
|
1893
1911
|
*
|
|
1894
1912
|
* If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned.
|
|
1895
1913
|
*
|
|
1896
|
-
* @see {@link https://discord.com/developers/
|
|
1914
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-channel-pins}
|
|
1897
1915
|
*/
|
|
1898
1916
|
getChannelPins: (channelId: BigString, options?: GetChannelPinsOptions) => Promise<Camelize<DiscordGetChannelPins>>;
|
|
1899
1917
|
/**
|
|
@@ -1908,7 +1926,7 @@ export interface RestManager {
|
|
|
1908
1926
|
* If getting a message from a guild channel:
|
|
1909
1927
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1910
1928
|
*
|
|
1911
|
-
* @see {@link https://discord.com/developers/
|
|
1929
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-pinned-messages-deprecated}
|
|
1912
1930
|
* @deprecated Use {@link getChannelPins} instead.
|
|
1913
1931
|
*/
|
|
1914
1932
|
getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage>[]>;
|
|
@@ -1927,7 +1945,7 @@ export interface RestManager {
|
|
|
1927
1945
|
*
|
|
1928
1946
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1929
1947
|
*
|
|
1930
|
-
* @see {@link https://discord.com/developers/
|
|
1948
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-private-archived-threads}
|
|
1931
1949
|
*/
|
|
1932
1950
|
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1933
1951
|
/**
|
|
@@ -1944,7 +1962,7 @@ export interface RestManager {
|
|
|
1944
1962
|
*
|
|
1945
1963
|
* Threads are ordered by the `id` property in descending order.
|
|
1946
1964
|
*
|
|
1947
|
-
* @see {@link https://discord.com/developers/
|
|
1965
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads}
|
|
1948
1966
|
*/
|
|
1949
1967
|
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1950
1968
|
/**
|
|
@@ -1957,7 +1975,7 @@ export interface RestManager {
|
|
|
1957
1975
|
* @remarks
|
|
1958
1976
|
* Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
|
|
1959
1977
|
*
|
|
1960
|
-
* @see {@link https://discord.com/developers/
|
|
1978
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-prune-count}
|
|
1961
1979
|
*/
|
|
1962
1980
|
getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
|
|
1963
1981
|
/**
|
|
@@ -1975,7 +1993,7 @@ export interface RestManager {
|
|
|
1975
1993
|
*
|
|
1976
1994
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1977
1995
|
*
|
|
1978
|
-
* @see {@link https://discord.com/developers/
|
|
1996
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-public-archived-threads}
|
|
1979
1997
|
*/
|
|
1980
1998
|
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1981
1999
|
/**
|
|
@@ -1987,7 +2005,7 @@ export interface RestManager {
|
|
|
1987
2005
|
* @remarks
|
|
1988
2006
|
* ⚠️ This endpoint should be used sparingly due to {@link DiscordRole} objects already being included in guild payloads.
|
|
1989
2007
|
*
|
|
1990
|
-
* @see {@link https://discord.com/developers/
|
|
2008
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-roles}
|
|
1991
2009
|
*/
|
|
1992
2010
|
getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole>[]>;
|
|
1993
2011
|
/**
|
|
@@ -1997,7 +2015,7 @@ export interface RestManager {
|
|
|
1997
2015
|
* @param roleId - The ID of the role.
|
|
1998
2016
|
* @returns A {@link DiscordRole} object.
|
|
1999
2017
|
*
|
|
2000
|
-
* @see {@link https://discord.com/developers/
|
|
2018
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role}
|
|
2001
2019
|
*/
|
|
2002
2020
|
getRole: (guildId: BigString, roleId: BigString) => Promise<Camelize<DiscordRole>>;
|
|
2003
2021
|
/**
|
|
@@ -2008,7 +2026,7 @@ export interface RestManager {
|
|
|
2008
2026
|
* @param options - The parameters for the fetching of the scheduled event.
|
|
2009
2027
|
* @returns An instance of {@link DiscordScheduledEvent}.
|
|
2010
2028
|
*
|
|
2011
|
-
* @see {@link https://discord.com/developers/
|
|
2029
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event}
|
|
2012
2030
|
*/
|
|
2013
2031
|
getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
|
|
2014
2032
|
withUserCount?: boolean;
|
|
@@ -2020,7 +2038,7 @@ export interface RestManager {
|
|
|
2020
2038
|
* @param options - The parameters for the fetching of the scheduled events.
|
|
2021
2039
|
* @returns A collection of {@link DiscordScheduledEvent} objects assorted by event ID.
|
|
2022
2040
|
*
|
|
2023
|
-
* @see {@link https://discord.com/developers/
|
|
2041
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#list-scheduled-events-for-guild}
|
|
2024
2042
|
*/
|
|
2025
2043
|
getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent>[]>;
|
|
2026
2044
|
/**
|
|
@@ -2036,7 +2054,7 @@ export interface RestManager {
|
|
|
2036
2054
|
*
|
|
2037
2055
|
* Users are ordered by their IDs in _ascending_ order.
|
|
2038
2056
|
*
|
|
2039
|
-
* @see {@link https://discord.com/developers/
|
|
2057
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event-users}
|
|
2040
2058
|
*/
|
|
2041
2059
|
getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
|
|
2042
2060
|
user: Camelize<DiscordUser>;
|
|
@@ -2050,7 +2068,7 @@ export interface RestManager {
|
|
|
2050
2068
|
* @param channelId - The ID of the stage channel the stage instance is associated with.
|
|
2051
2069
|
* @returns An instance of {@link DiscordStageInstance}.
|
|
2052
2070
|
*
|
|
2053
|
-
* @see {@link https://discord.com/developers/
|
|
2071
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#get-stage-instance}
|
|
2054
2072
|
*/
|
|
2055
2073
|
getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
|
|
2056
2074
|
/**
|
|
@@ -2059,7 +2077,7 @@ export interface RestManager {
|
|
|
2059
2077
|
* @param guildId - The ID of the guild to get the voice state from.
|
|
2060
2078
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2061
2079
|
*
|
|
2062
|
-
* @see {@link https://discord.com/developers/
|
|
2080
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-current-user-voice-state}
|
|
2063
2081
|
*/
|
|
2064
2082
|
getOwnVoiceState: (guildId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2065
2083
|
/**
|
|
@@ -2069,7 +2087,7 @@ export interface RestManager {
|
|
|
2069
2087
|
* @param userId - The ID of the user to get the voice state from
|
|
2070
2088
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2071
2089
|
*
|
|
2072
|
-
* @see {@link https://discord.com/developers/
|
|
2090
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-user-voice-state}
|
|
2073
2091
|
*/
|
|
2074
2092
|
getUserVoiceState: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2075
2093
|
/**
|
|
@@ -2078,7 +2096,7 @@ export interface RestManager {
|
|
|
2078
2096
|
* @param stickerId The ID of the sticker to get
|
|
2079
2097
|
* @returns A {@link DiscordSticker}
|
|
2080
2098
|
*
|
|
2081
|
-
* @see {@link https://discord.com/developers/
|
|
2099
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker}
|
|
2082
2100
|
*/
|
|
2083
2101
|
getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
2084
2102
|
/**
|
|
@@ -2089,7 +2107,7 @@ export interface RestManager {
|
|
|
2089
2107
|
* @param options - The parameters for the fetching of the thread member.
|
|
2090
2108
|
* @returns An instance of {@link DiscordThreadMember}.
|
|
2091
2109
|
*
|
|
2092
|
-
* @see {@link https://discord.com/developers/
|
|
2110
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-thread-member}
|
|
2093
2111
|
*/
|
|
2094
2112
|
getThreadMember: (channelId: BigString, userId: BigString, options?: GetThreadMember) => Promise<Camelize<DiscordThreadMember>>;
|
|
2095
2113
|
/**
|
|
@@ -2102,7 +2120,7 @@ export interface RestManager {
|
|
|
2102
2120
|
* @remarks
|
|
2103
2121
|
* Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
|
|
2104
2122
|
*
|
|
2105
|
-
* @see {@link https://discord.com/developers/
|
|
2123
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-thread-members}
|
|
2106
2124
|
*/
|
|
2107
2125
|
getThreadMembers: (channelId: BigString, options?: ListThreadMembers) => Promise<Camelize<DiscordThreadMember>[]>;
|
|
2108
2126
|
/**
|
|
@@ -2114,7 +2132,7 @@ export interface RestManager {
|
|
|
2114
2132
|
* @param options - The parameters for the fetching of the users.
|
|
2115
2133
|
* @returns A collection of {@link DiscordUser} objects assorted by user ID.
|
|
2116
2134
|
*
|
|
2117
|
-
* @see {@link https://discord.com/developers/
|
|
2135
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-reactions}
|
|
2118
2136
|
*/
|
|
2119
2137
|
getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser>[]>;
|
|
2120
2138
|
/**
|
|
@@ -2156,7 +2174,7 @@ export interface RestManager {
|
|
|
2156
2174
|
* @remarks
|
|
2157
2175
|
* The access token requires the `role_connections.write` scope.
|
|
2158
2176
|
*
|
|
2159
|
-
* @see {@link https://discord.com/developers/
|
|
2177
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-user-application-role-connection}
|
|
2160
2178
|
*/
|
|
2161
2179
|
getUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
2162
2180
|
/**
|
|
@@ -2170,7 +2188,7 @@ export interface RestManager {
|
|
|
2170
2188
|
*
|
|
2171
2189
|
* The `code` property will be `null` if the guild does not have a set vanity url.
|
|
2172
2190
|
*
|
|
2173
|
-
* @see {@link https://discord.com/developers/
|
|
2191
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-vanity-url}
|
|
2174
2192
|
*/
|
|
2175
2193
|
getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
|
|
2176
2194
|
/**
|
|
@@ -2179,7 +2197,7 @@ export interface RestManager {
|
|
|
2179
2197
|
* @param guildId - The ID of the guild to get the voice regions for.
|
|
2180
2198
|
* @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
|
|
2181
2199
|
*
|
|
2182
|
-
* @see {@link https://discord.com/developers/
|
|
2200
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-voice-regions}
|
|
2183
2201
|
*/
|
|
2184
2202
|
getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion>[]>;
|
|
2185
2203
|
/**
|
|
@@ -2191,7 +2209,7 @@ export interface RestManager {
|
|
|
2191
2209
|
* @remarks
|
|
2192
2210
|
* Requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook.
|
|
2193
2211
|
*
|
|
2194
|
-
* @see {@link https://discord.com/developers/
|
|
2212
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook}
|
|
2195
2213
|
*/
|
|
2196
2214
|
getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
|
|
2197
2215
|
/**
|
|
@@ -2203,7 +2221,7 @@ export interface RestManager {
|
|
|
2203
2221
|
* @param options - The parameters for the fetching of the message.
|
|
2204
2222
|
* @returns An instance of {@link DiscordMessage}.
|
|
2205
2223
|
*
|
|
2206
|
-
* @see {@link https://discord.com/developers/
|
|
2224
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-message}
|
|
2207
2225
|
*/
|
|
2208
2226
|
getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2209
2227
|
/**
|
|
@@ -2213,7 +2231,7 @@ export interface RestManager {
|
|
|
2213
2231
|
* @param token - The webhook token, used to get the webhook.
|
|
2214
2232
|
* @returns An instance of {@link DiscordWebhook}.
|
|
2215
2233
|
*
|
|
2216
|
-
* @see {@link https://discord.com/developers/
|
|
2234
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-with-token}
|
|
2217
2235
|
*/
|
|
2218
2236
|
getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
|
|
2219
2237
|
/**
|
|
@@ -2226,7 +2244,7 @@ export interface RestManager {
|
|
|
2226
2244
|
* If the welcome screen is not enabled:
|
|
2227
2245
|
* - Requires the `MANAGE_GUILD` permission.
|
|
2228
2246
|
*
|
|
2229
|
-
* @see {@link https://discord.com/developers/
|
|
2247
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-welcome-screen}
|
|
2230
2248
|
*/
|
|
2231
2249
|
getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
2232
2250
|
/**
|
|
@@ -2238,7 +2256,7 @@ export interface RestManager {
|
|
|
2238
2256
|
* @remarks
|
|
2239
2257
|
* Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
|
|
2240
2258
|
*
|
|
2241
|
-
* @see {@link https://discord.com/developers/
|
|
2259
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget}
|
|
2242
2260
|
*/
|
|
2243
2261
|
getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
|
|
2244
2262
|
/**
|
|
@@ -2250,7 +2268,7 @@ export interface RestManager {
|
|
|
2250
2268
|
* @remarks
|
|
2251
2269
|
* Requires the `MANAGE_GUILD` permission.
|
|
2252
2270
|
*
|
|
2253
|
-
* @see {@link https://discord.com/developers/
|
|
2271
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget-settings}
|
|
2254
2272
|
*/
|
|
2255
2273
|
getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
2256
2274
|
/**
|
|
@@ -2263,7 +2281,7 @@ export interface RestManager {
|
|
|
2263
2281
|
*
|
|
2264
2282
|
* Fires a _Thread Members Update_ gateway event.
|
|
2265
2283
|
*
|
|
2266
|
-
* @see {@link https://discord.com/developers/
|
|
2284
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#join-thread}
|
|
2267
2285
|
*/
|
|
2268
2286
|
joinThread: (channelId: BigString) => Promise<void>;
|
|
2269
2287
|
/**
|
|
@@ -2274,7 +2292,7 @@ export interface RestManager {
|
|
|
2274
2292
|
* @remarks
|
|
2275
2293
|
* Fires a _Guild Delete_ event.
|
|
2276
2294
|
*
|
|
2277
|
-
* @see {@link https://discord.com/developers/
|
|
2295
|
+
* @see {@link https://docs.discord.com/developers/resources/user#leave-guild}
|
|
2278
2296
|
*/
|
|
2279
2297
|
leaveGuild: (guildId: BigString) => Promise<void>;
|
|
2280
2298
|
/**
|
|
@@ -2287,7 +2305,7 @@ export interface RestManager {
|
|
|
2287
2305
|
*
|
|
2288
2306
|
* Fires a _Thread Members Update_ gateway event.
|
|
2289
2307
|
*
|
|
2290
|
-
* @see {@link https://discord.com/developers/
|
|
2308
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#leave-thread}
|
|
2291
2309
|
*/
|
|
2292
2310
|
leaveThread: (channelId: BigString) => Promise<void>;
|
|
2293
2311
|
/**
|
|
@@ -2305,7 +2323,7 @@ export interface RestManager {
|
|
|
2305
2323
|
*
|
|
2306
2324
|
* Fires a _Message Create_ event in the guilds the subscribed channels are in.
|
|
2307
2325
|
*
|
|
2308
|
-
* @see {@link https://discord.com/developers/
|
|
2326
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#crosspost-message}
|
|
2309
2327
|
*/
|
|
2310
2328
|
publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
2311
2329
|
/**
|
|
@@ -2321,7 +2339,7 @@ export interface RestManager {
|
|
|
2321
2339
|
*
|
|
2322
2340
|
* Fires a _Guild Member Update_ gateway event.
|
|
2323
2341
|
*
|
|
2324
|
-
* @see {@link https://discord.com/developers/
|
|
2342
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member-role}
|
|
2325
2343
|
*/
|
|
2326
2344
|
removeRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
2327
2345
|
/**
|
|
@@ -2338,7 +2356,7 @@ export interface RestManager {
|
|
|
2338
2356
|
*
|
|
2339
2357
|
* Fires a _Thread Members Update_ gateway event.
|
|
2340
2358
|
*
|
|
2341
|
-
* @see {@link https://discord.com/developers/
|
|
2359
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#remove-thread-member}
|
|
2342
2360
|
*/
|
|
2343
2361
|
removeThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2344
2362
|
/**
|
|
@@ -2347,7 +2365,7 @@ export interface RestManager {
|
|
|
2347
2365
|
* @param channelId - The ID of the channel to remove the recipient user of.
|
|
2348
2366
|
* @param userId - The user ID of the user to remove.
|
|
2349
2367
|
*
|
|
2350
|
-
* @see {@link https://discord.com/developers/
|
|
2368
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#group-dm-remove-recipient}
|
|
2351
2369
|
*/
|
|
2352
2370
|
removeDmRecipient: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2353
2371
|
/**
|
|
@@ -2374,7 +2392,7 @@ export interface RestManager {
|
|
|
2374
2392
|
*
|
|
2375
2393
|
* Fires a _Message Create_ gateway event.
|
|
2376
2394
|
*
|
|
2377
|
-
* @see {@link https://discord.com/developers/
|
|
2395
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-message}
|
|
2378
2396
|
*/
|
|
2379
2397
|
sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2380
2398
|
/**
|
|
@@ -2398,7 +2416,7 @@ export interface RestManager {
|
|
|
2398
2416
|
*
|
|
2399
2417
|
* Fires a _Message Create_ event.
|
|
2400
2418
|
*
|
|
2401
|
-
* @see {@link https://discord.com/developers/
|
|
2419
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-followup-message}
|
|
2402
2420
|
*/
|
|
2403
2421
|
sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
2404
2422
|
/**
|
|
@@ -2421,7 +2439,7 @@ export interface RestManager {
|
|
|
2421
2439
|
*
|
|
2422
2440
|
* Fires a _Message Create_ event.
|
|
2423
2441
|
*
|
|
2424
|
-
* @see {@link https://discord.com/developers/
|
|
2442
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-interaction-response}
|
|
2425
2443
|
*/
|
|
2426
2444
|
sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse, params?: InteractionCallbackOptions) => Promise<void | Camelize<DiscordInteractionCallbackResponse>>;
|
|
2427
2445
|
/**
|
|
@@ -2442,7 +2460,7 @@ export interface RestManager {
|
|
|
2442
2460
|
*
|
|
2443
2461
|
* Fires a _Thread Create_ gateway event.
|
|
2444
2462
|
*
|
|
2445
|
-
* @see {@link https://discord.com/developers/
|
|
2463
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
|
|
2446
2464
|
*/
|
|
2447
2465
|
startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2448
2466
|
/**
|
|
@@ -2458,7 +2476,7 @@ export interface RestManager {
|
|
|
2458
2476
|
*
|
|
2459
2477
|
* Fires a _Thread Create_ gateway event.
|
|
2460
2478
|
*
|
|
2461
|
-
* @see {@link https://discord.com/developers/
|
|
2479
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
|
|
2462
2480
|
*/
|
|
2463
2481
|
startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2464
2482
|
/**
|
|
@@ -2495,7 +2513,7 @@ export interface RestManager {
|
|
|
2495
2513
|
*
|
|
2496
2514
|
* Fires a _Guild Update_ gateway event.
|
|
2497
2515
|
*
|
|
2498
|
-
* @see {@link https://discord.com/developers/
|
|
2516
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
2499
2517
|
*/
|
|
2500
2518
|
syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
|
|
2501
2519
|
/**
|
|
@@ -2510,7 +2528,7 @@ export interface RestManager {
|
|
|
2510
2528
|
*
|
|
2511
2529
|
* Fires a _Typing Start_ gateway event.
|
|
2512
2530
|
*
|
|
2513
|
-
* @see {@link https://discord.com/developers/
|
|
2531
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#trigger-typing-indicator}
|
|
2514
2532
|
*/
|
|
2515
2533
|
triggerTypingIndicator: (channelId: BigString) => Promise<void>;
|
|
2516
2534
|
/**
|
|
@@ -2528,7 +2546,7 @@ export interface RestManager {
|
|
|
2528
2546
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2529
2547
|
* You will be able to update only your own application commands
|
|
2530
2548
|
*
|
|
2531
|
-
* @see {@link https://discord.com/developers/
|
|
2549
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-global-application-commands}
|
|
2532
2550
|
*/
|
|
2533
2551
|
upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2534
2552
|
/**
|
|
@@ -2547,7 +2565,7 @@ export interface RestManager {
|
|
|
2547
2565
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2548
2566
|
* You will be able to update only your own application commands
|
|
2549
2567
|
*
|
|
2550
|
-
* @see {@link https://discord.com/developers/
|
|
2568
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-guild-application-commands}
|
|
2551
2569
|
*/
|
|
2552
2570
|
upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2553
2571
|
/**
|
|
@@ -2563,7 +2581,7 @@ export interface RestManager {
|
|
|
2563
2581
|
*
|
|
2564
2582
|
* Fires a _Guild Ban Add_ gateway event.
|
|
2565
2583
|
*
|
|
2566
|
-
* @see {@link https://discord.com/developers/
|
|
2584
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-ban}
|
|
2567
2585
|
*/
|
|
2568
2586
|
banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
|
|
2569
2587
|
/**
|
|
@@ -2580,7 +2598,7 @@ export interface RestManager {
|
|
|
2580
2598
|
*
|
|
2581
2599
|
* Fires as many _Guild Ban Add_ gateway events as many user where banned.
|
|
2582
2600
|
*
|
|
2583
|
-
* @see {@link https://discord.com/developers/
|
|
2601
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#bulk-guild-ban}
|
|
2584
2602
|
*/
|
|
2585
2603
|
bulkBanMembers: (guildId: BigString, options: CreateGuildBulkBan, reason?: string) => Promise<Camelize<DiscordBulkBan>>;
|
|
2586
2604
|
/**
|
|
@@ -2594,9 +2612,9 @@ export interface RestManager {
|
|
|
2594
2612
|
* @remarks
|
|
2595
2613
|
* Fires a _Guild Member Update_ gateway event.
|
|
2596
2614
|
*
|
|
2597
|
-
* @see {@link https://discord.com/developers/
|
|
2615
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-current-member}
|
|
2598
2616
|
*/
|
|
2599
|
-
|
|
2617
|
+
editCurrentMember: (guildId: BigString, options: ModifyCurrentMember, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2600
2618
|
/**
|
|
2601
2619
|
* Edits a member's properties.
|
|
2602
2620
|
*
|
|
@@ -2611,20 +2629,9 @@ export interface RestManager {
|
|
|
2611
2629
|
*
|
|
2612
2630
|
* Fires a _Guild Member Update_ gateway event.
|
|
2613
2631
|
*
|
|
2614
|
-
* @see {@link https://discord.com/developers/
|
|
2632
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-member}
|
|
2615
2633
|
*/
|
|
2616
2634
|
editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2617
|
-
/**
|
|
2618
|
-
* Gets the member object by user ID.
|
|
2619
|
-
*
|
|
2620
|
-
|
|
2621
|
-
* @param guildId - The ID of the guild to get the member object for.
|
|
2622
|
-
* @param userId - The ID of the user to get the member object for.
|
|
2623
|
-
* @returns An instance of {@link DiscordMemberWithUser}.
|
|
2624
|
-
*
|
|
2625
|
-
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
|
|
2626
|
-
*/
|
|
2627
|
-
getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2628
2635
|
/**
|
|
2629
2636
|
* Gets the current member object.
|
|
2630
2637
|
*
|
|
@@ -2635,9 +2642,20 @@ export interface RestManager {
|
|
|
2635
2642
|
* @remarks
|
|
2636
2643
|
* The access tokens needs the `guilds.members.read` scope
|
|
2637
2644
|
*
|
|
2638
|
-
* @see {@link https://discord.com/developers/
|
|
2645
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guild-member}
|
|
2639
2646
|
*/
|
|
2640
2647
|
getCurrentMember: (guildId: BigString, bearerToken: string) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2648
|
+
/**
|
|
2649
|
+
* Gets the member object by user ID.
|
|
2650
|
+
*
|
|
2651
|
+
|
|
2652
|
+
* @param guildId - The ID of the guild to get the member object for.
|
|
2653
|
+
* @param userId - The ID of the user to get the member object for.
|
|
2654
|
+
* @returns An instance of {@link DiscordMemberWithUser}.
|
|
2655
|
+
*
|
|
2656
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-member}
|
|
2657
|
+
*/
|
|
2658
|
+
getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2641
2659
|
/**
|
|
2642
2660
|
* Gets the list of members for a guild.
|
|
2643
2661
|
*
|
|
@@ -2650,11 +2668,11 @@ export interface RestManager {
|
|
|
2650
2668
|
*
|
|
2651
2669
|
* ⚠️ It is not recommended to use this endpoint with very large bots. Instead, opt to use `fetchMembers()`:
|
|
2652
2670
|
* REST communication only permits 50 requests to be made per second, while gateways allow for up to 120 requests
|
|
2653
|
-
* per minute per shard. For more information, read {@link https://discord.com/developers/
|
|
2671
|
+
* per minute per shard. For more information, read {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}.
|
|
2654
2672
|
*
|
|
2655
|
-
* @see {@link https://discord.com/developers/
|
|
2656
|
-
* @see {@link https://discord.com/developers/
|
|
2657
|
-
* @see {@link https://discord.com/developers/
|
|
2673
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#list-guild-members}
|
|
2674
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#request-guild-members}
|
|
2675
|
+
* @see {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}
|
|
2658
2676
|
*/
|
|
2659
2677
|
getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2660
2678
|
/**
|
|
@@ -2677,7 +2695,7 @@ export interface RestManager {
|
|
|
2677
2695
|
*
|
|
2678
2696
|
* Fires a _Guild Member Remove_ gateway event.
|
|
2679
2697
|
*
|
|
2680
|
-
* @see {@link https://discord.com/developers/
|
|
2698
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member}
|
|
2681
2699
|
*/
|
|
2682
2700
|
kickMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2683
2701
|
/**
|
|
@@ -2692,7 +2710,7 @@ export interface RestManager {
|
|
|
2692
2710
|
*
|
|
2693
2711
|
* Fires a _Channel Pins Update_ event.
|
|
2694
2712
|
*
|
|
2695
|
-
* @see {@link https://discord.com/developers/
|
|
2713
|
+
* @see {@link https://docs.discord.com/developers/resources/message#pin-message}
|
|
2696
2714
|
*/
|
|
2697
2715
|
pinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2698
2716
|
/**
|
|
@@ -2713,7 +2731,7 @@ export interface RestManager {
|
|
|
2713
2731
|
*
|
|
2714
2732
|
* Fires a _Guild Member Remove_ gateway event for every member kicked.
|
|
2715
2733
|
*
|
|
2716
|
-
* @see {@link https://discord.com/developers/
|
|
2734
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#begin-guild-prune}
|
|
2717
2735
|
*/
|
|
2718
2736
|
pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
|
|
2719
2737
|
pruned: number | null;
|
|
@@ -2727,7 +2745,7 @@ export interface RestManager {
|
|
|
2727
2745
|
* @param options - The parameters for searching through the members.
|
|
2728
2746
|
* @returns A collection of {@link DiscordMember} objects assorted by user ID.
|
|
2729
2747
|
*
|
|
2730
|
-
* @see {@link https://discord.com/developers/
|
|
2748
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#search-guild-members}
|
|
2731
2749
|
*/
|
|
2732
2750
|
searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2733
2751
|
/**
|
|
@@ -2743,7 +2761,7 @@ export interface RestManager {
|
|
|
2743
2761
|
*
|
|
2744
2762
|
* Fires a _Guild Ban Remove_ gateway event.
|
|
2745
2763
|
*
|
|
2746
|
-
* @see {@link https://discord.com/developers/
|
|
2764
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-ban}
|
|
2747
2765
|
*/
|
|
2748
2766
|
unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2749
2767
|
/**
|
|
@@ -2758,7 +2776,7 @@ export interface RestManager {
|
|
|
2758
2776
|
*
|
|
2759
2777
|
* Fires a _Channel Pins Update_ event.
|
|
2760
2778
|
*
|
|
2761
|
-
* @see {@link https://discord.com/developers/
|
|
2779
|
+
* @see {@link https://docs.discord.com/developers/resources/message#unpin-message}
|
|
2762
2780
|
*/
|
|
2763
2781
|
unpinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2764
2782
|
/**
|