@discordeno/rest 22.0.1-next.fca3cbb → 22.0.1-next.fdb61e1

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.
@@ -0,0 +1,3062 @@
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, DiscordSearchGuildMessages, DiscordSearchGuildMessagesIndexing, 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, 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, SearchGuildMessagesOptions, SearchMembers, SendLobbyMessage, SendSoundboardSound, SetVoiceChannelStatus, StartThreadWithMessage, StartThreadWithoutMessage, UpsertGlobalApplicationCommandOptions, UpsertGuildApplicationCommandOptions } from '@discordeno/types';
2
+ import type { RestManager } from './types.js';
3
+ /**
4
+ * @internal You are not supposed to use the functions in this object directly. Use the RestManager instead.
5
+ */
6
+ export declare const restEndpoints: {
7
+ /**
8
+ * Adds a reaction to a message.
9
+ *
10
+ * @param channelId - The ID of the channel the message to add a reaction to is in.
11
+ * @param messageId - The ID of the message to add a reaction to.
12
+ * @param reaction - The reaction to add to the message.
13
+ * @returns
14
+ *
15
+ * @remarks
16
+ * Requires the `READ_MESSAGE_HISTORY` permission.
17
+ *
18
+ * If nobody else has reacted to the message:
19
+ * - Requires the `ADD_REACTIONS` permission.
20
+ *
21
+ * Fires a _Message Reaction Add_ gateway event.
22
+ *
23
+ * @see {@link https://docs.discord.com/developers/resources/channel#create-reaction}
24
+ */
25
+ addReaction(rest: RestManager, channelId: BigString, messageId: BigString, reaction: string): Promise<void>;
26
+ /**
27
+ * Adds multiple a reaction to a message.
28
+ *
29
+ * This function uses the `addReaction()` helper behind the scenes.
30
+ *
31
+ * @param channelId - The ID of the channel the message to add reactions to is in.
32
+ * @param messageId - The ID of the message to add the reactions to.
33
+ * @param reactions - The reactions to add to the message.
34
+ * @param ordered - Whether the reactions must be added in order or not.
35
+ *
36
+ * @remarks
37
+ * Requires the `READ_MESSAGE_HISTORY` permission.
38
+ *
39
+ * If nobody else has reacted to the message:
40
+ * - Requires the `ADD_REACTIONS` permission.
41
+ *
42
+ * Fires a _Message Reaction Add_ gateway event for every reaction added.
43
+ */
44
+ addReactions(rest: RestManager, channelId: BigString, messageId: BigString, reactions: string[], ordered?: boolean): Promise<void>;
45
+ /**
46
+ * Adds a role to a member.
47
+ *
48
+ * @param guildId - The ID of the guild the member to add the role to is in.
49
+ * @param userId - The user ID of the member to add the role to.
50
+ * @param roleId - The ID of the role to add to the member.
51
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
52
+ *
53
+ * @remarks
54
+ * Requires the `MANAGE_ROLES` permission.
55
+ *
56
+ * Fires a _Guild Member Update_ gateway event.
57
+ *
58
+ * @see {@link https://docs.discord.com/developers/resources/guild#add-guild-member-role}
59
+ */
60
+ addRole(rest: RestManager, guildId: BigString, userId: BigString, roleId: BigString, reason?: string): Promise<void>;
61
+ /**
62
+ * Adds a member to a thread.
63
+ *
64
+ * @param channelId - The ID of the thread to add the member to.
65
+ * @param userId - The user ID of the member to add to the thread.
66
+ *
67
+ * @remarks
68
+ * Requires the ability to send messages in the thread.
69
+ * Requires the thread not be archived.
70
+ *
71
+ * Fires a _Thread Members Update_ gateway event.
72
+ *
73
+ * @see {@link https://docs.discord.com/developers/resources/channel#add-thread-member}
74
+ */
75
+ addThreadMember(rest: RestManager, channelId: BigString, userId: BigString): Promise<void>;
76
+ /**
77
+ * Adds a recipient to a group DM.
78
+ *
79
+ * @param channelId - The ID of the group dm to add the user to.
80
+ * @param userId - The user ID of the user to add to the group dm.
81
+ * @param options - The options for adding the user
82
+ *
83
+ * @remarks
84
+ * Requires an OAuth2 access token with the `gdm.join` scope
85
+ *
86
+ * @see {@link https://docs.discord.com/developers/resources/channel#group-dm-add-recipient}
87
+ */
88
+ addDmRecipient(rest: RestManager, channelId: BigString, userId: BigString, options: AddDmRecipientOptions): Promise<void>;
89
+ /**
90
+ * Adds a member to a guild.
91
+ *
92
+ * @param guildId - The ID of the thread to add the member to.
93
+ * @param userId - The user ID of the member to add to the thread.
94
+ * @param options - The options for the add of a guild member
95
+ *
96
+ * @remarks
97
+ * Requires the bot to be in the specified server
98
+ * Requires an OAuth2 access token with the `guilds.join` scope
99
+ *
100
+ * Fires a _Guild Member Add_ gateway event.
101
+ *
102
+ * @see {@link https://docs.discord.com/developers/resources/guild#add-guild-member}
103
+ */
104
+ addGuildMember(rest: RestManager, guildId: BigString, userId: BigString, options: AddGuildMemberOptions): Promise<void>;
105
+ /**
106
+ * Creates an automod rule in a guild.
107
+ *
108
+ * @param guildId - The ID of the guild to create the rule in.
109
+ * @param options - The parameters for the creation of the rule.
110
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
111
+ * @returns An instance of the created {@link DiscordAutoModerationRule}.
112
+ *
113
+ * @remarks
114
+ * Requires the `MANAGE_GUILD` permission.
115
+ *
116
+ * Fires an _Auto Moderation Rule Create_ gateway event.
117
+ *
118
+ * @see {@link https://docs.discord.com/developers/resources/auto-moderation#create-auto-moderation-rule}
119
+ */
120
+ createAutomodRule(rest: RestManager, guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string): Promise<DiscordAutoModerationRule>;
121
+ /**
122
+ * Creates a channel within a guild.
123
+ *
124
+ * @param guildId - The ID of the guild to create the channel within.
125
+ * @param options - The parameters for the creation of the channel.
126
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
127
+ * @returns An instance of the created {@link DiscordChannel}.
128
+ *
129
+ * @remarks
130
+ * Requires the `MANAGE_CHANNELS` permission.
131
+ *
132
+ * If setting permission overwrites, only the permissions the bot user has in the guild can be allowed or denied.
133
+ *
134
+ * Setting the `MANAGE_ROLES` permission is only possible for guild administrators.
135
+ *
136
+ * Fires a _Channel Create_ gateway event.
137
+ *
138
+ * @see {@link https://docs.discord.com/developers/resources/guild#create-guild-channel}
139
+ */
140
+ createChannel(rest: RestManager, guildId: BigString, options: CreateGuildChannel, reason?: string): Promise<DiscordChannel>;
141
+ /**
142
+ * Creates an emoji in a guild.
143
+ *
144
+ * @param guildId - The ID of the guild in which to create the emoji.
145
+ * @param options - The parameters for the creation of the emoji.
146
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
147
+ * @returns An instance of the created {@link DiscordEmoji}.
148
+ *
149
+ * @remarks
150
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
151
+ *
152
+ * Emojis have a maximum file size of 256 kilobits. Attempting to upload a larger emoji will cause the route to return 400 Bad Request.
153
+ *
154
+ * Fires a _Guild Emojis Update_ gateway event.
155
+ *
156
+ * @see {@link https://docs.discord.com/developers/resources/emoji#create-guild-emoji}
157
+ */
158
+ createEmoji(rest: RestManager, guildId: BigString, options: CreateGuildEmoji, reason?: string): Promise<DiscordEmoji>;
159
+ /**
160
+ * Creates an emoji for the application.
161
+ *
162
+ * @param options - The parameters for the creation of the emoji.
163
+ * @returns An instance of the created {@link DiscordEmoji}.
164
+ *
165
+ * @see {@link https://docs.discord.com/developers/resources/emoji#create-application-emoji}
166
+ */
167
+ createApplicationEmoji(rest: RestManager, options: CreateApplicationEmoji): Promise<DiscordEmoji>;
168
+ /**
169
+ * Creates a new thread in a forum channel or media channel, and sends a message within the created thread.
170
+ *
171
+ * @param channelId - The ID of the forum channel to create the thread within.
172
+ * @param options - The parameters for the creation of the thread.
173
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
174
+ * @returns An instance of {@link DiscordChannel} with a nested {@link DiscordChannel} object.
175
+ *
176
+ * @remarks
177
+ * Requires the `CREATE_MESSAGES` permission.
178
+ *
179
+ * Fires a _Thread Create_ gateway event.
180
+ * Fires a _Message Create_ gateway event.
181
+ *
182
+ * @see {@link https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel}
183
+ */
184
+ createForumThread(rest: RestManager, channelId: BigString, options: CreateForumPostWithMessage, reason?: string): Promise<DiscordChannel>;
185
+ /**
186
+ * Creates an application command accessible globally; across different guilds and channels.
187
+ *
188
+ * @param command - The command to create.
189
+ * @param options - Additional options for the endpoint
190
+ * @returns An instance of the created {@link DiscordApplicationCommand}.
191
+ *
192
+ * @remarks
193
+ * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
194
+ * ⚠️ Global commands once created are cached for periods of __an hour__, so changes made to existing commands will take an hour to surface.
195
+ * ⚠️ You can only create up to 200 _new_ commands daily.
196
+ *
197
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
198
+ * You will be able to update only your own application commands
199
+ *
200
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#create-global-application-command}
201
+ */
202
+ createGlobalApplicationCommand(rest: RestManager, command: CreateApplicationCommand, options?: CreateGlobalApplicationCommandOptions): Promise<DiscordApplicationCommand>;
203
+ /**
204
+ * Creates an application command only accessible in a specific guild.
205
+ *
206
+ * @param command - The command to create.
207
+ * @param guildId - The ID of the guild to create the command for.
208
+ * @param options - Additional options for the endpoint
209
+ * @returns An instance of the created {@link DiscordApplicationCommand}.
210
+ *
211
+ * @remarks
212
+ * ⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command.
213
+ * ⚠️ You can only create up to 200 _new_ commands daily.
214
+ *
215
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
216
+ * You will be able to update only your own application commands
217
+ *
218
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#create-guild-application-command}
219
+ */
220
+ createGuildApplicationCommand(rest: RestManager, command: CreateApplicationCommand, guildId: BigString, options?: CreateGuildApplicationCommandOptions): Promise<DiscordApplicationCommand>;
221
+ /**
222
+ * Create a new sticker for the guild.
223
+ *
224
+ * @param guildId The ID of the guild to get
225
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
226
+ * @return A {@link DiscordSticker}
227
+ *
228
+ * @remarks
229
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
230
+ * Fires a Guild Stickers Update Gateway event.
231
+ * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
232
+ * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
233
+ *
234
+ * @see {@link https://docs.discord.com/developers/resources/sticker#create-guild-sticker}
235
+ */
236
+ createGuildSticker(rest: RestManager, guildId: BigString, options: CreateGuildStickerOptions, reason?: string): Promise<DiscordSticker>;
237
+ /**
238
+ * Creates a template from a guild.
239
+ *
240
+ * @param guildId - The ID of the guild to create the template from.
241
+ * @param options - The parameters for the creation of the template.
242
+ * @returns An instance of the created {@link DiscordTemplate}.
243
+ *
244
+ * @remarks
245
+ * Requires the `MANAGE_GUILD` permission.
246
+ *
247
+ * Fires a _Guild Update_ gateway event.
248
+ *
249
+ * @see {@link https://docs.discord.com/developers/resources/guild-template#create-guild-template}
250
+ */
251
+ createGuildTemplate(rest: RestManager, guildId: BigString, options: CreateTemplate): Promise<DiscordTemplate>;
252
+ /**
253
+ * Creates an invite to a channel in a guild.
254
+ *
255
+ * @param channelId - The ID of the channel to create the invite to.
256
+ * @param options - The parameters for the creation of the invite.
257
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
258
+ * @returns An instance of the created {@link DiscordInvite}.
259
+ *
260
+ * @remarks
261
+ * Requires the `CREATE_INSTANT_INVITE` permission.
262
+ *
263
+ * Fires an _Invite Create_ gateway event.
264
+ *
265
+ * @privateRemarks
266
+ * The request body is not optional, and an empty JSON object must be sent regardless of whether any fields are being transmitted.
267
+ *
268
+ * @see {@link https://docs.discord.com/developers/resources/channel#create-channel-invite}
269
+ */
270
+ createInvite(rest: RestManager, channelId: BigString, options?: CreateChannelInvite, reason?: string): Promise<DiscordInvite>;
271
+ /**
272
+ * Get guild role member counts
273
+ *
274
+ * Returns a map of role IDs to the number of members with the role. Does not include the \@everyone role.
275
+ *
276
+ * @param guildId - The ID of the guild to get role member counts for.
277
+ *
278
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
279
+ */
280
+ getGuildRoleMemberCounts(rest: RestManager, guildId: BigString): Promise<Record<string, number>>;
281
+ /**
282
+ * Creates a role in a guild.
283
+ *
284
+ * @param guildId - The ID of the guild to create the role in.
285
+ * @param options - The parameters for the creation of the role.
286
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
287
+ * @returns An instance of the created {@link DiscordRole}.
288
+ *
289
+ * @remarks
290
+ * Requires the `MANAGE_ROLES` permission.
291
+ *
292
+ * Fires a _Guild Role Create_ gateway event.
293
+ *
294
+ * @see {@link https://docs.discord.com/developers/resources/guild#create-guild-role}
295
+ */
296
+ createRole(rest: RestManager, guildId: BigString, options: CreateGuildRole, reason?: string): Promise<DiscordRole>;
297
+ /**
298
+ * Creates a scheduled event in a guild.
299
+ *
300
+ * @param guildId - The ID of the guild to create the scheduled event in.
301
+ * @param options - The parameters for the creation of the scheduled event.
302
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
303
+ * @returns An instance of the created {@link DiscordScheduledEvent}.
304
+ *
305
+ * @remarks
306
+ * Requires the `MANAGE_EVENTS` permission.
307
+ *
308
+ * A guild can only have a maximum of 100 events with a status of {@link ScheduledEventStatus}.Active or {@link ScheduledEventStatus}.Scheduled (inclusive).
309
+ *
310
+ * Fires a _Guild Scheduled Event Create_ gateway event.
311
+ *
312
+ * @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#create-guild-scheduled-event}
313
+ */
314
+ createScheduledEvent(rest: RestManager, guildId: BigString, options: CreateScheduledEvent, reason?: string): Promise<DiscordScheduledEvent>;
315
+ /**
316
+ * Creates a stage instance associated with a stage channel.
317
+ *
318
+ * @param options - The parameters for the creation of the stage instance.
319
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
320
+ * @returns An instance of the created {@link DiscordStageInstance}.
321
+ *
322
+ * @remarks
323
+ * Requires the user to be a moderator of the stage channel.
324
+ *
325
+ * Fires a _Stage Instance Create_ gateway event.
326
+ *
327
+ * @see {@link https://docs.discord.com/developers/resources/stage-instance#create-stage-instance}
328
+ */
329
+ createStageInstance(rest: RestManager, options: CreateStageInstance, reason?: string): Promise<DiscordStageInstance>;
330
+ /**
331
+ * Creates a webhook.
332
+ *
333
+ * @param channelId - The ID of the channel to create the webhook in.
334
+ * @param options - The parameters for the creation of the webhook.
335
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
336
+ * @returns An instance of the created {@link DiscordWebhook}.
337
+ *
338
+ * @remarks
339
+ * Requires the `MANAGE_WEBHOOKS` permission.
340
+ *
341
+ * ⚠️ The webhook name must not contain the substrings 'clyde', or 'discord' (case-insensitive).
342
+ *
343
+ * Fires a _Webhooks Update_ gateway event.
344
+ *
345
+ * @see {@link https://docs.discord.com/developers/resources/webhook#create-webhook}
346
+ */
347
+ createWebhook(rest: RestManager, channelId: BigString, options: CreateWebhook, reason?: string): Promise<DiscordWebhook>;
348
+ /**
349
+ * Deletes an automod rule.
350
+ *
351
+ * @param guildId - The ID of the guild to delete the rule from.
352
+ * @param ruleId - The ID of the automod rule to delete.
353
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
354
+ *
355
+ * @remarks
356
+ * Requires the `MANAGE_GUILD` permission.
357
+ *
358
+ * Fires an _Auto Moderation Rule Delete_ gateway event.
359
+ *
360
+ * @see {@link https://docs.discord.com/developers/resources/auto-moderation#delete-auto-moderation-rule}
361
+ */
362
+ deleteAutomodRule(rest: RestManager, guildId: BigString, ruleId: BigString, reason?: string): Promise<void>;
363
+ /**
364
+ * Set a voice channel’s status
365
+ *
366
+ * @param channelId - The ID of the channel to set the status of.
367
+ * @param options - The parameters for the status of the voice channel.
368
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
369
+ * @returns Nothing
370
+ *
371
+ * @remarks
372
+ * Requires the `SET_VOICE_CHANNEL_STATUS` permission, and additionally the `MANAGE_CHANNELS` permission if the current user is not connected to the voice channel.
373
+ *
374
+ * Fires a _Voice Channel Status Update_ Gateway event.
375
+ *
376
+ * @see {@link https://docs.discord.com/developers/resources/channel#set-voice-channel-status}
377
+ */
378
+ setVoiceChannelStatus(rest: RestManager, channelId: BigString, options: SetVoiceChannelStatus, reason?: string): Promise<void>;
379
+ /**
380
+ * Deletes a channel from within a guild.
381
+ *
382
+ * @param channelId - The ID of the channel to delete.
383
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
384
+ * @returns nothing
385
+ *
386
+ * @remarks
387
+ * For community guilds, the _Rules_, _Guidelines_ and _Community Update_ channels cannot be deleted.
388
+ *
389
+ * If the channel is a thread:
390
+ * - Requires the `MANAGE_THREADS` permission.
391
+ *
392
+ * - Fires a _Thread Delete_ gateway event.
393
+ *
394
+ * Otherwise:
395
+ * - Requires the `MANAGE_CHANNELS` permission.
396
+ *
397
+ * - ⚠️ Deleting a category channel does not delete its child channels.
398
+ * Instead, they will have their `parent_id` property removed, and a `Channel Update` gateway event will fire for each of them.
399
+ *
400
+ * - Fires a _Channel Delete_ gateway event.
401
+ *
402
+ * @see {@link https://docs.discord.com/developers/resources/channel#deleteclose-channel}
403
+ */
404
+ deleteChannel(rest: RestManager, channelId: BigString, reason?: string): Promise<void>;
405
+ /**
406
+ * Deletes a permission override for a user or role in a channel.
407
+ *
408
+ * @param channelId - The ID of the channel to delete the permission override of.
409
+ * @param overwriteId - The ID of the permission override to delete.
410
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
411
+ *
412
+ * @remarks
413
+ * Requires the `MANAGE_ROLES` permission.
414
+ *
415
+ * Fires a _Channel Update_ gateway event.
416
+ *
417
+ * @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-permission}
418
+ */
419
+ deleteChannelPermissionOverride(rest: RestManager, channelId: BigString, overwriteId: BigString, reason?: string): Promise<void>;
420
+ /**
421
+ * Deletes an emoji from a guild.
422
+ *
423
+ * @param guildId - The ID of the guild from which to delete the emoji.
424
+ * @param id - The ID of the emoji to delete.
425
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
426
+ *
427
+ * @remarks
428
+ * For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
429
+ * For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
430
+ *
431
+ * Fires a _Guild Emojis Update_ gateway event.
432
+ *
433
+ * @see {@link https://docs.discord.com/developers/resources/emoji#delete-guild-emoji}
434
+ */
435
+ deleteEmoji(rest: RestManager, guildId: BigString, id: BigString, reason?: string): Promise<void>;
436
+ /**
437
+ * Deletes an emoji from the application.
438
+ *
439
+ * @param id - The ID of the emoji to delete.
440
+ *
441
+ * @see {@link https://docs.discord.com/developers/resources/emoji#delete-application-emoji}
442
+ */
443
+ deleteApplicationEmoji(rest: RestManager, id: BigString): Promise<void>;
444
+ /**
445
+ * Deletes a follow-up message to an interaction.
446
+ *
447
+ * @param token - The interaction token to use, provided in the original interaction.
448
+ * @param messageId - The ID of the message to delete.
449
+ *
450
+ * @remarks
451
+ * Unlike `deleteMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
452
+ *
453
+ * Fires a _Message Delete_ event.
454
+ *
455
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-followup-message}
456
+ */
457
+ deleteFollowupMessage(rest: RestManager, token: string, messageId: BigString): Promise<void>;
458
+ /**
459
+ * Deletes an application command registered globally.
460
+ *
461
+ * @param commandId - The ID of the command to delete.
462
+ *
463
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-global-application-command}
464
+ */
465
+ deleteGlobalApplicationCommand(rest: RestManager, commandId: BigString): Promise<void>;
466
+ /**
467
+ * Deletes an application command registered in a guild.
468
+ *
469
+ * @param guildId - The ID of the guild to delete the command from.
470
+ * @param commandId - The ID of the command to delete from the guild.
471
+ *
472
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#delete-guild-application-command}
473
+ */
474
+ deleteGuildApplicationCommand(rest: RestManager, commandId: BigString, guildId: BigString): Promise<void>;
475
+ /**
476
+ * Delete a new sticker for the guild.
477
+ *
478
+ * @param guildId The ID of the guild to get
479
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
480
+ * @return A {@link DiscordSticker}
481
+ *
482
+ * @remarks
483
+ * For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
484
+ * For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
485
+ * Fires a Guild Stickers Update Gateway event.
486
+ * Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
487
+ * Lottie stickers can only be uploaded on guilds that have either the `VERIFIED` and/or the `PARTNERED` guild feature.
488
+ *
489
+ * @see {@link https://docs.discord.com/developers/resources/sticker#delete-guild-sticker}
490
+ */
491
+ deleteGuildSticker(rest: RestManager, guildId: BigString, stickerId: BigString, reason?: string): Promise<void>;
492
+ /**
493
+ * Deletes a template from a guild.
494
+ *
495
+ * @param guildId - The ID of the guild to delete the template from.
496
+ * @param templateCode - The code of the template to delete.
497
+ *
498
+ * @remarks
499
+ * Requires the `MANAGE_GUILD` permission.
500
+ *
501
+ * Fires a _Guild Update_ gateway event.
502
+ *
503
+ * @see {@link https://docs.discord.com/developers/resources/guild-template#delete-guild-template}
504
+ */
505
+ deleteGuildTemplate(rest: RestManager, guildId: BigString, templateCode: string): Promise<void>;
506
+ /**
507
+ * Deletes an integration attached to a guild.
508
+ *
509
+ * @param guildId - The ID of the guild from which to delete the integration.
510
+ * @param integrationId - The ID of the integration to delete from the guild.
511
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
512
+ *
513
+ * @remarks
514
+ * Requires the `MANAGE_GUILD` permission.
515
+ *
516
+ * Deletes all webhooks associated with the integration, and kicks the associated bot if there is one.
517
+ *
518
+ * Fires a _Guild Integrations Update_ gateway event.
519
+ * Fires a _Integration Delete_ gateway event.
520
+ *
521
+ * @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-integration}
522
+ */
523
+ deleteIntegration(rest: RestManager, guildId: BigString, integrationId: BigString, reason?: string): Promise<void>;
524
+ /**
525
+ * Deletes an invite to a channel.
526
+ *
527
+ * @param inviteCode - The invite code of the invite to delete.
528
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
529
+ *
530
+ * @remarks
531
+ * Requires the `MANAGE_CHANNELS` permission.
532
+ *
533
+ * Fires an _Invite Delete_ gateway event.
534
+ *
535
+ * @see {@link https://docs.discord.com/developers/resources/channel#delete-channel-invite}
536
+ */
537
+ deleteInvite(rest: RestManager, inviteCode: string, reason?: string): Promise<void>;
538
+ /**
539
+ * Gets the users allowed to see and accept this invite.
540
+ *
541
+ * @param inviteCode - The invite code of the invite to update.
542
+ * @returns CSV file containing the user IDs with the header `user_id` and each user ID from the original file
543
+ *
544
+ * @remarks
545
+ * Requires called to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
546
+ *
547
+ * @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
548
+ */
549
+ getTargetUsers(rest: RestManager, inviteCode: string): Promise<string>;
550
+ /**
551
+ * Updates the users allowed to see and accept this invite.
552
+ *
553
+ * @param inviteCode - The invite code of the invite to update.
554
+ * @param targetUsersFile - A CSV file with a single column of user IDs for all the users able to accept this invite
555
+ *
556
+ * @remarks
557
+ * Requires the caller to be the inviter or have the `MANAGE_GUILD` permission.
558
+ *
559
+ * Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described.
560
+ *
561
+ * @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
562
+ */
563
+ updateTargetUsers(rest: RestManager, inviteCode: string, targetUsersFile: Blob): Promise<void>;
564
+ /**
565
+ * 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.
566
+ *
567
+ * @param inviteCode - The invite code of the invite to check the target users job status for.
568
+ * @returns An object containing the status of the target users job.
569
+ *
570
+ * @remarks
571
+ * Requires the caller to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
572
+ *
573
+ * @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
574
+ */
575
+ getTargetUsersJobStatus(rest: RestManager, inviteCode: string): Promise<DiscordTargetUsersJobStatus>;
576
+ /**
577
+ * Deletes a message from a channel.
578
+ *
579
+ * @param channelId - The ID of the channel to delete the message from.
580
+ * @param messageId - The ID of the message to delete from the channel.
581
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
582
+ *
583
+ * @remarks
584
+ * If not deleting own message:
585
+ * - Requires the `MANAGE_MESSAGES` permission.
586
+ *
587
+ * Fires a _Message Delete_ gateway event.
588
+ *
589
+ * @see {@link https://docs.discord.com/developers/resources/channel#delete-message}
590
+ */
591
+ deleteMessage(rest: RestManager, channelId: BigString, messageId: BigString, reason?: string): Promise<void>;
592
+ /**
593
+ * Deletes multiple messages from a channel.
594
+ *
595
+ * @param channelId - The ID of the channel to delete the messages from.
596
+ * @param messageIds - The IDs of the messages to delete from the channel.
597
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
598
+ *
599
+ * @remarks
600
+ * Requires the `MANAGE_MESSAGES` permission.
601
+ *
602
+ * ⚠️ Messages older than 2 weeks old cannot be deleted.
603
+ *
604
+ * Fires a _Message Delete Bulk_ gateway event.
605
+ *
606
+ * @see {@link https://docs.discord.com/developers/resources/channel#bulk-delete-messages}
607
+ */
608
+ deleteMessages(rest: RestManager, channelId: BigString, messageIds: BigString[], reason?: string): Promise<void>;
609
+ /**
610
+ * Deletes the initial message response to an interaction.
611
+ *
612
+ * @param token - The interaction token to use, provided in the original interaction.
613
+ *
614
+ * @remarks
615
+ * Unlike `deleteMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
616
+ *
617
+ * Fires a _Message Delete_ event.
618
+ *
619
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#delete-original-interaction-response}
620
+ */
621
+ deleteOriginalInteractionResponse(rest: RestManager, token: string): Promise<void>;
622
+ /**
623
+ * Deletes a reaction added by the bot user from a message.
624
+ *
625
+ * @param channelId - The ID of the channel the message to delete the reaction from is in.
626
+ * @param messageId - The ID of the message to delete the reaction from.
627
+ * @param reaction - The reaction to delete from the message.
628
+ *
629
+ * @remarks
630
+ * Requires the `READ_MESSAGE_HISTORY` permission.
631
+ *
632
+ * Fires a _Message Reaction Remove_ gateway event.
633
+ *
634
+ * @see {@link https://docs.discord.com/developers/resources/channel#delete-own-reaction}
635
+ */
636
+ deleteOwnReaction(rest: RestManager, channelId: BigString, messageId: BigString, reaction: string): Promise<void>;
637
+ /**
638
+ * Deletes all reactions for all emojis from a message.
639
+ *
640
+ * @param channelId - The ID of the channel the message to delete the reactions from is in.
641
+ * @param messageId - The ID of the message to delete the reactions from.
642
+ *
643
+ * @remarks
644
+ * Requires the `READ_MESSAGE_HISTORY` permission.
645
+ *
646
+ * Requires the `MANAGE_MESSAGES` permission.
647
+ *
648
+ * Fires a _Message Reaction Remove All_ gateway event.
649
+ *
650
+ * @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions}
651
+ */
652
+ deleteReactionsAll(rest: RestManager, channelId: BigString, messageId: BigString): Promise<void>;
653
+ /**
654
+ * Deletes all reactions for an emoji from a message.
655
+ *
656
+ * @param channelId - The ID of the channel the message to delete the reactions from is in.
657
+ * @param messageId - The ID of the message to delete the reactions from.
658
+ * @param reaction - The reaction to remove from the message.
659
+ *
660
+ * @remarks
661
+ * Requires the `READ_MESSAGE_HISTORY` permission.
662
+ *
663
+ * Requires the `MANAGE_MESSAGES` permission.
664
+ *
665
+ * Fires a _Message Reaction Remove Emoji_ gateway event.
666
+ *
667
+ * @see {@link https://docs.discord.com/developers/resources/channel#delete-all-reactions-for-emoji}
668
+ */
669
+ deleteReactionsEmoji(rest: RestManager, channelId: BigString, messageId: BigString, reaction: string): Promise<void>;
670
+ /**
671
+ * Deletes a role from a guild.
672
+ *
673
+ * @param guildId - The ID of the guild to delete the role from.
674
+ * @param roleId - The ID of the role to delete.
675
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
676
+ *
677
+ * @remarks
678
+ * Requires the `MANAGE_ROLES` permission.
679
+ *
680
+ * Fires a _Guild Role Delete_ gateway event.
681
+ *
682
+ * @see {@link https://docs.discord.com/developers/resources/guild#delete-guild-role}
683
+ */
684
+ deleteRole(rest: RestManager, guildId: BigString, roleId: BigString, reason?: string): Promise<void>;
685
+ /**
686
+ * Deletes a scheduled event from a guild.
687
+ *
688
+ * @param guildId - The ID of the guild to delete the scheduled event from.
689
+ * @param eventId - The ID of the scheduled event to delete.
690
+ *
691
+ * @remarks
692
+ * Requires the `MANAGE_EVENTS` permission.
693
+ *
694
+ * Fires a _Guild Scheduled Event Delete_ gateway event.
695
+ *
696
+ * @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#delete-guild-scheduled-event}
697
+ */
698
+ deleteScheduledEvent(rest: RestManager, guildId: BigString, eventId: BigString): Promise<void>;
699
+ /**
700
+ * Deletes the stage instance associated with a stage channel, if one exists.
701
+ *
702
+ * @param channelId - The ID of the stage channel the stage instance is associated with.
703
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
704
+ *
705
+ * @remarks
706
+ * Requires the user to be a moderator of the stage channel.
707
+ *
708
+ * Fires a _Stage Instance Delete_ gateway event.
709
+ *
710
+ * @see {@link https://docs.discord.com/developers/resources/stage-instance#delete-stage-instance}
711
+ */
712
+ deleteStageInstance(rest: RestManager, channelId: BigString, reason?: string): Promise<void>;
713
+ /**
714
+ * Deletes a user's reaction from a message.
715
+ *
716
+ * @param channelId - The ID of the channel the message to delete the reaction from is in.
717
+ * @param messageId - The ID of the message to delete the reaction from.
718
+ * @param userId - The ID of the user whose reaction to delete.
719
+ * @param reaction - The reaction to delete from the message.
720
+ *
721
+ * @remarks
722
+ * Requires the `READ_MESSAGE_HISTORY` permission.
723
+ *
724
+ * Requires the `MANAGE_MESSAGES` permission.
725
+ *
726
+ * Fires a _Message Reaction Remove_ gateway event.
727
+ *
728
+ * @see {@link https://docs.discord.com/developers/resources/channel#delete-user-reaction}
729
+ */
730
+ deleteUserReaction(rest: RestManager, channelId: BigString, messageId: BigString, userId: BigString, reaction: string): Promise<void>;
731
+ /**
732
+ * Deletes a webhook.
733
+ *
734
+ * @param webhookId - The ID of the webhook to delete.
735
+ *
736
+ * @remarks
737
+ * Requires the `MANAGE_WEBHOOKS` permission.
738
+ *
739
+ * Fires a _Webhooks Update_ gateway event.
740
+ *
741
+ * @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
742
+ */
743
+ deleteWebhook(rest: RestManager, webhookId: BigString, reason?: string): Promise<void>;
744
+ /**
745
+ * Deletes a webhook message.
746
+ *
747
+ * @param webhookId - The ID of the webhook to delete the message belonging to.
748
+ * @param token - The webhook token, used to manage the webhook.
749
+ * @param messageId - The ID of the message to delete.
750
+ * @param options - The parameters for the deletion of the message.
751
+ *
752
+ * @remarks
753
+ * Fires a _Message Delete_ gateway event.
754
+ *
755
+ * @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook}
756
+ */
757
+ deleteWebhookMessage(rest: RestManager, webhookId: BigString, token: string, messageId: BigString, options?: DeleteWebhookMessageOptions): Promise<void>;
758
+ /**
759
+ * Deletes a webhook message using the webhook token, thereby bypassing the need for authentication + permissions.
760
+ *
761
+ * @param webhookId - The ID of the webhook to delete the message belonging to.
762
+ * @param token - The webhook token, used to delete the webhook.
763
+ *
764
+ * @remarks
765
+ * Fires a _Message Delete_ gateway event.
766
+ *
767
+ * @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-with-token}
768
+ */
769
+ deleteWebhookWithToken(rest: RestManager, webhookId: BigString, token: string): Promise<void>;
770
+ /**
771
+ * Edits the permissions for a guild application command.
772
+ *
773
+ * @param guildId - The ID of the guild the command is registered in.
774
+ * @param commandId - The ID of the command to edit the permissions of.
775
+ * @param bearerToken - The bearer token to use to make the request.
776
+ * @param options - The parameters for the edit of the command permissions.
777
+ * @returns An instance of the edited {@link DiscordGuildApplicationCommandPermissions}.
778
+ *
779
+ * @remarks
780
+ * 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.
781
+ *
782
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-application-command-permissions}
783
+ */
784
+ editApplicationCommandPermissions(rest: RestManager, guildId: BigString, commandId: BigString, bearerToken: string, options: Camelize<DiscordApplicationCommandPermissions[]>): Promise<DiscordGuildApplicationCommandPermissions>;
785
+ /**
786
+ * Edits an automod rule.
787
+ *
788
+ * @param guildId - The ID of the guild to edit the rule in.
789
+ * @param ruleId - The ID of the rule to edit.
790
+ * @param options - The parameters for the edit of the rule.
791
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
792
+ * @returns An instance of the edited {@link DiscordAutoModerationRule}.
793
+ *
794
+ * @remarks
795
+ * Requires the `MANAGE_GUILD` permission.
796
+ *
797
+ * Fires an _Auto Moderation Rule Update_ gateway event.
798
+ *
799
+ * @see {@link https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule}
800
+ */
801
+ editAutomodRule(rest: RestManager, guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string): Promise<DiscordAutoModerationRule>;
802
+ /**
803
+ * Modifies the bot's username, avatar or banner.
804
+ *
805
+ * @param options - The parameters for the edit of the bot's profile.
806
+ * @returns An instance of the edited {@link DiscordUser}.
807
+ *
808
+ * @remarks
809
+ * Editing the `username` may cause the bot's discriminator to be randomized.
810
+ *
811
+ * `avatar` and `banner` must to be a Data URI scheme. {@link urlToBase64} from `@discordeno/utils` can be used to convert a URL to a Data URI scheme.
812
+ *
813
+ * @see {@link https://docs.discord.com/developers/resources/user#modify-current-user}
814
+ */
815
+ editBotProfile(rest: RestManager, options: {
816
+ username?: string;
817
+ botAvatarURL?: string | null;
818
+ botBannerURL?: string | null;
819
+ }): Promise<DiscordUser>;
820
+ /**
821
+ * Edits a channel's settings.
822
+ *
823
+ * @param channelId - The ID of the channel to edit.
824
+ * @param options - The parameters for the edit of the channel.
825
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
826
+ * @returns An instance of the edited {@link DiscordChannel}.
827
+ *
828
+ * @remarks
829
+ * If editing a channel of type {@link ChannelTypes}.GroupDm:
830
+ * - Fires a _Channel Update_ gateway event.
831
+ *
832
+ * If editing a thread channel:
833
+ * - Requires the `MANAGE_THREADS` permission __unless__ if setting the `archived` property to `false` when the `locked` property is also `false`, in which case only the `SEND_MESSAGES` permission is required.
834
+ *
835
+ * - Fires a _Thread Update_ gateway event.
836
+ *
837
+ * If editing a guild channel:
838
+ * - Requires the `MANAGE_CHANNELS` permission.
839
+ *
840
+ * - If modifying permission overrides:
841
+ * - Requires the `MANAGE_ROLES` permission.
842
+ *
843
+ * - Only permissions the bot user has in the guild or parent channel can be allowed/denied __unless__ the bot user has a `MANAGE_ROLES` permission override in the channel.
844
+ *
845
+ * - If modifying a channel of type {@link ChannelTypes}.GuildCategory:
846
+ * - Fires a _Channel Update_ gateway event for each child channel impacted in this change.
847
+ * - Otherwise:
848
+ * - Fires a _Channel Update_ gateway event.
849
+ */
850
+ editChannel(rest: RestManager, channelId: BigString, options: ModifyChannel, reason?: string): Promise<DiscordChannel>;
851
+ /**
852
+ * Edits the permission overrides for a user or role in a channel.
853
+ *
854
+ * @param channelId - The ID of the channel to edit the permission overrides of.
855
+ * @param options - The permission override.
856
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
857
+ *
858
+ * @remarks
859
+ * Requires the `MANAGE_ROLES` permission.
860
+ *
861
+ * Only permissions the bot user has in the guild or parent channel can be allowed/denied __unless__ the bot user has a `MANAGE_ROLES` permission override in the channel.
862
+ *
863
+ * Fires a _Channel Update_ gateway event.
864
+ *
865
+ * @see {@link https://docs.discord.com/developers/resources/channel#edit-channel-permissions}
866
+ */
867
+ editChannelPermissionOverrides(rest: RestManager, channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string): Promise<void>;
868
+ /**
869
+ * Edits the positions of a set of channels in a guild.
870
+ *
871
+ * @param guildId - The ID of the guild in which to edit the positions of the channels.
872
+ * @param channelPositions - A set of objects defining the updated positions of the channels.
873
+ *
874
+ * @remarks
875
+ * Requires the `MANAGE_CHANNELS` permission.
876
+ *
877
+ * Fires a _Channel Update_ gateway event for every channel impacted in this change.
878
+ *
879
+ * 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.
880
+ *
881
+ * Permissions are checked per entry, based on what the entry changes:
882
+ * - 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.
883
+ * - 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`.
884
+ *
885
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-channel-positions}
886
+ */
887
+ editChannelPositions(rest: RestManager, guildId: BigString, channelPositions: ModifyGuildChannelPositions[]): Promise<void>;
888
+ /**
889
+ * Edits an emoji.
890
+ *
891
+ * @param guildId - The ID of the guild in which to edit the emoji.
892
+ * @param id - The ID of the emoji to edit.
893
+ * @param options - The parameters for the edit of the emoji.
894
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
895
+ * @returns An instance of the updated {@link DiscordEmoji}.
896
+ *
897
+ * @remarks
898
+ * For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
899
+ * For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
900
+ *
901
+ * Fires a `Guild Emojis Update` gateway event.
902
+ *
903
+ * @see {@link https://docs.discord.com/developers/resources/emoji#modify-guild-emoji}
904
+ */
905
+ editEmoji(rest: RestManager, guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string): Promise<DiscordEmoji>;
906
+ /**
907
+ * Edits an application emoji.
908
+ *
909
+ * @param id - The ID of the emoji to edit.
910
+ * @param options - The parameters for the edit of the emoji.
911
+ * @returns An instance of the updated {@link DiscordEmoji}.
912
+ *
913
+ * @see {@link https://docs.discord.com/developers/resources/emoji#modify-application-emoji}
914
+ */
915
+ editApplicationEmoji(rest: RestManager, id: BigString, options: ModifyApplicationEmoji): Promise<DiscordEmoji>;
916
+ /**
917
+ * Edits a follow-up message to an interaction.
918
+ *
919
+ * @param token - The interaction token to use, provided in the original interaction.
920
+ * @param messageId - The ID of the message to edit.
921
+ * @param options - The parameters for the edit of the message.
922
+ * @returns An instance of the edited {@link DiscordMessage}.
923
+ *
924
+ * @remarks
925
+ * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
926
+ *
927
+ * Does not support ephemeral follow-up messages due to these being stateless.
928
+ *
929
+ * Fires a _Message Update_ event.
930
+ *
931
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-followup-message}
932
+ */
933
+ editFollowupMessage(rest: RestManager, token: string, messageId: BigString, options: InteractionCallbackData): Promise<DiscordMessage>;
934
+ /**
935
+ * Edits a global application command.
936
+ *
937
+ * @param commandId - The ID of the command to edit.
938
+ * @param options - The parameters for the edit of the command.
939
+ * @returns An instance of the edited {@link DiscordApplicationCommand}.
940
+ *
941
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-global-application-command}
942
+ */
943
+ editGlobalApplicationCommand(rest: RestManager, commandId: BigString, options: CreateApplicationCommand): Promise<DiscordApplicationCommand>;
944
+ /**
945
+ * Edits a guild's settings.
946
+ *
947
+ * @param guildId - The ID of the guild to edit.
948
+ * @param options - The parameters for the edit of the guild.
949
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
950
+ * @returns An instance of the edited {@link DiscordGuild}.
951
+ *
952
+ * @remarks
953
+ * Requires the `MANAGE_GUILD` permission.
954
+ *
955
+ * If attempting to add or remove the {@link GuildFeatures}.Community feature:
956
+ * - Requires the `ADMINISTRATOR` permission.
957
+ *
958
+ * Fires a _Guild Update_ gateway event.
959
+ *
960
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-guild}
961
+ */
962
+ editGuild(rest: RestManager, guildId: BigString, options: ModifyGuild, reason?: string): Promise<DiscordGuild>;
963
+ /**
964
+ * Edits an application command registered in a guild.
965
+ *
966
+ * @param guildId - The ID of the guild the command is registered in.
967
+ * @param commandId - The ID of the command to edit.
968
+ * @param options - The parameters for the edit of the command.
969
+ * @returns An instance of the edited {@link DiscordApplicationCommand}.
970
+ *
971
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#edit-guild-application-command}
972
+ */
973
+ editGuildApplicationCommand(rest: RestManager, commandId: BigString, guildId: BigString, options: CreateApplicationCommand): Promise<DiscordApplicationCommand>;
974
+ /**
975
+ * Edit the given sticker.
976
+ *
977
+ * @param guildId The ID of the guild to get
978
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
979
+ * @return A {@link DiscordSticker}
980
+ *
981
+ * @remarks
982
+ * For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
983
+ * For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
984
+ * Fires a Guild Stickers Update Gateway event.
985
+ *
986
+ * @see {@link https://docs.discord.com/developers/resources/sticker#modify-guild-sticker}
987
+ */
988
+ editGuildSticker(rest: RestManager, guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string): Promise<DiscordSticker>;
989
+ /**
990
+ * Edits a template's settings.
991
+ *
992
+ * @param guildId - The ID of the guild to edit a template of.
993
+ * @param templateCode - The code of the template to edit.
994
+ * @param options - The parameters for the edit of the template.
995
+ * @returns An instance of the edited {@link DiscordTemplate}.
996
+ *
997
+ * @remarks
998
+ * Requires the `MANAGE_GUILD` permission.
999
+ *
1000
+ * Fires a _Guild Update_ gateway event.
1001
+ *
1002
+ * @see {@link https://docs.discord.com/developers/resources/guild-template#modify-guild-template}
1003
+ */
1004
+ editGuildTemplate(rest: RestManager, guildId: BigString, templateCode: string, options: ModifyGuildTemplate): Promise<DiscordTemplate>;
1005
+ /**
1006
+ * Edits a message.
1007
+ *
1008
+ * @param channelId - The ID of the channel to edit the message in.
1009
+ * @param messageId - The IDs of the message to edit.
1010
+ * @param options - The parameters for the edit of the message.
1011
+ * @returns An instance of the edited {@link DiscordMessage}.
1012
+ *
1013
+ * @remarks
1014
+ * If editing another user's message:
1015
+ * - Requires the `MANAGE_MESSAGES` permission.
1016
+ * - Only the {@link EditMessage.flags | flags} property of the options object parameter can be edited.
1017
+ *
1018
+ * Fires a _Message Update_ gateway event.
1019
+ *
1020
+ * @see {@link https://docs.discord.com/developers/resources/channel#edit-message}
1021
+ */
1022
+ editMessage(rest: RestManager, channelId: BigString, messageId: BigString, options: EditMessage): Promise<DiscordMessage>;
1023
+ /**
1024
+ * Edits the initial message response to an interaction.
1025
+ *
1026
+ * @param token - The interaction token to use, provided in the original interaction.
1027
+ * @param options - The parameters for the edit of the response.
1028
+ * @returns An instance of the edited {@link DiscordMessage}.
1029
+ *
1030
+ * @remarks
1031
+ * Unlike `editMessage()`, this endpoint allows the bot user to act without needing to see the channel the message is in.
1032
+ *
1033
+ * Does not support ephemeral follow-up messages due to these being stateless.
1034
+ *
1035
+ * Fires a _Message Update_ event.
1036
+ *
1037
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#edit-original-interaction-response}
1038
+ */
1039
+ editOriginalInteractionResponse(rest: RestManager, token: string, options: InteractionCallbackData): Promise<DiscordMessage>;
1040
+ /**
1041
+ * Edits the voice state of the bot user.
1042
+ *
1043
+ * @param guildId - The ID of the guild in which to edit the voice state of the bot user.
1044
+ * @param options - The parameters for the edit of the voice state.
1045
+ *
1046
+ * @remarks
1047
+ * The {@link EditOwnVoiceState.channelId | channelId} property of the options object parameter must point to a stage channel, and the bot user must already have joined it.
1048
+ *
1049
+ * If attempting to unmute oneself:
1050
+ * - Requires the `MUTE_MEMBERS` permission.
1051
+ *
1052
+ * If attempting to request to speak:
1053
+ * - Requires the `REQUEST_TO_SPEAK` permission.
1054
+ *
1055
+ * @see {@link https://docs.discord.com/developers/resources/voice#modify-current-user-voice-state}
1056
+ */
1057
+ editOwnVoiceState(rest: RestManager, guildId: BigString, options: EditOwnVoiceState): Promise<void>;
1058
+ /**
1059
+ * Edits a role in a guild.
1060
+ *
1061
+ * @param guildId - The ID of the guild to edit the role in.
1062
+ * @param roleId - The ID of the role to edit.
1063
+ * @param options - The parameters for the edit of the role.
1064
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1065
+ * @returns An instance of the edited {@link DiscordRole}.
1066
+ *
1067
+ * @remarks
1068
+ * Requires the `MANAGE_ROLES` permission.
1069
+ *
1070
+ * Fires a _Guild Role Update_ gateway event.
1071
+ *
1072
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role}
1073
+ */
1074
+ editRole(rest: RestManager, guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string): Promise<DiscordRole>;
1075
+ /**
1076
+ * Edits the positions of a set of roles.
1077
+ *
1078
+ * @param guildId - The ID of the guild to edit the role positions in.
1079
+ * @param options - The parameters for the edit of the role positions.
1080
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1081
+ * @returns A collection of {@link DiscordRole} objects assorted by role ID.
1082
+ *
1083
+ * @remarks
1084
+ * Requires the `MANAGE_ROLES` permission.
1085
+ *
1086
+ * Fires a _Guild Role Update_ gateway event for every role impacted in this change.
1087
+ *
1088
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-role-positions}
1089
+ */
1090
+ editRolePositions(rest: RestManager, guildId: BigString, options: ModifyRolePositions[], reason?: string): Promise<DiscordRole[]>;
1091
+ /**
1092
+ * Edits a scheduled event.
1093
+ *
1094
+ * @param guildId - The ID of the guild to edit the scheduled event in.
1095
+ * @param eventId - The ID of the scheduled event to edit.
1096
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1097
+ * @returns An instance of the edited {@link DiscordScheduledEvent}.
1098
+ *
1099
+ * @remarks
1100
+ * Requires the `MANAGE_EVENTS` permission.
1101
+ *
1102
+ * To start or end an event, modify the event's `status` property.
1103
+ *
1104
+ * The `entity_metadata` property is discarded for events whose `entity_type` is not {@link ScheduledEventEntityType}.External.
1105
+ *
1106
+ * Fires a _Guild Scheduled Event Update_ gateway event.
1107
+ *
1108
+ * @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#modify-guild-scheduled-event}
1109
+ */
1110
+ editScheduledEvent(rest: RestManager, guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string): Promise<DiscordScheduledEvent>;
1111
+ /**
1112
+ * Edits a stage instance.
1113
+ *
1114
+ * @param channelId - The ID of the stage channel the stage instance is associated with.
1115
+ * @param topic - Topic of the Stage instance (1-120 characters).
1116
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1117
+ * @returns An instance of the updated {@link DiscordStageInstance}.
1118
+ *
1119
+ * @remarks
1120
+ * Requires the user to be a moderator of the stage channel.
1121
+ *
1122
+ * Fires a _Stage Instance Update_ event.
1123
+ *
1124
+ * @see {@link https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance}
1125
+ */
1126
+ editStageInstance(rest: RestManager, channelId: BigString, topic: string, reason?: string): Promise<DiscordStageInstance>;
1127
+ /**
1128
+ * Edits the voice state of another user.
1129
+ *
1130
+ * @param guildId - The ID of the guild in which to edit the voice state of the bot user.
1131
+ * @param options - The parameters for the edit of the voice state.
1132
+ *
1133
+ * @remarks
1134
+ * The {@link EditOwnVoiceState.channelId | channelId} property of the options object parameter must point to a stage channel, and the user must already have joined it.
1135
+ *
1136
+ * Requires the `MUTE_MEMBERS` permission.
1137
+ *
1138
+ * @see {@link https://docs.discord.com/developers/resources/voice#modify-user-voice-state}
1139
+ */
1140
+ editUserVoiceState(rest: RestManager, guildId: BigString, options: EditUserVoiceState): Promise<void>;
1141
+ /**
1142
+ * Edit the current user application role connection for the application.
1143
+ *
1144
+ * @param bearerToken - The access token of the user
1145
+ * @param applicationId - The id of the application to edit the role connection
1146
+ * @param options - The options to edit
1147
+ * @returns {DiscordApplicationRoleConnection}
1148
+ *
1149
+ * @remarks
1150
+ * This requires the `role_connections.write` scope.
1151
+ *
1152
+ * @see {@link https://docs.discord.com/developers/resources/user#update-user-application-role-connection}
1153
+ */
1154
+ editUserApplicationRoleConnection(rest: RestManager, bearerToken: string, applicationId: BigString, options: Camelize<DiscordApplicationRoleConnection>): Promise<DiscordApplicationRoleConnection>;
1155
+ /**
1156
+ * Deletes the application role connection for the user.
1157
+ *
1158
+ * @param bearerToken - The access token of the user
1159
+ * @param applicationId - The id of the application to delete the role connection
1160
+ *
1161
+ * @remarks
1162
+ * This requires the `role_connections.write` scope.
1163
+ *
1164
+ * @see {@link https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection}
1165
+ */
1166
+ deleteCurrentUserApplicationRoleConnection(rest: RestManager, bearerToken: string, applicationId: BigString): Promise<void>;
1167
+ /**
1168
+ * Edits a webhook.
1169
+ *
1170
+ * @param webhookId - The ID of the webhook to edit.
1171
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1172
+ * @returns An instance of the edited {@link DiscordWebhook}.
1173
+ *
1174
+ * @remarks
1175
+ * Requires the `MANAGE_WEBHOOKS` permission.
1176
+ *
1177
+ * Fires a _Webhooks Update_ gateway event.
1178
+ *
1179
+ * @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook}
1180
+ */
1181
+ editWebhook(rest: RestManager, webhookId: BigString, options: ModifyWebhook, reason?: string): Promise<DiscordWebhook>;
1182
+ /**
1183
+ * Edits a webhook message.
1184
+ *
1185
+ * @param webhookId - The ID of the webhook to edit the message of.
1186
+ * @param token - The webhook token, used to edit the message.
1187
+ * @param messageId - The ID of the message to edit.
1188
+ * @param options - The parameters for the edit of the message.
1189
+ * @returns An instance of the edited {@link DiscordMessage}.
1190
+ *
1191
+ * @remarks
1192
+ * Fires a _Message Update_ gateway event.
1193
+ *
1194
+ * @see {@link https://docs.discord.com/developers/resources/webhook#edit-webhook-message}
1195
+ */
1196
+ editWebhookMessage(rest: RestManager, webhookId: BigString, token: string, messageId: BigString, options: EditWebhookMessageOptions): Promise<DiscordMessage>;
1197
+ /**
1198
+ * Edits a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
1199
+ *
1200
+ * @param webhookId - The ID of the webhook to edit.
1201
+ * @param token - The webhook token, used to edit the webhook.
1202
+ * @returns An instance of the edited {@link DiscordWebhook}.
1203
+ *
1204
+ * @remarks
1205
+ * Requires the `MANAGE_WEBHOOKS` permission.
1206
+ *
1207
+ * Fires a _Webhooks Update_ gateway event.
1208
+ *
1209
+ * @see {@link https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token}
1210
+ */
1211
+ editWebhookWithToken(rest: RestManager, webhookId: BigString, token: string, options: Omit<ModifyWebhook, "channelId">): Promise<DiscordWebhook>;
1212
+ /**
1213
+ * Edits a guild's welcome screen.
1214
+ *
1215
+ * @param guildId - The ID of the guild to edit the welcome screen of.
1216
+ * @param options - The parameters for the edit of the welcome screen.
1217
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1218
+ * @returns An instance of the edited {@link DiscordWelcomeScreen}.
1219
+ *
1220
+ * @remarks
1221
+ * Requires the `MANAGE_GUILD` permission.
1222
+ *
1223
+ * Fires a _Guild Update_ gateway event.
1224
+ *
1225
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-welcome-screen}
1226
+ */
1227
+ editWelcomeScreen(rest: RestManager, guildId: BigString, options: ModifyGuildWelcomeScreen, reason?: string): Promise<DiscordWelcomeScreen>;
1228
+ /**
1229
+ * Edits the settings of a guild's widget.
1230
+ *
1231
+ * @param guildId - The ID of the guild to edit the settings of the widget of.
1232
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1233
+ * @returns An instance of the edited {@link DiscordGuildWidgetSettings}.
1234
+ *
1235
+ * @remarks
1236
+ * Requires the `MANAGE_GUILD` permission.
1237
+ *
1238
+ * Fires a _Guild Update_ gateway event.
1239
+ *
1240
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-widget}
1241
+ */
1242
+ editWidgetSettings(rest: RestManager, guildId: BigString, options: Camelize<DiscordGuildWidgetSettings>, reason?: string): Promise<DiscordGuildWidgetSettings>;
1243
+ /**
1244
+ * Executes a webhook, causing a message to be posted in the channel configured for the webhook.
1245
+ *
1246
+ * @param webhookId - The ID of the webhook to execute.
1247
+ * @param token - The webhook token, used to execute the webhook.
1248
+ * @param options - The parameters for the execution of the webhook.
1249
+ * @returns An instance of the created {@link DiscordMessage}, or `undefined` if the {@link ExecuteWebhook.wait | wait} property of the options object parameter is set to `false`.
1250
+ *
1251
+ * @remarks
1252
+ * If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
1253
+ *
1254
+ * @see {@link https://docs.discord.com/developers/resources/webhook#execute-webhook}
1255
+ */
1256
+ executeWebhook(rest: RestManager, webhookId: BigString, token: string, options: ExecuteWebhook): Promise<DiscordMessage | undefined>;
1257
+ /**
1258
+ * Follows an announcement channel, allowing messages posted within it to be cross-posted into the target channel.
1259
+ *
1260
+ * @param sourceChannelId - The ID of the announcement channel to follow.
1261
+ * @param targetChannelId - The ID of the target channel - the channel to cross-post to.
1262
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
1263
+ * @returns An instance of {@link DiscordFollowedChannel}.
1264
+ *
1265
+ * @remarks
1266
+ * Requires the `MANAGE_WEBHOOKS` permission in the __target channel__.
1267
+ *
1268
+ * Fires a _Webhooks Update_ gateway event.
1269
+ *
1270
+ * @see {@link https://docs.discord.com/developers/resources/channel#follow-announcement-channel}
1271
+ */
1272
+ followAnnouncement(rest: RestManager, sourceChannelId: BigString, targetChannelId: BigString, reason?: string): Promise<DiscordFollowedChannel>;
1273
+ /**
1274
+ * Gets the list of all active threads for a guild.
1275
+ *
1276
+ * @param guildId - The ID of the guild to get the threads of.
1277
+ * @returns An instance of {@link DiscordListActiveThreads}.
1278
+ *
1279
+ * @remarks
1280
+ * Returns both public and private threads.
1281
+ *
1282
+ * Threads are ordered by the `id` property in descending order.
1283
+ *
1284
+ * @see {@link https://docs.discord.com/developers/resources/guild#list-active-guild-threads}
1285
+ */
1286
+ getActiveThreads(rest: RestManager, guildId: BigString): Promise<DiscordListActiveThreads>;
1287
+ /** Get the applications info */
1288
+ getApplicationInfo(rest: RestManager): Promise<DiscordApplication>;
1289
+ /**
1290
+ * Edit properties of the app associated with the requesting bot user.
1291
+ *
1292
+ * @remarks
1293
+ * Only properties that are passed will be updated.
1294
+ */
1295
+ editApplicationInfo(rest: RestManager, body: EditApplication): Promise<DiscordApplication>;
1296
+ /**
1297
+ * Get the current authentication info for the authenticated user
1298
+ *
1299
+ * @param bearerToken - Any OAuth2 derived access token
1300
+ * @returns An instance of {@link DiscordCurrentAuthorization}
1301
+ *
1302
+ * @remarks
1303
+ * The user object is not defined if the scopes do not include `identify`.
1304
+ * In the user object, if defined, the email is not included if the scopes do not include `email`
1305
+ */
1306
+ getCurrentAuthenticationInfo(rest: RestManager, bearerToken: string): Promise<DiscordCurrentAuthorization>;
1307
+ /**
1308
+ * Exchange the information to get a OAuth2 accessToken token
1309
+ *
1310
+ * @param clientId - Application's client id
1311
+ * @param clientSecret - application's client secret
1312
+ * @param options - The options to make the exchange with discord
1313
+ */
1314
+ exchangeToken(rest: RestManager, clientId: BigString, clientSecret: string, options: Camelize<DiscordTokenExchange>): Promise<DiscordAccessTokenResponse>;
1315
+ /**
1316
+ * Revoke an access_token
1317
+ *
1318
+ * @param clientId - Application's client id
1319
+ * @param clientSecret - application's client secret
1320
+ * @param options - The options to revoke the access_token
1321
+ */
1322
+ revokeToken(rest: RestManager, clientId: BigString, clientSecret: string, options: Camelize<DiscordTokenRevocation>): Promise<void>;
1323
+ /**
1324
+ * Gets the permissions of a guild application command.
1325
+ *
1326
+ * @param guildId - The ID of the guild the command is registered in.
1327
+ * @param commandId - The ID of the command to get the permissions of.
1328
+ * @param options - The OAuth2 related optional parameters for the endpoint
1329
+ * @returns An instance of {@link DiscordGuildApplicationCommandPermissions}.
1330
+ *
1331
+ * @remarks
1332
+ * Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
1333
+ *
1334
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#get-application-command-permissions}
1335
+ */
1336
+ getApplicationCommandPermission(rest: RestManager, guildId: BigString, commandId: BigString, options?: GetApplicationCommandPermissionOptions): Promise<DiscordGuildApplicationCommandPermissions>;
1337
+ /**
1338
+ * Gets the permissions of all application commands registered in a guild by the ID of the guild and optionally an external application.
1339
+ *
1340
+ * @param guildId - The ID of the guild to get the permissions objects of.
1341
+ * @param options - The OAuth2 related optional parameters for the endpoint
1342
+ * @returns A collection of {@link DiscordGuildApplicationCommandPermissions} objects assorted by command ID.
1343
+ *
1344
+ * @remarks
1345
+ * Then specifying the options object the access token passed-in requires the OAuth2 scope `applications.commands.permissions.update`
1346
+ *
1347
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command-permissions}
1348
+ */
1349
+ getApplicationCommandPermissions(rest: RestManager, guildId: BigString, options?: GetApplicationCommandPermissionOptions): Promise<DiscordGuildApplicationCommandPermissions[]>;
1350
+ /**
1351
+ * Gets a guild's audit log.
1352
+ *
1353
+ * @param guildId - The ID of the guild to get the audit log of.
1354
+ * @param options - The parameters for the fetching of the audit log.
1355
+ * @returns An instance of {@link DiscordAuditLog}.
1356
+ *
1357
+ * @remarks
1358
+ * Requires the `VIEW_AUDIT_LOG` permission.
1359
+ *
1360
+ * @see {@link https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log}
1361
+ */
1362
+ getAuditLog(rest: RestManager, guildId: BigString, options?: GetGuildAuditLog): Promise<DiscordAuditLog>;
1363
+ /**
1364
+ * Gets an automod rule by its ID.
1365
+ *
1366
+ * @param guildId - The ID of the guild to get the rule of.
1367
+ * @param ruleId - The ID of the rule to get.
1368
+ * @returns An instance of {@link DiscordAutoModerationRule}.
1369
+ *
1370
+ * @remarks
1371
+ * Requires the `MANAGE_GUILD` permission.
1372
+ *
1373
+ * @see {@link https://docs.discord.com/developers/resources/auto-moderation#get-auto-moderation-rule}
1374
+ */
1375
+ getAutomodRule(rest: RestManager, guildId: BigString, ruleId: BigString): Promise<DiscordAutoModerationRule>;
1376
+ /**
1377
+ * Gets the list of automod rules for a guild.
1378
+ *
1379
+ * @param guildId - The ID of the guild to get the rules from.
1380
+ * @returns A collection of {@link DiscordAutoModerationRule} objects assorted by rule ID.
1381
+ *
1382
+ * @remarks
1383
+ * Requires the `MANAGE_GUILD` permission.
1384
+ *
1385
+ * @see {@link https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild}
1386
+ */
1387
+ getAutomodRules(rest: RestManager, guildId: BigString): Promise<DiscordAutoModerationRule[]>;
1388
+ /**
1389
+ * Gets the list of available voice regions.
1390
+ *
1391
+ * @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
1392
+ */
1393
+ getAvailableVoiceRegions(rest: RestManager): Promise<DiscordVoiceRegion[]>;
1394
+ /**
1395
+ * Gets a ban by user ID.
1396
+ *
1397
+ * @param guildId - The ID of the guild to get the ban from.
1398
+ * @param userId - The ID of the user to get the ban for.
1399
+ * @returns An instance of {@link DiscordBan}.
1400
+ *
1401
+ * @remarks
1402
+ * Requires the `BAN_MEMBERS` permission.
1403
+ *
1404
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-ban}
1405
+ */
1406
+ getBan(rest: RestManager, guildId: BigString, userId: BigString): Promise<DiscordBan>;
1407
+ /**
1408
+ * Gets the list of bans for a guild.
1409
+ *
1410
+ * @param guildId - The ID of the guild to get the list of bans for.
1411
+ * @param options - The parameters for the fetching of the list of bans.
1412
+ * @returns A collection of {@link DiscordBan} objects assorted by user ID.
1413
+ *
1414
+ * @remarks
1415
+ * Requires the `BAN_MEMBERS` permission.
1416
+ *
1417
+ * Users are ordered by their IDs in _ascending_ order.
1418
+ *
1419
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-bans}
1420
+ */
1421
+ getBans(rest: RestManager, guildId: BigString, options?: GetBans): Promise<DiscordBan[]>;
1422
+ /**
1423
+ * Gets a channel by its ID.
1424
+ *
1425
+ * @param channelId - The ID of the channel to get.
1426
+ * @returns An instance of {@link DiscordChannel}.
1427
+ *
1428
+ * @remarks
1429
+ * If the channel is a thread, a {@link DiscordThreadMember} object is included in the result.
1430
+ *
1431
+ * @see {@link https://docs.discord.com/developers/resources/channel#get-channel}
1432
+ */
1433
+ getChannel(rest: RestManager, channelId: BigString): Promise<DiscordChannel>;
1434
+ /**
1435
+ * Gets the list of invites for a channel.
1436
+ *
1437
+ * @param channelId - The ID of the channel to get the invites of.
1438
+ * @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
1439
+ *
1440
+ * @remarks
1441
+ * Requires the `MANAGE_CHANNELS` permission.
1442
+ *
1443
+ * Only usable for guild channels.
1444
+ *
1445
+ * @see {@link https://docs.discord.com/developers/resources/channel#get-channel-invites}
1446
+ */
1447
+ getChannelInvites(rest: RestManager, channelId: BigString): Promise<DiscordInviteMetadata[]>;
1448
+ /**
1449
+ * Gets the list of channels for a guild.
1450
+ *
1451
+ * @param guildId - The ID of the guild to get the channels of.
1452
+ * @returns A collection of {@link DiscordChannel} objects assorted by channel ID.
1453
+ *
1454
+ * @remarks
1455
+ * Excludes threads.
1456
+ *
1457
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-channels}
1458
+ */
1459
+ getChannels(rest: RestManager, guildId: BigString): Promise<DiscordChannel[]>;
1460
+ /**
1461
+ * Gets a list of webhooks for a channel.
1462
+ *
1463
+ * @param channelId - The ID of the channel which to get the webhooks of.
1464
+ * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1465
+ *
1466
+ * @remarks
1467
+ * Requires the `MANAGE_WEBHOOKS` permission.
1468
+ *
1469
+ * @see {@link https://docs.discord.com/developers/resources/webhook#get-channel-webhooks}
1470
+ */
1471
+ getChannelWebhooks(rest: RestManager, channelId: BigString): Promise<DiscordWebhook[]>;
1472
+ /**
1473
+ * Gets or creates a DM channel with a user.
1474
+ *
1475
+ * @param userId - The ID of the user to create the DM channel with.
1476
+ * @returns An instance of {@link DiscordChannel}.
1477
+ *
1478
+ * @see {@link https://docs.discord.com/developers/resources/user#create-dm}
1479
+ */
1480
+ getDmChannel(rest: RestManager, userId: BigString): Promise<DiscordChannel>;
1481
+ /**
1482
+ * Create a new group DM channel with multiple users.
1483
+ *
1484
+ * @param options - The options for create a new group dm
1485
+ * @returns An instance of {@link DiscordChannel}.
1486
+ *
1487
+ * @remarks
1488
+ * The access tokens require to have the `gdm.join` scope
1489
+ *
1490
+ * This endpoint is limited to 10 active group DMs.
1491
+ *
1492
+ * Fires a _Channel create_ gateway event.
1493
+ *
1494
+ * @see {@link https://docs.discord.com/developers/resources/user#create-group-dm}
1495
+ */
1496
+ getGroupDmChannel(rest: RestManager, options: CreateGroupDmOptions): Promise<DiscordChannel>;
1497
+ /**
1498
+ * Gets an emoji by its ID.
1499
+ *
1500
+ * @param guildId - The ID of the guild from which to get the emoji.
1501
+ * @param emojiId - The ID of the emoji to get.
1502
+ * @returns An instance of {@link DiscordEmoji}.
1503
+ *
1504
+ * @remarks
1505
+ * Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission,
1506
+ * or if the bot created the emoji and has the `CREATE_GUILD_EXPRESSIONS` permission.
1507
+ *
1508
+ * @see {@link https://docs.discord.com/developers/resources/emoji#get-guild-emoji}
1509
+ */
1510
+ getEmoji(rest: RestManager, guildId: BigString, emojiId: BigString): Promise<DiscordEmoji>;
1511
+ /**
1512
+ * Gets an application emoji by its ID.
1513
+ *
1514
+ * @param emojiId - The ID of the emoji to get.
1515
+ * @returns An instance of {@link DiscordEmoji}.
1516
+ *
1517
+ * @remarks
1518
+ * 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.
1519
+ *
1520
+ * @see {@link https://docs.discord.com/developers/resources/emoji#get-application-emoji}
1521
+ */
1522
+ getApplicationEmoji(rest: RestManager, emojiId: BigString): Promise<DiscordEmoji>;
1523
+ /**
1524
+ * Gets the list of emojis for a guild.
1525
+ *
1526
+ * @param guildId - The ID of the guild which to get the emojis of.
1527
+ * @returns A collection of {@link DiscordEmoji} objects assorted by emoji ID.
1528
+ *
1529
+ * @remarks
1530
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1531
+ *
1532
+ * @see {@link https://docs.discord.com/developers/resources/emoji#list-guild-emojis}
1533
+ */
1534
+ getEmojis(rest: RestManager, guildId: BigString): Promise<DiscordEmoji[]>;
1535
+ /**
1536
+ * Gets the list of emojis for an application.
1537
+ *
1538
+ * @returns An object with the array of {@link DiscordEmoji} objects.
1539
+ *
1540
+ * @remarks
1541
+ * 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.
1542
+ *
1543
+ * @see {@link https://docs.discord.com/developers/resources/emoji#list-application-emojis}
1544
+ */
1545
+ getApplicationEmojis(rest: RestManager): Promise<{
1546
+ items: DiscordEmoji[];
1547
+ }>;
1548
+ /**
1549
+ * Gets a follow-up message to an interaction by the ID of the message.
1550
+ *
1551
+ * @param token - The interaction token to use, provided in the original interaction.
1552
+ * @param messageId - The ID of the message to get.
1553
+ * @returns An instance of {@link DiscordMessage}.
1554
+ *
1555
+ * @remarks
1556
+ * Unlike `getMessage()`, this endpoint allows the bot user to act without:
1557
+ * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.)
1558
+ * - Requiring the `MESSAGE_CONTENT` intent.
1559
+ *
1560
+ * Does not support ephemeral follow-up messages due to these being stateless.
1561
+ *
1562
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-followup-message}
1563
+ */
1564
+ getFollowupMessage(rest: RestManager, token: string, messageId: BigString): Promise<DiscordMessage>;
1565
+ /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1566
+ getGatewayBot(rest: RestManager): Promise<DiscordGetGatewayBot>;
1567
+ /**
1568
+ * Gets a global application command by its ID.
1569
+ *
1570
+ * @param commandId - The ID of the command to get.
1571
+ * @returns An instance of {@link DiscordApplicationCommand}.
1572
+ *
1573
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-command}
1574
+ */
1575
+ getGlobalApplicationCommand(rest: RestManager, commandId: BigString): Promise<DiscordApplicationCommand>;
1576
+ /**
1577
+ * Gets the list of your bot's global application commands.
1578
+ *
1579
+ * @param options - The parameters for the fetching of global application commands
1580
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
1581
+ *
1582
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commands}
1583
+ */
1584
+ getGlobalApplicationCommands(rest: RestManager, options?: GetGlobalApplicationCommandsOptions): Promise<DiscordApplicationCommand[]>;
1585
+ /**
1586
+ * Gets a guild by its ID.
1587
+ *
1588
+ * @param guildId - The ID of the guild to get.
1589
+ * @param options - The parameters for the fetching of the guild.
1590
+ * @returns An instance of {@link DiscordGuild}.
1591
+ *
1592
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild}
1593
+ */
1594
+ getGuild(rest: RestManager, guildId: BigString, options?: {
1595
+ counts?: boolean;
1596
+ }): Promise<DiscordGuild>;
1597
+ /**
1598
+ * Get the user guilds.
1599
+ *
1600
+ * @param bearerToken - The access token of the user, if unspecified the bot token is used instead
1601
+ * @param options - The parameters for the fetching of the guild.
1602
+ * @returns An array of partial {@link DiscordGuild}.
1603
+ *
1604
+ * @remarks
1605
+ * If used with an access token, the token needs to have the `guilds` scope
1606
+ *
1607
+ * @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guilds}
1608
+ */
1609
+ getGuilds(rest: RestManager, bearerToken?: string, options?: GetUserGuilds): Promise<Partial<DiscordGuild>[]>;
1610
+ /**
1611
+ * Gets a guild application command by its ID.
1612
+ *
1613
+ * @param guildId - The ID of the guild the command is registered in.
1614
+ * @param commandId - The ID of the command to get.
1615
+ * @returns An instance of {@link DiscordApplicationCommand}.
1616
+ *
1617
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command}
1618
+ */
1619
+ getGuildApplicationCommand(rest: RestManager, commandId: BigString, guildId: BigString): Promise<DiscordApplicationCommand>;
1620
+ /**
1621
+ * Gets the list of application commands registered by your bot in a guild.
1622
+ *
1623
+ * @param guildId - The ID of the guild the commands are registered in.
1624
+ * @param options - The parameters for the fetching of guild application commands
1625
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
1626
+ *
1627
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#get-global-application-commandss}
1628
+ */
1629
+ getGuildApplicationCommands(rest: RestManager, guildId: BigString, options?: GetGuildApplicationCommandsOptions): Promise<DiscordApplicationCommand[]>;
1630
+ /**
1631
+ * Gets the preview of a guild by a guild's ID.
1632
+ *
1633
+ * @param guildId - The ID of the guild to get the preview of.
1634
+ * @returns An instance of {@link DiscordGuildPreview}.
1635
+ *
1636
+ * @remarks
1637
+ * If the bot user is not in the guild, the guild must be discoverable.
1638
+ *
1639
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-preview}
1640
+ */
1641
+ getGuildPreview(rest: RestManager, guildId: BigString): Promise<DiscordGuildPreview>;
1642
+ /**
1643
+ * Returns a sticker object for the given guild and sticker IDs.
1644
+ *
1645
+ * @param guildId The ID of the guild to get
1646
+ * @param stickerId The ID of the sticker to get
1647
+ * @return A {@link DiscordSticker}
1648
+ *
1649
+ * @remarks Includes the user field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1650
+ *
1651
+ * @see {@link https://docs.discord.com/developers/resources/sticker#get-guild-sticker}
1652
+ */
1653
+ getGuildSticker(rest: RestManager, guildId: BigString, stickerId: BigString): Promise<DiscordSticker>;
1654
+ /**
1655
+ * Returns an array of sticker objects for the given guild.
1656
+ *
1657
+ * @param guildId The ID of the guild to get
1658
+ * @returns A collection of {@link DiscordSticker} objects assorted by sticker ID.
1659
+ *
1660
+ * @remarks Includes user fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
1661
+ *
1662
+ * @see {@link https://docs.discord.com/developers/resources/sticker#list-guild-stickers}
1663
+ */
1664
+ getGuildStickers(rest: RestManager, guildId: BigString): Promise<DiscordSticker[]>;
1665
+ /**
1666
+ * Gets a template by its code.
1667
+ *
1668
+ * @param templateCode - The code of the template to get.
1669
+ * @returns An instance of {@link DiscordTemplate}.
1670
+ *
1671
+ * @remarks
1672
+ * Requires the `MANAGE_GUILD` permission.
1673
+ *
1674
+ * @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-template}
1675
+ */
1676
+ getGuildTemplate(rest: RestManager, templateCode: string): Promise<DiscordTemplate>;
1677
+ /**
1678
+ * Gets the list of templates for a guild.
1679
+ *
1680
+ * @param guildId - The ID of the guild to get the list of templates for.
1681
+ * @returns A collection of {@link DiscordTemplate} objects assorted by template code.
1682
+ *
1683
+ * @remarks
1684
+ * Requires the `MANAGE_GUILD` permission.
1685
+ *
1686
+ * @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
1687
+ */
1688
+ getGuildTemplates(rest: RestManager, guildId: BigString): Promise<DiscordTemplate[]>;
1689
+ /**
1690
+ * Gets the list of webhooks for a guild.
1691
+ *
1692
+ * @param guildId - The ID of the guild to get the list of webhooks for.
1693
+ * @returns A collection of {@link DiscordWebhook} objects assorted by webhook ID.
1694
+ *
1695
+ * @remarks
1696
+ * Requires the `MANAGE_WEBHOOKS` permission.
1697
+ *
1698
+ * @see {@link https://docs.discord.com/developers/resources/webhook#get-guild-webhooks}
1699
+ */
1700
+ getGuildWebhooks(rest: RestManager, guildId: BigString): Promise<DiscordWebhook[]>;
1701
+ /**
1702
+ * Gets the list of integrations attached to a guild.
1703
+ *
1704
+ * @param guildId - The ID of the guild to get the list of integrations from.
1705
+ * @returns A collection of {@link DiscordIntegration} objects assorted by integration ID.
1706
+ *
1707
+ * @remarks
1708
+ * Requires the `MANAGE_GUILD` permission.
1709
+ *
1710
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-integrations}
1711
+ */
1712
+ getIntegrations(rest: RestManager, guildId: BigString): Promise<DiscordIntegration[]>;
1713
+ /**
1714
+ * Gets an invite to a channel by its invite code.
1715
+ *
1716
+ * @param inviteCode - The invite code of the invite to get.
1717
+ * @param options - The parameters for the fetching of the invite.
1718
+ * @returns An instance of {@link DiscordInviteMetadata}.
1719
+ *
1720
+ * @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
1721
+ */
1722
+ getInvite(rest: RestManager, inviteCode: string, options?: GetInvite): Promise<DiscordInviteMetadata>;
1723
+ /**
1724
+ * Gets the list of invites for a guild.
1725
+ *
1726
+ * @param guildId - The ID of the guild to get the invites from.
1727
+ * @returns A collection of {@link DiscordInviteMetadata} objects assorted by invite code.
1728
+ *
1729
+ * @remarks
1730
+ * Requires the `MANAGE_GUILD` or `VIEW_AUDIT_LOG` permission.
1731
+ *
1732
+ * @see {@link https://docs.discord.com/developers/resources/invite#get-invites}
1733
+ */
1734
+ getInvites(rest: RestManager, guildId: BigString): Promise<DiscordInviteMetadata[]>;
1735
+ /**
1736
+ * Gets a message from a channel by the ID of the message.
1737
+ *
1738
+ * @param channelId - The ID of the channel from which to get the message.
1739
+ * @param messageId - The ID of the message to get.
1740
+ * @returns An instance of {@link DiscordMessage}.
1741
+ *
1742
+ * @remarks
1743
+ * Requires that the bot user be able to see the contents of the channel in which the message was posted.
1744
+ *
1745
+ * If getting a message from a guild channel:
1746
+ * - Requires the `READ_MESSAGE_HISTORY` permission.
1747
+ *
1748
+ * @see {@link https://docs.discord.com/developers/resources/channel#get-channel-message}
1749
+ */
1750
+ getMessage(rest: RestManager, channelId: BigString, messageId: BigString): Promise<DiscordMessage>;
1751
+ /**
1752
+ * Gets multiple messages from a channel.
1753
+ *
1754
+ * @param channelId - The ID of the channel from which to get the messages.
1755
+ * @param options - The parameters for the fetching of the messages.
1756
+ * @returns Returns an array of {@link DiscordMessage} objects from newest to oldest on success.
1757
+ *
1758
+ * @remarks
1759
+ * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
1760
+ *
1761
+ * If getting a messages from a guild channel:
1762
+ * - Requires the `READ_MESSAGE_HISTORY` permission.
1763
+ *
1764
+ * @see {@link https://docs.discord.com/developers/resources/channel#get-channel-messages}
1765
+ */
1766
+ getMessages(rest: RestManager, channelId: BigString, options?: GetMessagesOptions): Promise<DiscordMessage[]>;
1767
+ /**
1768
+ * Search messages in a guild.
1769
+ *
1770
+ * @remarks
1771
+ * Requires `READ_MESSAGE_HISTORY` and is restricted by the `MESSAGE_CONTENT` intent.
1772
+ *
1773
+ * @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
1774
+ */
1775
+ searchGuildMessages(rest: RestManager, guildId: BigString, options?: SearchGuildMessagesOptions): Promise<DiscordSearchGuildMessages | DiscordSearchGuildMessagesIndexing>;
1776
+ /**
1777
+ * Returns a sticker pack for the given ID.
1778
+ *
1779
+ * @returns A {@link DiscordStickerPack} object.
1780
+ *
1781
+ * @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker-pack}
1782
+ */
1783
+ getStickerPack(rest: RestManager, stickerPackId: BigString): Promise<DiscordStickerPack>;
1784
+ /**
1785
+ * Returns the list of sticker packs available.
1786
+ *
1787
+ * @returns A collection of {@link DiscordStickerPack} objects assorted by sticker ID.
1788
+ *
1789
+ * @see {@link https://docs.discord.com/developers/resources/sticker#list-sticker-packs}
1790
+ */
1791
+ getStickerPacks(rest: RestManager): Promise<DiscordStickerPack[]>;
1792
+ /**
1793
+ * Gets the initial message response to an interaction.
1794
+ *
1795
+ * @param token - The interaction token to use, provided in the original interaction.
1796
+ * @returns An instance of {@link DiscordMessage}.
1797
+ *
1798
+ * @remarks
1799
+ * Unlike `getMessage()`, this endpoint allows the bot user to act without:
1800
+ * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.)
1801
+ * - Requiring the `MESSAGE_CONTENT` intent.
1802
+ *
1803
+ * Does not support ephemeral follow-up messages due to these being stateless.
1804
+ *
1805
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#get-original-interaction-response}
1806
+ */
1807
+ getOriginalInteractionResponse(rest: RestManager, token: string): Promise<DiscordMessage>;
1808
+ /**
1809
+ * Retrieves the list of pins in a channel.
1810
+ *
1811
+ * @param channelId - The ID of the channel to get the pins for.
1812
+ * @param options - The options for the fetching of the pins.
1813
+ * @returns A {@link DiscordGetChannelPins} objects
1814
+ *
1815
+ * @remarks
1816
+ * Requires the `VIEW_CHANNEL` permission.
1817
+ *
1818
+ * If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned.
1819
+ *
1820
+ * @see {@link https://docs.discord.com/developers/resources/message#get-channel-pins}
1821
+ */
1822
+ getChannelPins(rest: RestManager, channelId: BigString, options?: GetChannelPinsOptions): Promise<DiscordGetChannelPins>;
1823
+ /**
1824
+ * Gets the pinned messages for a channel.
1825
+ *
1826
+ * @param channelId - The ID of the channel to get the pinned messages for.
1827
+ * @returns A collection of {@link DiscordMessage} objects assorted by message ID.
1828
+ *
1829
+ * @remarks
1830
+ * Requires that the bot user be able to see the contents of the channel in which the messages were posted.
1831
+ *
1832
+ * If getting a message from a guild channel:
1833
+ * - Requires the `READ_MESSAGE_HISTORY` permission.
1834
+ *
1835
+ * @see {@link https://docs.discord.com/developers/resources/message#get-pinned-messages-deprecated}
1836
+ * @deprecated Use {@link getChannelPins} instead.
1837
+ */
1838
+ getPinnedMessages(rest: RestManager, channelId: BigString): Promise<DiscordMessage[]>;
1839
+ /**
1840
+ * Gets the list of private archived threads for a channel.
1841
+ *
1842
+ * @param channelId - The ID of the channel to get the archived threads for.
1843
+ * @param options - The parameters for the fetching of threads.
1844
+ * @returns An instance of {@link DiscordListArchivedThreads}.
1845
+ *
1846
+ * @remarks
1847
+ * Requires the `READ_MESSAGE_HISTORY` permission.
1848
+ * Requires the `MANAGE_THREADS` permission.
1849
+ *
1850
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1851
+ *
1852
+ * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1853
+ *
1854
+ * @see {@link https://docs.discord.com/developers/resources/channel#list-private-archived-threads}
1855
+ */
1856
+ getPrivateArchivedThreads(rest: RestManager, channelId: BigString, options?: ListArchivedThreads): Promise<DiscordListArchivedThreads>;
1857
+ /**
1858
+ * Gets the list of private archived threads the bot is a member of for a channel.
1859
+ *
1860
+ * @param channelId - The ID of the channel to get the archived threads for.
1861
+ * @param options - The parameters for the fetching of threads.
1862
+ * @returns An instance of {@link DiscordListArchivedThreads}.
1863
+ *
1864
+ * @remarks
1865
+ * Requires the `READ_MESSAGE_HISTORY` permission.
1866
+ *
1867
+ * Returns threads of type {@link ChannelTypes}.GuildPrivateThread.
1868
+ *
1869
+ * Threads are ordered by the `id` property in descending order.
1870
+ *
1871
+ * @see {@link https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads}
1872
+ */
1873
+ getPrivateJoinedArchivedThreads(rest: RestManager, channelId: BigString, options?: ListArchivedThreads): Promise<DiscordListArchivedThreads>;
1874
+ /**
1875
+ * Gets the number of members that would be kicked from a guild during pruning.
1876
+ *
1877
+ * @param guildId - The ID of the guild to get the prune count of.
1878
+ * @param options - The parameters for the fetching of the prune count.
1879
+ * @returns A number indicating the number of members that would be kicked.
1880
+ *
1881
+ * @remarks
1882
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions, unless the guild has the `PRUNE_REQUIRES_ADMIN` guild feature, in which case it requires the `ADMINISTRATOR` permission.
1883
+ *
1884
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-prune-count}
1885
+ */
1886
+ getPruneCount(rest: RestManager, guildId: BigString, options?: GetGuildPruneCountQuery): Promise<DiscordPrunedCount>;
1887
+ /**
1888
+ * Gets the list of public archived threads for a channel.
1889
+ *
1890
+ * @param channelId - The ID of the channel to get the archived threads for.
1891
+ * @param options - The parameters for the fetching of threads.
1892
+ * @returns An instance of {@link DiscordListArchivedThreads}.
1893
+ *
1894
+ * @remarks
1895
+ * Requires the `READ_MESSAGE_HISTORY` permission.
1896
+ *
1897
+ * If called on a channel of type {@link ChannelTypes}.GuildText, returns threads of type {@link ChannelTypes}.GuildPublicThread.
1898
+ * If called on a channel of type {@link ChannelTypes}.GuildNews, returns threads of type {@link ChannelTypes}.GuildNewsThread.
1899
+ *
1900
+ * Threads are ordered by the `archive_timestamp` property included in the metadata of the object in descending order.
1901
+ *
1902
+ * @see {@link https://docs.discord.com/developers/resources/channel#list-public-archived-threads}
1903
+ */
1904
+ getPublicArchivedThreads(rest: RestManager, channelId: BigString, options?: ListArchivedThreads): Promise<DiscordListArchivedThreads>;
1905
+ /**
1906
+ * Gets the list of roles for a guild.
1907
+ *
1908
+ * @param guildId - The ID of the guild to get the list of roles for.
1909
+ * @returns A collection of {@link DiscordRole} objects assorted by role ID.
1910
+ *
1911
+ * @remarks
1912
+ * ⚠️ This endpoint should be used sparingly due to {@link DiscordRole} objects already being included in guild payloads.
1913
+ *
1914
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-roles}
1915
+ */
1916
+ getRoles(rest: RestManager, guildId: BigString): Promise<DiscordRole[]>;
1917
+ /**
1918
+ * Gets a role by id for a guild.
1919
+ *
1920
+ * @param guildId - The ID of the guild to get role for.
1921
+ * @param roleId - The ID of the role.
1922
+ * @returns A {@link DiscordRole} object.
1923
+ *
1924
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role}
1925
+ */
1926
+ getRole(rest: RestManager, guildId: BigString, roleId: BigString): Promise<DiscordRole>;
1927
+ /**
1928
+ * Gets a scheduled event by its ID.
1929
+ *
1930
+ * @param guildId - The ID of the guild to get the scheduled event from.
1931
+ * @param eventId - The ID of the scheduled event to get.
1932
+ * @param options - The parameters for the fetching of the scheduled event.
1933
+ * @returns An instance of {@link DiscordScheduledEvent}.
1934
+ *
1935
+ * @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event}
1936
+ */
1937
+ getScheduledEvent(rest: RestManager, guildId: BigString, eventId: BigString, options?: {
1938
+ withUserCount?: boolean;
1939
+ }): Promise<DiscordScheduledEvent>;
1940
+ /**
1941
+ * Gets the list of scheduled events for a guild.
1942
+ *
1943
+ * @param guildId - The ID of the guild to get the scheduled events from.
1944
+ * @param options - The parameters for the fetching of the scheduled events.
1945
+ * @returns A collection of {@link DiscordScheduledEvent} objects assorted by event ID.
1946
+ *
1947
+ * @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#list-scheduled-events-for-guild}
1948
+ */
1949
+ getScheduledEvents(rest: RestManager, guildId: BigString, options?: GetScheduledEvents): Promise<DiscordScheduledEvent[]>;
1950
+ /**
1951
+ * Gets the list of subscribers to a scheduled event from a guild.
1952
+ *
1953
+ * @param guildId - The ID of the guild to get the subscribers to the scheduled event from.
1954
+ * @param eventId - The ID of the scheduled event to get the subscribers of.
1955
+ * @param options - The parameters for the fetching of the subscribers.
1956
+ * @returns A collection of {@link DiscordUser} objects assorted by user ID.
1957
+ *
1958
+ * @remarks
1959
+ * Requires the `MANAGE_EVENTS` permission.
1960
+ *
1961
+ * Users are ordered by their IDs in _ascending_ order.
1962
+ *
1963
+ * @see {@link https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event-users}
1964
+ */
1965
+ getScheduledEventUsers(rest: RestManager, guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers): Promise<{
1966
+ user: DiscordUser;
1967
+ member?: DiscordMember;
1968
+ }[]>;
1969
+ /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
1970
+ getSessionInfo(rest: RestManager): Promise<DiscordGetGatewayBot>;
1971
+ /**
1972
+ * Gets the stage instance associated with a stage channel, if one exists.
1973
+ *
1974
+ * @param channelId - The ID of the stage channel the stage instance is associated with.
1975
+ * @returns An instance of {@link DiscordStageInstance}.
1976
+ *
1977
+ * @see {@link https://docs.discord.com/developers/resources/stage-instance#get-stage-instance}
1978
+ */
1979
+ getStageInstance(rest: RestManager, channelId: BigString): Promise<DiscordStageInstance>;
1980
+ /**
1981
+ * Returns the current user's voice state in the guild.
1982
+ *
1983
+ * @param guildId - The ID of the guild to get the voice state from.
1984
+ * @returns An instance of {@link DiscordVoiceState}.
1985
+ *
1986
+ * @see {@link https://docs.discord.com/developers/resources/voice#get-current-user-voice-state}
1987
+ */
1988
+ getOwnVoiceState(rest: RestManager, guildId: BigString): Promise<DiscordVoiceState>;
1989
+ /**
1990
+ * Returns the specified user's voice state in the guild.
1991
+ *
1992
+ * @param guildId - The ID of the guild to get the voice state from.
1993
+ * @param userId - The ID of the user to get the voice state from
1994
+ * @returns An instance of {@link DiscordVoiceState}.
1995
+ *
1996
+ * @remarks
1997
+ * If the specified user is connected to a voice channel, the current user must have permission to connect to the channel.
1998
+ *
1999
+ * @see {@link https://docs.discord.com/developers/resources/voice#get-user-voice-state}
2000
+ */
2001
+ getUserVoiceState(rest: RestManager, guildId: BigString, userId: BigString): Promise<DiscordVoiceState>;
2002
+ /**
2003
+ * Returns a sticker object for the given sticker ID.
2004
+ *
2005
+ * @param stickerId The ID of the sticker to get
2006
+ * @returns A {@link DiscordSticker}
2007
+ *
2008
+ * @see {@link https://docs.discord.com/developers/resources/sticker#get-sticker}
2009
+ */
2010
+ getSticker(rest: RestManager, stickerId: BigString): Promise<DiscordSticker>;
2011
+ /**
2012
+ * Gets a thread member by their user ID.
2013
+ *
2014
+ * @param channelId - The ID of the thread to get the thread member of.
2015
+ * @param userId - The user ID of the thread member to get.
2016
+ * @param options - The parameters for the fetching of the thread member.
2017
+ * @returns An instance of {@link DiscordThreadMember}.
2018
+ *
2019
+ * @see {@link https://docs.discord.com/developers/resources/channel#get-thread-member}
2020
+ */
2021
+ getThreadMember(rest: RestManager, channelId: BigString, userId: BigString, options?: GetThreadMember): Promise<DiscordThreadMember>;
2022
+ /**
2023
+ * Gets the list of thread members for a thread.
2024
+ *
2025
+ * @param channelId - The ID of the thread to get the thread members of.
2026
+ * @param options - The parameters for the fetching of the thread members.
2027
+ * @returns A collection of {@link DiscordThreadMember} assorted by user ID.
2028
+ *
2029
+ * @remarks
2030
+ * Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
2031
+ *
2032
+ * @see {@link https://docs.discord.com/developers/resources/channel#list-thread-members}
2033
+ */
2034
+ getThreadMembers(rest: RestManager, channelId: BigString, options?: ListThreadMembers): Promise<DiscordThreadMember[]>;
2035
+ /**
2036
+ * Gets the list of users that reacted with an emoji to a message.
2037
+ *
2038
+ * @param channelId - The ID of the channel the message to get the users for is in.
2039
+ * @param messageId - The ID of the message to get the users for.
2040
+ * @param reaction - The reaction for which to get the users.
2041
+ * @param options - The parameters for the fetching of the users.
2042
+ * @returns A collection of {@link DiscordUser} objects assorted by user ID.
2043
+ *
2044
+ * @see {@link https://docs.discord.com/developers/resources/channel#get-reactions}
2045
+ */
2046
+ getReactions(rest: RestManager, channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions): Promise<DiscordUser[]>;
2047
+ /**
2048
+ * Get a user's data from the api
2049
+ *
2050
+ * @param id The user's id
2051
+ * @returns {DiscordUser}
2052
+ */
2053
+ getUser(rest: RestManager, id: BigString): Promise<DiscordUser>;
2054
+ /**
2055
+ * Get the current user data.
2056
+ *
2057
+ * @param bearerToken - The access token of the user
2058
+ * @returns {DiscordUser}
2059
+ *
2060
+ * @remarks
2061
+ * This requires the `identify` scope.
2062
+ *
2063
+ * To get the mail this also requires the `email` scope
2064
+ */
2065
+ getCurrentUser(rest: RestManager, bearerToken: string): Promise<DiscordUser>;
2066
+ /**
2067
+ * Get the current user connections.
2068
+ *
2069
+ * @param bearerToken - The access token of the user
2070
+ * @returns {DiscordConnection[]}
2071
+ *
2072
+ * @remarks
2073
+ * This requires the `connections` scope.
2074
+ */
2075
+ getUserConnections(rest: RestManager, bearerToken: string): Promise<DiscordConnection[]>;
2076
+ /**
2077
+ * Get the current user application role connection for the application.
2078
+ *
2079
+ * @param bearerToken - The access token of the user
2080
+ * @param applicationId - The id of the application to get the role connection
2081
+ * @returns {DiscordApplicationRoleConnection}
2082
+ *
2083
+ * @remarks
2084
+ * The access token requires the `role_connections.write` scope.
2085
+ *
2086
+ * @see {@link https://docs.discord.com/developers/resources/user#get-user-application-role-connection}
2087
+ */
2088
+ getUserApplicationRoleConnection(rest: RestManager, bearerToken: string, applicationId: BigString): Promise<DiscordApplicationRoleConnection>;
2089
+ /**
2090
+ * Gets information about the vanity url of a guild.
2091
+ *
2092
+ * @param guildId - The ID of the guild to get the vanity url information for.
2093
+ * @returns An instance of {@link DiscordVanityUrl}.
2094
+ *
2095
+ * @remarks
2096
+ * Requires the `MANAGE_GUILD` permission.
2097
+ *
2098
+ * The `code` property will be `null` if the guild does not have a set vanity url.
2099
+ *
2100
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-vanity-url}
2101
+ */
2102
+ getVanityUrl(rest: RestManager, guildId: BigString): Promise<DiscordVanityUrl>;
2103
+ /**
2104
+ * Gets the list of voice regions for a guild.
2105
+ *
2106
+ * @param guildId - The ID of the guild to get the voice regions for.
2107
+ * @returns A collection of {@link DiscordVoiceRegion} objects assorted by voice region ID.
2108
+ *
2109
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-voice-regions}
2110
+ */
2111
+ getVoiceRegions(rest: RestManager, guildId: BigString): Promise<DiscordVoiceRegion[]>;
2112
+ /**
2113
+ * Gets a webhook by its ID.
2114
+ *
2115
+ * @param webhookId - The ID of the webhook to get.
2116
+ * @returns An instance of {@link DiscordWebhook}.
2117
+ *
2118
+ * @remarks
2119
+ * Requires the `MANAGE_WEBHOOKS` permission unless the application making the request owns the webhook.
2120
+ *
2121
+ * @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook}
2122
+ */
2123
+ getWebhook(rest: RestManager, webhookId: BigString): Promise<DiscordWebhook>;
2124
+ /**
2125
+ * Gets a webhook message by its ID.
2126
+ *
2127
+ * @param webhookId - The ID of the webhook to get a message of.
2128
+ * @param token - The webhook token, used to get webhook messages.
2129
+ * @param messageId - the ID of the webhook message to get.
2130
+ * @param options - The parameters for the fetching of the message.
2131
+ * @returns An instance of {@link DiscordMessage}.
2132
+ *
2133
+ * @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-message}
2134
+ */
2135
+ getWebhookMessage(rest: RestManager, webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions): Promise<DiscordMessage>;
2136
+ /**
2137
+ * Gets a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
2138
+ *
2139
+ * @param webhookId - The ID of the webhook to get.
2140
+ * @param token - The webhook token, used to get the webhook.
2141
+ * @returns An instance of {@link DiscordWebhook}.
2142
+ *
2143
+ * @see {@link https://docs.discord.com/developers/resources/webhook#get-webhook-with-token}
2144
+ */
2145
+ getWebhookWithToken(rest: RestManager, webhookId: BigString, token: string): Promise<DiscordWebhook>;
2146
+ /**
2147
+ * Gets the welcome screen for a guild.
2148
+ *
2149
+ * @param guildId - The ID of the guild to get the welcome screen for.
2150
+ * @returns An instance of {@link DiscordWelcomeScreen}.
2151
+ *
2152
+ * @remarks
2153
+ * If the welcome screen is not enabled:
2154
+ * - Requires the `MANAGE_GUILD` permission.
2155
+ *
2156
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-welcome-screen}
2157
+ */
2158
+ getWelcomeScreen(rest: RestManager, guildId: BigString): Promise<DiscordWelcomeScreen>;
2159
+ /**
2160
+ * Gets the guild widget by guild ID.
2161
+ *
2162
+ * @param guildId - The ID of the guild to get the widget of.
2163
+ * @returns An instance of {@link DiscordGuildWidget}.
2164
+ *
2165
+ * @remarks
2166
+ * Fires an `INVITE_CREATED` Gateway event when an invite channel is defined and a new `Invite` is generated.
2167
+ *
2168
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget}
2169
+ */
2170
+ getWidget(rest: RestManager, guildId: BigString): Promise<DiscordGuildWidget>;
2171
+ /**
2172
+ * Gets the settings of a guild's widget.
2173
+ *
2174
+ * @param guildId - The ID of the guild to get the widget of.
2175
+ * @returns An instance of {@link DiscordGuildWidgetSettings}.
2176
+ *
2177
+ * @remarks
2178
+ * Requires the `MANAGE_GUILD` permission.
2179
+ *
2180
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-widget-settings}
2181
+ */
2182
+ getWidgetSettings(rest: RestManager, guildId: BigString): Promise<DiscordGuildWidgetSettings>;
2183
+ /**
2184
+ * Adds the bot user to a thread.
2185
+ *
2186
+ * @param channelId - The ID of the thread to add the bot user to.
2187
+ *
2188
+ * @remarks
2189
+ * Requires the thread not be archived.
2190
+ *
2191
+ * Fires a _Thread Members Update_ gateway event.
2192
+ *
2193
+ * @see {@link https://docs.discord.com/developers/resources/channel#join-thread}
2194
+ */
2195
+ joinThread(rest: RestManager, channelId: BigString): Promise<void>;
2196
+ /**
2197
+ * Leaves a guild.
2198
+ *
2199
+ * @param guildId - The ID of the guild to leave.
2200
+ *
2201
+ * @remarks
2202
+ * Fires a _Guild Delete_ event.
2203
+ *
2204
+ * @see {@link https://docs.discord.com/developers/resources/user#leave-guild}
2205
+ */
2206
+ leaveGuild(rest: RestManager, guildId: BigString): Promise<void>;
2207
+ /**
2208
+ * Removes the bot user from a thread.
2209
+ *
2210
+ * @param channelId - The ID of the thread to remove the bot user from.
2211
+ *
2212
+ * @remarks
2213
+ * Requires the thread not be archived.
2214
+ *
2215
+ * Fires a _Thread Members Update_ gateway event.
2216
+ *
2217
+ * @see {@link https://docs.discord.com/developers/resources/channel#leave-thread}
2218
+ */
2219
+ leaveThread(rest: RestManager, channelId: BigString): Promise<void>;
2220
+ /**
2221
+ * Cross-posts a message posted in an announcement channel to subscribed channels.
2222
+ *
2223
+ * @param channelId - The ID of the announcement channel.
2224
+ * @param messageId - The ID of the message to cross-post.
2225
+ * @returns An instance of the cross-posted {@link DiscordMessage}.
2226
+ *
2227
+ * @remarks
2228
+ * Requires the `SEND_MESSAGES` permission.
2229
+ *
2230
+ * If not cross-posting own message:
2231
+ * - Requires the `MANAGE_MESSAGES` permission.
2232
+ *
2233
+ * Fires a _Message Create_ event in the guilds the subscribed channels are in.
2234
+ *
2235
+ * @see {@link https://docs.discord.com/developers/resources/channel#crosspost-message}
2236
+ */
2237
+ publishMessage(rest: RestManager, channelId: BigString, messageId: BigString): Promise<DiscordMessage>;
2238
+ /**
2239
+ * Removes a role from a member.
2240
+ *
2241
+ * @param guildId - The ID of the guild the member to remove the role from is in.
2242
+ * @param userId - The user ID of the member to remove the role from.
2243
+ * @param roleId - The ID of the role to remove from the member.
2244
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2245
+ *
2246
+ * @remarks
2247
+ * Requires the `MANAGE_ROLES` permission.
2248
+ *
2249
+ * Fires a _Guild Member Update_ gateway event.
2250
+ *
2251
+ * @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member-role}
2252
+ */
2253
+ removeRole(rest: RestManager, guildId: BigString, userId: BigString, roleId: BigString, reason?: string): Promise<void>;
2254
+ /**
2255
+ * Removes a member from a thread.
2256
+ *
2257
+ * @param channelId - The ID of the thread to remove the thread member of.
2258
+ * @param userId - The user ID of the thread member to remove.
2259
+ *
2260
+ * @remarks
2261
+ * If the thread is of type {@link ChannelTypes}.GuildPrivateThread, requires to be the creator of the thread.
2262
+ * Otherwise, requires the `MANAGE_THREADS` permission.
2263
+ *
2264
+ * Requires the thread not be archived.
2265
+ *
2266
+ * Fires a _Thread Members Update_ gateway event.
2267
+ *
2268
+ * @see {@link https://docs.discord.com/developers/resources/channel#remove-thread-member}
2269
+ */
2270
+ removeThreadMember(rest: RestManager, channelId: BigString, userId: BigString): Promise<void>;
2271
+ /**
2272
+ * Removes a member from a Group DM.
2273
+ *
2274
+ * @param channelId - The ID of the channel to remove the recipient user of.
2275
+ * @param userId - The user ID of the user to remove.
2276
+ *
2277
+ * @see {@link https://docs.discord.com/developers/resources/channel#group-dm-remove-recipient}
2278
+ */
2279
+ removeDmRecipient(rest: RestManager, channelId: BigString, userId: BigString): Promise<void>;
2280
+ /**
2281
+ * Sends a message to a channel.
2282
+ *
2283
+ * @param channelId - The ID of the channel to send the message in.
2284
+ * @param options - The parameters for the creation of the message.
2285
+ * @returns An instance of the created {@link DiscordMessage}.
2286
+ *
2287
+ * @remarks
2288
+ * Requires that the bot user be able to see the contents of the channel the message is to be sent in.
2289
+ *
2290
+ * If sending a message to a guild channel:
2291
+ * - Requires the `SEND_MESSAGES` permission.
2292
+ *
2293
+ * If sending a TTS message:
2294
+ * - Requires the `SEND_TTS_MESSAGES` permission.
2295
+ *
2296
+ * If sending a message as a reply to another message:
2297
+ * - Requires the `READ_MESSAGE_HISTORY` permission.
2298
+ * - The message being replied to cannot be a system message.
2299
+ *
2300
+ * ⚠️ The maximum size of a request (accounting for any attachments and message content) for bot users is _8 MiB_.
2301
+ *
2302
+ * Fires a _Message Create_ gateway event.
2303
+ *
2304
+ * @see {@link https://docs.discord.com/developers/resources/channel#create-message}
2305
+ */
2306
+ sendMessage(rest: RestManager, channelId: BigString, options: CreateMessageOptions): Promise<DiscordMessage>;
2307
+ /**
2308
+ * Sends a follow-up message to an interaction.
2309
+ *
2310
+ * @param token - The interaction token to use, provided in the original interaction.
2311
+ * @param options - The parameters for the creation of the message.
2312
+ * @returns An instance of the created {@link DiscordMessage}.
2313
+ *
2314
+ * @remarks
2315
+ * ⚠️ Interaction tokens are only valid for _15 minutes_.
2316
+ *
2317
+ * By default, mentions are suppressed. To enable mentions, pass a mention object with the callback data.
2318
+ *
2319
+ * Unlike `sendMessage()`, this endpoint allows the bot user to act without:
2320
+ * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.)
2321
+ * - Requiring the `MESSAGE_CONTENT` intent.
2322
+ *
2323
+ * Apps are limited to 5 followup messages per interaction if it was initiated from a user-installed app and isn't installed in the server
2324
+ * You can check if it was initiated from a user-installed app that isn't installed in the server by checking if {@link DiscordInteraction.authorizing_integration_owners | authorizingIntegrationOwners} only contains {@link DiscordApplicationIntegrationType.UserInstall | UserInstall}.
2325
+ *
2326
+ * Fires a _Message Create_ event.
2327
+ *
2328
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-followup-message}
2329
+ */
2330
+ sendFollowupMessage(rest: RestManager, token: string, options: InteractionCallbackData): Promise<DiscordMessage>;
2331
+ /**
2332
+ * Sends a response to an interaction.
2333
+ *
2334
+ * @param interactionId - The ID of the interaction to respond to.
2335
+ * @param token - The interaction token to use, provided in the original interaction.
2336
+ * @param options - The parameters for the creation of the message.
2337
+ * @param params - The query parameters for the response of the callback
2338
+ * @returns Nothing or the {@link DiscordInteractionCallbackResponse} if withResponse param is true
2339
+ *
2340
+ * @remarks
2341
+ * ⚠️ Interaction tokens are only valid for _15 minutes_.
2342
+ *
2343
+ * By default, mentions are suppressed. To enable mentions, pass a mention object with the callback data.
2344
+ *
2345
+ * Unlike `sendMessage()`, this endpoint allows the bot user to act without:
2346
+ * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.)
2347
+ * - Requiring the `MESSAGE_CONTENT` intent.
2348
+ *
2349
+ * Fires a _Message Create_ event.
2350
+ *
2351
+ * @see {@link https://docs.discord.com/developers/interactions/receiving-and-responding#create-interaction-response}
2352
+ */
2353
+ sendInteractionResponse(rest: RestManager, interactionId: BigString, token: string, options: InteractionResponse, params?: InteractionCallbackOptions): Promise<void | DiscordInteractionCallbackResponse>;
2354
+ /**
2355
+ * Creates a thread, using an existing message as its point of origin.
2356
+ *
2357
+ * @param channelId - The ID of the channel in which to create the thread.
2358
+ * @param messageId - The ID of the message to use as the thread's point of origin.
2359
+ * @param options - The parameters to use for the creation of the thread.
2360
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2361
+ * @returns An instance of the created {@link DiscordChannel}.
2362
+ *
2363
+ * @remarks
2364
+ * If called on a channel of type {@link ChannelTypes}.GuildText, creates a {@link ChannelTypes}.GuildPublicThread.
2365
+ * If called on a channel of type {@link ChannelTypes}.GuildNews, creates a {@link ChannelTypes}.GuildNewsThread.
2366
+ * Does not work on channels of type {@link ChannelTypes}.GuildForum.
2367
+ *
2368
+ * The ID of the created thread will be the same as the ID of the source message.
2369
+ *
2370
+ * Fires a _Thread Create_ gateway event.
2371
+ *
2372
+ * @see {@link https://docs.discord.com/developers/resources/channel#start-thread-from-message}
2373
+ */
2374
+ startThreadWithMessage(rest: RestManager, channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string): Promise<DiscordChannel>;
2375
+ /**
2376
+ * Creates a thread without using a message as the thread's point of origin.
2377
+ *
2378
+ * @param channelId - The ID of the channel in which to create the thread.
2379
+ * @param options - The parameters to use for the creation of the thread.
2380
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2381
+ * @returns An instance of the created {@link DiscordChannel | Thread}.
2382
+ *
2383
+ * @remarks
2384
+ * Creating a private thread requires the server to be boosted.
2385
+ *
2386
+ * Fires a _Thread Create_ gateway event.
2387
+ *
2388
+ * @see {@link https://docs.discord.com/developers/resources/channel#start-thread-without-message}
2389
+ */
2390
+ startThreadWithoutMessage(rest: RestManager, channelId: BigString, options: StartThreadWithoutMessage, reason?: string): Promise<DiscordChannel>;
2391
+ /**
2392
+ * Get a list of users that voted for this specific answer.
2393
+ *
2394
+ * @param channelId - The ID of the channel in which the message with the poll lives
2395
+ * @param messageId - The ID of the message in which the poll lives
2396
+ * @param answerId - The ID of the answer to get the users that voted that answer
2397
+ * @param options - The options for the request
2398
+ * @returns The list of users that voted for the specific answer.
2399
+ */
2400
+ getPollAnswerVoters(rest: RestManager, channelId: BigString, messageId: BigString, answerId: number, options?: GetPollAnswerVotes): Promise<DiscordGetAnswerVotesResponse>;
2401
+ /**
2402
+ * Immediately ends the poll.
2403
+ *
2404
+ * @param channelId - The ID of the channel in which the message with the poll lives
2405
+ * @param messageId - The ID of the message in which the poll lives
2406
+ * @returns The message with the expired poll
2407
+ *
2408
+ * @remarks
2409
+ * You cannot end polls from other users.
2410
+ *
2411
+ * Fires a _Message Update_ gateway event
2412
+ */
2413
+ endPoll(rest: RestManager, channelId: BigString, messageId: BigString): Promise<DiscordMessage>;
2414
+ /**
2415
+ * Synchronises a template with the current state of a guild.
2416
+ *
2417
+ * @param guildId - The ID of the guild to synchronise a template of.
2418
+ * @returns An instance of the edited {@link DiscordTemplate}.
2419
+ *
2420
+ * @remarks
2421
+ * Requires the `MANAGE_GUILD` permission.
2422
+ *
2423
+ * Fires a _Guild Update_ gateway event.
2424
+ *
2425
+ * @see {@link https://docs.discord.com/developers/resources/guild-template#get-guild-templates}
2426
+ */
2427
+ syncGuildTemplate(rest: RestManager, guildId: BigString): Promise<DiscordTemplate>;
2428
+ /**
2429
+ * Triggers a typing indicator for the specified channel, which expires after 10 seconds.
2430
+ *
2431
+ * @param channelId - The ID of the channel in which to trigger the typing indicator.
2432
+ *
2433
+ * @remarks
2434
+ * Generally bots should **not** use this route.
2435
+ * However, if a bot is responding to a command and expects the computation to take a few seconds,
2436
+ * this endpoint may be called to let the user know that the bot is processing their message.
2437
+ *
2438
+ * Fires a _Typing Start_ gateway event.
2439
+ *
2440
+ * @see {@link https://docs.discord.com/developers/resources/channel#trigger-typing-indicator}
2441
+ */
2442
+ triggerTypingIndicator(rest: RestManager, channelId: BigString): Promise<void>;
2443
+ /**
2444
+ * Re-registers the list of global application commands, overwriting the previous commands completely.
2445
+ *
2446
+ * @param commands - The list of commands to use to overwrite the previous list.
2447
+ * @param options - Additional options for the endpoint.
2448
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
2449
+ *
2450
+ * @remarks
2451
+ * ❗ Commands that are not present in the `commands` array will be __deleted__.
2452
+ *
2453
+ * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2454
+ *
2455
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
2456
+ * You will be able to update only your own application commands
2457
+ *
2458
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-global-application-commands}
2459
+ */
2460
+ upsertGlobalApplicationCommands(rest: RestManager, commands: CreateApplicationCommand[], options?: UpsertGlobalApplicationCommandOptions): Promise<DiscordApplicationCommand[]>;
2461
+ /**
2462
+ * Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
2463
+ *
2464
+ * @param guildId - The ID of the guild whose list of commands to overwrite.
2465
+ * @param commands - The list of commands to use to overwrite the previous list.
2466
+ * @param options - Additional options for the endpoint.
2467
+ * @returns A collection of {@link DiscordApplicationCommand} objects assorted by command ID.
2468
+ *
2469
+ * @remarks
2470
+ * ❗ Commands that are not present in the `commands` array will be __deleted__.
2471
+ *
2472
+ * ⚠️ Commands that do not already exist will count towards the daily limit of _200_ new commands.
2473
+ *
2474
+ * When using the bearer token the token needs the `applications.commands.update` scope and must be a `Client grant` token.
2475
+ * You will be able to update only your own application commands
2476
+ *
2477
+ * @see {@link https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-guild-application-commands}
2478
+ */
2479
+ upsertGuildApplicationCommands(rest: RestManager, guildId: BigString, commands: CreateApplicationCommand[], options?: UpsertGuildApplicationCommandOptions): Promise<DiscordApplicationCommand[]>;
2480
+ /**
2481
+ * Bans a user from a guild.
2482
+ *
2483
+ * @param guildId - The ID of the guild to ban the user from.
2484
+ * @param userId - The ID of the user to ban from the guild.
2485
+ * @param options - The parameters for the creation of the ban.
2486
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2487
+ *
2488
+ * @remarks
2489
+ * Requires the `BAN_MEMBERS` permission.
2490
+ *
2491
+ * Fires a _Guild Ban Add_ gateway event.
2492
+ *
2493
+ * @see {@link https://docs.discord.com/developers/resources/guild#create-guild-ban}
2494
+ */
2495
+ banMember(rest: RestManager, guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string): Promise<void>;
2496
+ /**
2497
+ * Bans up to 200 users from a guild.
2498
+ *
2499
+ * @param guildId - The ID of the guild to ban the users from.
2500
+ * @param options - The users to ban and the other options for the ban.
2501
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2502
+ *
2503
+ * @remarks
2504
+ * Requires the `BAN_MEMBERS` and `MANAGE_GUILD` permissions.
2505
+ *
2506
+ * If all provided users fail to be banned, discord will respond with an error (code: `500000: Failed to ban users`)
2507
+ *
2508
+ * Fires as many _Guild Ban Add_ gateway events as many user where banned.
2509
+ *
2510
+ * @see {@link https://docs.discord.com/developers/resources/guild#bulk-guild-ban}
2511
+ */
2512
+ bulkBanMembers(rest: RestManager, guildId: BigString, options: CreateGuildBulkBan, reason?: string): Promise<DiscordBulkBan>;
2513
+ /**
2514
+ * Edits the nickname of the bot user.
2515
+ *
2516
+ * @param guildId - The ID of the guild to edit the nickname of the bot user in.
2517
+ * @param options - The parameters for the edit of the nickname.
2518
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2519
+ * @returns An instance of the edited {@link DiscordMember}
2520
+ *
2521
+ * @remarks
2522
+ * Fires a _Guild Member Update_ gateway event.
2523
+ *
2524
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-current-member}
2525
+ */
2526
+ editCurrentMember(rest: RestManager, guildId: BigString, options: ModifyCurrentMember, reason?: string): Promise<DiscordMember>;
2527
+ /**
2528
+ * Edits a member's properties.
2529
+ *
2530
+ * @param guildId - The ID of the guild to edit the member of.
2531
+ * @param userId - The user ID of the member to edit.
2532
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2533
+ * @param options - The parameters for the edit of the user.
2534
+ *
2535
+ * @remarks
2536
+ * This endpoint requires various permissions depending on what is edited about the member.
2537
+ * To find out the required permission to enact a change, read the documentation of this endpoint's {@link ModifyGuildMember | parameters}.
2538
+ *
2539
+ * Fires a _Guild Member Update_ gateway event.
2540
+ *
2541
+ * @see {@link https://docs.discord.com/developers/resources/guild#modify-guild-member}
2542
+ */
2543
+ editMember(rest: RestManager, guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string): Promise<DiscordMember>;
2544
+ /**
2545
+ * Gets the current member object.
2546
+ *
2547
+ * @param bearerToken - The access token of the user
2548
+ * @param guildId - The ID of the guild to get the member object for.
2549
+ * @returns An instance of {@link DiscordMemberWithUser}.
2550
+ *
2551
+ * @remarks
2552
+ * The access tokens needs the `guilds.members.read` scope
2553
+ *
2554
+ * @see {@link https://docs.discord.com/developers/resources/user#get-current-user-guild-member}
2555
+ */
2556
+ getCurrentMember(rest: RestManager, guildId: BigString, bearerToken: string): Promise<DiscordMemberWithUser>;
2557
+ /**
2558
+ * Gets the member object by user ID.
2559
+ *
2560
+
2561
+ * @param guildId - The ID of the guild to get the member object for.
2562
+ * @param userId - The ID of the user to get the member object for.
2563
+ * @returns An instance of {@link DiscordMemberWithUser}.
2564
+ *
2565
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-member}
2566
+ */
2567
+ getMember(rest: RestManager, guildId: BigString, userId: BigString): Promise<DiscordMemberWithUser>;
2568
+ /**
2569
+ * Gets the list of members for a guild.
2570
+ *
2571
+ * @param guildId - The ID of the guild to get the list of members for.
2572
+ * @param options - The parameters for the fetching of the members.
2573
+ * @returns A collection of {@link DiscordMemberWithUser} objects assorted by user ID.
2574
+ *
2575
+ * @remarks
2576
+ * Requires the `GUILD_MEMBERS` intent.
2577
+ *
2578
+ * ⚠️ It is not recommended to use this endpoint with very large bots. Instead, opt to use `fetchMembers()`:
2579
+ * REST communication only permits 50 requests to be made per second, while gateways allow for up to 120 requests
2580
+ * per minute per shard. For more information, read {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}.
2581
+ *
2582
+ * @see {@link https://docs.discord.com/developers/resources/guild#list-guild-members}
2583
+ * @see {@link https://docs.discord.com/developers/events/gateway-events#request-guild-members}
2584
+ * @see {@link https://docs.discord.com/developers/topics/rate-limits#rate-limits}
2585
+ */
2586
+ getMembers(rest: RestManager, guildId: BigString, options: ListGuildMembers): Promise<DiscordMemberWithUser[]>;
2587
+ /**
2588
+ * Returns a serialized activity instance, if it exists. Useful for preventing unwanted activity sessions.
2589
+ *
2590
+ * @param applicationId - The ID of the application
2591
+ * @param instanceId - The ID of the activity instance
2592
+ */
2593
+ getApplicationActivityInstance(rest: RestManager, applicationId: BigString, instanceId: string): Promise<DiscordActivityInstance>;
2594
+ /**
2595
+ * Kicks a member from a guild.
2596
+ *
2597
+
2598
+ * @param guildId - The ID of the guild to kick the member from.
2599
+ * @param userId - The user ID of the member to kick from the guild.
2600
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2601
+ *
2602
+ * @remarks
2603
+ * Requires the `KICK_MEMBERS` permission.
2604
+ *
2605
+ * Fires a _Guild Member Remove_ gateway event.
2606
+ *
2607
+ * @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-member}
2608
+ */
2609
+ kickMember(rest: RestManager, guildId: BigString, userId: BigString, reason?: string): Promise<void>;
2610
+ /**
2611
+ * Pins a message in a channel.
2612
+ *
2613
+ * @param channelId - The ID of the channel where the message is to be pinned.
2614
+ * @param messageId - The ID of the message to pin.
2615
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2616
+ *
2617
+ * @remarks
2618
+ * Requires the `PIN_MESSAGES` permission.
2619
+ *
2620
+ * Fires a _Channel Pins Update_ event.
2621
+ *
2622
+ * @see {@link https://docs.discord.com/developers/resources/message#pin-message}
2623
+ */
2624
+ pinMessage(rest: RestManager, channelId: BigString, messageId: BigString, reason?: string): Promise<void>;
2625
+ /**
2626
+ * Initiates the process of pruning inactive members.
2627
+ *
2628
+
2629
+ * @param guildId - The ID of the guild to prune the members of.
2630
+ * @param options - The parameters for the pruning of members.
2631
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2632
+ * @returns A number indicating how many members were pruned.
2633
+ *
2634
+ * @remarks
2635
+ * Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions, unless the guild has the `PRUNE_REQUIRES_ADMIN` guild feature, in which case it requires the `ADMINISTRATOR` permission.
2636
+ *
2637
+ * ❗ Requests to this endpoint will time out for large guilds. To prevent this from happening, set the {@link BeginGuildPrune.computePruneCount} property of the options object parameter to `false`. This will begin the process of pruning, and immediately return `undefined`, rather than wait for the process to complete before returning the actual count of members that have been kicked.
2638
+ *
2639
+ * ⚠️ By default, this process will not remove members with a role. To include the members who have a _particular subset of roles_, specify the role(s) in the {@link BeginGuildPrune.includeRoles | includeRoles} property of the options object parameter.
2640
+ *
2641
+ * Fires a _Guild Member Remove_ gateway event for every member kicked.
2642
+ *
2643
+ * @see {@link https://docs.discord.com/developers/resources/guild#begin-guild-prune}
2644
+ */
2645
+ pruneMembers(rest: RestManager, guildId: BigString, options: BeginGuildPrune, reason?: string): Promise<{
2646
+ pruned: number | null;
2647
+ }>;
2648
+ /**
2649
+ * Gets the list of members whose usernames or nicknames start with a provided string.
2650
+ *
2651
+
2652
+ * @param guildId - The ID of the guild to search in.
2653
+ * @param query - The string to match usernames or nicknames against.
2654
+ * @param options - The parameters for searching through the members.
2655
+ * @returns A collection of {@link DiscordMember} objects assorted by user ID.
2656
+ *
2657
+ * @see {@link https://docs.discord.com/developers/resources/guild#search-guild-members}
2658
+ */
2659
+ searchMembers(rest: RestManager, guildId: BigString, query: string, options?: Omit<SearchMembers, "query">): Promise<DiscordMemberWithUser[]>;
2660
+ /**
2661
+ * Unbans a user from a guild.
2662
+ *
2663
+ * @param guildId - The ID of the guild to unban the user in.
2664
+ * @param userId - The ID of the user to unban.
2665
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2666
+ *
2667
+ * @remarks
2668
+ * Requires the `BAN_MEMBERS` permission.
2669
+ *
2670
+ * Fires a _Guild Ban Remove_ gateway event.
2671
+ *
2672
+ * @see {@link https://docs.discord.com/developers/resources/guild#remove-guild-ban}
2673
+ */
2674
+ unbanMember(rest: RestManager, guildId: BigString, userId: BigString, reason?: string): Promise<void>;
2675
+ /**
2676
+ * Unpin a message in a channel.
2677
+ *
2678
+ * @param channelId - The ID of the channel where the message is pinned.
2679
+ * @param messageId - The ID of the message to unpin.
2680
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2681
+ *
2682
+ * @remarks
2683
+ * Requires the `PIN_MESSAGES` permission.
2684
+ *
2685
+ * Fires a _Channel Pins Update_ event.
2686
+ *
2687
+ * @see {@link https://docs.discord.com/developers/resources/message#unpin-message}
2688
+ */
2689
+ unpinMessage(rest: RestManager, channelId: BigString, messageId: BigString, reason?: string): Promise<void>;
2690
+ /**
2691
+ * Get the guild onboarding
2692
+ *
2693
+ * @param guildId - The guild to get the onboarding from
2694
+ */
2695
+ getGuildOnboarding(rest: RestManager, guildId: BigString): Promise<DiscordGuildOnboarding>;
2696
+ /**
2697
+ * Modifies the onboarding configuration of the guild.
2698
+ *
2699
+ * @param guildId - The guild to edit the onboarding from
2700
+ * @param {string} [reason] - An optional reason for the action, to be included in the audit log.
2701
+ *
2702
+ * @remarks
2703
+ * Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions.
2704
+ *
2705
+ * Onboarding enforces constraints when enabled. These constraints are:
2706
+ * - at least 7 default channels
2707
+ * - at least 5 of the 7 channels must allow sending messages to the \@everyone role
2708
+ *
2709
+ * The `mode` field modifies what is considered when enforcing these constraints.
2710
+ */
2711
+ editGuildOnboarding(rest: RestManager, guildId: BigString, options: EditGuildOnboarding, reason?: string): Promise<DiscordGuildOnboarding>;
2712
+ /**
2713
+ * Modifies the incident actions of the guild.
2714
+ *
2715
+ * @param guildId - The guild to edit the incident actions from
2716
+ * @param options - The options for the incident actions
2717
+ *
2718
+ * @remarks
2719
+ * Requires the `MANAGE_GUILD` permission.
2720
+ */
2721
+ modifyGuildIncidentActions(rest: RestManager, guildId: BigString, options: ModifyGuildIncidentActions): Promise<DiscordIncidentsData>;
2722
+ /**
2723
+ * Returns all entitlements for a given app, active and expired.
2724
+ *
2725
+ * @param applicationId - The id of the application to get the entitlements
2726
+ * @param {GetEntitlements} [options] - The optional query params for the endpoint
2727
+ */
2728
+ listEntitlements(rest: RestManager, applicationId: BigString, options?: GetEntitlements): Promise<DiscordEntitlement[]>;
2729
+ /**
2730
+ * Returns an entitlement.
2731
+ *
2732
+ * @param applicationId - The id of the application to get the entitlement
2733
+ * @param entitlementId - The id of the entitlement to get
2734
+ */
2735
+ getEntitlement(rest: RestManager, applicationId: BigString, entitlementId: BigString): Promise<DiscordEntitlement>;
2736
+ /**
2737
+ * Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering.
2738
+ *
2739
+ * @param applicationId - The id of the application to create the entitlement
2740
+ * @param body - The options for new entitlement
2741
+ *
2742
+ * @remarks
2743
+ * This endpoint returns a partial entitlement object.
2744
+ * It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity.
2745
+ */
2746
+ createTestEntitlement(rest: RestManager, applicationId: BigString, body: CreateTestEntitlement): Promise<Partial<DiscordEntitlement>>;
2747
+ /**
2748
+ * Deletes a currently-active test entitlement. Discord will act as though that user or guild no longer has entitlement to your premium offering.
2749
+ *
2750
+ * @param applicationId - The id of the application from where delete the entitlement
2751
+ * @param entitlementId - The id of the entitlement to delete
2752
+ */
2753
+ deleteTestEntitlement(rest: RestManager, applicationId: BigString, entitlementId: BigString): Promise<void>;
2754
+ /**
2755
+ * For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have `consumed: true` when using {@link listEntitlements | List Entitlements}
2756
+ *
2757
+ * @param applicationId - The id of the application to get the entitlement
2758
+ * @param entitlementId - The id of the entitlement to get
2759
+ */
2760
+ consumeEntitlement(rest: RestManager, applicationId: BigString, entitlementId: BigString): Promise<void>;
2761
+ /**
2762
+ * Returns all SKUs for a given application
2763
+ *
2764
+ * @param applicationId - The id of the application to get the SKUs
2765
+ */
2766
+ listSkus(rest: RestManager, applicationId: BigString): Promise<DiscordSku[]>;
2767
+ /**
2768
+ * Returns all subscriptions containing the SKU, filtered by user.
2769
+ *
2770
+ * @param skuId - The id of the sku of get the subscriptions for
2771
+ */
2772
+ listSubscriptions(rest: RestManager, skuId: BigString, options?: ListSkuSubscriptionsOptions): Promise<DiscordSubscription[]>;
2773
+ /**
2774
+ * Get a subscription by its ID.
2775
+ *
2776
+ * @param skuId - The id of the sku of get the subscriptions for
2777
+ */
2778
+ getSubscription(rest: RestManager, skuId: BigString, subscriptionId: BigString): Promise<DiscordSubscription>;
2779
+ /**
2780
+ * Send a soundboard sound to a voice channel the user is connected to.
2781
+ *
2782
+ * @param channelId - The id of the voice channel
2783
+ *
2784
+ * @remarks
2785
+ * Fires a _Voice Channel Effect Send_ Gateway event.
2786
+ *
2787
+ * Requires the `SPEAK` and `USE_SOUNDBOARD` permissions, and also the `USE_EXTERNAL_SOUNDS` permission if the sound is from a different server.
2788
+ * Additionally, requires the user to be connected to the voice channel, having a voice state without `deaf`, `self_deaf`, `mute`, or `suppress` enabled.
2789
+ */
2790
+ sendSoundboardSound(rest: RestManager, channelId: BigString, options: SendSoundboardSound): Promise<void>;
2791
+ /** Returns an array of soundboard sound objects that can be used by all users. */
2792
+ listDefaultSoundboardSounds(rest: RestManager): Promise<DiscordSoundboardSound[]>;
2793
+ /**
2794
+ * Returns a list of the guild's soundboard sounds.
2795
+ *
2796
+ * @param guildId - The guild to get the sounds from
2797
+ *
2798
+ * @remarks
2799
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2800
+ */
2801
+ listGuildSoundboardSounds(rest: RestManager, guildId: BigString): Promise<{
2802
+ items: DiscordSoundboardSound[];
2803
+ }>;
2804
+ /**
2805
+ * Returns a soundboard sound object for the given sound id.
2806
+ *
2807
+ * @param guildId - The guild to get the sounds from
2808
+ * @param soundId - The sound id
2809
+ *
2810
+ * @remarks
2811
+ * Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2812
+ */
2813
+ getGuildSoundboardSound(rest: RestManager, guildId: BigString, soundId: BigString): Promise<DiscordSoundboardSound>;
2814
+ /**
2815
+ * Create a new soundboard sound for the guild.
2816
+ *
2817
+ * @param guildId - The guild to create the sounds in
2818
+ * @param options - The options to create the sound
2819
+ * @param reason - The audit log reason
2820
+ *
2821
+ * @remarks
2822
+ * Fires a _Guild Soundboard Sound Create_ Gateway event.
2823
+ *
2824
+ * Requires the `CREATE_GUILD_EXPRESSIONS` permission.
2825
+ */
2826
+ createGuildSoundboardSound(rest: RestManager, guildId: BigString, options: CreateGuildSoundboardSound, reason?: string): Promise<DiscordSoundboardSound>;
2827
+ /**
2828
+ * Modify the given soundboard sound.
2829
+ *
2830
+ * @param guildId - The guild to create the sounds in
2831
+ * @param soundId - The sound id to update
2832
+ * @param options - The options to update the sound
2833
+ * @param reason - The audit log reason
2834
+ *
2835
+ * @remarks
2836
+ * Fires a _Guild Soundboard Sound Update_ Gateway event.
2837
+ *
2838
+ * For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2839
+ * For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
2840
+ */
2841
+ modifyGuildSoundboardSound(rest: RestManager, guildId: BigString, soundId: BigString, options: ModifyGuildSoundboardSound, reason?: string): Promise<DiscordSoundboardSound>;
2842
+ /**
2843
+ * Delete the given soundboard sound.
2844
+ *
2845
+ * @param guildId - The guild to create the sounds in
2846
+ * @param soundId - The sound id to delete
2847
+ * @param reason - The audit log reason
2848
+ *
2849
+ * @remarks
2850
+ * Fires a _Guild Soundboard Sound Delete_ Gateway event.
2851
+ *
2852
+ * For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
2853
+ * For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission.
2854
+ */
2855
+ deleteGuildSoundboardSound(rest: RestManager, guildId: BigString, soundId: BigString, reason?: string): Promise<void>;
2856
+ /**
2857
+ * Returns a list of application role connection metadata objects for the given application.
2858
+ *
2859
+ * @param applicationId - The application to get the role connections from
2860
+ * @returns A list of application role connection metadata objects
2861
+ */
2862
+ listApplicationRoleConnectionsMetadataRecords(rest: RestManager, applicationId: BigString): Promise<DiscordApplicationRoleConnectionMetadata[]>;
2863
+ /**
2864
+ * Updates and returns a list of application role connection metadata objects for the given application.
2865
+ *
2866
+ * @param applicationId - The application to get the role connections from
2867
+ * @param options - The options to update the role connections
2868
+ * @returns A list of application role connection metadata objects
2869
+ *
2870
+ * @remarks
2871
+ * An application can have a maximum of 5 metadata records.
2872
+ */
2873
+ updateApplicationRoleConnectionsMetadataRecords(rest: RestManager, applicationId: BigString, options: Camelize<DiscordApplicationRoleConnectionMetadata[]>): Promise<DiscordApplicationRoleConnectionMetadata[]>;
2874
+ /**
2875
+ * Creates a new lobby, adding any of the specified members to it, if provided.
2876
+ *
2877
+ * @param options - The options to create the lobby
2878
+ * @returns The created lobby
2879
+ */
2880
+ createLobby(rest: RestManager, options: CreateLobby): Promise<DiscordLobby>;
2881
+ /**
2882
+ * 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.
2883
+ *
2884
+ * Updates lobby metadata and the calling member's metadata on join.
2885
+ *
2886
+ * @param options - The options to create or join the lobby
2887
+ * @returns - The created or joined lobby
2888
+ *
2889
+ * @remarks
2890
+ * Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
2891
+ */
2892
+ createOrJoinLobby(rest: RestManager, options: CreateOrJoinLobby): Promise<DiscordLobby>;
2893
+ /**
2894
+ * Returns a lobby object for the specified lobby id, if it exists.
2895
+ *
2896
+ * @param lobbyId - The ID of the lobby to get
2897
+ * @returns The lobby object
2898
+ */
2899
+ getLobby(rest: RestManager, lobbyId: BigString): Promise<DiscordLobby>;
2900
+ /**
2901
+ * Modifies the specified lobby with new values, if provided.
2902
+ *
2903
+ * @param lobbyId - The ID of the lobby to modify
2904
+ * @param options - The options to modify the lobby
2905
+ * @returns The modified lobby
2906
+ */
2907
+ modifyLobby(rest: RestManager, lobbyId: BigString, options: ModifyLobby): Promise<DiscordLobby>;
2908
+ /**
2909
+ * Deletes the specified lobby if it exists.
2910
+ *
2911
+ * It is safe to call even if the lobby is already deleted as well.
2912
+ *
2913
+ * @param lobbyId - The ID of the lobby to delete
2914
+ * @returns Nothing
2915
+ */
2916
+ deleteLobby(rest: RestManager, lobbyId: BigString): Promise<void>;
2917
+ /**
2918
+ * Adds the provided user to the specified lobby. If called when the user is already a member of the lobby will update fields such as metadata on that user instead.
2919
+ *
2920
+ * @param lobbyId - The ID of the lobby to add the user to
2921
+ * @param userId - The ID of the user to add to the lobby
2922
+ * @param options - The options to add the user to the lobby
2923
+ * @returns The lobby member object
2924
+ */
2925
+ addMemberToLobby(rest: RestManager, lobbyId: BigString, userId: BigString, options: AddLobbyMember): Promise<DiscordLobbyMember>;
2926
+ /**
2927
+ * Adds, updates, or removes up to 25 members from the specified lobby in a single request.
2928
+ *
2929
+ * @param lobbyId - The ID of the lobby to add, update, or remove members from
2930
+ * @param options - The options to add, update, or remove members from the lobby
2931
+ * @returns Returns an array of lobby member objects for the upserted members. Removed members are not included in the response.
2932
+ *
2933
+ * @remarks
2934
+ * 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.
2935
+ *
2936
+ * Users unknown to Discord will return a 404 UNKNOWN_USER error.
2937
+ * 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.
2938
+ *
2939
+ * @see {@link https://docs.discord.com/developers/resources/lobby#bulk-update-lobby-members}
2940
+ */
2941
+ bulkUpdateLobbyMembers(rest: RestManager, lobbyId: BigString, options: BulkUpdateLobbyMember[]): Promise<DiscordLobbyMember[]>;
2942
+ /**
2943
+ * 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.
2944
+ *
2945
+ * @param lobbyId - The ID of the lobby to remove the user from
2946
+ * @param userId - The ID of the user to remove from the lobby
2947
+ * @returns Nothing
2948
+ */
2949
+ removeMemberFromLobby(rest: RestManager, lobbyId: BigString, userId: BigString): Promise<void>;
2950
+ /**
2951
+ * Removes the current 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.
2952
+ *
2953
+ * @param lobbyId - The ID of the lobby to remove the user from
2954
+ * @param bearerToken - The access token of the user
2955
+ * @returns Nothing
2956
+ *
2957
+ * @remarks
2958
+ * This requires a bearer token for authorization
2959
+ */
2960
+ leaveLobby(rest: RestManager, lobbyId: BigString, bearerToken: string): Promise<void>;
2961
+ /**
2962
+ * Links an existing text channel to a lobby.
2963
+ *
2964
+ * @param lobbyId - The ID of the lobby to link the channel to
2965
+ * @param bearerToken - The access token of the user
2966
+ * @param options - The options to link the channel to the lobby
2967
+ * @returns The updated lobby object
2968
+ *
2969
+ * @remarks
2970
+ * Uses bearer token for authorization and the user must be a lobby member with the CanLinkLobby lobby member flag.
2971
+ */
2972
+ linkChannelToLobby(rest: RestManager, lobbyId: BigString, bearerToken: string, options: LinkChannelToLobby): Promise<DiscordLobby>;
2973
+ /**
2974
+ * Unlinks any currently linked channels from the specified lobby.
2975
+ *
2976
+ * @param lobbyId - The ID of the lobby to unlink the channel from
2977
+ * @param bearerToken - The access token of the user
2978
+ * @returns The updated lobby object
2979
+ *
2980
+ * @remarks
2981
+ * Uses bearer token for authorization and the user must be a lobby member with the CanLinkLobby lobby member flag.
2982
+ */
2983
+ unlinkChannelToLobby(rest: RestManager, lobbyId: BigString, bearerToken: string): Promise<DiscordLobby>;
2984
+ /**
2985
+ * 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.
2986
+ *
2987
+ * @param lobbyId - The ID of the lobby to set the moderation metadata
2988
+ * @param messageId - The ID of the message to set the moderation metadata
2989
+ * @param options - The moderation metadata to set
2990
+ *
2991
+ * @remarks
2992
+ * Uses `Bot` token for authorization.
2993
+ *
2994
+ * For the options: Free-form key–value pairs describing the moderation decision. Up to 5 keys; key length <= 1024 characters; value length <= 2000 characters
2995
+ *
2996
+ * @see {@link https://discord.com/developers/docs/game-sdk/social-sdk/chat-moderation#server-side-chat-moderation} for the full moderation flow.
2997
+ */
2998
+ updateLobbyMessageModerationMetadata(rest: RestManager, lobbyId: BigString, messageId: BigString, options: Record<string, string>): Promise<void>;
2999
+ /**
3000
+ * Sends a message to the specified lobby. The calling user must be a member of the lobby.
3001
+ *
3002
+ * @param bearerToken - The access token of the user
3003
+ * @param lobbyId - The ID of the lobby to send the message to
3004
+ * @param options - The options to send the message
3005
+ * @returns Returns the created lobby message object.
3006
+ *
3007
+ * @remarks
3008
+ * Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
3009
+ *
3010
+ * If the lobby has a linked channel, the message is also forwarded to that channel.
3011
+ * If forwarding fails (for example, due to AutoMod), the lobby message is still delivered to other lobby members.
3012
+ */
3013
+ sendLobbyMessage(rest: RestManager, bearerToken: string, lobbyId: BigString, options: SendLobbyMessage): Promise<DiscordLobbyMessage>;
3014
+ /**
3015
+ * Returns the most recent messages in the specified lobby. The calling user must be a member of the lobby.
3016
+ *
3017
+ * @param bearerToken - The access token of the user
3018
+ * @param lobbyId - The ID of the lobby to get the messages from
3019
+ * @param options - The options to get the messages
3020
+ * @returns Returns an array of lobby message objects
3021
+ *
3022
+ * @remarks
3023
+ * Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
3024
+ */
3025
+ getLobbyMessages(rest: RestManager, bearerToken: string, lobbyId: BigString, options?: GetLobbyMessages): Promise<DiscordLobbyMessage[]>;
3026
+ /**
3027
+ * Creates a single-use guild invite to the lobby's linked channel, targeted at the calling user.
3028
+ *
3029
+ *
3030
+ * @param bearerToken - The access token of the user
3031
+ * @param lobbyId - The ID of the lobby to create the invite for
3032
+ * @returns The created invite object
3033
+ *
3034
+ * @remarks
3035
+ * Uses `Bearer` token for authorization with the `sdk.social_layer` scope.
3036
+ *
3037
+ * The lobby must have a linked channel and the caller must be a member of the lobby.
3038
+ * The invite expires after one hour.
3039
+ */
3040
+ createLobbyChannelInviteForSelf(rest: RestManager, bearerToken: string, lobbyId: BigString): Promise<DiscordLobbyInvite>;
3041
+ /**
3042
+ * Creates a single-use guild invite to the lobby's linked channel on behalf of an application, targeted at the specified user.
3043
+ *
3044
+ * @param lobbyId - The ID of the lobby to create the invite for
3045
+ * @param userId - The ID of the user to create the invite for
3046
+ * @returns The created invite object
3047
+ *
3048
+ * @remarks
3049
+ * Uses `Bot` token for authorization
3050
+ *
3051
+ * The lobby must have a linked channel.
3052
+ * The invite expires after one hour.
3053
+ */
3054
+ createLobbyChannelInviteForUser(rest: RestManager, lobbyId: BigString, userId: BigString): Promise<DiscordLobbyInvite>;
3055
+ };
3056
+ export type RestEndpoints = {
3057
+ [K in keyof typeof restEndpoints]: (typeof restEndpoints)[K] extends (...args: [RestManager, ...infer B]) => infer R ? (...args: B) => R : never;
3058
+ };
3059
+ export type CamelizedRestEndpoints = {
3060
+ [K in keyof RestEndpoints]: RestEndpoints[K] extends (...args: infer A) => Promise<infer R> ? (...args: A) => Promise<Camelize<R>> : never;
3061
+ };
3062
+ //# sourceMappingURL=endpoints.d.ts.map