@discordeno/rest 22.0.1-next.ea88819 → 22.0.1-next.eb4cdaa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/invalidBucket.d.ts.map +1 -1
- package/dist/invalidBucket.js +1 -1
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +168 -44
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +14 -6
- package/dist/routes.d.ts +7 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +228 -187
- package/dist/types.d.ts +372 -185
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/typings/routes.d.ts +17 -1
- package/dist/typings/routes.d.ts.map +1 -1
- package/dist/typings/routes.js +1 -1
- package/package.json +21 -24
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddDmRecipientOptions, AddGuildMemberOptions, AddLobbyMember, AtLeastOne, BeginGuildPrune, BigString, Camelize, CreateApplicationCommand, CreateApplicationEmoji, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGlobalApplicationCommandOptions, CreateGroupDmOptions, CreateGuildApplicationCommandOptions, CreateGuildBan, CreateGuildBulkBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildRole, CreateGuildSoundboardSound, CreateGuildStickerOptions, CreateLobby, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, CreateTestEntitlement, CreateWebhook, DeleteWebhookMessageOptions, DiscordAccessTokenResponse, DiscordActivityInstance, DiscordApplication, DiscordApplicationCommand, DiscordApplicationCommandPermissions, DiscordApplicationRoleConnection, DiscordApplicationRoleConnectionMetadata, DiscordAuditLog, DiscordAutoModerationRule, DiscordBan, DiscordBulkBan, DiscordChannel, DiscordConnection, DiscordCurrentAuthorization, DiscordEmoji, DiscordEntitlement, DiscordFollowedChannel, DiscordGetAnswerVotesResponse, DiscordGetChannelPins, DiscordGetGatewayBot, DiscordGuild, DiscordGuildApplicationCommandPermissions, DiscordGuildOnboarding, DiscordGuildPreview, DiscordGuildWidget, DiscordGuildWidgetSettings, DiscordIncidentsData, DiscordIntegration, DiscordInteractionCallbackResponse, DiscordInvite, DiscordInviteMetadata, DiscordListActiveThreads, DiscordListArchivedThreads, DiscordLobby, DiscordLobbyMember, DiscordMember, DiscordMemberWithUser, DiscordMessage, DiscordPrunedCount, DiscordRole, DiscordScheduledEvent, DiscordSku, DiscordSoundboardSound, DiscordStageInstance, DiscordSticker, DiscordStickerPack, DiscordSubscription, DiscordTemplate, DiscordThreadMember, DiscordTokenExchange, DiscordTokenRevocation, DiscordUser, DiscordVanityUrl, DiscordVoiceRegion, DiscordVoiceState, DiscordWebhook, DiscordWelcomeScreen, EditApplication, EditAutoModerationRuleOptions,
|
|
1
|
+
import type { AddDmRecipientOptions, AddGuildMemberOptions, AddLobbyMember, AtLeastOne, BeginGuildPrune, BigString, BulkUpdateLobbyMember, Camelize, CreateApplicationCommand, CreateApplicationEmoji, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGlobalApplicationCommandOptions, CreateGroupDmOptions, CreateGuildApplicationCommandOptions, CreateGuildBan, CreateGuildBulkBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildRole, CreateGuildSoundboardSound, CreateGuildStickerOptions, CreateLobby, CreateMessageOptions, CreateOrJoinLobby, 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, DiscordLobbyInvite, DiscordLobbyMember, DiscordLobbyMessage, 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, GetLobbyMessages, 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, SendLobbyMessage, 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,9 +411,19 @@ 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>>;
|
|
417
|
+
/**
|
|
418
|
+
* Get guild role member counts
|
|
419
|
+
*
|
|
420
|
+
* Returns a map of role IDs to the number of members with the role. Does not include the \@everyone role.
|
|
421
|
+
*
|
|
422
|
+
* @param guildId - The ID of the guild to get role member counts for.
|
|
423
|
+
*
|
|
424
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
425
|
+
*/
|
|
426
|
+
getGuildRoleMemberCounts: (guildId: BigString) => Promise<Record<string, number>>;
|
|
399
427
|
/**
|
|
400
428
|
* Creates a role in a guild.
|
|
401
429
|
*
|
|
@@ -409,7 +437,7 @@ export interface RestManager {
|
|
|
409
437
|
*
|
|
410
438
|
* Fires a _Guild Role Create_ gateway event.
|
|
411
439
|
*
|
|
412
|
-
* @see {@link https://discord.com/developers/
|
|
440
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-role}
|
|
413
441
|
*/
|
|
414
442
|
createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
415
443
|
/**
|
|
@@ -427,7 +455,7 @@ export interface RestManager {
|
|
|
427
455
|
*
|
|
428
456
|
* Fires a _Guild Scheduled Event Create_ gateway event.
|
|
429
457
|
*
|
|
430
|
-
* @see {@link https://discord.com/developers/
|
|
458
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#create-guild-scheduled-event}
|
|
431
459
|
*/
|
|
432
460
|
createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
433
461
|
/**
|
|
@@ -442,7 +470,7 @@ export interface RestManager {
|
|
|
442
470
|
*
|
|
443
471
|
* Fires a _Stage Instance Create_ gateway event.
|
|
444
472
|
*
|
|
445
|
-
* @see {@link https://discord.com/developers/
|
|
473
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#create-stage-instance}
|
|
446
474
|
*/
|
|
447
475
|
createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
448
476
|
/**
|
|
@@ -460,7 +488,7 @@ export interface RestManager {
|
|
|
460
488
|
*
|
|
461
489
|
* Fires a _Webhooks Update_ gateway event.
|
|
462
490
|
*
|
|
463
|
-
* @see {@link https://discord.com/developers/
|
|
491
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#create-webhook}
|
|
464
492
|
*/
|
|
465
493
|
createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
466
494
|
/**
|
|
@@ -475,7 +503,7 @@ export interface RestManager {
|
|
|
475
503
|
*
|
|
476
504
|
* Fires an _Auto Moderation Rule Delete_ gateway event.
|
|
477
505
|
*
|
|
478
|
-
* @see {@link https://discord.com/developers/
|
|
506
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#delete-auto-moderation-rule}
|
|
479
507
|
*/
|
|
480
508
|
deleteAutomodRule: (guildId: BigString, ruleId: BigString, reason?: string) => Promise<void>;
|
|
481
509
|
/**
|
|
@@ -501,7 +529,7 @@ export interface RestManager {
|
|
|
501
529
|
*
|
|
502
530
|
* - Fires a _Channel Delete_ gateway event.
|
|
503
531
|
*
|
|
504
|
-
* @see {@link https://discord.com/developers/
|
|
532
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#deleteclose-channel}
|
|
505
533
|
*/
|
|
506
534
|
deleteChannel: (channelId: BigString, reason?: string) => Promise<void>;
|
|
507
535
|
/**
|
|
@@ -516,7 +544,7 @@ export interface RestManager {
|
|
|
516
544
|
*
|
|
517
545
|
* Fires a _Channel Update_ gateway event.
|
|
518
546
|
*
|
|
519
|
-
* @see {@link https://discord.com/developers/
|
|
547
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-permission}
|
|
520
548
|
*/
|
|
521
549
|
deleteChannelPermissionOverride: (channelId: BigString, overwriteId: BigString, reason?: string) => Promise<void>;
|
|
522
550
|
/**
|
|
@@ -532,7 +560,7 @@ export interface RestManager {
|
|
|
532
560
|
*
|
|
533
561
|
* Fires a _Guild Emojis Update_ gateway event.
|
|
534
562
|
*
|
|
535
|
-
* @see {@link https://discord.com/developers/
|
|
563
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-guild-emoji}
|
|
536
564
|
*/
|
|
537
565
|
deleteEmoji: (guildId: BigString, id: BigString, reason?: string) => Promise<void>;
|
|
538
566
|
/**
|
|
@@ -540,7 +568,7 @@ export interface RestManager {
|
|
|
540
568
|
*
|
|
541
569
|
* @param id - The ID of the emoji to delete.
|
|
542
570
|
*
|
|
543
|
-
* @see {@link https://discord.com/developers/
|
|
571
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#delete-application-emoji}
|
|
544
572
|
*/
|
|
545
573
|
deleteApplicationEmoji: (id: BigString) => Promise<void>;
|
|
546
574
|
/**
|
|
@@ -554,7 +582,7 @@ export interface RestManager {
|
|
|
554
582
|
*
|
|
555
583
|
* Fires a _Message Delete_ event.
|
|
556
584
|
*
|
|
557
|
-
* @see {@link https://discord.com/developers/
|
|
585
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-followup-message}
|
|
558
586
|
*/
|
|
559
587
|
deleteFollowupMessage: (token: string, messageId: BigString) => Promise<void>;
|
|
560
588
|
/**
|
|
@@ -562,7 +590,7 @@ export interface RestManager {
|
|
|
562
590
|
*
|
|
563
591
|
* @param commandId - The ID of the command to delete.
|
|
564
592
|
*
|
|
565
|
-
* @see {@link https://discord.com/developers/
|
|
593
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-global-application-command}
|
|
566
594
|
*/
|
|
567
595
|
deleteGlobalApplicationCommand: (commandId: BigString) => Promise<void>;
|
|
568
596
|
/**
|
|
@@ -571,7 +599,7 @@ export interface RestManager {
|
|
|
571
599
|
* @param guildId - The ID of the guild to delete the command from.
|
|
572
600
|
* @param commandId - The ID of the command to delete from the guild.
|
|
573
601
|
*
|
|
574
|
-
* @see {@link https://discord.com/developers/
|
|
602
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-guild-application-command}
|
|
575
603
|
*/
|
|
576
604
|
deleteGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<void>;
|
|
577
605
|
/**
|
|
@@ -588,7 +616,7 @@ export interface RestManager {
|
|
|
588
616
|
* Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
|
|
589
617
|
* Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
|
|
590
618
|
*
|
|
591
|
-
* @see {@link https://discord.com/developers/
|
|
619
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#delete-guild-sticker}
|
|
592
620
|
*/
|
|
593
621
|
deleteGuildSticker: (guildId: BigString, stickerId: BigString, reason?: string) => Promise<void>;
|
|
594
622
|
/**
|
|
@@ -602,7 +630,7 @@ export interface RestManager {
|
|
|
602
630
|
*
|
|
603
631
|
* Fires a _Guild Update_ gateway event.
|
|
604
632
|
*
|
|
605
|
-
* @see {@link https://discord.com/developers/
|
|
633
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#delete-guild-template}
|
|
606
634
|
*/
|
|
607
635
|
deleteGuildTemplate: (guildId: BigString, templateCode: string) => Promise<void>;
|
|
608
636
|
/**
|
|
@@ -620,7 +648,7 @@ export interface RestManager {
|
|
|
620
648
|
* Fires a _Guild Integrations Update_ gateway event.
|
|
621
649
|
* Fires a _Integration Delete_ gateway event.
|
|
622
650
|
*
|
|
623
|
-
* @see {@link https://discord.com/developers/
|
|
651
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-integration}
|
|
624
652
|
*/
|
|
625
653
|
deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
|
|
626
654
|
/**
|
|
@@ -634,9 +662,47 @@ export interface RestManager {
|
|
|
634
662
|
*
|
|
635
663
|
* Fires an _Invite Delete_ gateway event.
|
|
636
664
|
*
|
|
637
|
-
* @see {@link https://discord.com/developers/
|
|
665
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-invite}
|
|
638
666
|
*/
|
|
639
667
|
deleteInvite: (inviteCode: string, reason?: string) => Promise<void>;
|
|
668
|
+
/**
|
|
669
|
+
* Gets the users allowed to see and accept this invite.
|
|
670
|
+
*
|
|
671
|
+
* @param inviteCode - The invite code of the invite to update.
|
|
672
|
+
* @returns CSV file containing the user IDs with the header `user_id` and each user ID from the original file
|
|
673
|
+
*
|
|
674
|
+
* @remarks
|
|
675
|
+
* Requires called to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
676
|
+
*
|
|
677
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
678
|
+
*/
|
|
679
|
+
getTargetUsers: (inviteCode: string) => Promise<string>;
|
|
680
|
+
/**
|
|
681
|
+
* Updates the users allowed to see and accept this invite.
|
|
682
|
+
*
|
|
683
|
+
* @param inviteCode - The invite code of the invite to update.
|
|
684
|
+
* @param targetUsersFile - A CSV file with a single column of user IDs for all the users able to accept this invite
|
|
685
|
+
*
|
|
686
|
+
* @remarks
|
|
687
|
+
* Requires the caller to be the inviter or have the `MANAGE_GUILD` permission.
|
|
688
|
+
*
|
|
689
|
+
* Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described.
|
|
690
|
+
*
|
|
691
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
692
|
+
*/
|
|
693
|
+
updateTargetUsers: (inviteCode: string, targetUsersFile: Blob) => Promise<void>;
|
|
694
|
+
/**
|
|
695
|
+
* Processing target users from a CSV when creating or updating an invite is done asynchronously. This endpoint allows you to check the status of that job.
|
|
696
|
+
*
|
|
697
|
+
* @param inviteCode - The invite code of the invite to check the target users job status for.
|
|
698
|
+
* @returns An object containing the status of the target users job.
|
|
699
|
+
*
|
|
700
|
+
* @remarks
|
|
701
|
+
* Requires the caller to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
702
|
+
*
|
|
703
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
704
|
+
*/
|
|
705
|
+
getTargetUsersJobStatus: (inviteCode: string) => Promise<Camelize<DiscordTargetUsersJobStatus>>;
|
|
640
706
|
/**
|
|
641
707
|
* Deletes a message from a channel.
|
|
642
708
|
*
|
|
@@ -650,7 +716,7 @@ export interface RestManager {
|
|
|
650
716
|
*
|
|
651
717
|
* Fires a _Message Delete_ gateway event.
|
|
652
718
|
*
|
|
653
|
-
* @see {@link https://discord.com/developers/
|
|
719
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-message}
|
|
654
720
|
*/
|
|
655
721
|
deleteMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
656
722
|
/**
|
|
@@ -667,7 +733,7 @@ export interface RestManager {
|
|
|
667
733
|
*
|
|
668
734
|
* Fires a _Message Delete Bulk_ gateway event.
|
|
669
735
|
*
|
|
670
|
-
* @see {@link https://discord.com/developers/
|
|
736
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#bulk-delete-messages}
|
|
671
737
|
*/
|
|
672
738
|
deleteMessages: (channelId: BigString, messageIds: BigString[], reason?: string) => Promise<void>;
|
|
673
739
|
/**
|
|
@@ -680,7 +746,7 @@ export interface RestManager {
|
|
|
680
746
|
*
|
|
681
747
|
* Fires a _Message Delete_ event.
|
|
682
748
|
*
|
|
683
|
-
* @see {@link https://discord.com/developers/
|
|
749
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-original-interaction-response}
|
|
684
750
|
*/
|
|
685
751
|
deleteOriginalInteractionResponse: (token: string) => Promise<void>;
|
|
686
752
|
/**
|
|
@@ -695,7 +761,7 @@ export interface RestManager {
|
|
|
695
761
|
*
|
|
696
762
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
697
763
|
*
|
|
698
|
-
* @see {@link https://discord.com/developers/
|
|
764
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-own-reaction}
|
|
699
765
|
*/
|
|
700
766
|
deleteOwnReaction: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
701
767
|
/**
|
|
@@ -711,7 +777,7 @@ export interface RestManager {
|
|
|
711
777
|
*
|
|
712
778
|
* Fires a _Message Reaction Remove All_ gateway event.
|
|
713
779
|
*
|
|
714
|
-
* @see {@link https://discord.com/developers/
|
|
780
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions}
|
|
715
781
|
*/
|
|
716
782
|
deleteReactionsAll: (channelId: BigString, messageId: BigString) => Promise<void>;
|
|
717
783
|
/**
|
|
@@ -728,7 +794,7 @@ export interface RestManager {
|
|
|
728
794
|
*
|
|
729
795
|
* Fires a _Message Reaction Remove Emoji_ gateway event.
|
|
730
796
|
*
|
|
731
|
-
* @see {@link https://discord.com/developers/
|
|
797
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions-for-emoji}
|
|
732
798
|
*/
|
|
733
799
|
deleteReactionsEmoji: (channelId: BigString, messageId: BigString, reaction: string) => Promise<void>;
|
|
734
800
|
/**
|
|
@@ -743,7 +809,7 @@ export interface RestManager {
|
|
|
743
809
|
*
|
|
744
810
|
* Fires a _Guild Role Delete_ gateway event.
|
|
745
811
|
*
|
|
746
|
-
* @see {@link https://discord.com/developers/
|
|
812
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-role}
|
|
747
813
|
*/
|
|
748
814
|
deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
749
815
|
/**
|
|
@@ -757,7 +823,7 @@ export interface RestManager {
|
|
|
757
823
|
*
|
|
758
824
|
* Fires a _Guild Scheduled Event Delete_ gateway event.
|
|
759
825
|
*
|
|
760
|
-
* @see {@link https://discord.com/developers/
|
|
826
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#delete-guild-scheduled-event}
|
|
761
827
|
*/
|
|
762
828
|
deleteScheduledEvent: (guildId: BigString, eventId: BigString) => Promise<void>;
|
|
763
829
|
/**
|
|
@@ -771,7 +837,7 @@ export interface RestManager {
|
|
|
771
837
|
*
|
|
772
838
|
* Fires a _Stage Instance Delete_ gateway event.
|
|
773
839
|
*
|
|
774
|
-
* @see {@link https://discord.com/developers/
|
|
840
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#delete-stage-instance}
|
|
775
841
|
*/
|
|
776
842
|
deleteStageInstance: (channelId: BigString, reason?: string) => Promise<void>;
|
|
777
843
|
/**
|
|
@@ -789,7 +855,7 @@ export interface RestManager {
|
|
|
789
855
|
*
|
|
790
856
|
* Fires a _Message Reaction Remove_ gateway event.
|
|
791
857
|
*
|
|
792
|
-
* @see {@link https://discord.com/developers/
|
|
858
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#delete-user-reaction}
|
|
793
859
|
*/
|
|
794
860
|
deleteUserReaction: (channelId: BigString, messageId: BigString, userId: BigString, reaction: string) => Promise<void>;
|
|
795
861
|
/**
|
|
@@ -802,7 +868,7 @@ export interface RestManager {
|
|
|
802
868
|
*
|
|
803
869
|
* Fires a _Webhooks Update_ gateway event.
|
|
804
870
|
*
|
|
805
|
-
* @see {@link https://discord.com/developers/
|
|
871
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
806
872
|
*/
|
|
807
873
|
deleteWebhook: (webhookId: BigString, reason?: string) => Promise<void>;
|
|
808
874
|
/**
|
|
@@ -816,7 +882,7 @@ export interface RestManager {
|
|
|
816
882
|
* @remarks
|
|
817
883
|
* Fires a _Message Delete_ gateway event.
|
|
818
884
|
*
|
|
819
|
-
* @see {@link https://discord.com/developers/
|
|
885
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
|
|
820
886
|
*/
|
|
821
887
|
deleteWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: DeleteWebhookMessageOptions) => Promise<void>;
|
|
822
888
|
/**
|
|
@@ -828,7 +894,7 @@ export interface RestManager {
|
|
|
828
894
|
* @remarks
|
|
829
895
|
* Fires a _Message Delete_ gateway event.
|
|
830
896
|
*
|
|
831
|
-
* @see {@link https://discord.com/developers/
|
|
897
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-with-token}
|
|
832
898
|
*/
|
|
833
899
|
deleteWebhookWithToken: (webhookId: BigString, token: string) => Promise<void>;
|
|
834
900
|
/**
|
|
@@ -843,7 +909,7 @@ export interface RestManager {
|
|
|
843
909
|
* @remarks
|
|
844
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.
|
|
845
911
|
*
|
|
846
|
-
* @see {@link https://discord.com/developers/
|
|
912
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-application-command-permissions}
|
|
847
913
|
*/
|
|
848
914
|
editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: Camelize<DiscordApplicationCommandPermissions>[]) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
849
915
|
/**
|
|
@@ -860,7 +926,7 @@ export interface RestManager {
|
|
|
860
926
|
*
|
|
861
927
|
* Fires an _Auto Moderation Rule Update_ gateway event.
|
|
862
928
|
*
|
|
863
|
-
* @see {@link https://discord.com/developers/
|
|
929
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule}
|
|
864
930
|
*/
|
|
865
931
|
editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
866
932
|
/**
|
|
@@ -917,7 +983,7 @@ export interface RestManager {
|
|
|
917
983
|
*
|
|
918
984
|
* Fires a _Channel Update_ gateway event.
|
|
919
985
|
*
|
|
920
|
-
* @see {@link https://discord.com/developers/
|
|
986
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-channel-permissions}
|
|
921
987
|
*/
|
|
922
988
|
editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
|
|
923
989
|
/**
|
|
@@ -931,7 +997,13 @@ export interface RestManager {
|
|
|
931
997
|
*
|
|
932
998
|
* Fires a _Channel Update_ gateway event for every channel impacted in this change.
|
|
933
999
|
*
|
|
934
|
-
*
|
|
1000
|
+
* At most one entry per request may change `parent_id`. A request that changes `parent_id` for more than one channel fails with a 400 response and error code 40009.
|
|
1001
|
+
*
|
|
1002
|
+
* Permissions are checked per entry, based on what the entry changes:
|
|
1003
|
+
* - An entry that only changes `position` requires the `MANAGE_CHANNELS` permission at the guild level (or on the channel's current parent category). It does **not** require access to the individual channel, so a full reordering may include channels the current user cannot view.
|
|
1004
|
+
* - An entry that changes `parent_id` requires the `MANAGE_CHANNELS` permission on that channel and on the destination (the new parent category, or the guild when moving the channel out of a category), and the current user must be able to view the channel. Otherwise the request fails with a `403` response and error code 50001. Setting `lock_permissions` additionally requires `MANAGE_ROLES`.
|
|
1005
|
+
*
|
|
1006
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-channel-positions}
|
|
935
1007
|
*/
|
|
936
1008
|
editChannelPositions: (guildId: BigString, channelPositions: ModifyGuildChannelPositions[]) => Promise<void>;
|
|
937
1009
|
/**
|
|
@@ -949,7 +1021,7 @@ export interface RestManager {
|
|
|
949
1021
|
*
|
|
950
1022
|
* Fires a `Guild Emojis Update` gateway event.
|
|
951
1023
|
*
|
|
952
|
-
* @see {@link https://discord.com/developers/
|
|
1024
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-guild-emoji}
|
|
953
1025
|
*/
|
|
954
1026
|
editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<Camelize<DiscordEmoji>>;
|
|
955
1027
|
/**
|
|
@@ -959,7 +1031,7 @@ export interface RestManager {
|
|
|
959
1031
|
* @param options - The parameters for the edit of the emoji.
|
|
960
1032
|
* @returns An instance of the updated {@link DiscordEmoji}.
|
|
961
1033
|
*
|
|
962
|
-
* @see {@link https://discord.com/developers/
|
|
1034
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#modify-application-emoji}
|
|
963
1035
|
*/
|
|
964
1036
|
editApplicationEmoji: (id: BigString, options: ModifyApplicationEmoji) => Promise<Camelize<DiscordEmoji>>;
|
|
965
1037
|
/**
|
|
@@ -977,7 +1049,7 @@ export interface RestManager {
|
|
|
977
1049
|
*
|
|
978
1050
|
* Fires a _Message Update_ event.
|
|
979
1051
|
*
|
|
980
|
-
* @see {@link https://discord.com/developers/
|
|
1052
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-followup-message}
|
|
981
1053
|
*/
|
|
982
1054
|
editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
983
1055
|
/**
|
|
@@ -987,7 +1059,7 @@ export interface RestManager {
|
|
|
987
1059
|
* @param options - The parameters for the edit of the command.
|
|
988
1060
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
989
1061
|
*
|
|
990
|
-
* @see {@link https://discord.com/developers/
|
|
1062
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-global-application-command}
|
|
991
1063
|
*/
|
|
992
1064
|
editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
993
1065
|
/**
|
|
@@ -1006,7 +1078,7 @@ export interface RestManager {
|
|
|
1006
1078
|
*
|
|
1007
1079
|
* Fires a _Guild Update_ gateway event.
|
|
1008
1080
|
*
|
|
1009
|
-
* @see {@link https://discord.com/developers/
|
|
1081
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild}
|
|
1010
1082
|
*/
|
|
1011
1083
|
editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<Camelize<DiscordGuild>>;
|
|
1012
1084
|
/**
|
|
@@ -1017,7 +1089,7 @@ export interface RestManager {
|
|
|
1017
1089
|
* @param options - The parameters for the edit of the command.
|
|
1018
1090
|
* @returns An instance of the edited {@link DiscordApplicationCommand}.
|
|
1019
1091
|
*
|
|
1020
|
-
* @see {@link https://discord.com/developers/
|
|
1092
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-guild-application-command}
|
|
1021
1093
|
*/
|
|
1022
1094
|
editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1023
1095
|
/**
|
|
@@ -1032,7 +1104,7 @@ export interface RestManager {
|
|
|
1032
1104
|
* For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1033
1105
|
* Fires a Guild Stickers Update Gateway event.
|
|
1034
1106
|
*
|
|
1035
|
-
* @see {@link https://discord.com/developers/
|
|
1107
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#modify-guild-sticker}
|
|
1036
1108
|
*/
|
|
1037
1109
|
editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<Camelize<DiscordSticker>>;
|
|
1038
1110
|
/**
|
|
@@ -1048,7 +1120,7 @@ export interface RestManager {
|
|
|
1048
1120
|
*
|
|
1049
1121
|
* Fires a _Guild Update_ gateway event.
|
|
1050
1122
|
*
|
|
1051
|
-
* @see {@link https://discord.com/developers/
|
|
1123
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#modify-guild-template}
|
|
1052
1124
|
*/
|
|
1053
1125
|
editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<Camelize<DiscordTemplate>>;
|
|
1054
1126
|
/**
|
|
@@ -1066,7 +1138,7 @@ export interface RestManager {
|
|
|
1066
1138
|
*
|
|
1067
1139
|
* Fires a _Message Update_ gateway event.
|
|
1068
1140
|
*
|
|
1069
|
-
* @see {@link https://discord.com/developers/
|
|
1141
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#edit-message}
|
|
1070
1142
|
*/
|
|
1071
1143
|
editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<Camelize<DiscordMessage>>;
|
|
1072
1144
|
/**
|
|
@@ -1083,7 +1155,7 @@ export interface RestManager {
|
|
|
1083
1155
|
*
|
|
1084
1156
|
* Fires a _Message Update_ event.
|
|
1085
1157
|
*
|
|
1086
|
-
* @see {@link https://discord.com/developers/
|
|
1158
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-original-interaction-response}
|
|
1087
1159
|
*/
|
|
1088
1160
|
editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
1089
1161
|
/**
|
|
@@ -1101,7 +1173,7 @@ export interface RestManager {
|
|
|
1101
1173
|
* If attempting to request to speak:
|
|
1102
1174
|
* - Requires the `REQUEST_TO_SPEAK` permission.
|
|
1103
1175
|
*
|
|
1104
|
-
* @see {@link https://discord.com/developers/
|
|
1176
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-current-user-voice-state}
|
|
1105
1177
|
*/
|
|
1106
1178
|
editOwnVoiceState: (guildId: BigString, options: EditOwnVoiceState) => Promise<void>;
|
|
1107
1179
|
/**
|
|
@@ -1118,7 +1190,7 @@ export interface RestManager {
|
|
|
1118
1190
|
*
|
|
1119
1191
|
* Fires a _Guild Role Update_ gateway event.
|
|
1120
1192
|
*
|
|
1121
|
-
* @see {@link https://discord.com/developers/
|
|
1193
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role}
|
|
1122
1194
|
*/
|
|
1123
1195
|
editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<Camelize<DiscordRole>>;
|
|
1124
1196
|
/**
|
|
@@ -1134,7 +1206,7 @@ export interface RestManager {
|
|
|
1134
1206
|
*
|
|
1135
1207
|
* Fires a _Guild Role Update_ gateway event for every role impacted in this change.
|
|
1136
1208
|
*
|
|
1137
|
-
* @see {@link https://discord.com/developers/
|
|
1209
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role-positions}
|
|
1138
1210
|
*/
|
|
1139
1211
|
editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<Camelize<DiscordRole>[]>;
|
|
1140
1212
|
/**
|
|
@@ -1154,7 +1226,7 @@ export interface RestManager {
|
|
|
1154
1226
|
*
|
|
1155
1227
|
* Fires a _Guild Scheduled Event Update_ gateway event.
|
|
1156
1228
|
*
|
|
1157
|
-
* @see {@link https://discord.com/developers/
|
|
1229
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
|
1158
1230
|
*/
|
|
1159
1231
|
editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<Camelize<DiscordScheduledEvent>>;
|
|
1160
1232
|
/**
|
|
@@ -1170,7 +1242,7 @@ export interface RestManager {
|
|
|
1170
1242
|
*
|
|
1171
1243
|
* Fires a _Stage Instance Update_ event.
|
|
1172
1244
|
*
|
|
1173
|
-
* @see {@link https://discord.com/developers/
|
|
1245
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance}
|
|
1174
1246
|
*/
|
|
1175
1247
|
editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<Camelize<DiscordStageInstance>>;
|
|
1176
1248
|
/**
|
|
@@ -1184,7 +1256,7 @@ export interface RestManager {
|
|
|
1184
1256
|
*
|
|
1185
1257
|
* Requires the `MUTE_MEMBERS` permission.
|
|
1186
1258
|
*
|
|
1187
|
-
* @see {@link https://discord.com/developers/
|
|
1259
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#modify-user-voice-state}
|
|
1188
1260
|
*/
|
|
1189
1261
|
editUserVoiceState: (guildId: BigString, options: EditUserVoiceState) => Promise<void>;
|
|
1190
1262
|
/**
|
|
@@ -1198,9 +1270,21 @@ export interface RestManager {
|
|
|
1198
1270
|
* @remarks
|
|
1199
1271
|
* This requires the `role_connections.write` scope.
|
|
1200
1272
|
*
|
|
1201
|
-
* @see {@link https://discord.com/developers/
|
|
1273
|
+
* @see {@link https://docs.discord.com/developers/resources/user#update-user-application-role-connection}
|
|
1202
1274
|
*/
|
|
1203
1275
|
editUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString, options: Camelize<DiscordApplicationRoleConnection>) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Deletes the application role connection for the user.
|
|
1278
|
+
*
|
|
1279
|
+
* @param bearerToken - The access token of the user
|
|
1280
|
+
* @param applicationId - The id of the application to delete the role connection
|
|
1281
|
+
*
|
|
1282
|
+
* @remarks
|
|
1283
|
+
* This requires the `role_connections.write` scope.
|
|
1284
|
+
*
|
|
1285
|
+
* @see {@link https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection}
|
|
1286
|
+
*/
|
|
1287
|
+
deleteCurrentUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString) => Promise<void>;
|
|
1204
1288
|
/**
|
|
1205
1289
|
* Edits a webhook.
|
|
1206
1290
|
*
|
|
@@ -1213,7 +1297,7 @@ export interface RestManager {
|
|
|
1213
1297
|
*
|
|
1214
1298
|
* Fires a _Webhooks Update_ gateway event.
|
|
1215
1299
|
*
|
|
1216
|
-
* @see {@link https://discord.com/developers/
|
|
1300
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook}
|
|
1217
1301
|
*/
|
|
1218
1302
|
editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<Camelize<DiscordWebhook>>;
|
|
1219
1303
|
/**
|
|
@@ -1228,7 +1312,7 @@ export interface RestManager {
|
|
|
1228
1312
|
* @remarks
|
|
1229
1313
|
* Fires a _Message Update_ gateway event.
|
|
1230
1314
|
*
|
|
1231
|
-
* @see {@link https://discord.com/developers/
|
|
1315
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook-message}
|
|
1232
1316
|
*/
|
|
1233
1317
|
editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: EditWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
1234
1318
|
/**
|
|
@@ -1243,7 +1327,7 @@ export interface RestManager {
|
|
|
1243
1327
|
*
|
|
1244
1328
|
* Fires a _Webhooks Update_ gateway event.
|
|
1245
1329
|
*
|
|
1246
|
-
* @see {@link https://discord.com/developers/
|
|
1330
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token}
|
|
1247
1331
|
*/
|
|
1248
1332
|
editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<Camelize<DiscordWebhook>>;
|
|
1249
1333
|
/**
|
|
@@ -1259,7 +1343,7 @@ export interface RestManager {
|
|
|
1259
1343
|
*
|
|
1260
1344
|
* Fires a _Guild Update_ gateway event.
|
|
1261
1345
|
*
|
|
1262
|
-
* @see {@link https://discord.com/developers/
|
|
1346
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-welcome-screen}
|
|
1263
1347
|
*/
|
|
1264
1348
|
editWelcomeScreen: (guildId: BigString, options: ModifyGuildWelcomeScreen, reason?: string) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
1265
1349
|
/**
|
|
@@ -1274,7 +1358,7 @@ export interface RestManager {
|
|
|
1274
1358
|
*
|
|
1275
1359
|
* Fires a _Guild Update_ gateway event.
|
|
1276
1360
|
*
|
|
1277
|
-
* @see {@link https://discord.com/developers/
|
|
1361
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-widget}
|
|
1278
1362
|
*/
|
|
1279
1363
|
editWidgetSettings: (guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>, reason?: string) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
1280
1364
|
/**
|
|
@@ -1288,7 +1372,7 @@ export interface RestManager {
|
|
|
1288
1372
|
* @remarks
|
|
1289
1373
|
* If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
|
|
1290
1374
|
*
|
|
1291
|
-
* @see {@link https://discord.com/developers/
|
|
1375
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#execute-webhook}
|
|
1292
1376
|
*/
|
|
1293
1377
|
executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<Camelize<DiscordMessage> | undefined>;
|
|
1294
1378
|
/**
|
|
@@ -1304,7 +1388,7 @@ export interface RestManager {
|
|
|
1304
1388
|
*
|
|
1305
1389
|
* Fires a _Webhooks Update_ gateway event.
|
|
1306
1390
|
*
|
|
1307
|
-
* @see {@link https://discord.com/developers/
|
|
1391
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#follow-announcement-channel}
|
|
1308
1392
|
*/
|
|
1309
1393
|
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<Camelize<DiscordFollowedChannel>>;
|
|
1310
1394
|
/**
|
|
@@ -1318,7 +1402,7 @@ export interface RestManager {
|
|
|
1318
1402
|
*
|
|
1319
1403
|
* Threads are ordered by the `id` property in descending order.
|
|
1320
1404
|
*
|
|
1321
|
-
* @see {@link https://discord.com/developers/
|
|
1405
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#list-active-guild-threads}
|
|
1322
1406
|
*/
|
|
1323
1407
|
getActiveThreads: (guildId: BigString) => Promise<Camelize<DiscordListActiveThreads>>;
|
|
1324
1408
|
/** Get the applications info */
|
|
@@ -1368,7 +1452,7 @@ export interface RestManager {
|
|
|
1368
1452
|
* @remarks
|
|
1369
1453
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1370
1454
|
*
|
|
1371
|
-
* @see {@link https://discord.com/developers/
|
|
1455
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-application-command-permissions}
|
|
1372
1456
|
*/
|
|
1373
1457
|
getApplicationCommandPermission: (guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>>;
|
|
1374
1458
|
/**
|
|
@@ -1381,7 +1465,7 @@ export interface RestManager {
|
|
|
1381
1465
|
* @remarks
|
|
1382
1466
|
* Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
|
|
1383
1467
|
*
|
|
1384
|
-
* @see {@link https://discord.com/developers/
|
|
1468
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command-permissions}
|
|
1385
1469
|
*/
|
|
1386
1470
|
getApplicationCommandPermissions: (guildId: BigString, options?: GetApplicationCommandPermissionOptions) => Promise<Camelize<DiscordGuildApplicationCommandPermissions>[]>;
|
|
1387
1471
|
/**
|
|
@@ -1394,7 +1478,7 @@ export interface RestManager {
|
|
|
1394
1478
|
* @remarks
|
|
1395
1479
|
* Requires the `VIEW_AUDIT_LOG` permission.
|
|
1396
1480
|
*
|
|
1397
|
-
* @see {@link https://discord.com/developers/
|
|
1481
|
+
* @see {@link https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log}
|
|
1398
1482
|
*/
|
|
1399
1483
|
getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<Camelize<DiscordAuditLog>>;
|
|
1400
1484
|
/**
|
|
@@ -1407,7 +1491,7 @@ export interface RestManager {
|
|
|
1407
1491
|
* @remarks
|
|
1408
1492
|
* Requires the `MANAGE_GUILD` permission.
|
|
1409
1493
|
*
|
|
1410
|
-
* @see {@link https://discord.com/developers/
|
|
1494
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#get-auto-moderation-rule}
|
|
1411
1495
|
*/
|
|
1412
1496
|
getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<Camelize<DiscordAutoModerationRule>>;
|
|
1413
1497
|
/**
|
|
@@ -1419,7 +1503,7 @@ export interface RestManager {
|
|
|
1419
1503
|
* @remarks
|
|
1420
1504
|
* Requires the `MANAGE_GUILD` permission.
|
|
1421
1505
|
*
|
|
1422
|
-
* @see {@link https://discord.com/developers/
|
|
1506
|
+
* @see {@link https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild}
|
|
1423
1507
|
*/
|
|
1424
1508
|
getAutomodRules: (guildId: BigString) => Promise<Camelize<DiscordAutoModerationRule>[]>;
|
|
1425
1509
|
/**
|
|
@@ -1438,7 +1522,7 @@ export interface RestManager {
|
|
|
1438
1522
|
* @remarks
|
|
1439
1523
|
* Requires the `BAN_MEMBERS` permission.
|
|
1440
1524
|
*
|
|
1441
|
-
* @see {@link https://discord.com/developers/
|
|
1525
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-ban}
|
|
1442
1526
|
*/
|
|
1443
1527
|
getBan: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordBan>>;
|
|
1444
1528
|
/**
|
|
@@ -1453,7 +1537,7 @@ export interface RestManager {
|
|
|
1453
1537
|
*
|
|
1454
1538
|
* Users are ordered by their IDs in _ascending_ order.
|
|
1455
1539
|
*
|
|
1456
|
-
* @see {@link https://discord.com/developers/
|
|
1540
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-bans}
|
|
1457
1541
|
*/
|
|
1458
1542
|
getBans: (guildId: BigString, options?: GetBans) => Promise<Camelize<DiscordBan>[]>;
|
|
1459
1543
|
/**
|
|
@@ -1465,7 +1549,7 @@ export interface RestManager {
|
|
|
1465
1549
|
* @remarks
|
|
1466
1550
|
* If the channel is a thread, a {@link DiscordThreadMember} object is included in the result.
|
|
1467
1551
|
*
|
|
1468
|
-
* @see {@link https://discord.com/developers/
|
|
1552
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel}
|
|
1469
1553
|
*/
|
|
1470
1554
|
getChannel: (channelId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1471
1555
|
/**
|
|
@@ -1479,7 +1563,7 @@ export interface RestManager {
|
|
|
1479
1563
|
*
|
|
1480
1564
|
* Only usable for guild channels.
|
|
1481
1565
|
*
|
|
1482
|
-
* @see {@link https://discord.com/developers/
|
|
1566
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-invites}
|
|
1483
1567
|
*/
|
|
1484
1568
|
getChannelInvites: (channelId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1485
1569
|
/**
|
|
@@ -1491,7 +1575,7 @@ export interface RestManager {
|
|
|
1491
1575
|
* @remarks
|
|
1492
1576
|
* Excludes threads.
|
|
1493
1577
|
*
|
|
1494
|
-
* @see {@link https://discord.com/developers/
|
|
1578
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-channels}
|
|
1495
1579
|
*/
|
|
1496
1580
|
getChannels: (guildId: BigString) => Promise<Camelize<DiscordChannel>[]>;
|
|
1497
1581
|
/**
|
|
@@ -1503,7 +1587,7 @@ export interface RestManager {
|
|
|
1503
1587
|
* @remarks
|
|
1504
1588
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1505
1589
|
*
|
|
1506
|
-
* @see {@link https://discord.com/developers/
|
|
1590
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-channel-webhooks}
|
|
1507
1591
|
*/
|
|
1508
1592
|
getChannelWebhooks: (channelId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1509
1593
|
/**
|
|
@@ -1512,7 +1596,7 @@ export interface RestManager {
|
|
|
1512
1596
|
* @param userId - The ID of the user to create the DM channel with.
|
|
1513
1597
|
* @returns An instance of {@link DiscordChannel}.
|
|
1514
1598
|
*
|
|
1515
|
-
* @see {@link https://discord.com/developers/
|
|
1599
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-dm}
|
|
1516
1600
|
*/
|
|
1517
1601
|
getDmChannel: (userId: BigString) => Promise<Camelize<DiscordChannel>>;
|
|
1518
1602
|
/**
|
|
@@ -1528,7 +1612,7 @@ export interface RestManager {
|
|
|
1528
1612
|
*
|
|
1529
1613
|
* Fires a _Channel create_ gateway event.
|
|
1530
1614
|
*
|
|
1531
|
-
* @see {@link https://discord.com/developers/
|
|
1615
|
+
* @see {@link https://docs.discord.com/developers/resources/user#create-group-dm}
|
|
1532
1616
|
*/
|
|
1533
1617
|
getGroupDmChannel: (options: CreateGroupDmOptions) => Promise<Camelize<DiscordChannel>>;
|
|
1534
1618
|
/**
|
|
@@ -1540,9 +1624,9 @@ export interface RestManager {
|
|
|
1540
1624
|
*
|
|
1541
1625
|
* @remarks
|
|
1542
1626
|
* Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission,
|
|
1543
|
-
* or if the bot created the emoji and has the
|
|
1627
|
+
* or if the bot created the emoji and has the `CREATE_GUILD_EXPRESSIONS` permission.
|
|
1544
1628
|
*
|
|
1545
|
-
* @see {@link https://discord.com/developers/
|
|
1629
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-guild-emoji}
|
|
1546
1630
|
*/
|
|
1547
1631
|
getEmoji: (guildId: BigString, emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1548
1632
|
/**
|
|
@@ -1554,7 +1638,7 @@ export interface RestManager {
|
|
|
1554
1638
|
* @remarks
|
|
1555
1639
|
* Always includes the `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API.
|
|
1556
1640
|
*
|
|
1557
|
-
* @see {@link https://discord.com/developers/
|
|
1641
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#get-application-emoji}
|
|
1558
1642
|
*/
|
|
1559
1643
|
getApplicationEmoji: (emojiId: BigString) => Promise<Camelize<DiscordEmoji>>;
|
|
1560
1644
|
/**
|
|
@@ -1566,7 +1650,7 @@ export interface RestManager {
|
|
|
1566
1650
|
* @remarks
|
|
1567
1651
|
* Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1568
1652
|
*
|
|
1569
|
-
* @see {@link https://discord.com/developers/
|
|
1653
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-guild-emojis}
|
|
1570
1654
|
*/
|
|
1571
1655
|
getEmojis: (guildId: BigString) => Promise<Camelize<DiscordEmoji>[]>;
|
|
1572
1656
|
/**
|
|
@@ -1577,7 +1661,7 @@ export interface RestManager {
|
|
|
1577
1661
|
* @remarks
|
|
1578
1662
|
* Always includes the `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API.
|
|
1579
1663
|
*
|
|
1580
|
-
* @see {@link https://discord.com/developers/
|
|
1664
|
+
* @see {@link https://docs.discord.com/developers/resources/emoji#list-application-emojis}
|
|
1581
1665
|
*/
|
|
1582
1666
|
getApplicationEmojis: () => Promise<{
|
|
1583
1667
|
items: Camelize<DiscordEmoji>[];
|
|
@@ -1596,7 +1680,7 @@ export interface RestManager {
|
|
|
1596
1680
|
*
|
|
1597
1681
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1598
1682
|
*
|
|
1599
|
-
* @see {@link https://discord.com/developers/
|
|
1683
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-followup-message}
|
|
1600
1684
|
*/
|
|
1601
1685
|
getFollowupMessage: (token: string, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1602
1686
|
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
|
|
@@ -1607,7 +1691,7 @@ export interface RestManager {
|
|
|
1607
1691
|
* @param commandId - The ID of the command to get.
|
|
1608
1692
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1609
1693
|
*
|
|
1610
|
-
* @see {@link https://discord.com/developers/
|
|
1694
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-command}
|
|
1611
1695
|
*/
|
|
1612
1696
|
getGlobalApplicationCommand: (commandId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1613
1697
|
/**
|
|
@@ -1616,7 +1700,7 @@ export interface RestManager {
|
|
|
1616
1700
|
* @param options - The parameters for the fetching of global application commands
|
|
1617
1701
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1618
1702
|
*
|
|
1619
|
-
* @see {@link https://discord.com/developers/
|
|
1703
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commands}
|
|
1620
1704
|
*/
|
|
1621
1705
|
getGlobalApplicationCommands: (options?: GetGlobalApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1622
1706
|
/**
|
|
@@ -1626,7 +1710,7 @@ export interface RestManager {
|
|
|
1626
1710
|
* @param options - The parameters for the fetching of the guild.
|
|
1627
1711
|
* @returns An instance of {@link DiscordGuild}.
|
|
1628
1712
|
*
|
|
1629
|
-
* @see {@link https://discord.com/developers/
|
|
1713
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild}
|
|
1630
1714
|
*/
|
|
1631
1715
|
getGuild: (guildId: BigString, options?: {
|
|
1632
1716
|
counts?: boolean;
|
|
@@ -1641,7 +1725,7 @@ export interface RestManager {
|
|
|
1641
1725
|
* @remarks
|
|
1642
1726
|
* If used with an access token, the token needs to have the `guilds` scope
|
|
1643
1727
|
*
|
|
1644
|
-
* @see {@link https://discord.com/developers/
|
|
1728
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guilds}
|
|
1645
1729
|
*/
|
|
1646
1730
|
getGuilds: (bearerToken?: string, options?: GetUserGuilds) => Promise<Partial<Camelize<DiscordGuild>>[]>;
|
|
1647
1731
|
/**
|
|
@@ -1651,7 +1735,7 @@ export interface RestManager {
|
|
|
1651
1735
|
* @param commandId - The ID of the command to get.
|
|
1652
1736
|
* @returns An instance of {@link DiscordApplicationCommand}.
|
|
1653
1737
|
*
|
|
1654
|
-
* @see {@link https://discord.com/developers/
|
|
1738
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command}
|
|
1655
1739
|
*/
|
|
1656
1740
|
getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<Camelize<DiscordApplicationCommand>>;
|
|
1657
1741
|
/**
|
|
@@ -1661,7 +1745,7 @@ export interface RestManager {
|
|
|
1661
1745
|
* @param options - The parameters for the fetching of guild application commands
|
|
1662
1746
|
* @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
|
|
1663
1747
|
*
|
|
1664
|
-
* @see {@link https://discord.com/developers/
|
|
1748
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commandss}
|
|
1665
1749
|
*/
|
|
1666
1750
|
getGuildApplicationCommands: (guildId: BigString, options?: GetGuildApplicationCommandsOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
1667
1751
|
/**
|
|
@@ -1673,7 +1757,7 @@ export interface RestManager {
|
|
|
1673
1757
|
* @remarks
|
|
1674
1758
|
* If the bot user is not in the guild, the guild must be discoverable.
|
|
1675
1759
|
*
|
|
1676
|
-
* @see {@link https://discord.com/developers/
|
|
1760
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-preview}
|
|
1677
1761
|
*/
|
|
1678
1762
|
getGuildPreview: (guildId: BigString) => Promise<Camelize<DiscordGuildPreview>>;
|
|
1679
1763
|
/**
|
|
@@ -1685,7 +1769,7 @@ export interface RestManager {
|
|
|
1685
1769
|
*
|
|
1686
1770
|
* @remarks Includes the user field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1687
1771
|
*
|
|
1688
|
-
* @see {@link https://discord.com/developers/
|
|
1772
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-guild-sticker}
|
|
1689
1773
|
*/
|
|
1690
1774
|
getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
1691
1775
|
/**
|
|
@@ -1696,7 +1780,7 @@ export interface RestManager {
|
|
|
1696
1780
|
*
|
|
1697
1781
|
* @remarks Includes user fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
1698
1782
|
*
|
|
1699
|
-
* @see {@link https://discord.com/developers/
|
|
1783
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-guild-stickers}
|
|
1700
1784
|
*/
|
|
1701
1785
|
getGuildStickers: (guildId: BigString) => Promise<Camelize<DiscordSticker>[]>;
|
|
1702
1786
|
/**
|
|
@@ -1708,7 +1792,7 @@ export interface RestManager {
|
|
|
1708
1792
|
* @remarks
|
|
1709
1793
|
* Requires the `MANAGE_GUILD` permission.
|
|
1710
1794
|
*
|
|
1711
|
-
* @see {@link https://discord.com/developers/
|
|
1795
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-template}
|
|
1712
1796
|
*/
|
|
1713
1797
|
getGuildTemplate: (templateCode: string) => Promise<Camelize<DiscordTemplate>>;
|
|
1714
1798
|
/**
|
|
@@ -1720,7 +1804,7 @@ export interface RestManager {
|
|
|
1720
1804
|
* @remarks
|
|
1721
1805
|
* Requires the `MANAGE_GUILD` permission.
|
|
1722
1806
|
*
|
|
1723
|
-
* @see {@link https://discord.com/developers/
|
|
1807
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
1724
1808
|
*/
|
|
1725
1809
|
getGuildTemplates: (guildId: BigString) => Promise<Camelize<DiscordTemplate>[]>;
|
|
1726
1810
|
/**
|
|
@@ -1732,7 +1816,7 @@ export interface RestManager {
|
|
|
1732
1816
|
* @remarks
|
|
1733
1817
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1734
1818
|
*
|
|
1735
|
-
* @see {@link https://discord.com/developers/
|
|
1819
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-guild-webhooks}
|
|
1736
1820
|
*/
|
|
1737
1821
|
getGuildWebhooks: (guildId: BigString) => Promise<Camelize<DiscordWebhook>[]>;
|
|
1738
1822
|
/**
|
|
@@ -1744,7 +1828,7 @@ export interface RestManager {
|
|
|
1744
1828
|
* @remarks
|
|
1745
1829
|
* Requires the `MANAGE_GUILD` permission.
|
|
1746
1830
|
*
|
|
1747
|
-
* @see {@link https://discord.com/developers/
|
|
1831
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-integrations}
|
|
1748
1832
|
*/
|
|
1749
1833
|
getIntegrations: (guildId: BigString) => Promise<Camelize<DiscordIntegration>[]>;
|
|
1750
1834
|
/**
|
|
@@ -1754,7 +1838,7 @@ export interface RestManager {
|
|
|
1754
1838
|
* @param options - The parameters for the fetching of the invite.
|
|
1755
1839
|
* @returns An instance of {@link DiscordInviteMetadata}.
|
|
1756
1840
|
*
|
|
1757
|
-
* @see {@link https://discord.com/developers/
|
|
1841
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1758
1842
|
*/
|
|
1759
1843
|
getInvite: (inviteCode: string, options?: GetInvite) => Promise<Camelize<DiscordInviteMetadata>>;
|
|
1760
1844
|
/**
|
|
@@ -1764,9 +1848,9 @@ export interface RestManager {
|
|
|
1764
1848
|
* @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
|
|
1765
1849
|
*
|
|
1766
1850
|
* @remarks
|
|
1767
|
-
* Requires the `MANAGE_GUILD` permission.
|
|
1851
|
+
* Requires the `MANAGE_GUILD` or `VIEW_AUDIT_LOG` permission.
|
|
1768
1852
|
*
|
|
1769
|
-
* @see {@link https://discord.com/developers/
|
|
1853
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invites}
|
|
1770
1854
|
*/
|
|
1771
1855
|
getInvites: (guildId: BigString) => Promise<Camelize<DiscordInviteMetadata>[]>;
|
|
1772
1856
|
/**
|
|
@@ -1782,7 +1866,7 @@ export interface RestManager {
|
|
|
1782
1866
|
* If getting a message from a guild channel:
|
|
1783
1867
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1784
1868
|
*
|
|
1785
|
-
* @see {@link https://discord.com/developers/
|
|
1869
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-message}
|
|
1786
1870
|
*/
|
|
1787
1871
|
getMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
1788
1872
|
/**
|
|
@@ -1798,7 +1882,7 @@ export interface RestManager {
|
|
|
1798
1882
|
* If getting a messages from a guild channel:
|
|
1799
1883
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1800
1884
|
*
|
|
1801
|
-
* @see {@link https://discord.com/developers/
|
|
1885
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-channel-messages}
|
|
1802
1886
|
*/
|
|
1803
1887
|
getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<Camelize<DiscordMessage>[]>;
|
|
1804
1888
|
/**
|
|
@@ -1806,7 +1890,7 @@ export interface RestManager {
|
|
|
1806
1890
|
*
|
|
1807
1891
|
* @returns A {@link DiscordStickerPack} object.
|
|
1808
1892
|
*
|
|
1809
|
-
* @see {@link https://discord.com/developers/
|
|
1893
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker-pack}
|
|
1810
1894
|
*/
|
|
1811
1895
|
getStickerPack: (stickerPackId: BigString) => Promise<Camelize<DiscordStickerPack>>;
|
|
1812
1896
|
/**
|
|
@@ -1814,7 +1898,7 @@ export interface RestManager {
|
|
|
1814
1898
|
*
|
|
1815
1899
|
* @returns A collection of {@link DiscordStickerPack} objects assorted by sticker ID.
|
|
1816
1900
|
*
|
|
1817
|
-
* @see {@link https://discord.com/developers/
|
|
1901
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#list-sticker-packs}
|
|
1818
1902
|
*/
|
|
1819
1903
|
getStickerPacks: () => Promise<Camelize<DiscordStickerPack>[]>;
|
|
1820
1904
|
/**
|
|
@@ -1830,7 +1914,7 @@ export interface RestManager {
|
|
|
1830
1914
|
*
|
|
1831
1915
|
* Does not support ephemeral follow-up messages due to these being stateless.
|
|
1832
1916
|
*
|
|
1833
|
-
* @see {@link https://discord.com/developers/
|
|
1917
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-original-interaction-response}
|
|
1834
1918
|
*/
|
|
1835
1919
|
getOriginalInteractionResponse: (token: string) => Promise<Camelize<DiscordMessage>>;
|
|
1836
1920
|
/**
|
|
@@ -1845,7 +1929,7 @@ export interface RestManager {
|
|
|
1845
1929
|
*
|
|
1846
1930
|
* If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned.
|
|
1847
1931
|
*
|
|
1848
|
-
* @see {@link https://discord.com/developers/
|
|
1932
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-channel-pins}
|
|
1849
1933
|
*/
|
|
1850
1934
|
getChannelPins: (channelId: BigString, options?: GetChannelPinsOptions) => Promise<Camelize<DiscordGetChannelPins>>;
|
|
1851
1935
|
/**
|
|
@@ -1860,7 +1944,7 @@ export interface RestManager {
|
|
|
1860
1944
|
* If getting a message from a guild channel:
|
|
1861
1945
|
* - Requires the `READ_MESSAGE_HISTORY` permission.
|
|
1862
1946
|
*
|
|
1863
|
-
* @see {@link https://discord.com/developers/
|
|
1947
|
+
* @see {@link https://docs.discord.com/developers/resources/message#get-pinned-messages-deprecated}
|
|
1864
1948
|
* @deprecated Use {@link getChannelPins} instead.
|
|
1865
1949
|
*/
|
|
1866
1950
|
getPinnedMessages: (channelId: BigString) => Promise<Camelize<DiscordMessage>[]>;
|
|
@@ -1879,7 +1963,7 @@ export interface RestManager {
|
|
|
1879
1963
|
*
|
|
1880
1964
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1881
1965
|
*
|
|
1882
|
-
* @see {@link https://discord.com/developers/
|
|
1966
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-private-archived-threads}
|
|
1883
1967
|
*/
|
|
1884
1968
|
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1885
1969
|
/**
|
|
@@ -1896,7 +1980,7 @@ export interface RestManager {
|
|
|
1896
1980
|
*
|
|
1897
1981
|
* Threads are ordered by the `id` property in descending order.
|
|
1898
1982
|
*
|
|
1899
|
-
* @see {@link https://discord.com/developers/
|
|
1983
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads}
|
|
1900
1984
|
*/
|
|
1901
1985
|
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1902
1986
|
/**
|
|
@@ -1909,7 +1993,7 @@ export interface RestManager {
|
|
|
1909
1993
|
* @remarks
|
|
1910
1994
|
* Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions.
|
|
1911
1995
|
*
|
|
1912
|
-
* @see {@link https://discord.com/developers/
|
|
1996
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-prune-count}
|
|
1913
1997
|
*/
|
|
1914
1998
|
getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>;
|
|
1915
1999
|
/**
|
|
@@ -1927,7 +2011,7 @@ export interface RestManager {
|
|
|
1927
2011
|
*
|
|
1928
2012
|
* Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
|
|
1929
2013
|
*
|
|
1930
|
-
* @see {@link https://discord.com/developers/
|
|
2014
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-public-archived-threads}
|
|
1931
2015
|
*/
|
|
1932
2016
|
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>;
|
|
1933
2017
|
/**
|
|
@@ -1939,7 +2023,7 @@ export interface RestManager {
|
|
|
1939
2023
|
* @remarks
|
|
1940
2024
|
* ⚠️ This endpoint should be used sparingly due to {@link DiscordRole} objects already being included in guild payloads.
|
|
1941
2025
|
*
|
|
1942
|
-
* @see {@link https://discord.com/developers/
|
|
2026
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-roles}
|
|
1943
2027
|
*/
|
|
1944
2028
|
getRoles: (guildId: BigString) => Promise<Camelize<DiscordRole>[]>;
|
|
1945
2029
|
/**
|
|
@@ -1949,7 +2033,7 @@ export interface RestManager {
|
|
|
1949
2033
|
* @param roleId - The ID of the role.
|
|
1950
2034
|
* @returns A {@link DiscordRole} object.
|
|
1951
2035
|
*
|
|
1952
|
-
* @see {@link https://discord.com/developers/
|
|
2036
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role}
|
|
1953
2037
|
*/
|
|
1954
2038
|
getRole: (guildId: BigString, roleId: BigString) => Promise<Camelize<DiscordRole>>;
|
|
1955
2039
|
/**
|
|
@@ -1960,7 +2044,7 @@ export interface RestManager {
|
|
|
1960
2044
|
* @param options - The parameters for the fetching of the scheduled event.
|
|
1961
2045
|
* @returns An instance of {@link DiscordScheduledEvent}.
|
|
1962
2046
|
*
|
|
1963
|
-
* @see {@link https://discord.com/developers/
|
|
2047
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event}
|
|
1964
2048
|
*/
|
|
1965
2049
|
getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
|
|
1966
2050
|
withUserCount?: boolean;
|
|
@@ -1972,7 +2056,7 @@ export interface RestManager {
|
|
|
1972
2056
|
* @param options - The parameters for the fetching of the scheduled events.
|
|
1973
2057
|
* @returns A collection of {@link DiscordScheduledEvent} objects assorted by event ID.
|
|
1974
2058
|
*
|
|
1975
|
-
* @see {@link https://discord.com/developers/
|
|
2059
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#list-scheduled-events-for-guild}
|
|
1976
2060
|
*/
|
|
1977
2061
|
getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<Camelize<DiscordScheduledEvent>[]>;
|
|
1978
2062
|
/**
|
|
@@ -1988,7 +2072,7 @@ export interface RestManager {
|
|
|
1988
2072
|
*
|
|
1989
2073
|
* Users are ordered by their IDs in _ascending_ order.
|
|
1990
2074
|
*
|
|
1991
|
-
* @see {@link https://discord.com/developers/
|
|
2075
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event-users}
|
|
1992
2076
|
*/
|
|
1993
2077
|
getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
|
|
1994
2078
|
user: Camelize<DiscordUser>;
|
|
@@ -2002,7 +2086,7 @@ export interface RestManager {
|
|
|
2002
2086
|
* @param channelId - The ID of the stage channel the stage instance is associated with.
|
|
2003
2087
|
* @returns An instance of {@link DiscordStageInstance}.
|
|
2004
2088
|
*
|
|
2005
|
-
* @see {@link https://discord.com/developers/
|
|
2089
|
+
* @see {@link https://docs.discord.com/developers/resources/stage-instance#get-stage-instance}
|
|
2006
2090
|
*/
|
|
2007
2091
|
getStageInstance: (channelId: BigString) => Promise<Camelize<DiscordStageInstance>>;
|
|
2008
2092
|
/**
|
|
@@ -2011,7 +2095,7 @@ export interface RestManager {
|
|
|
2011
2095
|
* @param guildId - The ID of the guild to get the voice state from.
|
|
2012
2096
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2013
2097
|
*
|
|
2014
|
-
* @see {@link https://discord.com/developers/
|
|
2098
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-current-user-voice-state}
|
|
2015
2099
|
*/
|
|
2016
2100
|
getOwnVoiceState: (guildId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2017
2101
|
/**
|
|
@@ -2021,7 +2105,10 @@ export interface RestManager {
|
|
|
2021
2105
|
* @param userId - The ID of the user to get the voice state from
|
|
2022
2106
|
* @returns An instance of {@link DiscordVoiceState}.
|
|
2023
2107
|
*
|
|
2024
|
-
* @
|
|
2108
|
+
* @remarks
|
|
2109
|
+
* If the specified user is connected to a voice channel, the current user must have permission to connect to the channel.
|
|
2110
|
+
*
|
|
2111
|
+
* @see {@link https://docs.discord.com/developers/resources/voice#get-user-voice-state}
|
|
2025
2112
|
*/
|
|
2026
2113
|
getUserVoiceState: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordVoiceState>>;
|
|
2027
2114
|
/**
|
|
@@ -2030,7 +2117,7 @@ export interface RestManager {
|
|
|
2030
2117
|
* @param stickerId The ID of the sticker to get
|
|
2031
2118
|
* @returns A {@link DiscordSticker}
|
|
2032
2119
|
*
|
|
2033
|
-
* @see {@link https://discord.com/developers/
|
|
2120
|
+
* @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker}
|
|
2034
2121
|
*/
|
|
2035
2122
|
getSticker: (stickerId: BigString) => Promise<Camelize<DiscordSticker>>;
|
|
2036
2123
|
/**
|
|
@@ -2041,7 +2128,7 @@ export interface RestManager {
|
|
|
2041
2128
|
* @param options - The parameters for the fetching of the thread member.
|
|
2042
2129
|
* @returns An instance of {@link DiscordThreadMember}.
|
|
2043
2130
|
*
|
|
2044
|
-
* @see {@link https://discord.com/developers/
|
|
2131
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-thread-member}
|
|
2045
2132
|
*/
|
|
2046
2133
|
getThreadMember: (channelId: BigString, userId: BigString, options?: GetThreadMember) => Promise<Camelize<DiscordThreadMember>>;
|
|
2047
2134
|
/**
|
|
@@ -2054,7 +2141,7 @@ export interface RestManager {
|
|
|
2054
2141
|
* @remarks
|
|
2055
2142
|
* Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
|
|
2056
2143
|
*
|
|
2057
|
-
* @see {@link https://discord.com/developers/
|
|
2144
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#list-thread-members}
|
|
2058
2145
|
*/
|
|
2059
2146
|
getThreadMembers: (channelId: BigString, options?: ListThreadMembers) => Promise<Camelize<DiscordThreadMember>[]>;
|
|
2060
2147
|
/**
|
|
@@ -2066,7 +2153,7 @@ export interface RestManager {
|
|
|
2066
2153
|
* @param options - The parameters for the fetching of the users.
|
|
2067
2154
|
* @returns A collection of {@link DiscordUser} objects assorted by user ID.
|
|
2068
2155
|
*
|
|
2069
|
-
* @see {@link https://discord.com/developers/
|
|
2156
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#get-reactions}
|
|
2070
2157
|
*/
|
|
2071
2158
|
getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<Camelize<DiscordUser>[]>;
|
|
2072
2159
|
/**
|
|
@@ -2108,7 +2195,7 @@ export interface RestManager {
|
|
|
2108
2195
|
* @remarks
|
|
2109
2196
|
* The access token requires the `role_connections.write` scope.
|
|
2110
2197
|
*
|
|
2111
|
-
* @see {@link https://discord.com/developers/
|
|
2198
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-user-application-role-connection}
|
|
2112
2199
|
*/
|
|
2113
2200
|
getUserApplicationRoleConnection: (bearerToken: string, applicationId: BigString) => Promise<Camelize<DiscordApplicationRoleConnection>>;
|
|
2114
2201
|
/**
|
|
@@ -2122,7 +2209,7 @@ export interface RestManager {
|
|
|
2122
2209
|
*
|
|
2123
2210
|
* The `code` property will be `null` if the guild does not have a set vanity url.
|
|
2124
2211
|
*
|
|
2125
|
-
* @see {@link https://discord.com/developers/
|
|
2212
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-vanity-url}
|
|
2126
2213
|
*/
|
|
2127
2214
|
getVanityUrl: (guildId: BigString) => Promise<Camelize<DiscordVanityUrl>>;
|
|
2128
2215
|
/**
|
|
@@ -2131,7 +2218,7 @@ export interface RestManager {
|
|
|
2131
2218
|
* @param guildId - The ID of the guild to get the voice regions for.
|
|
2132
2219
|
* @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
|
|
2133
2220
|
*
|
|
2134
|
-
* @see {@link https://discord.com/developers/
|
|
2221
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-voice-regions}
|
|
2135
2222
|
*/
|
|
2136
2223
|
getVoiceRegions: (guildId: BigString) => Promise<Camelize<DiscordVoiceRegion>[]>;
|
|
2137
2224
|
/**
|
|
@@ -2143,7 +2230,7 @@ export interface RestManager {
|
|
|
2143
2230
|
* @remarks
|
|
2144
2231
|
* Requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook.
|
|
2145
2232
|
*
|
|
2146
|
-
* @see {@link https://discord.com/developers/
|
|
2233
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook}
|
|
2147
2234
|
*/
|
|
2148
2235
|
getWebhook: (webhookId: BigString) => Promise<Camelize<DiscordWebhook>>;
|
|
2149
2236
|
/**
|
|
@@ -2155,7 +2242,7 @@ export interface RestManager {
|
|
|
2155
2242
|
* @param options - The parameters for the fetching of the message.
|
|
2156
2243
|
* @returns An instance of {@link DiscordMessage}.
|
|
2157
2244
|
*
|
|
2158
|
-
* @see {@link https://discord.com/developers/
|
|
2245
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-message}
|
|
2159
2246
|
*/
|
|
2160
2247
|
getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2161
2248
|
/**
|
|
@@ -2165,7 +2252,7 @@ export interface RestManager {
|
|
|
2165
2252
|
* @param token - The webhook token, used to get the webhook.
|
|
2166
2253
|
* @returns An instance of {@link DiscordWebhook}.
|
|
2167
2254
|
*
|
|
2168
|
-
* @see {@link https://discord.com/developers/
|
|
2255
|
+
* @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-with-token}
|
|
2169
2256
|
*/
|
|
2170
2257
|
getWebhookWithToken: (webhookId: BigString, token: string) => Promise<Camelize<DiscordWebhook>>;
|
|
2171
2258
|
/**
|
|
@@ -2178,7 +2265,7 @@ export interface RestManager {
|
|
|
2178
2265
|
* If the welcome screen is not enabled:
|
|
2179
2266
|
* - Requires the `MANAGE_GUILD` permission.
|
|
2180
2267
|
*
|
|
2181
|
-
* @see {@link https://discord.com/developers/
|
|
2268
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-welcome-screen}
|
|
2182
2269
|
*/
|
|
2183
2270
|
getWelcomeScreen: (guildId: BigString) => Promise<Camelize<DiscordWelcomeScreen>>;
|
|
2184
2271
|
/**
|
|
@@ -2190,7 +2277,7 @@ export interface RestManager {
|
|
|
2190
2277
|
* @remarks
|
|
2191
2278
|
* Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
|
|
2192
2279
|
*
|
|
2193
|
-
* @see {@link https://discord.com/developers/
|
|
2280
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget}
|
|
2194
2281
|
*/
|
|
2195
2282
|
getWidget: (guildId: BigString) => Promise<Camelize<DiscordGuildWidget>>;
|
|
2196
2283
|
/**
|
|
@@ -2202,7 +2289,7 @@ export interface RestManager {
|
|
|
2202
2289
|
* @remarks
|
|
2203
2290
|
* Requires the `MANAGE_GUILD` permission.
|
|
2204
2291
|
*
|
|
2205
|
-
* @see {@link https://discord.com/developers/
|
|
2292
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget-settings}
|
|
2206
2293
|
*/
|
|
2207
2294
|
getWidgetSettings: (guildId: BigString) => Promise<Camelize<DiscordGuildWidgetSettings>>;
|
|
2208
2295
|
/**
|
|
@@ -2215,7 +2302,7 @@ export interface RestManager {
|
|
|
2215
2302
|
*
|
|
2216
2303
|
* Fires a _Thread Members Update_ gateway event.
|
|
2217
2304
|
*
|
|
2218
|
-
* @see {@link https://discord.com/developers/
|
|
2305
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#join-thread}
|
|
2219
2306
|
*/
|
|
2220
2307
|
joinThread: (channelId: BigString) => Promise<void>;
|
|
2221
2308
|
/**
|
|
@@ -2226,7 +2313,7 @@ export interface RestManager {
|
|
|
2226
2313
|
* @remarks
|
|
2227
2314
|
* Fires a _Guild Delete_ event.
|
|
2228
2315
|
*
|
|
2229
|
-
* @see {@link https://discord.com/developers/
|
|
2316
|
+
* @see {@link https://docs.discord.com/developers/resources/user#leave-guild}
|
|
2230
2317
|
*/
|
|
2231
2318
|
leaveGuild: (guildId: BigString) => Promise<void>;
|
|
2232
2319
|
/**
|
|
@@ -2239,7 +2326,7 @@ export interface RestManager {
|
|
|
2239
2326
|
*
|
|
2240
2327
|
* Fires a _Thread Members Update_ gateway event.
|
|
2241
2328
|
*
|
|
2242
|
-
* @see {@link https://discord.com/developers/
|
|
2329
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#leave-thread}
|
|
2243
2330
|
*/
|
|
2244
2331
|
leaveThread: (channelId: BigString) => Promise<void>;
|
|
2245
2332
|
/**
|
|
@@ -2257,7 +2344,7 @@ export interface RestManager {
|
|
|
2257
2344
|
*
|
|
2258
2345
|
* Fires a _Message Create_ event in the guilds the subscribed channels are in.
|
|
2259
2346
|
*
|
|
2260
|
-
* @see {@link https://discord.com/developers/
|
|
2347
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#crosspost-message}
|
|
2261
2348
|
*/
|
|
2262
2349
|
publishMessage: (channelId: BigString, messageId: BigString) => Promise<Camelize<DiscordMessage>>;
|
|
2263
2350
|
/**
|
|
@@ -2273,7 +2360,7 @@ export interface RestManager {
|
|
|
2273
2360
|
*
|
|
2274
2361
|
* Fires a _Guild Member Update_ gateway event.
|
|
2275
2362
|
*
|
|
2276
|
-
* @see {@link https://discord.com/developers/
|
|
2363
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member-role}
|
|
2277
2364
|
*/
|
|
2278
2365
|
removeRole: (guildId: BigString, userId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
2279
2366
|
/**
|
|
@@ -2290,7 +2377,7 @@ export interface RestManager {
|
|
|
2290
2377
|
*
|
|
2291
2378
|
* Fires a _Thread Members Update_ gateway event.
|
|
2292
2379
|
*
|
|
2293
|
-
* @see {@link https://discord.com/developers/
|
|
2380
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#remove-thread-member}
|
|
2294
2381
|
*/
|
|
2295
2382
|
removeThreadMember: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2296
2383
|
/**
|
|
@@ -2299,7 +2386,7 @@ export interface RestManager {
|
|
|
2299
2386
|
* @param channelId - The ID of the channel to remove the recipient user of.
|
|
2300
2387
|
* @param userId - The user ID of the user to remove.
|
|
2301
2388
|
*
|
|
2302
|
-
* @see {@link https://discord.com/developers/
|
|
2389
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#group-dm-remove-recipient}
|
|
2303
2390
|
*/
|
|
2304
2391
|
removeDmRecipient: (channelId: BigString, userId: BigString) => Promise<void>;
|
|
2305
2392
|
/**
|
|
@@ -2326,7 +2413,7 @@ export interface RestManager {
|
|
|
2326
2413
|
*
|
|
2327
2414
|
* Fires a _Message Create_ gateway event.
|
|
2328
2415
|
*
|
|
2329
|
-
* @see {@link https://discord.com/developers/
|
|
2416
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#create-message}
|
|
2330
2417
|
*/
|
|
2331
2418
|
sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<Camelize<DiscordMessage>>;
|
|
2332
2419
|
/**
|
|
@@ -2350,7 +2437,7 @@ export interface RestManager {
|
|
|
2350
2437
|
*
|
|
2351
2438
|
* Fires a _Message Create_ event.
|
|
2352
2439
|
*
|
|
2353
|
-
* @see {@link https://discord.com/developers/
|
|
2440
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-followup-message}
|
|
2354
2441
|
*/
|
|
2355
2442
|
sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<Camelize<DiscordMessage>>;
|
|
2356
2443
|
/**
|
|
@@ -2373,7 +2460,7 @@ export interface RestManager {
|
|
|
2373
2460
|
*
|
|
2374
2461
|
* Fires a _Message Create_ event.
|
|
2375
2462
|
*
|
|
2376
|
-
* @see {@link https://discord.com/developers/
|
|
2463
|
+
* @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-interaction-response}
|
|
2377
2464
|
*/
|
|
2378
2465
|
sendInteractionResponse: (interactionId: BigString, token: string, options: InteractionResponse, params?: InteractionCallbackOptions) => Promise<void | Camelize<DiscordInteractionCallbackResponse>>;
|
|
2379
2466
|
/**
|
|
@@ -2394,7 +2481,7 @@ export interface RestManager {
|
|
|
2394
2481
|
*
|
|
2395
2482
|
* Fires a _Thread Create_ gateway event.
|
|
2396
2483
|
*
|
|
2397
|
-
* @see {@link https://discord.com/developers/
|
|
2484
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
|
|
2398
2485
|
*/
|
|
2399
2486
|
startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2400
2487
|
/**
|
|
@@ -2410,7 +2497,7 @@ export interface RestManager {
|
|
|
2410
2497
|
*
|
|
2411
2498
|
* Fires a _Thread Create_ gateway event.
|
|
2412
2499
|
*
|
|
2413
|
-
* @see {@link https://discord.com/developers/
|
|
2500
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
|
|
2414
2501
|
*/
|
|
2415
2502
|
startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<Camelize<DiscordChannel>>;
|
|
2416
2503
|
/**
|
|
@@ -2447,7 +2534,7 @@ export interface RestManager {
|
|
|
2447
2534
|
*
|
|
2448
2535
|
* Fires a _Guild Update_ gateway event.
|
|
2449
2536
|
*
|
|
2450
|
-
* @see {@link https://discord.com/developers/
|
|
2537
|
+
* @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
|
|
2451
2538
|
*/
|
|
2452
2539
|
syncGuildTemplate: (guildId: BigString) => Promise<Camelize<DiscordTemplate>>;
|
|
2453
2540
|
/**
|
|
@@ -2462,7 +2549,7 @@ export interface RestManager {
|
|
|
2462
2549
|
*
|
|
2463
2550
|
* Fires a _Typing Start_ gateway event.
|
|
2464
2551
|
*
|
|
2465
|
-
* @see {@link https://discord.com/developers/
|
|
2552
|
+
* @see {@link https://docs.discord.com/developers/resources/channel#trigger-typing-indicator}
|
|
2466
2553
|
*/
|
|
2467
2554
|
triggerTypingIndicator: (channelId: BigString) => Promise<void>;
|
|
2468
2555
|
/**
|
|
@@ -2480,7 +2567,7 @@ export interface RestManager {
|
|
|
2480
2567
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2481
2568
|
* You will be able to update only your own application commands
|
|
2482
2569
|
*
|
|
2483
|
-
* @see {@link https://discord.com/developers/
|
|
2570
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-global-application-commands}
|
|
2484
2571
|
*/
|
|
2485
2572
|
upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2486
2573
|
/**
|
|
@@ -2499,7 +2586,7 @@ export interface RestManager {
|
|
|
2499
2586
|
* When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
|
|
2500
2587
|
* You will be able to update only your own application commands
|
|
2501
2588
|
*
|
|
2502
|
-
* @see {@link https://discord.com/developers/
|
|
2589
|
+
* @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-guild-application-commands}
|
|
2503
2590
|
*/
|
|
2504
2591
|
upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions) => Promise<Camelize<DiscordApplicationCommand>[]>;
|
|
2505
2592
|
/**
|
|
@@ -2515,7 +2602,7 @@ export interface RestManager {
|
|
|
2515
2602
|
*
|
|
2516
2603
|
* Fires a _Guild Ban Add_ gateway event.
|
|
2517
2604
|
*
|
|
2518
|
-
* @see {@link https://discord.com/developers/
|
|
2605
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#create-guild-ban}
|
|
2519
2606
|
*/
|
|
2520
2607
|
banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
|
|
2521
2608
|
/**
|
|
@@ -2532,7 +2619,7 @@ export interface RestManager {
|
|
|
2532
2619
|
*
|
|
2533
2620
|
* Fires as many _Guild Ban Add_ gateway events as many user where banned.
|
|
2534
2621
|
*
|
|
2535
|
-
* @see {@link https://discord.com/developers/
|
|
2622
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#bulk-guild-ban}
|
|
2536
2623
|
*/
|
|
2537
2624
|
bulkBanMembers: (guildId: BigString, options: CreateGuildBulkBan, reason?: string) => Promise<Camelize<DiscordBulkBan>>;
|
|
2538
2625
|
/**
|
|
@@ -2546,9 +2633,9 @@ export interface RestManager {
|
|
|
2546
2633
|
* @remarks
|
|
2547
2634
|
* Fires a _Guild Member Update_ gateway event.
|
|
2548
2635
|
*
|
|
2549
|
-
* @see {@link https://discord.com/developers/
|
|
2636
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-current-member}
|
|
2550
2637
|
*/
|
|
2551
|
-
|
|
2638
|
+
editCurrentMember: (guildId: BigString, options: ModifyCurrentMember, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2552
2639
|
/**
|
|
2553
2640
|
* Edits a member's properties.
|
|
2554
2641
|
*
|
|
@@ -2563,20 +2650,9 @@ export interface RestManager {
|
|
|
2563
2650
|
*
|
|
2564
2651
|
* Fires a _Guild Member Update_ gateway event.
|
|
2565
2652
|
*
|
|
2566
|
-
* @see {@link https://discord.com/developers/
|
|
2653
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-member}
|
|
2567
2654
|
*/
|
|
2568
2655
|
editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<Camelize<DiscordMember>>;
|
|
2569
|
-
/**
|
|
2570
|
-
* Gets the member object by user ID.
|
|
2571
|
-
*
|
|
2572
|
-
|
|
2573
|
-
* @param guildId - The ID of the guild to get the member object for.
|
|
2574
|
-
* @param userId - The ID of the user to get the member object for.
|
|
2575
|
-
* @returns An instance of {@link DiscordMemberWithUser}.
|
|
2576
|
-
*
|
|
2577
|
-
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
|
|
2578
|
-
*/
|
|
2579
|
-
getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2580
2656
|
/**
|
|
2581
2657
|
* Gets the current member object.
|
|
2582
2658
|
*
|
|
@@ -2587,9 +2663,20 @@ export interface RestManager {
|
|
|
2587
2663
|
* @remarks
|
|
2588
2664
|
* The access tokens needs the `guilds.members.read` scope
|
|
2589
2665
|
*
|
|
2590
|
-
* @see {@link https://discord.com/developers/
|
|
2666
|
+
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guild-member}
|
|
2591
2667
|
*/
|
|
2592
2668
|
getCurrentMember: (guildId: BigString, bearerToken: string) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2669
|
+
/**
|
|
2670
|
+
* Gets the member object by user ID.
|
|
2671
|
+
*
|
|
2672
|
+
|
|
2673
|
+
* @param guildId - The ID of the guild to get the member object for.
|
|
2674
|
+
* @param userId - The ID of the user to get the member object for.
|
|
2675
|
+
* @returns An instance of {@link DiscordMemberWithUser}.
|
|
2676
|
+
*
|
|
2677
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-member}
|
|
2678
|
+
*/
|
|
2679
|
+
getMember: (guildId: BigString, userId: BigString) => Promise<Camelize<DiscordMemberWithUser>>;
|
|
2593
2680
|
/**
|
|
2594
2681
|
* Gets the list of members for a guild.
|
|
2595
2682
|
*
|
|
@@ -2602,11 +2689,11 @@ export interface RestManager {
|
|
|
2602
2689
|
*
|
|
2603
2690
|
* ⚠️ It is not recommended to use this endpoint with very large bots. Instead, opt to use `fetchMembers()`:
|
|
2604
2691
|
* REST communication only permits 50 requests to be made per second, while gateways allow for up to 120 requests
|
|
2605
|
-
* per minute per shard. For more information, read {@link https://discord.com/developers/
|
|
2692
|
+
* per minute per shard. For more information, read {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}.
|
|
2606
2693
|
*
|
|
2607
|
-
* @see {@link https://discord.com/developers/
|
|
2608
|
-
* @see {@link https://discord.com/developers/
|
|
2609
|
-
* @see {@link https://discord.com/developers/
|
|
2694
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#list-guild-members}
|
|
2695
|
+
* @see {@link https://docs.discord.com/developers/events/gateway-events#request-guild-members}
|
|
2696
|
+
* @see {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}
|
|
2610
2697
|
*/
|
|
2611
2698
|
getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2612
2699
|
/**
|
|
@@ -2629,7 +2716,7 @@ export interface RestManager {
|
|
|
2629
2716
|
*
|
|
2630
2717
|
* Fires a _Guild Member Remove_ gateway event.
|
|
2631
2718
|
*
|
|
2632
|
-
* @see {@link https://discord.com/developers/
|
|
2719
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member}
|
|
2633
2720
|
*/
|
|
2634
2721
|
kickMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2635
2722
|
/**
|
|
@@ -2644,7 +2731,7 @@ export interface RestManager {
|
|
|
2644
2731
|
*
|
|
2645
2732
|
* Fires a _Channel Pins Update_ event.
|
|
2646
2733
|
*
|
|
2647
|
-
* @see {@link https://discord.com/developers/
|
|
2734
|
+
* @see {@link https://docs.discord.com/developers/resources/message#pin-message}
|
|
2648
2735
|
*/
|
|
2649
2736
|
pinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2650
2737
|
/**
|
|
@@ -2665,7 +2752,7 @@ export interface RestManager {
|
|
|
2665
2752
|
*
|
|
2666
2753
|
* Fires a _Guild Member Remove_ gateway event for every member kicked.
|
|
2667
2754
|
*
|
|
2668
|
-
* @see {@link https://discord.com/developers/
|
|
2755
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#begin-guild-prune}
|
|
2669
2756
|
*/
|
|
2670
2757
|
pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
|
|
2671
2758
|
pruned: number | null;
|
|
@@ -2679,7 +2766,7 @@ export interface RestManager {
|
|
|
2679
2766
|
* @param options - The parameters for searching through the members.
|
|
2680
2767
|
* @returns A collection of {@link DiscordMember} objects assorted by user ID.
|
|
2681
2768
|
*
|
|
2682
|
-
* @see {@link https://discord.com/developers/
|
|
2769
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#search-guild-members}
|
|
2683
2770
|
*/
|
|
2684
2771
|
searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<Camelize<DiscordMemberWithUser>[]>;
|
|
2685
2772
|
/**
|
|
@@ -2695,7 +2782,7 @@ export interface RestManager {
|
|
|
2695
2782
|
*
|
|
2696
2783
|
* Fires a _Guild Ban Remove_ gateway event.
|
|
2697
2784
|
*
|
|
2698
|
-
* @see {@link https://discord.com/developers/
|
|
2785
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-ban}
|
|
2699
2786
|
*/
|
|
2700
2787
|
unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2701
2788
|
/**
|
|
@@ -2710,7 +2797,7 @@ export interface RestManager {
|
|
|
2710
2797
|
*
|
|
2711
2798
|
* Fires a _Channel Pins Update_ event.
|
|
2712
2799
|
*
|
|
2713
|
-
* @see {@link https://discord.com/developers/
|
|
2800
|
+
* @see {@link https://docs.discord.com/developers/resources/message#unpin-message}
|
|
2714
2801
|
*/
|
|
2715
2802
|
unpinMessage: (channelId: BigString, messageId: BigString, reason?: string) => Promise<void>;
|
|
2716
2803
|
/**
|
|
@@ -2904,6 +2991,18 @@ export interface RestManager {
|
|
|
2904
2991
|
* @returns The created lobby
|
|
2905
2992
|
*/
|
|
2906
2993
|
createLobby: (options: CreateLobby) => Promise<Camelize<DiscordLobby>>;
|
|
2994
|
+
/**
|
|
2995
|
+
* Creates a new lobby for the application identified by a `secret`, or joins the calling user to the existing lobby with that secret if one already exists.
|
|
2996
|
+
*
|
|
2997
|
+
* Updates lobby metadata and the calling member's metadata on join.
|
|
2998
|
+
*
|
|
2999
|
+
* @param options - The options to create or join the lobby
|
|
3000
|
+
* @returns - The created or joined lobby
|
|
3001
|
+
*
|
|
3002
|
+
* @remarks
|
|
3003
|
+
* Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
|
|
3004
|
+
*/
|
|
3005
|
+
createOrJoinLobby: (options: CreateOrJoinLobby) => Promise<Camelize<DiscordLobby>>;
|
|
2907
3006
|
/**
|
|
2908
3007
|
* Returns a lobby object for the specified lobby id, if it exists.
|
|
2909
3008
|
*
|
|
@@ -2937,6 +3036,22 @@ export interface RestManager {
|
|
|
2937
3036
|
* @returns The lobby member object
|
|
2938
3037
|
*/
|
|
2939
3038
|
addMemberToLobby: (lobbyId: BigString, userId: BigString, options: AddLobbyMember) => Promise<Camelize<DiscordLobbyMember>>;
|
|
3039
|
+
/**
|
|
3040
|
+
* Adds, updates, or removes up to 25 members from the specified lobby in a single request.
|
|
3041
|
+
*
|
|
3042
|
+
* @param lobbyId - The ID of the lobby to add, update, or remove members from
|
|
3043
|
+
* @param options - The options to add, update, or remove members from the lobby
|
|
3044
|
+
* @returns Returns an array of lobby member objects for the upserted members. Removed members are not included in the response.
|
|
3045
|
+
*
|
|
3046
|
+
* @remarks
|
|
3047
|
+
* Members with `remove_member: false` (the default) are upserted — added if not present, or updated with the provided metadata and flags if already a member. Members with `remove_member: true` are removed.
|
|
3048
|
+
*
|
|
3049
|
+
* Users unknown to Discord will return a 404 UNKNOWN_USER error.
|
|
3050
|
+
* Users that fail permission checks or who have already reached the maximum number of lobbies per application (and are not already a member of this lobby) are silently dropped from the upsert set.
|
|
3051
|
+
*
|
|
3052
|
+
* @see {@link https://docs.discord.com/developers/resources/lobby#bulk-update-lobby-members}
|
|
3053
|
+
*/
|
|
3054
|
+
bulkUpdateLobbyMembers: (lobbyId: BigString, options: BulkUpdateLobbyMember[]) => Promise<Camelize<DiscordLobbyMember>[]>;
|
|
2940
3055
|
/**
|
|
2941
3056
|
* Removes the provided user from the specified lobby. It is safe to call this even if the user is no longer a member of the lobby, but will fail if the lobby does not exist.
|
|
2942
3057
|
*
|
|
@@ -2979,6 +3094,77 @@ export interface RestManager {
|
|
|
2979
3094
|
* Uses bearer token for authorization and the user must be a lobby member with the CanLinkLobby lobby member flag.
|
|
2980
3095
|
*/
|
|
2981
3096
|
unlinkChannelToLobby: (lobbyId: BigString, bearerToken: string) => Promise<Camelize<DiscordLobby>>;
|
|
3097
|
+
/**
|
|
3098
|
+
* Sets the moderation metadata for a lobby message. The metadata is app-scoped and delivered to active game clients via the Social SDK as a realtime message update.
|
|
3099
|
+
*
|
|
3100
|
+
* @param lobbyId - The ID of the lobby to set the moderation metadata
|
|
3101
|
+
* @param messageId - The ID of the message to set the moderation metadata
|
|
3102
|
+
* @param options - The moderation metadata to set
|
|
3103
|
+
*
|
|
3104
|
+
* @remarks
|
|
3105
|
+
* Uses `Bot` token for authorization.
|
|
3106
|
+
*
|
|
3107
|
+
* For the options: Free-form key–value pairs describing the moderation decision. Up to 5 keys; key length <= 1024 characters; value length <= 2000 characters
|
|
3108
|
+
*
|
|
3109
|
+
* @see {@link https://discord.com/developers/docs/game-sdk/social-sdk/chat-moderation#server-side-chat-moderation} for the full moderation flow.
|
|
3110
|
+
*/
|
|
3111
|
+
updateLobbyMessageModerationMetadata: (lobbyId: BigString, messageId: BigString, options: Record<string, string>) => Promise<void>;
|
|
3112
|
+
/**
|
|
3113
|
+
* Sends a message to the specified lobby. The calling user must be a member of the lobby.
|
|
3114
|
+
*
|
|
3115
|
+
* @param bearerToken - The access token of the user
|
|
3116
|
+
* @param lobbyId - The ID of the lobby to send the message to
|
|
3117
|
+
* @param options - The options to send the message
|
|
3118
|
+
* @returns Returns the created lobby message object.
|
|
3119
|
+
*
|
|
3120
|
+
* @remarks
|
|
3121
|
+
* Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
|
|
3122
|
+
*
|
|
3123
|
+
* If the lobby has a linked channel, the message is also forwarded to that channel.
|
|
3124
|
+
* If forwarding fails (for example, due to AutoMod), the lobby message is still delivered to other lobby members.
|
|
3125
|
+
*/
|
|
3126
|
+
sendLobbyMessage: (bearerToken: string, lobbyId: BigString, options: SendLobbyMessage) => Promise<Camelize<DiscordLobbyMessage>>;
|
|
3127
|
+
/**
|
|
3128
|
+
* Returns the most recent messages in the specified lobby. The calling user must be a member of the lobby.
|
|
3129
|
+
*
|
|
3130
|
+
* @param bearerToken - The access token of the user
|
|
3131
|
+
* @param lobbyId - The ID of the lobby to get the messages from
|
|
3132
|
+
* @param options - The options to get the messages
|
|
3133
|
+
* @returns Returns an array of lobby message objects
|
|
3134
|
+
*
|
|
3135
|
+
* @remarks
|
|
3136
|
+
* Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
|
|
3137
|
+
*/
|
|
3138
|
+
getLobbyMessages: (bearerToken: string, lobbyId: BigString, options?: GetLobbyMessages) => Promise<Camelize<DiscordLobbyMessage>[]>;
|
|
3139
|
+
/**
|
|
3140
|
+
* Creates a single-use guild invite to the lobby's linked channel, targeted at the calling user.
|
|
3141
|
+
*
|
|
3142
|
+
*
|
|
3143
|
+
* @param bearerToken - The access token of the user
|
|
3144
|
+
* @param lobbyId - The ID of the lobby to create the invite for
|
|
3145
|
+
* @returns The created invite object
|
|
3146
|
+
*
|
|
3147
|
+
* @remarks
|
|
3148
|
+
* Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
|
|
3149
|
+
*
|
|
3150
|
+
* The lobby must have a linked channel and the caller must be a member of the lobby.
|
|
3151
|
+
* The invite expires after one hour.
|
|
3152
|
+
*/
|
|
3153
|
+
createLobbyChannelInviteForSelf: (bearerToken: string, lobbyId: BigString) => Promise<Camelize<DiscordLobbyInvite>>;
|
|
3154
|
+
/**
|
|
3155
|
+
* Creates a single-use guild invite to the lobby's linked channel on behalf of an application, targeted at the specified user.
|
|
3156
|
+
*
|
|
3157
|
+
* @param lobbyId - The ID of the lobby to create the invite for
|
|
3158
|
+
* @param userId - The ID of the user to create the invite for
|
|
3159
|
+
* @returns The created invite object
|
|
3160
|
+
*
|
|
3161
|
+
* @remarks
|
|
3162
|
+
* Uses `Bot` token for authorization
|
|
3163
|
+
*
|
|
3164
|
+
* The lobby must have a linked channel.
|
|
3165
|
+
* The invite expires after one hour.
|
|
3166
|
+
*/
|
|
3167
|
+
createLobbyChannelInviteForUser: (lobbyId: BigString, userId: BigString) => Promise<Camelize<DiscordLobbyInvite>>;
|
|
2982
3168
|
}
|
|
2983
3169
|
export type RequestMethods = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT';
|
|
2984
3170
|
export type ApiVersions = 9 | 10;
|
|
@@ -3037,6 +3223,7 @@ export interface RestRequestRejection {
|
|
|
3037
3223
|
/** The returned body parsed if it was JSON, otherwise it will be the raw body as a string */
|
|
3038
3224
|
body?: string | object;
|
|
3039
3225
|
error?: string;
|
|
3226
|
+
errorObject?: Error;
|
|
3040
3227
|
}
|
|
3041
3228
|
export interface RestManagerEvents {
|
|
3042
3229
|
/**
|