@discordeno/rest 19.0.0-next.40c19da → 19.0.0-next.4384457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +384 -758
- package/dist/manager.js.map +1 -1
- package/dist/routes.d.ts +3 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +487 -0
- package/dist/routes.js.map +1 -0
- package/dist/types.d.ts +256 -204
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/typings/routes.d.ts +0 -2
- package/dist/typings/routes.d.ts.map +1 -1
- package/dist/typings/routes.js.map +1 -1
- package/package.json +4 -4
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ApplicationCommandPermissions, AtLeastOne, BeginGuildPrune, BigString, Camelize,
|
|
1
|
+
import type { ApplicationCommandPermissions, AtLeastOne, BeginGuildPrune, BigString, Camelize, CamelizedDiscordActiveThreads, CamelizedDiscordApplication, CamelizedDiscordApplicationCommand, CamelizedDiscordApplicationCommandPermissions, CamelizedDiscordArchivedThreads, CamelizedDiscordAuditLog, CamelizedDiscordAutoModerationRule, CamelizedDiscordBan, CamelizedDiscordChannel, CamelizedDiscordEmoji, CamelizedDiscordFollowedChannel, CamelizedDiscordGetGatewayBot, CamelizedDiscordGuild, CamelizedDiscordGuildPreview, CamelizedDiscordGuildWidget, CamelizedDiscordGuildWidgetSettings, CamelizedDiscordIntegration, CamelizedDiscordInvite, CamelizedDiscordInviteMetadata, CamelizedDiscordMember, CamelizedDiscordMemberWithUser, CamelizedDiscordMessage, CamelizedDiscordModifyGuildWelcomeScreen, CamelizedDiscordPrunedCount, CamelizedDiscordRole, CamelizedDiscordScheduledEvent, CamelizedDiscordStageInstance, CamelizedDiscordSticker, CamelizedDiscordStickerPack, CamelizedDiscordTemplate, CamelizedDiscordThreadMember, CamelizedDiscordUser, CamelizedDiscordVanityUrl, CamelizedDiscordVoiceRegion, CamelizedDiscordWebhook, CamelizedDiscordWelcomeScreen, CreateApplicationCommand, CreateAutoModerationRuleOptions, CreateChannelInvite, CreateForumPostWithMessage, CreateGuild, CreateGuildBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildStickerOptions, CreateMessageOptions, CreateScheduledEvent, CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, EditAutoModerationRuleOptions, EditBotMemberOptions, EditChannelPermissionOverridesOptions, EditGuildRole, EditGuildStickerOptions, EditMessage, EditOwnVoiceState, EditScheduledEvent, EditUserVoiceState, ExecuteWebhook, FileContent, GetBans, GetGuildAuditLog, GetGuildPruneCountQuery, GetInvite, GetMessagesOptions, GetReactions, GetScheduledEvents, GetScheduledEventUsers, GetWebhookMessageOptions, InteractionCallbackData, InteractionResponse, ListArchivedThreads, ListGuildMembers, MfaLevels, ModifyChannel, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildTemplate, ModifyRolePositions, ModifyWebhook, SearchMembers, StartThreadWithMessage, StartThreadWithoutMessage } from '@discordeno/types';
|
|
2
2
|
import type { InvalidRequestBucket } from './invalidBucket.js';
|
|
3
3
|
import type { Queue } from './queue.js';
|
|
4
4
|
import type { RestRoutes } from './typings/routes.js';
|
|
5
5
|
export interface CreateRestManagerOptions {
|
|
6
6
|
/** The bot token which will be used to make requests. */
|
|
7
|
-
token
|
|
7
|
+
token?: string;
|
|
8
8
|
/**
|
|
9
9
|
* For old bots that have a different bot id and application id.
|
|
10
10
|
* @default bot id from token
|
|
@@ -29,7 +29,7 @@ export interface CreateRestManagerOptions {
|
|
|
29
29
|
}
|
|
30
30
|
export interface RestManager {
|
|
31
31
|
/** The bot token which will be used to make requests. */
|
|
32
|
-
token
|
|
32
|
+
token?: string;
|
|
33
33
|
/** The application id. Normally this is not required for recent bots but old bot's application id is sometimes different from the bot id so it is required for those bots. */
|
|
34
34
|
applicationId: bigint;
|
|
35
35
|
/** The api version to use when making requests. Only the latest supported version will be tested. */
|
|
@@ -63,7 +63,7 @@ export interface RestManager {
|
|
|
63
63
|
/** Reshapes and modifies the obj as needed to make it ready for discords api. */
|
|
64
64
|
changeToDiscordFormat: (obj: any) => any;
|
|
65
65
|
/** Creates the request body and headers that are necessary to send a request. Will handle different types of methods and everything necessary for discord. */
|
|
66
|
-
|
|
66
|
+
createRequestBody: (method: RequestMethods, options?: CreateRequestBodyOptions) => RequestBody;
|
|
67
67
|
/** This will create a infinite loop running in 1 seconds using tail recursion to keep rate limits clean. When a rate limit resets, this will remove it so the queue can proceed. */
|
|
68
68
|
processRateLimitedPaths: () => void;
|
|
69
69
|
/** Processes the rate limit headers and determines if it needs to be rate limited and returns the bucket id if available */
|
|
@@ -73,19 +73,19 @@ export interface RestManager {
|
|
|
73
73
|
/** Split a url to separate rate limit buckets based on major/minor parameters. */
|
|
74
74
|
simplifyUrl: (url: string, method: RequestMethods) => string;
|
|
75
75
|
/** Make a request to be sent to the api. */
|
|
76
|
-
makeRequest: <T = unknown>(method: RequestMethods, url: string,
|
|
76
|
+
makeRequest: <T = unknown>(method: RequestMethods, url: string, options?: MakeRequestOptions) => Promise<T>;
|
|
77
77
|
/** Takes a request and processes it into a queue. */
|
|
78
|
-
processRequest: (request: SendRequestOptions) => void
|
|
78
|
+
processRequest: (request: SendRequestOptions) => Promise<void>;
|
|
79
79
|
/** Make a get request to the api */
|
|
80
|
-
get: <T = void>(url: string) => Promise<Camelize<T>>;
|
|
80
|
+
get: <T = void>(url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<Camelize<T>>;
|
|
81
81
|
/** Make a post request to the api. */
|
|
82
|
-
post: <T = void>(url: string,
|
|
82
|
+
post: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
|
|
83
83
|
/** Make a put request to the api. */
|
|
84
|
-
put: <T = void>(url: string,
|
|
84
|
+
put: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
|
|
85
85
|
/** Make a delete request to the api. */
|
|
86
|
-
delete: (url: string,
|
|
86
|
+
delete: (url: string, options?: Omit<MakeRequestOptions, 'body'>) => Promise<void>;
|
|
87
87
|
/** Make a patch request to the api. */
|
|
88
|
-
patch: <T = void>(url: string,
|
|
88
|
+
patch: <T = void>(url: string, options?: MakeRequestOptions) => Promise<Camelize<T>>;
|
|
89
89
|
/**
|
|
90
90
|
* Adds a reaction to a message.
|
|
91
91
|
*
|
|
@@ -130,6 +130,7 @@ export interface RestManager {
|
|
|
130
130
|
* @param guildId - The ID of the guild the member to add the role to is in.
|
|
131
131
|
* @param userId - The user ID of the member to add the role to.
|
|
132
132
|
* @param roleId - The ID of the role to add to the member.
|
|
133
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
133
134
|
*
|
|
134
135
|
* @remarks
|
|
135
136
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -159,7 +160,8 @@ export interface RestManager {
|
|
|
159
160
|
*
|
|
160
161
|
* @param guildId - The ID of the guild to create the rule in.
|
|
161
162
|
* @param options - The parameters for the creation of the rule.
|
|
162
|
-
* @
|
|
163
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
164
|
+
* @returns An instance of the created {@link CamelizedDiscordAutoModerationRule}.
|
|
163
165
|
*
|
|
164
166
|
* @remarks
|
|
165
167
|
* Requires the `MANAGE_GUILD` permission.
|
|
@@ -168,13 +170,14 @@ export interface RestManager {
|
|
|
168
170
|
*
|
|
169
171
|
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
|
|
170
172
|
*/
|
|
171
|
-
createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions) => Promise<
|
|
173
|
+
createAutomodRule: (guildId: BigString, options: CreateAutoModerationRuleOptions, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
|
|
172
174
|
/**
|
|
173
175
|
* Creates a channel within a guild.
|
|
174
176
|
*
|
|
175
177
|
* @param guildId - The ID of the guild to create the channel within.
|
|
176
178
|
* @param options - The parameters for the creation of the channel.
|
|
177
|
-
* @
|
|
179
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
180
|
+
* @returns An instance of the created {@link CamelizedDiscordChannel}.
|
|
178
181
|
*
|
|
179
182
|
* @remarks
|
|
180
183
|
* Requires the `MANAGE_CHANNELS` permission.
|
|
@@ -187,13 +190,14 @@ export interface RestManager {
|
|
|
187
190
|
*
|
|
188
191
|
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
|
|
189
192
|
*/
|
|
190
|
-
createChannel: (guildId: BigString, options: CreateGuildChannel) => Promise<
|
|
193
|
+
createChannel: (guildId: BigString, options: CreateGuildChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
|
|
191
194
|
/**
|
|
192
195
|
* Creates an emoji in a guild.
|
|
193
196
|
*
|
|
194
197
|
* @param guildId - The ID of the guild in which to create the emoji.
|
|
195
198
|
* @param options - The parameters for the creation of the emoji.
|
|
196
|
-
* @
|
|
199
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
200
|
+
* @returns An instance of the created {@link CamelizedDiscordEmoji}.
|
|
197
201
|
*
|
|
198
202
|
* @remarks
|
|
199
203
|
* Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
@@ -204,13 +208,14 @@ export interface RestManager {
|
|
|
204
208
|
*
|
|
205
209
|
* @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
|
|
206
210
|
*/
|
|
207
|
-
createEmoji: (guildId: BigString, options: CreateGuildEmoji) => Promise<
|
|
211
|
+
createEmoji: (guildId: BigString, options: CreateGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
|
|
208
212
|
/**
|
|
209
213
|
* Creates a new thread in a forum channel, and sends a message within the created thread.
|
|
210
214
|
*
|
|
211
215
|
* @param channelId - The ID of the forum channel to create the thread within.
|
|
212
216
|
* @param options - The parameters for the creation of the thread.
|
|
213
|
-
* @
|
|
217
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
218
|
+
* @returns An instance of {@link CamelizedDiscordChannel} with a nested {@link Message} object.
|
|
214
219
|
*
|
|
215
220
|
* @remarks
|
|
216
221
|
* Requires the `CREATE_MESSAGES` permission.
|
|
@@ -222,7 +227,7 @@ export interface RestManager {
|
|
|
222
227
|
*
|
|
223
228
|
* @experimental
|
|
224
229
|
*/
|
|
225
|
-
createForumThread: (channelId: BigString, options: CreateForumPostWithMessage) => Promise<
|
|
230
|
+
createForumThread: (channelId: BigString, options: CreateForumPostWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
|
|
226
231
|
/**
|
|
227
232
|
* Creates an application command accessible globally; across different guilds and channels.
|
|
228
233
|
*
|
|
@@ -236,12 +241,12 @@ export interface RestManager {
|
|
|
236
241
|
*
|
|
237
242
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
|
|
238
243
|
*/
|
|
239
|
-
createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<
|
|
244
|
+
createGlobalApplicationCommand: (command: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
|
|
240
245
|
/**
|
|
241
246
|
* Creates a guild.
|
|
242
247
|
*
|
|
243
248
|
* @param options - The parameters for the creation of the guild.
|
|
244
|
-
* @returns An instance of the created {@link
|
|
249
|
+
* @returns An instance of the created {@link CamelizedDiscordGuild}.
|
|
245
250
|
*
|
|
246
251
|
* @remarks
|
|
247
252
|
* ⚠️ This route can only be used by bots in __fewer than 10 guilds__.
|
|
@@ -250,7 +255,7 @@ export interface RestManager {
|
|
|
250
255
|
*
|
|
251
256
|
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
|
|
252
257
|
*/
|
|
253
|
-
createGuild: (options: CreateGuild) => Promise<
|
|
258
|
+
createGuild: (options: CreateGuild) => Promise<CamelizedDiscordGuild>;
|
|
254
259
|
/**
|
|
255
260
|
* Creates an application command only accessible in a specific guild.
|
|
256
261
|
*
|
|
@@ -264,7 +269,7 @@ export interface RestManager {
|
|
|
264
269
|
*
|
|
265
270
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
|
|
266
271
|
*/
|
|
267
|
-
createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<
|
|
272
|
+
createGuildApplicationCommand: (command: CreateApplicationCommand, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
|
|
268
273
|
/**
|
|
269
274
|
* Creates a guild from a template.
|
|
270
275
|
*
|
|
@@ -279,12 +284,13 @@ export interface RestManager {
|
|
|
279
284
|
*
|
|
280
285
|
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
|
|
281
286
|
*/
|
|
282
|
-
createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<
|
|
287
|
+
createGuildFromTemplate: (templateCode: string, options: CreateGuildFromTemplate) => Promise<CamelizedDiscordGuild>;
|
|
283
288
|
/**
|
|
284
289
|
* Create a new sticker for the guild.
|
|
285
290
|
*
|
|
286
291
|
* @param guildId The ID of the guild to get
|
|
287
|
-
* @
|
|
292
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
293
|
+
* @return A {@link CamelizedDiscordSticker}
|
|
288
294
|
*
|
|
289
295
|
* @remarks
|
|
290
296
|
* Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
@@ -294,7 +300,7 @@ export interface RestManager {
|
|
|
294
300
|
*
|
|
295
301
|
* @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}
|
|
296
302
|
*/
|
|
297
|
-
createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions) => Promise<
|
|
303
|
+
createGuildSticker: (guildId: BigString, options: CreateGuildStickerOptions, reason?: string) => Promise<CamelizedDiscordSticker>;
|
|
298
304
|
/**
|
|
299
305
|
* Creates a template from a guild.
|
|
300
306
|
*
|
|
@@ -309,13 +315,14 @@ export interface RestManager {
|
|
|
309
315
|
*
|
|
310
316
|
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
|
|
311
317
|
*/
|
|
312
|
-
createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<
|
|
318
|
+
createGuildTemplate: (guildId: BigString, options: CreateTemplate) => Promise<CamelizedDiscordTemplate>;
|
|
313
319
|
/**
|
|
314
320
|
* Creates an invite to a channel in a guild.
|
|
315
321
|
*
|
|
316
322
|
* @param channelId - The ID of the channel to create the invite to.
|
|
317
323
|
* @param options - The parameters for the creation of the invite.
|
|
318
|
-
* @
|
|
324
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
325
|
+
* @returns An instance of the created {@link CamelizedDiscordInvite}.
|
|
319
326
|
*
|
|
320
327
|
* @remarks
|
|
321
328
|
* Requires the `CREATE_INSTANT_INVITE` permission.
|
|
@@ -327,13 +334,14 @@ export interface RestManager {
|
|
|
327
334
|
*
|
|
328
335
|
* @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
|
|
329
336
|
*/
|
|
330
|
-
createInvite: (channelId: BigString, options?: CreateChannelInvite) => Promise<
|
|
337
|
+
createInvite: (channelId: BigString, options?: CreateChannelInvite, reason?: string) => Promise<CamelizedDiscordInvite>;
|
|
331
338
|
/**
|
|
332
339
|
* Creates a role in a guild.
|
|
333
340
|
*
|
|
334
341
|
* @param guildId - The ID of the guild to create the role in.
|
|
335
342
|
* @param options - The parameters for the creation of the role.
|
|
336
|
-
* @
|
|
343
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
344
|
+
* @returns An instance of the created {@link CamelizedDiscordRole}.
|
|
337
345
|
*
|
|
338
346
|
* @remarks
|
|
339
347
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -342,12 +350,13 @@ export interface RestManager {
|
|
|
342
350
|
*
|
|
343
351
|
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
|
|
344
352
|
*/
|
|
345
|
-
createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<
|
|
353
|
+
createRole: (guildId: BigString, options: CreateGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
|
|
346
354
|
/**
|
|
347
355
|
* Creates a scheduled event in a guild.
|
|
348
356
|
*
|
|
349
357
|
* @param guildId - The ID of the guild to create the scheduled event in.
|
|
350
358
|
* @param options - The parameters for the creation of the scheduled event.
|
|
359
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
351
360
|
* @returns An instance of the created {@link ScheduledEvent}.
|
|
352
361
|
*
|
|
353
362
|
* @remarks
|
|
@@ -359,12 +368,13 @@ export interface RestManager {
|
|
|
359
368
|
*
|
|
360
369
|
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
|
|
361
370
|
*/
|
|
362
|
-
createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent) => Promise<
|
|
371
|
+
createScheduledEvent: (guildId: BigString, options: CreateScheduledEvent, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
|
|
363
372
|
/**
|
|
364
373
|
* Creates a stage instance associated with a stage channel.
|
|
365
374
|
*
|
|
366
375
|
* @param options - The parameters for the creation of the stage instance.
|
|
367
|
-
* @
|
|
376
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
377
|
+
* @returns An instance of the created {@link CamelizedDiscordStageInstance}.
|
|
368
378
|
*
|
|
369
379
|
* @remarks
|
|
370
380
|
* Requires the user to be a moderator of the stage channel.
|
|
@@ -373,29 +383,31 @@ export interface RestManager {
|
|
|
373
383
|
*
|
|
374
384
|
* @see {@link https://discord.com/developers/docs/resources/stage-instance#create-stage-instance}
|
|
375
385
|
*/
|
|
376
|
-
createStageInstance: (options: CreateStageInstance) => Promise<
|
|
386
|
+
createStageInstance: (options: CreateStageInstance, reason?: string) => Promise<CamelizedDiscordStageInstance>;
|
|
377
387
|
/**
|
|
378
388
|
* Creates a webhook.
|
|
379
389
|
*
|
|
380
390
|
* @param channelId - The ID of the channel to create the webhook in.
|
|
381
391
|
* @param options - The parameters for the creation of the webhook.
|
|
382
|
-
* @
|
|
392
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
393
|
+
* @returns An instance of the created {@link CamelizedDiscordWebhook}.
|
|
383
394
|
*
|
|
384
395
|
* @remarks
|
|
385
396
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
386
397
|
*
|
|
387
|
-
* ⚠️ The webhook name must not contain the
|
|
398
|
+
* ⚠️ The webhook name must not contain the substrings 'clyde', or 'discord' (case-insensitive).
|
|
388
399
|
*
|
|
389
400
|
* Fires a _Webhooks Update_ gateway event.
|
|
390
401
|
*
|
|
391
402
|
* @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
|
|
392
403
|
*/
|
|
393
|
-
createWebhook: (channelId: BigString, options: CreateWebhook) => Promise<
|
|
404
|
+
createWebhook: (channelId: BigString, options: CreateWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
|
|
394
405
|
/**
|
|
395
406
|
* Deletes an automod rule.
|
|
396
407
|
*
|
|
397
408
|
* @param guildId - The ID of the guild to delete the rule from.
|
|
398
409
|
* @param ruleId - The ID of the automod rule to delete.
|
|
410
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
399
411
|
*
|
|
400
412
|
* @remarks
|
|
401
413
|
* Requires the `MANAGE_GUILD` permission.
|
|
@@ -409,6 +421,7 @@ export interface RestManager {
|
|
|
409
421
|
* Deletes a channel from within a guild.
|
|
410
422
|
*
|
|
411
423
|
* @param channelId - The ID of the channel to delete.
|
|
424
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
412
425
|
* @returns An instance of the deleted {@link Channel}.
|
|
413
426
|
*
|
|
414
427
|
* @remarks
|
|
@@ -435,6 +448,7 @@ export interface RestManager {
|
|
|
435
448
|
*
|
|
436
449
|
* @param channelId - The ID of the channel to delete the permission override of.
|
|
437
450
|
* @param overwriteId - The ID of the permission override to delete.
|
|
451
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
438
452
|
*
|
|
439
453
|
* @remarks
|
|
440
454
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -449,6 +463,7 @@ export interface RestManager {
|
|
|
449
463
|
*
|
|
450
464
|
* @param guildId - The ID of the guild from which to delete the emoji.
|
|
451
465
|
* @param id - The ID of the emoji to delete.
|
|
466
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
452
467
|
*
|
|
453
468
|
* @remarks
|
|
454
469
|
* Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
@@ -506,7 +521,8 @@ export interface RestManager {
|
|
|
506
521
|
* Delete a new sticker for the guild.
|
|
507
522
|
*
|
|
508
523
|
* @param guildId The ID of the guild to get
|
|
509
|
-
* @
|
|
524
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
525
|
+
* @return A {@link CamelizedDiscordSticker}
|
|
510
526
|
*
|
|
511
527
|
* @remarks
|
|
512
528
|
* Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
@@ -536,6 +552,7 @@ export interface RestManager {
|
|
|
536
552
|
*
|
|
537
553
|
* @param guildId - The ID of the guild from which to delete the integration.
|
|
538
554
|
* @param integrationId - The ID of the integration to delete from the guild.
|
|
555
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
539
556
|
*
|
|
540
557
|
* @remarks
|
|
541
558
|
* Requires the `MANAGE_GUILD` permission.
|
|
@@ -547,11 +564,12 @@ export interface RestManager {
|
|
|
547
564
|
*
|
|
548
565
|
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}
|
|
549
566
|
*/
|
|
550
|
-
deleteIntegration: (guildId: BigString, integrationId: BigString) => Promise<void>;
|
|
567
|
+
deleteIntegration: (guildId: BigString, integrationId: BigString, reason?: string) => Promise<void>;
|
|
551
568
|
/**
|
|
552
569
|
* Deletes an invite to a channel.
|
|
553
570
|
*
|
|
554
571
|
* @param inviteCode - The invite code of the invite to delete.
|
|
572
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
555
573
|
*
|
|
556
574
|
* @remarks
|
|
557
575
|
* Requires the `MANAGE_CHANNELS` permission.
|
|
@@ -566,6 +584,7 @@ export interface RestManager {
|
|
|
566
584
|
*
|
|
567
585
|
* @param channelId - The ID of the channel to delete the message from.
|
|
568
586
|
* @param messageId - The ID of the message to delete from the channel.
|
|
587
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
569
588
|
*
|
|
570
589
|
* @remarks
|
|
571
590
|
* If not deleting own message:
|
|
@@ -581,6 +600,7 @@ export interface RestManager {
|
|
|
581
600
|
*
|
|
582
601
|
* @param channelId - The ID of the channel to delete the messages from.
|
|
583
602
|
* @param messageIds - The IDs of the messages to delete from the channel.
|
|
603
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
584
604
|
*
|
|
585
605
|
* @remarks
|
|
586
606
|
* Requires the `MANAGE_MESSAGES` permission.
|
|
@@ -658,6 +678,7 @@ export interface RestManager {
|
|
|
658
678
|
*
|
|
659
679
|
* @param guildId - The ID of the guild to delete the role from.
|
|
660
680
|
* @param roleId - The ID of the role to delete.
|
|
681
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
661
682
|
*
|
|
662
683
|
* @remarks
|
|
663
684
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -666,7 +687,7 @@ export interface RestManager {
|
|
|
666
687
|
*
|
|
667
688
|
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
|
|
668
689
|
*/
|
|
669
|
-
deleteRole: (guildId: BigString, roleId: BigString) => Promise<void>;
|
|
690
|
+
deleteRole: (guildId: BigString, roleId: BigString, reason?: string) => Promise<void>;
|
|
670
691
|
/**
|
|
671
692
|
* Deletes a scheduled event from a guild.
|
|
672
693
|
*
|
|
@@ -685,6 +706,7 @@ export interface RestManager {
|
|
|
685
706
|
* Deletes the stage instance associated with a stage channel, if one exists.
|
|
686
707
|
*
|
|
687
708
|
* @param channelId - The ID of the stage channel the stage instance is associated with.
|
|
709
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
688
710
|
*
|
|
689
711
|
* @remarks
|
|
690
712
|
* Requires the user to be a moderator of the stage channel.
|
|
@@ -765,14 +787,15 @@ export interface RestManager {
|
|
|
765
787
|
*
|
|
766
788
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
|
|
767
789
|
*/
|
|
768
|
-
editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<
|
|
790
|
+
editApplicationCommandPermissions: (guildId: BigString, commandId: BigString, bearerToken: string, options: ApplicationCommandPermissions[]) => Promise<CamelizedDiscordApplicationCommandPermissions>;
|
|
769
791
|
/**
|
|
770
792
|
* Edits an automod rule.
|
|
771
793
|
*
|
|
772
794
|
* @param guildId - The ID of the guild to edit the rule in.
|
|
773
795
|
* @param ruleId - The ID of the rule to edit.
|
|
774
796
|
* @param options - The parameters for the edit of the rule.
|
|
775
|
-
* @
|
|
797
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
798
|
+
* @returns An instance of the edited {@link CamelizedDiscordAutoModerationRule}.
|
|
776
799
|
*
|
|
777
800
|
* @remarks
|
|
778
801
|
* Requires the `MANAGE_GUILD` permission.
|
|
@@ -781,7 +804,7 @@ export interface RestManager {
|
|
|
781
804
|
*
|
|
782
805
|
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
|
|
783
806
|
*/
|
|
784
|
-
editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions
|
|
807
|
+
editAutomodRule: (guildId: BigString, ruleId: BigString, options: Partial<EditAutoModerationRuleOptions>, reason?: string) => Promise<CamelizedDiscordAutoModerationRule>;
|
|
785
808
|
/**
|
|
786
809
|
* Modifies the bot's username or avatar.
|
|
787
810
|
* NOTE: username: if changed may cause the bot's discriminator to be randomized.
|
|
@@ -789,13 +812,14 @@ export interface RestManager {
|
|
|
789
812
|
editBotProfile: (options: {
|
|
790
813
|
username?: string;
|
|
791
814
|
botAvatarURL?: string | null;
|
|
792
|
-
}) => Promise<
|
|
815
|
+
}) => Promise<CamelizedDiscordUser>;
|
|
793
816
|
/**
|
|
794
817
|
* Edits a channel's settings.
|
|
795
818
|
*
|
|
796
819
|
* @param channelId - The ID of the channel to edit.
|
|
797
820
|
* @param options - The parameters for the edit of the channel.
|
|
798
|
-
* @
|
|
821
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
822
|
+
* @returns An instance of the edited {@link CamelizedDiscordChannel}.
|
|
799
823
|
*
|
|
800
824
|
* @remarks
|
|
801
825
|
* If editing a channel of type {@link ChannelTypes.GroupDm}:
|
|
@@ -819,12 +843,13 @@ export interface RestManager {
|
|
|
819
843
|
* - Otherwise:
|
|
820
844
|
* - Fires a _Channel Update_ gateway event.
|
|
821
845
|
*/
|
|
822
|
-
editChannel: (channelId: BigString, options: ModifyChannel) => Promise<
|
|
846
|
+
editChannel: (channelId: BigString, options: ModifyChannel, reason?: string) => Promise<CamelizedDiscordChannel>;
|
|
823
847
|
/**
|
|
824
848
|
* Edits the permission overrides for a user or role in a channel.
|
|
825
849
|
*
|
|
826
850
|
* @param channelId - The ID of the channel to edit the permission overrides of.
|
|
827
851
|
* @param options - The permission override.
|
|
852
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
828
853
|
*
|
|
829
854
|
* @remarks
|
|
830
855
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -835,7 +860,7 @@ export interface RestManager {
|
|
|
835
860
|
*
|
|
836
861
|
* @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions}
|
|
837
862
|
*/
|
|
838
|
-
editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions) => Promise<void>;
|
|
863
|
+
editChannelPermissionOverrides: (channelId: BigString, options: EditChannelPermissionOverridesOptions, reason?: string) => Promise<void>;
|
|
839
864
|
/**
|
|
840
865
|
* Edits the positions of a set of channels in a guild.
|
|
841
866
|
*
|
|
@@ -856,7 +881,8 @@ export interface RestManager {
|
|
|
856
881
|
* @param guildId - The ID of the guild in which to edit the emoji.
|
|
857
882
|
* @param id - The ID of the emoji to edit.
|
|
858
883
|
* @param options - The parameters for the edit of the emoji.
|
|
859
|
-
* @
|
|
884
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
885
|
+
* @returns An instance of the updated {@link CamelizedDiscordEmoji}.
|
|
860
886
|
*
|
|
861
887
|
* @remarks
|
|
862
888
|
* Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
@@ -865,7 +891,7 @@ export interface RestManager {
|
|
|
865
891
|
*
|
|
866
892
|
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
|
|
867
893
|
*/
|
|
868
|
-
editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji) => Promise<
|
|
894
|
+
editEmoji: (guildId: BigString, id: BigString, options: ModifyGuildEmoji, reason?: string) => Promise<CamelizedDiscordEmoji>;
|
|
869
895
|
/**
|
|
870
896
|
* Edits a follow-up message to an interaction.
|
|
871
897
|
*
|
|
@@ -883,7 +909,7 @@ export interface RestManager {
|
|
|
883
909
|
*
|
|
884
910
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
|
|
885
911
|
*/
|
|
886
|
-
editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<
|
|
912
|
+
editFollowupMessage: (token: string, messageId: BigString, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
|
|
887
913
|
/**
|
|
888
914
|
* Edits a global application command.
|
|
889
915
|
*
|
|
@@ -893,13 +919,14 @@ export interface RestManager {
|
|
|
893
919
|
*
|
|
894
920
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
|
|
895
921
|
*/
|
|
896
|
-
editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<
|
|
922
|
+
editGlobalApplicationCommand: (commandId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
|
|
897
923
|
/**
|
|
898
924
|
* Edits a guild's settings.
|
|
899
925
|
*
|
|
900
926
|
* @param guildId - The ID of the guild to edit.
|
|
901
927
|
* @param shardId - The ID of the shard the guild is in.
|
|
902
928
|
* @param options - The parameters for the edit of the guild.
|
|
929
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
903
930
|
* @returns An instance of the edited {@link Guild}.
|
|
904
931
|
*
|
|
905
932
|
* @remarks
|
|
@@ -912,7 +939,7 @@ export interface RestManager {
|
|
|
912
939
|
*
|
|
913
940
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
|
|
914
941
|
*/
|
|
915
|
-
editGuild: (guildId: BigString, options: ModifyGuild) => Promise<
|
|
942
|
+
editGuild: (guildId: BigString, options: ModifyGuild, reason?: string) => Promise<CamelizedDiscordGuild>;
|
|
916
943
|
/**
|
|
917
944
|
* Edits an application command registered in a guild.
|
|
918
945
|
*
|
|
@@ -923,14 +950,17 @@ export interface RestManager {
|
|
|
923
950
|
*
|
|
924
951
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
|
|
925
952
|
*/
|
|
926
|
-
editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<
|
|
927
|
-
/** Modify a guild's MFA level. Requires guild ownership.
|
|
953
|
+
editGuildApplicationCommand: (commandId: BigString, guildId: BigString, options: CreateApplicationCommand) => Promise<CamelizedDiscordApplicationCommand>;
|
|
954
|
+
/** Modify a guild's MFA level. Requires guild ownership.
|
|
955
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
956
|
+
*/
|
|
928
957
|
editGuildMfaLevel: (guildId: BigString, mfaLevel: MfaLevels, reason?: string) => Promise<void>;
|
|
929
958
|
/**
|
|
930
959
|
* Edit the given sticker.
|
|
931
960
|
*
|
|
932
961
|
* @param guildId The ID of the guild to get
|
|
933
|
-
* @
|
|
962
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
963
|
+
* @return A {@link CamelizedDiscordSticker}
|
|
934
964
|
*
|
|
935
965
|
* @remarks
|
|
936
966
|
* Requires the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
@@ -938,7 +968,7 @@ export interface RestManager {
|
|
|
938
968
|
*
|
|
939
969
|
* @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}
|
|
940
970
|
*/
|
|
941
|
-
editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions
|
|
971
|
+
editGuildSticker: (guildId: BigString, stickerId: BigString, options: AtLeastOne<EditGuildStickerOptions>, reason?: string) => Promise<CamelizedDiscordSticker>;
|
|
942
972
|
/**
|
|
943
973
|
* Edits a template's settings.
|
|
944
974
|
*
|
|
@@ -954,7 +984,7 @@ export interface RestManager {
|
|
|
954
984
|
*
|
|
955
985
|
* @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}
|
|
956
986
|
*/
|
|
957
|
-
editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<
|
|
987
|
+
editGuildTemplate: (guildId: BigString, templateCode: string, options: ModifyGuildTemplate) => Promise<CamelizedDiscordTemplate>;
|
|
958
988
|
/**
|
|
959
989
|
* Edits a message.
|
|
960
990
|
*
|
|
@@ -972,7 +1002,7 @@ export interface RestManager {
|
|
|
972
1002
|
*
|
|
973
1003
|
* @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
|
|
974
1004
|
*/
|
|
975
|
-
editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<
|
|
1005
|
+
editMessage: (channelId: BigString, messageId: BigString, options: EditMessage) => Promise<CamelizedDiscordMessage>;
|
|
976
1006
|
/**
|
|
977
1007
|
* Edits the initial message response to an interaction.
|
|
978
1008
|
*
|
|
@@ -989,14 +1019,14 @@ export interface RestManager {
|
|
|
989
1019
|
*
|
|
990
1020
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
|
|
991
1021
|
*/
|
|
992
|
-
editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<
|
|
1022
|
+
editOriginalInteractionResponse: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage | undefined>;
|
|
993
1023
|
/**
|
|
994
1024
|
* Edits the original webhook message.
|
|
995
1025
|
*
|
|
996
1026
|
* @param webhookId - The ID of the webhook to edit the original message of.
|
|
997
1027
|
* @param token - The webhook token, used to edit the message.
|
|
998
1028
|
* @param options - The parameters for the edit of the message.
|
|
999
|
-
* @returns An instance of the edited {@link
|
|
1029
|
+
* @returns An instance of the edited {@link CamelizedDiscordMessage}.
|
|
1000
1030
|
*
|
|
1001
1031
|
* @remarks
|
|
1002
1032
|
* Fires a _Message Update_ gateway event.
|
|
@@ -1005,7 +1035,7 @@ export interface RestManager {
|
|
|
1005
1035
|
*/
|
|
1006
1036
|
editOriginalWebhookMessage: (webhookId: BigString, token: string, options: InteractionCallbackData & {
|
|
1007
1037
|
threadId?: BigString;
|
|
1008
|
-
}) => Promise<
|
|
1038
|
+
}) => Promise<CamelizedDiscordMessage>;
|
|
1009
1039
|
/**
|
|
1010
1040
|
* Edits the voice state of the bot user.
|
|
1011
1041
|
*
|
|
@@ -1030,7 +1060,8 @@ export interface RestManager {
|
|
|
1030
1060
|
* @param guildId - The ID of the guild to edit the role in.
|
|
1031
1061
|
* @param roleId - The ID of the role to edit.
|
|
1032
1062
|
* @param options - The parameters for the edit of the role.
|
|
1033
|
-
* @
|
|
1063
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1064
|
+
* @returns An instance of the edited {@link CamelizedDiscordRole}.
|
|
1034
1065
|
*
|
|
1035
1066
|
* @remarks
|
|
1036
1067
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -1039,13 +1070,14 @@ export interface RestManager {
|
|
|
1039
1070
|
*
|
|
1040
1071
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
|
|
1041
1072
|
*/
|
|
1042
|
-
editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole) => Promise<
|
|
1073
|
+
editRole: (guildId: BigString, roleId: BigString, options: EditGuildRole, reason?: string) => Promise<CamelizedDiscordRole>;
|
|
1043
1074
|
/**
|
|
1044
1075
|
* Edits the positions of a set of roles.
|
|
1045
1076
|
*
|
|
1046
1077
|
* @param guildId - The ID of the guild to edit the role positions in.
|
|
1047
1078
|
* @param options - The parameters for the edit of the role positions.
|
|
1048
|
-
* @
|
|
1079
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1080
|
+
* @returns A collection of {@link CamelizedDiscordRole} objects assorted by role ID.
|
|
1049
1081
|
*
|
|
1050
1082
|
* @remarks
|
|
1051
1083
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -1054,12 +1086,13 @@ export interface RestManager {
|
|
|
1054
1086
|
*
|
|
1055
1087
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
|
|
1056
1088
|
*/
|
|
1057
|
-
editRolePositions: (guildId: BigString, options: ModifyRolePositions[]) => Promise<
|
|
1089
|
+
editRolePositions: (guildId: BigString, options: ModifyRolePositions[], reason?: string) => Promise<CamelizedDiscordRole[]>;
|
|
1058
1090
|
/**
|
|
1059
1091
|
* Edits a scheduled event.
|
|
1060
1092
|
*
|
|
1061
1093
|
* @param guildId - The ID of the guild to edit the scheduled event in.
|
|
1062
1094
|
* @param eventId - The ID of the scheduled event to edit.
|
|
1095
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1063
1096
|
* @returns An instance of the edited {@link ScheduledEvent}.
|
|
1064
1097
|
*
|
|
1065
1098
|
* @remarks
|
|
@@ -1073,12 +1106,14 @@ export interface RestManager {
|
|
|
1073
1106
|
*
|
|
1074
1107
|
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
|
1075
1108
|
*/
|
|
1076
|
-
editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent
|
|
1109
|
+
editScheduledEvent: (guildId: BigString, eventId: BigString, options: Partial<EditScheduledEvent>, reason?: string) => Promise<CamelizedDiscordScheduledEvent>;
|
|
1077
1110
|
/**
|
|
1078
1111
|
* Edits a stage instance.
|
|
1079
1112
|
*
|
|
1080
1113
|
* @param channelId - The ID of the stage channel the stage instance is associated with.
|
|
1081
|
-
* @
|
|
1114
|
+
* @param topic - Topic of the Stage instance (1-120 characters).
|
|
1115
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1116
|
+
* @returns An instance of the updated {@link CamelizedDiscordStageInstance}.
|
|
1082
1117
|
*
|
|
1083
1118
|
* @remarks
|
|
1084
1119
|
* Requires the user to be a moderator of the stage channel.
|
|
@@ -1087,7 +1122,7 @@ export interface RestManager {
|
|
|
1087
1122
|
*
|
|
1088
1123
|
* @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance}
|
|
1089
1124
|
*/
|
|
1090
|
-
editStageInstance: (channelId: BigString,
|
|
1125
|
+
editStageInstance: (channelId: BigString, topic: string, reason?: string) => Promise<CamelizedDiscordStageInstance>;
|
|
1091
1126
|
/**
|
|
1092
1127
|
* Edits the voice state of another user.
|
|
1093
1128
|
*
|
|
@@ -1106,7 +1141,8 @@ export interface RestManager {
|
|
|
1106
1141
|
* Edits a webhook.
|
|
1107
1142
|
*
|
|
1108
1143
|
* @param webhookId - The ID of the webhook to edit.
|
|
1109
|
-
* @
|
|
1144
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1145
|
+
* @returns An instance of the edited {@link CamelizedDiscordWebhook}.
|
|
1110
1146
|
*
|
|
1111
1147
|
* @remarks
|
|
1112
1148
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
@@ -1115,7 +1151,7 @@ export interface RestManager {
|
|
|
1115
1151
|
*
|
|
1116
1152
|
* @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook}
|
|
1117
1153
|
*/
|
|
1118
|
-
editWebhook: (webhookId: BigString, options: ModifyWebhook) => Promise<
|
|
1154
|
+
editWebhook: (webhookId: BigString, options: ModifyWebhook, reason?: string) => Promise<CamelizedDiscordWebhook>;
|
|
1119
1155
|
/**
|
|
1120
1156
|
* Edits a webhook message.
|
|
1121
1157
|
*
|
|
@@ -1123,7 +1159,7 @@ export interface RestManager {
|
|
|
1123
1159
|
* @param token - The webhook token, used to edit the message.
|
|
1124
1160
|
* @param messageId - The ID of the message to edit.
|
|
1125
1161
|
* @param options - The parameters for the edit of the message.
|
|
1126
|
-
* @returns An instance of the edited {@link
|
|
1162
|
+
* @returns An instance of the edited {@link CamelizedDiscordMessage}.
|
|
1127
1163
|
*
|
|
1128
1164
|
* @remarks
|
|
1129
1165
|
* Fires a _Message Update_ gateway event.
|
|
@@ -1132,13 +1168,13 @@ export interface RestManager {
|
|
|
1132
1168
|
*/
|
|
1133
1169
|
editWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
|
|
1134
1170
|
threadId?: BigString;
|
|
1135
|
-
}) => Promise<
|
|
1171
|
+
}) => Promise<CamelizedDiscordMessage>;
|
|
1136
1172
|
/**
|
|
1137
1173
|
* Edits a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
|
|
1138
1174
|
*
|
|
1139
1175
|
* @param webhookId - The ID of the webhook to edit.
|
|
1140
1176
|
* @param token - The webhook token, used to edit the webhook.
|
|
1141
|
-
* @returns An instance of the edited {@link
|
|
1177
|
+
* @returns An instance of the edited {@link CamelizedDiscordWebhook}.
|
|
1142
1178
|
*
|
|
1143
1179
|
* @remarks
|
|
1144
1180
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
@@ -1147,12 +1183,13 @@ export interface RestManager {
|
|
|
1147
1183
|
*
|
|
1148
1184
|
* @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
|
|
1149
1185
|
*/
|
|
1150
|
-
editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<
|
|
1186
|
+
editWebhookWithToken: (webhookId: BigString, token: string, options: Omit<ModifyWebhook, 'channelId'>) => Promise<CamelizedDiscordWebhook>;
|
|
1151
1187
|
/**
|
|
1152
1188
|
* Edits a guild's welcome screen.
|
|
1153
1189
|
*
|
|
1154
1190
|
* @param guildId - The ID of the guild to edit the welcome screen of.
|
|
1155
1191
|
* @param options - The parameters for the edit of the welcome screen.
|
|
1192
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1156
1193
|
* @returns An instance of the edited {@link WelcomeScreen}.
|
|
1157
1194
|
*
|
|
1158
1195
|
* @remarks
|
|
@@ -1162,11 +1199,12 @@ export interface RestManager {
|
|
|
1162
1199
|
*
|
|
1163
1200
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
|
|
1164
1201
|
*/
|
|
1165
|
-
editWelcomeScreen: (guildId: BigString, options:
|
|
1202
|
+
editWelcomeScreen: (guildId: BigString, options: CamelizedDiscordModifyGuildWelcomeScreen, reason?: string) => Promise<CamelizedDiscordWelcomeScreen>;
|
|
1166
1203
|
/**
|
|
1167
1204
|
* Edits the settings of a guild's widget.
|
|
1168
1205
|
*
|
|
1169
1206
|
* @param guildId - The ID of the guild to edit the settings of the widget of.
|
|
1207
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1170
1208
|
* @returns An instance of the edited {@link GuildWidgetSettings}.
|
|
1171
1209
|
*
|
|
1172
1210
|
* @remarks
|
|
@@ -1176,27 +1214,27 @@ export interface RestManager {
|
|
|
1176
1214
|
*
|
|
1177
1215
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
|
|
1178
1216
|
*/
|
|
1179
|
-
editWidgetSettings: (guildId: BigString, options:
|
|
1217
|
+
editWidgetSettings: (guildId: BigString, options: CamelizedDiscordGuildWidgetSettings, reason?: string) => Promise<CamelizedDiscordGuildWidgetSettings>;
|
|
1180
1218
|
/**
|
|
1181
1219
|
* Executes a webhook, causing a message to be posted in the channel configured for the webhook.
|
|
1182
1220
|
*
|
|
1183
1221
|
* @param webhookId - The ID of the webhook to execute.
|
|
1184
1222
|
* @param token - The webhook token, used to execute the webhook.
|
|
1185
1223
|
* @param options - The parameters for the execution of the webhook.
|
|
1186
|
-
* @returns An instance of the created {@link
|
|
1224
|
+
* @returns An instance of the created {@link CamelizedDiscordMessage}, or `undefined` if the {@link ExecuteWebhook.wait | wait} property of the {@link options} object parameter is set to `false`.
|
|
1187
1225
|
*
|
|
1188
1226
|
* @remarks
|
|
1189
1227
|
* If the webhook channel is a forum channel, you must provide a value for either `threadId` or `threadName`.
|
|
1190
1228
|
*
|
|
1191
1229
|
* @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
|
|
1192
1230
|
*/
|
|
1193
|
-
executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<
|
|
1231
|
+
executeWebhook: (webhookId: BigString, token: string, options: ExecuteWebhook) => Promise<CamelizedDiscordMessage | undefined>;
|
|
1194
1232
|
/**
|
|
1195
1233
|
* Follows an announcement channel, allowing messages posted within it to be cross-posted into the target channel.
|
|
1196
1234
|
*
|
|
1197
1235
|
* @param sourceChannelId - The ID of the announcement channel to follow.
|
|
1198
1236
|
* @param targetChannelId - The ID of the target channel - the channel to cross-post to.
|
|
1199
|
-
* @returns An instance of {@link
|
|
1237
|
+
* @returns An instance of {@link CamelizedDiscordFollowedChannel}.
|
|
1200
1238
|
*
|
|
1201
1239
|
* @remarks
|
|
1202
1240
|
* Requires the `MANAGE_WEBHOOKS` permission in the __target channel__.
|
|
@@ -1205,12 +1243,12 @@ export interface RestManager {
|
|
|
1205
1243
|
*
|
|
1206
1244
|
* @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
|
|
1207
1245
|
*/
|
|
1208
|
-
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<
|
|
1246
|
+
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>;
|
|
1209
1247
|
/**
|
|
1210
1248
|
* Gets the list of all active threads for a guild.
|
|
1211
1249
|
*
|
|
1212
1250
|
* @param guildId - The ID of the guild to get the threads of.
|
|
1213
|
-
* @returns An instance of {@link
|
|
1251
|
+
* @returns An instance of {@link CamelizedDiscordActiveThreads}.
|
|
1214
1252
|
*
|
|
1215
1253
|
* @remarks
|
|
1216
1254
|
* Returns both public and private threads.
|
|
@@ -1219,9 +1257,9 @@ export interface RestManager {
|
|
|
1219
1257
|
*
|
|
1220
1258
|
* @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
|
|
1221
1259
|
*/
|
|
1222
|
-
getActiveThreads: (guildId: BigString) => Promise<
|
|
1260
|
+
getActiveThreads: (guildId: BigString) => Promise<CamelizedDiscordActiveThreads>;
|
|
1223
1261
|
/** Get the applications info */
|
|
1224
|
-
getApplicationInfo: () => Promise<
|
|
1262
|
+
getApplicationInfo: () => Promise<CamelizedDiscordApplication>;
|
|
1225
1263
|
/**
|
|
1226
1264
|
* Gets the permissions of a guild application command.
|
|
1227
1265
|
*
|
|
@@ -1231,7 +1269,7 @@ export interface RestManager {
|
|
|
1231
1269
|
*
|
|
1232
1270
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
|
|
1233
1271
|
*/
|
|
1234
|
-
getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<
|
|
1272
|
+
getApplicationCommandPermission: (guildId: BigString, commandId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions>;
|
|
1235
1273
|
/**
|
|
1236
1274
|
* Gets the permissions of all application commands registered in a guild by the ID of the guild.
|
|
1237
1275
|
*
|
|
@@ -1240,7 +1278,7 @@ export interface RestManager {
|
|
|
1240
1278
|
*
|
|
1241
1279
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
|
|
1242
1280
|
*/
|
|
1243
|
-
getApplicationCommandPermissions: (guildId: BigString) => Promise<
|
|
1281
|
+
getApplicationCommandPermissions: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommandPermissions[]>;
|
|
1244
1282
|
/**
|
|
1245
1283
|
* Gets a guild's audit log.
|
|
1246
1284
|
*
|
|
@@ -1253,57 +1291,57 @@ export interface RestManager {
|
|
|
1253
1291
|
*
|
|
1254
1292
|
* @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
|
|
1255
1293
|
*/
|
|
1256
|
-
getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<
|
|
1294
|
+
getAuditLog: (guildId: BigString, options?: GetGuildAuditLog) => Promise<CamelizedDiscordAuditLog>;
|
|
1257
1295
|
/**
|
|
1258
1296
|
* Gets an automod rule by its ID.
|
|
1259
1297
|
*
|
|
1260
1298
|
* @param guildId - The ID of the guild to get the rule of.
|
|
1261
1299
|
* @param ruleId - The ID of the rule to get.
|
|
1262
|
-
* @returns An instance of {@link
|
|
1300
|
+
* @returns An instance of {@link CamelizedDiscordAutoModerationRule}.
|
|
1263
1301
|
*
|
|
1264
1302
|
* @remarks
|
|
1265
1303
|
* Requires the `MANAGE_GUILD` permission.
|
|
1266
1304
|
*
|
|
1267
1305
|
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
|
|
1268
1306
|
*/
|
|
1269
|
-
getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<
|
|
1307
|
+
getAutomodRule: (guildId: BigString, ruleId: BigString) => Promise<CamelizedDiscordAutoModerationRule>;
|
|
1270
1308
|
/**
|
|
1271
1309
|
* Gets the list of automod rules for a guild.
|
|
1272
1310
|
*
|
|
1273
1311
|
* @param guildId - The ID of the guild to get the rules from.
|
|
1274
|
-
* @returns A collection of {@link
|
|
1312
|
+
* @returns A collection of {@link CamelizedDiscordAutoModerationRule} objects assorted by rule ID.
|
|
1275
1313
|
*
|
|
1276
1314
|
* @remarks
|
|
1277
1315
|
* Requires the `MANAGE_GUILD` permission.
|
|
1278
1316
|
*
|
|
1279
1317
|
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
|
|
1280
1318
|
*/
|
|
1281
|
-
getAutomodRules: (guildId: BigString) => Promise<
|
|
1319
|
+
getAutomodRules: (guildId: BigString) => Promise<CamelizedDiscordAutoModerationRule[]>;
|
|
1282
1320
|
/**
|
|
1283
1321
|
* Gets the list of available voice regions.
|
|
1284
1322
|
*
|
|
1285
1323
|
* @returns A collection of {@link VoiceRegions | VoiceRegion} objects assorted by voice region ID.
|
|
1286
1324
|
*/
|
|
1287
|
-
getAvailableVoiceRegions: () => Promise<
|
|
1325
|
+
getAvailableVoiceRegions: () => Promise<CamelizedDiscordVoiceRegion[]>;
|
|
1288
1326
|
/**
|
|
1289
1327
|
* Gets a ban by user ID.
|
|
1290
1328
|
*
|
|
1291
1329
|
* @param guildId - The ID of the guild to get the ban from.
|
|
1292
1330
|
* @param userId - The ID of the user to get the ban for.
|
|
1293
|
-
* @returns An instance of {@link
|
|
1331
|
+
* @returns An instance of {@link CamelizedDiscordBan}.
|
|
1294
1332
|
*
|
|
1295
1333
|
* @remarks
|
|
1296
1334
|
* Requires the `BAN_MEMBERS` permission.
|
|
1297
1335
|
*
|
|
1298
1336
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
|
|
1299
1337
|
*/
|
|
1300
|
-
getBan: (guildId: BigString, userId: BigString) => Promise<
|
|
1338
|
+
getBan: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordBan>;
|
|
1301
1339
|
/**
|
|
1302
1340
|
* Gets the list of bans for a guild.
|
|
1303
1341
|
*
|
|
1304
1342
|
* @param guildId - The ID of the guild to get the list of bans for.
|
|
1305
1343
|
* @param options - The parameters for the fetching of the list of bans.
|
|
1306
|
-
* @returns A collection of {@link
|
|
1344
|
+
* @returns A collection of {@link CamelizedDiscordBan} objects assorted by user ID.
|
|
1307
1345
|
*
|
|
1308
1346
|
* @remarks
|
|
1309
1347
|
* Requires the `BAN_MEMBERS` permission.
|
|
@@ -1312,24 +1350,24 @@ export interface RestManager {
|
|
|
1312
1350
|
*
|
|
1313
1351
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
|
|
1314
1352
|
*/
|
|
1315
|
-
getBans: (guildId: BigString, options?: GetBans) => Promise<
|
|
1353
|
+
getBans: (guildId: BigString, options?: GetBans) => Promise<CamelizedDiscordBan[]>;
|
|
1316
1354
|
/**
|
|
1317
1355
|
* Gets a channel by its ID.
|
|
1318
1356
|
*
|
|
1319
1357
|
* @param channelId - The ID of the channel to get.
|
|
1320
|
-
* @returns An instance of {@link
|
|
1358
|
+
* @returns An instance of {@link CamelizedDiscordChannel}.
|
|
1321
1359
|
*
|
|
1322
1360
|
* @remarks
|
|
1323
1361
|
* If the channel is a thread, a {@link ThreadMember} object is included in the result.
|
|
1324
1362
|
*
|
|
1325
1363
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
|
|
1326
1364
|
*/
|
|
1327
|
-
getChannel: (channelId: BigString) => Promise<
|
|
1365
|
+
getChannel: (channelId: BigString) => Promise<CamelizedDiscordChannel>;
|
|
1328
1366
|
/**
|
|
1329
1367
|
* Gets the list of invites for a channel.
|
|
1330
1368
|
*
|
|
1331
1369
|
* @param channelId - The ID of the channel to get the invites of.
|
|
1332
|
-
* @returns A collection of {@link
|
|
1370
|
+
* @returns A collection of {@link CamelizedDiscordInviteMetadata} objects assorted by invite code.
|
|
1333
1371
|
*
|
|
1334
1372
|
* @remarks
|
|
1335
1373
|
* Requires the `MANAGE_CHANNELS` permission.
|
|
@@ -1338,59 +1376,59 @@ export interface RestManager {
|
|
|
1338
1376
|
*
|
|
1339
1377
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
|
|
1340
1378
|
*/
|
|
1341
|
-
getChannelInvites: (channelId: BigString) => Promise<
|
|
1379
|
+
getChannelInvites: (channelId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
|
|
1342
1380
|
/**
|
|
1343
1381
|
* Gets the list of channels for a guild.
|
|
1344
1382
|
*
|
|
1345
1383
|
* @param guildId - The ID of the guild to get the channels of.
|
|
1346
|
-
* @returns A collection of {@link
|
|
1384
|
+
* @returns A collection of {@link CamelizedDiscordChannel} objects assorted by channel ID.
|
|
1347
1385
|
*
|
|
1348
1386
|
* @remarks
|
|
1349
1387
|
* Excludes threads.
|
|
1350
1388
|
*
|
|
1351
1389
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
|
|
1352
1390
|
*/
|
|
1353
|
-
getChannels: (guildId: BigString) => Promise<
|
|
1391
|
+
getChannels: (guildId: BigString) => Promise<CamelizedDiscordChannel[]>;
|
|
1354
1392
|
/**
|
|
1355
1393
|
* Gets a list of webhooks for a channel.
|
|
1356
1394
|
*
|
|
1357
1395
|
* @param channelId - The ID of the channel which to get the webhooks of.
|
|
1358
|
-
* @returns A collection of {@link
|
|
1396
|
+
* @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
|
|
1359
1397
|
*
|
|
1360
1398
|
* @remarks
|
|
1361
1399
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1362
1400
|
*
|
|
1363
1401
|
* @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks}
|
|
1364
1402
|
*/
|
|
1365
|
-
getChannelWebhooks: (channelId: BigString) => Promise<
|
|
1403
|
+
getChannelWebhooks: (channelId: BigString) => Promise<CamelizedDiscordWebhook[]>;
|
|
1366
1404
|
/**
|
|
1367
1405
|
* Gets or creates a DM channel with a user.
|
|
1368
1406
|
*
|
|
1369
1407
|
* @param userId - The ID of the user to create the DM channel with.
|
|
1370
|
-
* @returns An instance of {@link
|
|
1408
|
+
* @returns An instance of {@link CamelizedDiscordChannel}.
|
|
1371
1409
|
*
|
|
1372
1410
|
* @see {@link https://discord.com/developers/docs/resources/user#create-dm}
|
|
1373
1411
|
*/
|
|
1374
|
-
getDmChannel: (userId: BigString) => Promise<
|
|
1412
|
+
getDmChannel: (userId: BigString) => Promise<CamelizedDiscordChannel>;
|
|
1375
1413
|
/**
|
|
1376
1414
|
* Gets an emoji by its ID.
|
|
1377
1415
|
*
|
|
1378
1416
|
* @param guildId - The ID of the guild from which to get the emoji.
|
|
1379
1417
|
* @param emojiId - The ID of the emoji to get.
|
|
1380
|
-
* @returns An instance of {@link
|
|
1418
|
+
* @returns An instance of {@link CamelizedDiscordEmoji}.
|
|
1381
1419
|
*
|
|
1382
1420
|
* @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
|
|
1383
1421
|
*/
|
|
1384
|
-
getEmoji: (guildId: BigString, emojiId: BigString) => Promise<
|
|
1422
|
+
getEmoji: (guildId: BigString, emojiId: BigString) => Promise<CamelizedDiscordEmoji>;
|
|
1385
1423
|
/**
|
|
1386
1424
|
* Gets the list of emojis for a guild.
|
|
1387
1425
|
*
|
|
1388
1426
|
* @param guildId - The ID of the guild which to get the emojis of.
|
|
1389
|
-
* @returns A collection of {@link
|
|
1427
|
+
* @returns A collection of {@link CamelizedDiscordEmoji} objects assorted by emoji ID.
|
|
1390
1428
|
*
|
|
1391
1429
|
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
|
|
1392
1430
|
*/
|
|
1393
|
-
getEmojis: (guildId: BigString) => Promise<
|
|
1431
|
+
getEmojis: (guildId: BigString) => Promise<CamelizedDiscordEmoji[]>;
|
|
1394
1432
|
/**
|
|
1395
1433
|
* Gets a follow-up message to an interaction by the ID of the message.
|
|
1396
1434
|
*
|
|
@@ -1407,9 +1445,9 @@ export interface RestManager {
|
|
|
1407
1445
|
*
|
|
1408
1446
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message}
|
|
1409
1447
|
*/
|
|
1410
|
-
getFollowupMessage: (token: string, messageId: BigString) => Promise<
|
|
1448
|
+
getFollowupMessage: (token: string, messageId: BigString) => Promise<CamelizedDiscordMessage>;
|
|
1411
1449
|
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
|
|
1412
|
-
getGatewayBot: () => Promise<
|
|
1450
|
+
getGatewayBot: () => Promise<CamelizedDiscordGetGatewayBot>;
|
|
1413
1451
|
/**
|
|
1414
1452
|
* Gets a global application command by its ID.
|
|
1415
1453
|
*
|
|
@@ -1418,7 +1456,7 @@ export interface RestManager {
|
|
|
1418
1456
|
*
|
|
1419
1457
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
|
|
1420
1458
|
*/
|
|
1421
|
-
getGlobalApplicationCommand: (commandId: BigString) => Promise<
|
|
1459
|
+
getGlobalApplicationCommand: (commandId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
|
|
1422
1460
|
/**
|
|
1423
1461
|
* Gets the list of your bot's global application commands.
|
|
1424
1462
|
*
|
|
@@ -1426,7 +1464,7 @@ export interface RestManager {
|
|
|
1426
1464
|
*
|
|
1427
1465
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
|
|
1428
1466
|
*/
|
|
1429
|
-
getGlobalApplicationCommands: () => Promise<
|
|
1467
|
+
getGlobalApplicationCommands: () => Promise<CamelizedDiscordApplicationCommand[]>;
|
|
1430
1468
|
/**
|
|
1431
1469
|
* Gets a guild by its ID.
|
|
1432
1470
|
*
|
|
@@ -1438,7 +1476,7 @@ export interface RestManager {
|
|
|
1438
1476
|
*/
|
|
1439
1477
|
getGuild: (guildId: BigString, options?: {
|
|
1440
1478
|
counts?: boolean;
|
|
1441
|
-
}) => Promise<
|
|
1479
|
+
}) => Promise<CamelizedDiscordGuild>;
|
|
1442
1480
|
/**
|
|
1443
1481
|
* Gets a guild application command by its ID.
|
|
1444
1482
|
*
|
|
@@ -1448,7 +1486,7 @@ export interface RestManager {
|
|
|
1448
1486
|
*
|
|
1449
1487
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}
|
|
1450
1488
|
*/
|
|
1451
|
-
getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<
|
|
1489
|
+
getGuildApplicationCommand: (commandId: BigString, guildId: BigString) => Promise<CamelizedDiscordApplicationCommand>;
|
|
1452
1490
|
/**
|
|
1453
1491
|
* Gets the list of application commands registered by your bot in a guild.
|
|
1454
1492
|
*
|
|
@@ -1457,7 +1495,7 @@ export interface RestManager {
|
|
|
1457
1495
|
*
|
|
1458
1496
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commandss}
|
|
1459
1497
|
*/
|
|
1460
|
-
getGuildApplicationCommands: (guildId: BigString) => Promise<
|
|
1498
|
+
getGuildApplicationCommands: (guildId: BigString) => Promise<CamelizedDiscordApplicationCommand[]>;
|
|
1461
1499
|
/**
|
|
1462
1500
|
* Gets the preview of a guild by a guild's ID.
|
|
1463
1501
|
*
|
|
@@ -1469,30 +1507,30 @@ export interface RestManager {
|
|
|
1469
1507
|
*
|
|
1470
1508
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
|
|
1471
1509
|
*/
|
|
1472
|
-
getGuildPreview: (guildId: BigString) => Promise<
|
|
1510
|
+
getGuildPreview: (guildId: BigString) => Promise<CamelizedDiscordGuildPreview>;
|
|
1473
1511
|
/**
|
|
1474
1512
|
* Returns a sticker object for the given guild and sticker IDs.
|
|
1475
1513
|
*
|
|
1476
1514
|
* @param guildId The ID of the guild to get
|
|
1477
1515
|
* @param stickerId The ID of the sticker to get
|
|
1478
|
-
* @return A {@link
|
|
1516
|
+
* @return A {@link CamelizedDiscordSticker}
|
|
1479
1517
|
*
|
|
1480
1518
|
* @remarks Includes the user field if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
1481
1519
|
*
|
|
1482
1520
|
* @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}
|
|
1483
1521
|
*/
|
|
1484
|
-
getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<
|
|
1522
|
+
getGuildSticker: (guildId: BigString, stickerId: BigString) => Promise<CamelizedDiscordSticker>;
|
|
1485
1523
|
/**
|
|
1486
1524
|
* Returns an array of sticker objects for the given guild.
|
|
1487
1525
|
*
|
|
1488
1526
|
* @param guildId The ID of the guild to get
|
|
1489
|
-
* @returns A collection of {@link
|
|
1527
|
+
* @returns A collection of {@link CamelizedDiscordSticker} objects assorted by sticker ID.
|
|
1490
1528
|
*
|
|
1491
1529
|
* @remarks Includes user fields if the bot has the `MANAGE_EMOJIS_AND_STICKERS` permission.
|
|
1492
1530
|
*
|
|
1493
1531
|
* @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}
|
|
1494
1532
|
*/
|
|
1495
|
-
getGuildStickers: (guildId: BigString) => Promise<
|
|
1533
|
+
getGuildStickers: (guildId: BigString) => Promise<CamelizedDiscordSticker[]>;
|
|
1496
1534
|
/**
|
|
1497
1535
|
* Gets a template by its code.
|
|
1498
1536
|
*
|
|
@@ -1504,7 +1542,7 @@ export interface RestManager {
|
|
|
1504
1542
|
*
|
|
1505
1543
|
* @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}
|
|
1506
1544
|
*/
|
|
1507
|
-
getGuildTemplate: (templateCode: string) => Promise<
|
|
1545
|
+
getGuildTemplate: (templateCode: string) => Promise<CamelizedDiscordTemplate>;
|
|
1508
1546
|
/**
|
|
1509
1547
|
* Gets the list of templates for a guild.
|
|
1510
1548
|
*
|
|
@@ -1516,19 +1554,19 @@ export interface RestManager {
|
|
|
1516
1554
|
*
|
|
1517
1555
|
* @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
|
|
1518
1556
|
*/
|
|
1519
|
-
getGuildTemplates: (guildId: BigString) => Promise<
|
|
1557
|
+
getGuildTemplates: (guildId: BigString) => Promise<CamelizedDiscordTemplate[]>;
|
|
1520
1558
|
/**
|
|
1521
1559
|
* Gets the list of webhooks for a guild.
|
|
1522
1560
|
*
|
|
1523
1561
|
* @param guildId - The ID of the guild to get the list of webhooks for.
|
|
1524
|
-
* @returns A collection of {@link
|
|
1562
|
+
* @returns A collection of {@link CamelizedDiscordWebhook} objects assorted by webhook ID.
|
|
1525
1563
|
*
|
|
1526
1564
|
* @remarks
|
|
1527
1565
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1528
1566
|
*
|
|
1529
1567
|
* @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks}
|
|
1530
1568
|
*/
|
|
1531
|
-
getGuildWebhooks: (guildId: BigString) => Promise<
|
|
1569
|
+
getGuildWebhooks: (guildId: BigString) => Promise<CamelizedDiscordWebhook[]>;
|
|
1532
1570
|
/**
|
|
1533
1571
|
* Gets the list of integrations attached to a guild.
|
|
1534
1572
|
*
|
|
@@ -1540,17 +1578,17 @@ export interface RestManager {
|
|
|
1540
1578
|
*
|
|
1541
1579
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
|
|
1542
1580
|
*/
|
|
1543
|
-
getIntegrations: (guildId: BigString) => Promise<
|
|
1581
|
+
getIntegrations: (guildId: BigString) => Promise<CamelizedDiscordIntegration[]>;
|
|
1544
1582
|
/**
|
|
1545
1583
|
* Gets an invite to a channel by its invite code.
|
|
1546
1584
|
*
|
|
1547
1585
|
* @param inviteCode - The invite code of the invite to get.
|
|
1548
1586
|
* @param options - The parameters for the fetching of the invite.
|
|
1549
|
-
* @returns An instance of {@link
|
|
1587
|
+
* @returns An instance of {@link CamelizedDiscordInviteMetadata}.
|
|
1550
1588
|
*
|
|
1551
1589
|
* @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
|
|
1552
1590
|
*/
|
|
1553
|
-
getInvite: (inviteCode: string, options?: GetInvite) => Promise<
|
|
1591
|
+
getInvite: (inviteCode: string, options?: GetInvite) => Promise<CamelizedDiscordInviteMetadata>;
|
|
1554
1592
|
/**
|
|
1555
1593
|
* Gets the list of invites for a guild.
|
|
1556
1594
|
*
|
|
@@ -1562,7 +1600,7 @@ export interface RestManager {
|
|
|
1562
1600
|
*
|
|
1563
1601
|
* @see {@link https://discord.com/developers/docs/resources/invite#get-invites}
|
|
1564
1602
|
*/
|
|
1565
|
-
getInvites: (guildId: BigString) => Promise<
|
|
1603
|
+
getInvites: (guildId: BigString) => Promise<CamelizedDiscordInviteMetadata[]>;
|
|
1566
1604
|
/**
|
|
1567
1605
|
* Gets a message from a channel by the ID of the message.
|
|
1568
1606
|
*
|
|
@@ -1578,7 +1616,7 @@ export interface RestManager {
|
|
|
1578
1616
|
*
|
|
1579
1617
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
|
|
1580
1618
|
*/
|
|
1581
|
-
getMessage: (channelId: BigString, messageId: BigString) => Promise<
|
|
1619
|
+
getMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
|
|
1582
1620
|
/**
|
|
1583
1621
|
* Gets multiple messages from a channel.
|
|
1584
1622
|
*
|
|
@@ -1594,7 +1632,7 @@ export interface RestManager {
|
|
|
1594
1632
|
*
|
|
1595
1633
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
|
|
1596
1634
|
*/
|
|
1597
|
-
getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<
|
|
1635
|
+
getMessages: (channelId: BigString, options?: GetMessagesOptions) => Promise<CamelizedDiscordMessage[]>;
|
|
1598
1636
|
/**
|
|
1599
1637
|
* Returns the list of sticker packs available to Nitro subscribers.
|
|
1600
1638
|
*
|
|
@@ -1602,7 +1640,7 @@ export interface RestManager {
|
|
|
1602
1640
|
*
|
|
1603
1641
|
* @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
|
|
1604
1642
|
*/
|
|
1605
|
-
getNitroStickerPacks: () => Promise<
|
|
1643
|
+
getNitroStickerPacks: () => Promise<CamelizedDiscordStickerPack[]>;
|
|
1606
1644
|
/**
|
|
1607
1645
|
* Gets the initial message response to an interaction.
|
|
1608
1646
|
*
|
|
@@ -1618,7 +1656,7 @@ export interface RestManager {
|
|
|
1618
1656
|
*
|
|
1619
1657
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
|
|
1620
1658
|
*/
|
|
1621
|
-
getOriginalInteractionResponse: (token: string) => Promise<
|
|
1659
|
+
getOriginalInteractionResponse: (token: string) => Promise<CamelizedDiscordMessage>;
|
|
1622
1660
|
/**
|
|
1623
1661
|
* Gets the pinned messages for a channel.
|
|
1624
1662
|
*
|
|
@@ -1633,13 +1671,13 @@ export interface RestManager {
|
|
|
1633
1671
|
*
|
|
1634
1672
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
|
|
1635
1673
|
*/
|
|
1636
|
-
getPinnedMessages: (channelId: BigString) => Promise<
|
|
1674
|
+
getPinnedMessages: (channelId: BigString) => Promise<CamelizedDiscordMessage[]>;
|
|
1637
1675
|
/**
|
|
1638
1676
|
* Gets the list of private archived threads for a channel.
|
|
1639
1677
|
*
|
|
1640
1678
|
* @param channelId - The ID of the channel to get the archived threads for.
|
|
1641
1679
|
* @param options - The parameters for the fetching of threads.
|
|
1642
|
-
* @returns An instance of {@link
|
|
1680
|
+
* @returns An instance of {@link CamelizedDiscordArchivedThreads}.
|
|
1643
1681
|
*
|
|
1644
1682
|
* @remarks
|
|
1645
1683
|
* Requires the `READ_MESSAGE_HISTORY` permission.
|
|
@@ -1651,13 +1689,13 @@ export interface RestManager {
|
|
|
1651
1689
|
*
|
|
1652
1690
|
* @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
|
|
1653
1691
|
*/
|
|
1654
|
-
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<
|
|
1692
|
+
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
|
|
1655
1693
|
/**
|
|
1656
1694
|
* Gets the list of private archived threads the bot is a member of for a channel.
|
|
1657
1695
|
*
|
|
1658
1696
|
* @param channelId - The ID of the channel to get the archived threads for.
|
|
1659
1697
|
* @param options - The parameters for the fetching of threads.
|
|
1660
|
-
* @returns An instance of {@link
|
|
1698
|
+
* @returns An instance of {@link CamelizedDiscordArchivedThreads}.
|
|
1661
1699
|
*
|
|
1662
1700
|
* @remarks
|
|
1663
1701
|
* Requires the `READ_MESSAGE_HISTORY` permission.
|
|
@@ -1668,7 +1706,7 @@ export interface RestManager {
|
|
|
1668
1706
|
*
|
|
1669
1707
|
* @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
|
|
1670
1708
|
*/
|
|
1671
|
-
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<
|
|
1709
|
+
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
|
|
1672
1710
|
/**
|
|
1673
1711
|
* Gets the number of members that would be kicked from a guild during pruning.
|
|
1674
1712
|
*
|
|
@@ -1681,7 +1719,7 @@ export interface RestManager {
|
|
|
1681
1719
|
*
|
|
1682
1720
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
|
|
1683
1721
|
*/
|
|
1684
|
-
getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<
|
|
1722
|
+
getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<CamelizedDiscordPrunedCount>;
|
|
1685
1723
|
/**
|
|
1686
1724
|
* Gets the list of public archived threads for a channel.
|
|
1687
1725
|
*
|
|
@@ -1699,7 +1737,7 @@ export interface RestManager {
|
|
|
1699
1737
|
*
|
|
1700
1738
|
* @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
|
|
1701
1739
|
*/
|
|
1702
|
-
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<
|
|
1740
|
+
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<CamelizedDiscordArchivedThreads>;
|
|
1703
1741
|
/**
|
|
1704
1742
|
* Gets the list of roles for a guild.
|
|
1705
1743
|
*
|
|
@@ -1711,7 +1749,7 @@ export interface RestManager {
|
|
|
1711
1749
|
*
|
|
1712
1750
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
|
|
1713
1751
|
*/
|
|
1714
|
-
getRoles: (guildId: BigString) => Promise<
|
|
1752
|
+
getRoles: (guildId: BigString) => Promise<CamelizedDiscordRole[]>;
|
|
1715
1753
|
/**
|
|
1716
1754
|
* Gets a scheduled event by its ID.
|
|
1717
1755
|
*
|
|
@@ -1724,7 +1762,7 @@ export interface RestManager {
|
|
|
1724
1762
|
*/
|
|
1725
1763
|
getScheduledEvent: (guildId: BigString, eventId: BigString, options?: {
|
|
1726
1764
|
withUserCount?: boolean;
|
|
1727
|
-
}) => Promise<
|
|
1765
|
+
}) => Promise<CamelizedDiscordScheduledEvent>;
|
|
1728
1766
|
/**
|
|
1729
1767
|
* Gets the list of scheduled events for a guild.
|
|
1730
1768
|
*
|
|
@@ -1734,7 +1772,7 @@ export interface RestManager {
|
|
|
1734
1772
|
*
|
|
1735
1773
|
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
|
|
1736
1774
|
*/
|
|
1737
|
-
getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<
|
|
1775
|
+
getScheduledEvents: (guildId: BigString, options?: GetScheduledEvents) => Promise<CamelizedDiscordScheduledEvent[]>;
|
|
1738
1776
|
/**
|
|
1739
1777
|
* Gets the list of subscribers to a scheduled event from a guild.
|
|
1740
1778
|
*
|
|
@@ -1751,51 +1789,51 @@ export interface RestManager {
|
|
|
1751
1789
|
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
|
|
1752
1790
|
*/
|
|
1753
1791
|
getScheduledEventUsers: (guildId: BigString, eventId: BigString, options?: GetScheduledEventUsers) => Promise<Array<{
|
|
1754
|
-
user:
|
|
1755
|
-
member?:
|
|
1792
|
+
user: CamelizedDiscordUser;
|
|
1793
|
+
member?: CamelizedDiscordMember;
|
|
1756
1794
|
}>>;
|
|
1757
1795
|
/** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */
|
|
1758
|
-
getSessionInfo: () => Promise<
|
|
1796
|
+
getSessionInfo: () => Promise<CamelizedDiscordGetGatewayBot>;
|
|
1759
1797
|
/**
|
|
1760
1798
|
* Gets the stage instance associated with a stage channel, if one exists.
|
|
1761
1799
|
*
|
|
1762
1800
|
* @param channelId - The ID of the stage channel the stage instance is associated with.
|
|
1763
|
-
* @returns An instance of {@link
|
|
1801
|
+
* @returns An instance of {@link CamelizedDiscordStageInstance}.
|
|
1764
1802
|
*
|
|
1765
1803
|
* @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
|
|
1766
1804
|
*/
|
|
1767
|
-
getStageInstance: (channelId: BigString) => Promise<
|
|
1805
|
+
getStageInstance: (channelId: BigString) => Promise<CamelizedDiscordStageInstance>;
|
|
1768
1806
|
/**
|
|
1769
1807
|
* Returns a sticker object for the given sticker ID.
|
|
1770
1808
|
*
|
|
1771
1809
|
* @param stickerId The ID of the sticker to get
|
|
1772
|
-
* @returns A {@link
|
|
1810
|
+
* @returns A {@link CamelizedDiscordSticker}
|
|
1773
1811
|
*
|
|
1774
1812
|
* @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
|
|
1775
1813
|
*/
|
|
1776
|
-
getSticker: (stickerId: BigString) => Promise<
|
|
1814
|
+
getSticker: (stickerId: BigString) => Promise<CamelizedDiscordSticker>;
|
|
1777
1815
|
/**
|
|
1778
1816
|
* Gets a thread member by their user ID.
|
|
1779
1817
|
*
|
|
1780
1818
|
* @param channelId - The ID of the thread to get the thread member of.
|
|
1781
1819
|
* @param userId - The user ID of the thread member to get.
|
|
1782
|
-
* @returns An instance of {@link
|
|
1820
|
+
* @returns An instance of {@link CamelizedDiscordThreadMember}.
|
|
1783
1821
|
*
|
|
1784
1822
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
|
|
1785
1823
|
*/
|
|
1786
|
-
getThreadMember: (channelId: BigString, userId: BigString) => Promise<
|
|
1824
|
+
getThreadMember: (channelId: BigString, userId: BigString) => Promise<CamelizedDiscordThreadMember>;
|
|
1787
1825
|
/**
|
|
1788
1826
|
* Gets the list of thread members for a thread.
|
|
1789
1827
|
*
|
|
1790
1828
|
* @param channelId - The ID of the thread to get the thread members of.
|
|
1791
|
-
* @returns A collection of {@link
|
|
1829
|
+
* @returns A collection of {@link CamelizedDiscordThreadMember} assorted by user ID.
|
|
1792
1830
|
*
|
|
1793
1831
|
* @remarks
|
|
1794
1832
|
* Requires the application to have the `GUILD_MEMBERS` privileged intent enabled.
|
|
1795
1833
|
*
|
|
1796
1834
|
* @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
|
|
1797
1835
|
*/
|
|
1798
|
-
getThreadMembers: (channelId: BigString) => Promise<
|
|
1836
|
+
getThreadMembers: (channelId: BigString) => Promise<CamelizedDiscordThreadMember[]>;
|
|
1799
1837
|
/**
|
|
1800
1838
|
* Gets the list of users that reacted with an emoji to a message.
|
|
1801
1839
|
*
|
|
@@ -1807,14 +1845,14 @@ export interface RestManager {
|
|
|
1807
1845
|
*
|
|
1808
1846
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
|
|
1809
1847
|
*/
|
|
1810
|
-
getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<
|
|
1848
|
+
getReactions: (channelId: BigString, messageId: BigString, reaction: string, options?: GetReactions) => Promise<CamelizedDiscordUser[]>;
|
|
1811
1849
|
/**
|
|
1812
1850
|
* Get a user's data from the api
|
|
1813
1851
|
*
|
|
1814
1852
|
* @param id The user's id
|
|
1815
|
-
* @returns {
|
|
1853
|
+
* @returns {CamelizedDiscordUser}
|
|
1816
1854
|
*/
|
|
1817
|
-
getUser: (id: BigString) => Promise<
|
|
1855
|
+
getUser: (id: BigString) => Promise<CamelizedDiscordUser>;
|
|
1818
1856
|
/**
|
|
1819
1857
|
* Gets information about the vanity url of a guild.
|
|
1820
1858
|
*
|
|
@@ -1828,7 +1866,7 @@ export interface RestManager {
|
|
|
1828
1866
|
*
|
|
1829
1867
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
|
|
1830
1868
|
*/
|
|
1831
|
-
getVanityUrl: (guildId: BigString) => Promise<
|
|
1869
|
+
getVanityUrl: (guildId: BigString) => Promise<CamelizedDiscordVanityUrl>;
|
|
1832
1870
|
/**
|
|
1833
1871
|
* Gets the list of voice regions for a guild.
|
|
1834
1872
|
*
|
|
@@ -1837,19 +1875,19 @@ export interface RestManager {
|
|
|
1837
1875
|
*
|
|
1838
1876
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
|
|
1839
1877
|
*/
|
|
1840
|
-
getVoiceRegions: (guildId: BigString) => Promise<
|
|
1878
|
+
getVoiceRegions: (guildId: BigString) => Promise<CamelizedDiscordVoiceRegion[]>;
|
|
1841
1879
|
/**
|
|
1842
1880
|
* Gets a webhook by its ID.
|
|
1843
1881
|
*
|
|
1844
1882
|
* @param webhookId - The ID of the webhook to get.
|
|
1845
|
-
* @returns An instance of {@link
|
|
1883
|
+
* @returns An instance of {@link CamelizedDiscordWebhook}.
|
|
1846
1884
|
*
|
|
1847
1885
|
* @remarks
|
|
1848
1886
|
* Requires the `MANAGE_WEBHOOKS` permission.
|
|
1849
1887
|
*
|
|
1850
1888
|
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}
|
|
1851
1889
|
*/
|
|
1852
|
-
getWebhook: (webhookId: BigString) => Promise<
|
|
1890
|
+
getWebhook: (webhookId: BigString) => Promise<CamelizedDiscordWebhook>;
|
|
1853
1891
|
/**
|
|
1854
1892
|
* Gets a webhook message by its ID.
|
|
1855
1893
|
*
|
|
@@ -1857,21 +1895,21 @@ export interface RestManager {
|
|
|
1857
1895
|
* @param token - The webhook token, used to get webhook messages.
|
|
1858
1896
|
* @param messageId - the ID of the webhook message to get.
|
|
1859
1897
|
* @param options - The parameters for the fetching of the message.
|
|
1860
|
-
* @returns An instance of {@link
|
|
1898
|
+
* @returns An instance of {@link CamelizedDiscordMessage}.
|
|
1861
1899
|
*
|
|
1862
1900
|
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}
|
|
1863
1901
|
*/
|
|
1864
|
-
getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<
|
|
1902
|
+
getWebhookMessage: (webhookId: BigString, token: string, messageId: BigString, options?: GetWebhookMessageOptions) => Promise<CamelizedDiscordMessage>;
|
|
1865
1903
|
/**
|
|
1866
1904
|
* Gets a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
|
|
1867
1905
|
*
|
|
1868
1906
|
* @param webhookId - The ID of the webhook to get.
|
|
1869
1907
|
* @param token - The webhook token, used to get the webhook.
|
|
1870
|
-
* @returns An instance of {@link
|
|
1908
|
+
* @returns An instance of {@link CamelizedDiscordWebhook}.
|
|
1871
1909
|
*
|
|
1872
1910
|
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
|
|
1873
1911
|
*/
|
|
1874
|
-
getWebhookWithToken: (webhookId: BigString, token: string) => Promise<
|
|
1912
|
+
getWebhookWithToken: (webhookId: BigString, token: string) => Promise<CamelizedDiscordWebhook>;
|
|
1875
1913
|
/**
|
|
1876
1914
|
* Gets the welcome screen for a guild.
|
|
1877
1915
|
*
|
|
@@ -1884,7 +1922,7 @@ export interface RestManager {
|
|
|
1884
1922
|
*
|
|
1885
1923
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
|
|
1886
1924
|
*/
|
|
1887
|
-
getWelcomeScreen: (guildId: BigString) => Promise<
|
|
1925
|
+
getWelcomeScreen: (guildId: BigString) => Promise<CamelizedDiscordWelcomeScreen>;
|
|
1888
1926
|
/**
|
|
1889
1927
|
* Gets the guild widget by guild ID.
|
|
1890
1928
|
*
|
|
@@ -1893,7 +1931,7 @@ export interface RestManager {
|
|
|
1893
1931
|
*
|
|
1894
1932
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
|
|
1895
1933
|
*/
|
|
1896
|
-
getWidget: (guildId: BigString) => Promise<
|
|
1934
|
+
getWidget: (guildId: BigString) => Promise<CamelizedDiscordGuildWidget>;
|
|
1897
1935
|
/**
|
|
1898
1936
|
* Gets the settings of a guild's widget.
|
|
1899
1937
|
*
|
|
@@ -1905,7 +1943,7 @@ export interface RestManager {
|
|
|
1905
1943
|
*
|
|
1906
1944
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
|
|
1907
1945
|
*/
|
|
1908
|
-
getWidgetSettings: (guildId: BigString) => Promise<
|
|
1946
|
+
getWidgetSettings: (guildId: BigString) => Promise<CamelizedDiscordGuildWidgetSettings>;
|
|
1909
1947
|
/**
|
|
1910
1948
|
* Adds the bot user to a thread.
|
|
1911
1949
|
*
|
|
@@ -1960,13 +1998,14 @@ export interface RestManager {
|
|
|
1960
1998
|
*
|
|
1961
1999
|
* @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
|
|
1962
2000
|
*/
|
|
1963
|
-
publishMessage: (channelId: BigString, messageId: BigString) => Promise<
|
|
2001
|
+
publishMessage: (channelId: BigString, messageId: BigString) => Promise<CamelizedDiscordMessage>;
|
|
1964
2002
|
/**
|
|
1965
2003
|
* Removes a role from a member.
|
|
1966
2004
|
*
|
|
1967
2005
|
* @param guildId - The ID of the guild the member to remove the role from is in.
|
|
1968
2006
|
* @param userId - The user ID of the member to remove the role from.
|
|
1969
2007
|
* @param roleId - The ID of the role to remove from the member.
|
|
2008
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
1970
2009
|
*
|
|
1971
2010
|
* @remarks
|
|
1972
2011
|
* Requires the `MANAGE_ROLES` permission.
|
|
@@ -1998,7 +2037,7 @@ export interface RestManager {
|
|
|
1998
2037
|
*
|
|
1999
2038
|
* @param channelId - The ID of the channel to send the message in.
|
|
2000
2039
|
* @param options - The parameters for the creation of the message.
|
|
2001
|
-
* @returns An instance of the created {@link
|
|
2040
|
+
* @returns An instance of the created {@link CamelizedDiscordMessage}.
|
|
2002
2041
|
*
|
|
2003
2042
|
* @remarks
|
|
2004
2043
|
* Requires that the bot user be able to see the contents of the channel the message is to be sent in.
|
|
@@ -2019,7 +2058,7 @@ export interface RestManager {
|
|
|
2019
2058
|
*
|
|
2020
2059
|
* @see {@link https://discord.com/developers/docs/resources/channel#create-message}
|
|
2021
2060
|
*/
|
|
2022
|
-
sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<
|
|
2061
|
+
sendMessage: (channelId: BigString, options: CreateMessageOptions) => Promise<CamelizedDiscordMessage>;
|
|
2023
2062
|
/**
|
|
2024
2063
|
* Sends a follow-up message to an interaction.
|
|
2025
2064
|
*
|
|
@@ -2040,7 +2079,7 @@ export interface RestManager {
|
|
|
2040
2079
|
*
|
|
2041
2080
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
|
|
2042
2081
|
*/
|
|
2043
|
-
sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<
|
|
2082
|
+
sendFollowupMessage: (token: string, options: InteractionCallbackData) => Promise<CamelizedDiscordMessage>;
|
|
2044
2083
|
/**
|
|
2045
2084
|
* Sends a response to an interaction.
|
|
2046
2085
|
*
|
|
@@ -2069,6 +2108,7 @@ export interface RestManager {
|
|
|
2069
2108
|
* @param channelId - The ID of the channel in which to create the thread.
|
|
2070
2109
|
* @param messageId - The ID of the message to use as the thread's point of origin.
|
|
2071
2110
|
* @param options - The parameters to use for the creation of the thread.
|
|
2111
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2072
2112
|
* @returns An instance of the created {@link Channel | Thread}.
|
|
2073
2113
|
*
|
|
2074
2114
|
* @remarks
|
|
@@ -2082,13 +2122,14 @@ export interface RestManager {
|
|
|
2082
2122
|
*
|
|
2083
2123
|
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
|
|
2084
2124
|
*/
|
|
2085
|
-
startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage) => Promise<
|
|
2125
|
+
startThreadWithMessage: (channelId: BigString, messageId: BigString, options: StartThreadWithMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
|
|
2086
2126
|
/**
|
|
2087
2127
|
* Creates a thread without using a message as the thread's point of origin.
|
|
2088
2128
|
*
|
|
2089
2129
|
* @param channelId - The ID of the channel in which to create the thread.
|
|
2090
2130
|
* @param options - The parameters to use for the creation of the thread.
|
|
2091
|
-
* @
|
|
2131
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2132
|
+
* @returns An instance of the created {@link CamelizedDiscordChannel | Thread}.
|
|
2092
2133
|
*
|
|
2093
2134
|
* @remarks
|
|
2094
2135
|
* Creating a private thread requires the server to be boosted.
|
|
@@ -2097,7 +2138,7 @@ export interface RestManager {
|
|
|
2097
2138
|
*
|
|
2098
2139
|
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
|
|
2099
2140
|
*/
|
|
2100
|
-
startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage) => Promise<
|
|
2141
|
+
startThreadWithoutMessage: (channelId: BigString, options: StartThreadWithoutMessage, reason?: string) => Promise<CamelizedDiscordChannel>;
|
|
2101
2142
|
/**
|
|
2102
2143
|
* Synchronises a template with the current state of a guild.
|
|
2103
2144
|
*
|
|
@@ -2111,7 +2152,7 @@ export interface RestManager {
|
|
|
2111
2152
|
*
|
|
2112
2153
|
* @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
|
|
2113
2154
|
*/
|
|
2114
|
-
syncGuildTemplate: (guildId: BigString) => Promise<
|
|
2155
|
+
syncGuildTemplate: (guildId: BigString) => Promise<CamelizedDiscordTemplate>;
|
|
2115
2156
|
/**
|
|
2116
2157
|
* Triggers a typing indicator for the bot user.
|
|
2117
2158
|
*
|
|
@@ -2138,7 +2179,7 @@ export interface RestManager {
|
|
|
2138
2179
|
*
|
|
2139
2180
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
|
|
2140
2181
|
*/
|
|
2141
|
-
upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<
|
|
2182
|
+
upsertGlobalApplicationCommands: (commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
|
|
2142
2183
|
/**
|
|
2143
2184
|
* Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
|
|
2144
2185
|
*
|
|
@@ -2153,13 +2194,13 @@ export interface RestManager {
|
|
|
2153
2194
|
*
|
|
2154
2195
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
|
|
2155
2196
|
*/
|
|
2156
|
-
upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<
|
|
2197
|
+
upsertGuildApplicationCommands: (guildId: BigString, commands: CreateApplicationCommand[]) => Promise<CamelizedDiscordApplicationCommand[]>;
|
|
2157
2198
|
/**
|
|
2158
2199
|
* Bans a user from a guild.
|
|
2159
2200
|
*
|
|
2160
|
-
|
|
2161
2201
|
* @param guildId - The ID of the guild to ban the user from.
|
|
2162
2202
|
* @param userId - The ID of the user to ban from the guild.
|
|
2203
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2163
2204
|
* @param options - The parameters for the creation of the ban.
|
|
2164
2205
|
*
|
|
2165
2206
|
* @remarks
|
|
@@ -2169,25 +2210,27 @@ export interface RestManager {
|
|
|
2169
2210
|
*
|
|
2170
2211
|
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
|
|
2171
2212
|
*/
|
|
2172
|
-
banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan) => Promise<void>;
|
|
2213
|
+
banMember: (guildId: BigString, userId: BigString, options?: CreateGuildBan, reason?: string) => Promise<void>;
|
|
2173
2214
|
/**
|
|
2174
2215
|
* Edits the nickname of the bot user.
|
|
2175
2216
|
*
|
|
2176
2217
|
* @param guildId - The ID of the guild to edit the nickname of the bot user in.
|
|
2177
2218
|
* @param options - The parameters for the edit of the nickname.
|
|
2178
|
-
* @
|
|
2219
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2220
|
+
* @returns An instance of the edited {@link CamelizedDiscordMember}
|
|
2179
2221
|
*
|
|
2180
2222
|
* @remarks
|
|
2181
2223
|
* Fires a _Guild Member Update_ gateway event.
|
|
2182
2224
|
*
|
|
2183
2225
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
|
2184
2226
|
*/
|
|
2185
|
-
editBotMember: (guildId: BigString, options: EditBotMemberOptions) => Promise<
|
|
2227
|
+
editBotMember: (guildId: BigString, options: EditBotMemberOptions, reason?: string) => Promise<CamelizedDiscordMember>;
|
|
2186
2228
|
/**
|
|
2187
2229
|
* Edits a member's properties.
|
|
2188
2230
|
*
|
|
2189
2231
|
* @param guildId - The ID of the guild to edit the member of.
|
|
2190
2232
|
* @param userId - The user ID of the member to edit.
|
|
2233
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2191
2234
|
* @param options - The parameters for the edit of the user.
|
|
2192
2235
|
*
|
|
2193
2236
|
* @remarks
|
|
@@ -2198,24 +2241,24 @@ export interface RestManager {
|
|
|
2198
2241
|
*
|
|
2199
2242
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
|
|
2200
2243
|
*/
|
|
2201
|
-
editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember) => Promise<
|
|
2244
|
+
editMember: (guildId: BigString, userId: BigString, options: ModifyGuildMember, reason?: string) => Promise<CamelizedDiscordMember>;
|
|
2202
2245
|
/**
|
|
2203
2246
|
* Gets the member object by user ID.
|
|
2204
2247
|
*
|
|
2205
2248
|
|
|
2206
2249
|
* @param guildId - The ID of the guild to get the member object for.
|
|
2207
2250
|
* @param userId - The ID of the user to get the member object for.
|
|
2208
|
-
* @returns An instance of {@link
|
|
2251
|
+
* @returns An instance of {@link CamelizedDiscordMemberWithUser}.
|
|
2209
2252
|
*
|
|
2210
2253
|
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
|
|
2211
2254
|
*/
|
|
2212
|
-
getMember: (guildId: BigString, userId: BigString) => Promise<
|
|
2255
|
+
getMember: (guildId: BigString, userId: BigString) => Promise<CamelizedDiscordMemberWithUser>;
|
|
2213
2256
|
/**
|
|
2214
2257
|
* Gets the list of members for a guild.
|
|
2215
2258
|
*
|
|
2216
2259
|
* @param guildId - The ID of the guild to get the list of members for.
|
|
2217
2260
|
* @param options - The parameters for the fetching of the members.
|
|
2218
|
-
* @returns A collection of {@link
|
|
2261
|
+
* @returns A collection of {@link CamelizedDiscordMemberWithUser} objects assorted by user ID.
|
|
2219
2262
|
*
|
|
2220
2263
|
* @remarks
|
|
2221
2264
|
* Requires the `GUILD_MEMBERS` intent.
|
|
@@ -2228,13 +2271,14 @@ export interface RestManager {
|
|
|
2228
2271
|
* @see {@link https://discord.com/developers/docs/topics/gateway#request-guild-members}
|
|
2229
2272
|
* @see {@link https://discord.com/developers/docs/topics/rate-limits#rate-limits}
|
|
2230
2273
|
*/
|
|
2231
|
-
getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<
|
|
2274
|
+
getMembers: (guildId: BigString, options: ListGuildMembers) => Promise<CamelizedDiscordMemberWithUser[]>;
|
|
2232
2275
|
/**
|
|
2233
2276
|
* Kicks a member from a guild.
|
|
2234
2277
|
*
|
|
2235
2278
|
|
|
2236
2279
|
* @param guildId - The ID of the guild to kick the member from.
|
|
2237
2280
|
* @param userId - The user ID of the member to kick from the guild.
|
|
2281
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2238
2282
|
*
|
|
2239
2283
|
* @remarks
|
|
2240
2284
|
* Requires the `KICK_MEMBERS` permission.
|
|
@@ -2249,6 +2293,7 @@ export interface RestManager {
|
|
|
2249
2293
|
*
|
|
2250
2294
|
* @param channelId - The ID of the channel where the message is to be pinned.
|
|
2251
2295
|
* @param messageId - The ID of the message to pin.
|
|
2296
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2252
2297
|
*
|
|
2253
2298
|
* @remarks
|
|
2254
2299
|
* Requires that the bot user be able to see the contents of the channel in which the messages were posted.
|
|
@@ -2268,6 +2313,7 @@ export interface RestManager {
|
|
|
2268
2313
|
|
|
2269
2314
|
* @param guildId - The ID of the guild to prune the members of.
|
|
2270
2315
|
* @param options - The parameters for the pruning of members.
|
|
2316
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2271
2317
|
* @returns A number indicating how many members were pruned.
|
|
2272
2318
|
*
|
|
2273
2319
|
* @remarks
|
|
@@ -2281,7 +2327,7 @@ export interface RestManager {
|
|
|
2281
2327
|
*
|
|
2282
2328
|
* @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
|
|
2283
2329
|
*/
|
|
2284
|
-
pruneMembers: (guildId: BigString, options: BeginGuildPrune) => Promise<{
|
|
2330
|
+
pruneMembers: (guildId: BigString, options: BeginGuildPrune, reason?: string) => Promise<{
|
|
2285
2331
|
pruned: number | null;
|
|
2286
2332
|
}>;
|
|
2287
2333
|
/**
|
|
@@ -2291,17 +2337,18 @@ export interface RestManager {
|
|
|
2291
2337
|
* @param guildId - The ID of the guild to search in.
|
|
2292
2338
|
* @param query - The string to match usernames or nicknames against.
|
|
2293
2339
|
* @param options - The parameters for searching through the members.
|
|
2294
|
-
* @returns A collection of {@link
|
|
2340
|
+
* @returns A collection of {@link CamelizedDiscordMember} objects assorted by user ID.
|
|
2295
2341
|
*
|
|
2296
2342
|
* @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
|
|
2297
2343
|
*/
|
|
2298
|
-
searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<
|
|
2344
|
+
searchMembers: (guildId: BigString, query: string, options?: Omit<SearchMembers, 'query'>) => Promise<CamelizedDiscordMemberWithUser[]>;
|
|
2299
2345
|
/**
|
|
2300
2346
|
* Unbans a user from a guild.
|
|
2301
2347
|
*
|
|
2302
2348
|
|
|
2303
2349
|
* @param guildId - The ID of the guild to unban the user in.
|
|
2304
2350
|
* @param userId - The ID of the user to unban.
|
|
2351
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2305
2352
|
*
|
|
2306
2353
|
* @remarks
|
|
2307
2354
|
* Requires the `BAN_MEMBERS` permission.
|
|
@@ -2310,12 +2357,13 @@ export interface RestManager {
|
|
|
2310
2357
|
*
|
|
2311
2358
|
* @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}
|
|
2312
2359
|
*/
|
|
2313
|
-
unbanMember: (guildId: BigString, userId: BigString) => Promise<void>;
|
|
2360
|
+
unbanMember: (guildId: BigString, userId: BigString, reason?: string) => Promise<void>;
|
|
2314
2361
|
/**
|
|
2315
2362
|
* Unpins a pinned message in a channel.
|
|
2316
2363
|
*
|
|
2317
2364
|
* @param channelId - The ID of the channel where the message is pinned.
|
|
2318
2365
|
* @param messageId - The ID of the message to unpin.
|
|
2366
|
+
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
|
2319
2367
|
*
|
|
2320
2368
|
* @remarks
|
|
2321
2369
|
* Requires that the bot user be able to see the contents of the channel in which the messages were posted.
|
|
@@ -2330,7 +2378,7 @@ export interface RestManager {
|
|
|
2330
2378
|
}
|
|
2331
2379
|
export type RequestMethods = 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT';
|
|
2332
2380
|
export type ApiVersions = 9 | 10;
|
|
2333
|
-
export interface CreateWebhook
|
|
2381
|
+
export interface CreateWebhook {
|
|
2334
2382
|
/** Name of the webhook (1-80 characters) */
|
|
2335
2383
|
name: string;
|
|
2336
2384
|
/** Image url for the default webhook avatar */
|
|
@@ -2338,23 +2386,22 @@ export interface CreateWebhook extends WithReason {
|
|
|
2338
2386
|
}
|
|
2339
2387
|
export interface CreateRequestBodyOptions {
|
|
2340
2388
|
headers?: Record<string, string>;
|
|
2341
|
-
|
|
2342
|
-
body?: Record<string, unknown>;
|
|
2389
|
+
body?: any;
|
|
2343
2390
|
unauthorized?: boolean;
|
|
2344
|
-
|
|
2391
|
+
reason?: string;
|
|
2392
|
+
files?: FileContent[];
|
|
2345
2393
|
}
|
|
2394
|
+
export type MakeRequestOptions = Omit<CreateRequestBodyOptions, 'method'> & Pick<SendRequestOptions, 'runThroughQueue'>;
|
|
2346
2395
|
export interface RequestBody {
|
|
2347
2396
|
headers: Record<string, string>;
|
|
2348
|
-
body
|
|
2397
|
+
body?: string | FormData;
|
|
2349
2398
|
method: RequestMethods;
|
|
2350
2399
|
}
|
|
2351
2400
|
export interface SendRequestOptions {
|
|
2352
2401
|
/** The url to send the request to. */
|
|
2353
2402
|
url: string;
|
|
2354
|
-
/** The method to use
|
|
2403
|
+
/** The method to use for sending the request. */
|
|
2355
2404
|
method: RequestMethods;
|
|
2356
|
-
/** The body to be sent in the request. */
|
|
2357
|
-
body?: Record<string, any>;
|
|
2358
2405
|
/** The amount of times this request has been retried. */
|
|
2359
2406
|
retryCount: number;
|
|
2360
2407
|
/** Handler to retry a request should it be rate limited. */
|
|
@@ -2366,7 +2413,12 @@ export interface SendRequestOptions {
|
|
|
2366
2413
|
/** If this request has a bucket id which it falls under for rate limit */
|
|
2367
2414
|
bucketId?: string;
|
|
2368
2415
|
/** Additional request options, used for things like overriding authorization header. */
|
|
2369
|
-
|
|
2416
|
+
requestBodyOptions?: CreateRequestBodyOptions;
|
|
2417
|
+
/**
|
|
2418
|
+
* Whether the request should be run through the queue.
|
|
2419
|
+
* Useful for routes which do not have any rate limits.
|
|
2420
|
+
*/
|
|
2421
|
+
runThroughQueue?: boolean;
|
|
2370
2422
|
}
|
|
2371
2423
|
export interface RestRateLimitedPath {
|
|
2372
2424
|
url: string;
|
|
@@ -2381,7 +2433,7 @@ export interface WebhookMessageEditor {
|
|
|
2381
2433
|
* @param token - The webhook token, used to edit the message.
|
|
2382
2434
|
* @param messageId - The ID of the message to edit.
|
|
2383
2435
|
* @param options - The parameters for the edit of the message.
|
|
2384
|
-
* @returns An instance of the edited {@link
|
|
2436
|
+
* @returns An instance of the edited {@link CamelizedDiscordMessage}.
|
|
2385
2437
|
*
|
|
2386
2438
|
* @remarks
|
|
2387
2439
|
* Fires a _Message Update_ gateway event.
|
|
@@ -2390,14 +2442,14 @@ export interface WebhookMessageEditor {
|
|
|
2390
2442
|
*/
|
|
2391
2443
|
(webhookId: BigString, token: string, messageId: BigString, options: InteractionCallbackData & {
|
|
2392
2444
|
threadId?: BigString;
|
|
2393
|
-
}): Promise<
|
|
2445
|
+
}): Promise<CamelizedDiscordMessage>;
|
|
2394
2446
|
/**
|
|
2395
2447
|
* Edits the original webhook message.
|
|
2396
2448
|
*
|
|
2397
2449
|
* @param webhookId - The ID of the webhook to edit the original message of.
|
|
2398
2450
|
* @param token - The webhook token, used to edit the message.
|
|
2399
2451
|
* @param options - The parameters for the edit of the message.
|
|
2400
|
-
* @returns An instance of the edited {@link
|
|
2452
|
+
* @returns An instance of the edited {@link CamelizedDiscordMessage}.
|
|
2401
2453
|
*
|
|
2402
2454
|
* @remarks
|
|
2403
2455
|
* Fires a _Message Update_ gateway event.
|
|
@@ -2406,7 +2458,7 @@ export interface WebhookMessageEditor {
|
|
|
2406
2458
|
*/
|
|
2407
2459
|
original: (webhookId: BigString, token: string, options: InteractionCallbackData & {
|
|
2408
2460
|
threadId?: BigString;
|
|
2409
|
-
}) => Promise<
|
|
2461
|
+
}) => Promise<CamelizedDiscordMessage>;
|
|
2410
2462
|
}
|
|
2411
2463
|
export interface RestRequestResponse {
|
|
2412
2464
|
ok: boolean;
|