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