@discordjs/core 2.3.0 → 2.5.0
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/http-only.d.mts +349 -53
- package/dist/http-only.d.ts +349 -53
- package/dist/http-only.js +272 -150
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +274 -151
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +394 -53
- package/dist/index.d.ts +394 -53
- package/dist/index.js +387 -171
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +381 -165
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
package/dist/http-only.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { REST, RequestData, RawFile } from '@discordjs/rest';
|
|
2
2
|
import * as discord_api_types_v10 from 'discord-api-types/v10';
|
|
3
|
-
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody,
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPutAPIChannelRecipientJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildMessagesSearchQuery, RESTGetAPIGuildMessagesSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPutAPIGuildIncidentActionsJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentGuildMemberJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
4
4
|
export * from 'discord-api-types/v10';
|
|
5
5
|
import * as discord_api_types_globals from 'discord-api-types/globals';
|
|
6
6
|
|
|
@@ -226,6 +226,12 @@ interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
|
|
|
226
226
|
files?: RawFile[];
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
+
interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
|
|
230
|
+
files?: RawFile[];
|
|
231
|
+
}
|
|
232
|
+
interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
|
|
233
|
+
files?: RawFile[];
|
|
234
|
+
}
|
|
229
235
|
declare class ChannelsAPI {
|
|
230
236
|
private readonly rest;
|
|
231
237
|
constructor(rest: REST);
|
|
@@ -237,9 +243,7 @@ declare class ChannelsAPI {
|
|
|
237
243
|
* @param body - The data for sending the message
|
|
238
244
|
* @param options - The options for sending the message
|
|
239
245
|
*/
|
|
240
|
-
createMessage(channelId: Snowflake, { files, ...body }:
|
|
241
|
-
files?: RawFile[];
|
|
242
|
-
}, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
246
|
+
createMessage(channelId: Snowflake, { files, ...body }: CreateMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
243
247
|
/**
|
|
244
248
|
* Edits a message
|
|
245
249
|
*
|
|
@@ -249,9 +253,7 @@ declare class ChannelsAPI {
|
|
|
249
253
|
* @param body - The data for editing the message
|
|
250
254
|
* @param options - The options for editing the message
|
|
251
255
|
*/
|
|
252
|
-
editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }:
|
|
253
|
-
files?: RawFile[];
|
|
254
|
-
}, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
256
|
+
editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: EditMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
255
257
|
/**
|
|
256
258
|
* Fetches the reactions for a message
|
|
257
259
|
*
|
|
@@ -518,6 +520,15 @@ declare class ChannelsAPI {
|
|
|
518
520
|
* @param options - The options for deleting the permission overwrite
|
|
519
521
|
*/
|
|
520
522
|
deletePermissionOverwrite(channelId: Snowflake, overwriteId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
523
|
+
/**
|
|
524
|
+
* Sends a soundboard sound in a channel
|
|
525
|
+
*
|
|
526
|
+
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
|
|
527
|
+
* @param channelId - The id of the channel to send the soundboard sound in
|
|
528
|
+
* @param body - The data for sending the soundboard sound
|
|
529
|
+
* @param options - The options for sending the soundboard sound
|
|
530
|
+
*/
|
|
531
|
+
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
|
|
521
532
|
/**
|
|
522
533
|
* Adds a recipient to a group DM channel
|
|
523
534
|
*
|
|
@@ -558,6 +569,9 @@ declare class GatewayAPI {
|
|
|
558
569
|
getBot({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGatewayBotInfo>;
|
|
559
570
|
}
|
|
560
571
|
|
|
572
|
+
interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
|
|
573
|
+
file: RawFile;
|
|
574
|
+
}
|
|
561
575
|
declare class GuildsAPI {
|
|
562
576
|
private readonly rest;
|
|
563
577
|
constructor(rest: REST);
|
|
@@ -625,7 +639,7 @@ declare class GuildsAPI {
|
|
|
625
639
|
*/
|
|
626
640
|
addMember(guildId: Snowflake, userId: Snowflake, body: RESTPutAPIGuildMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIGuildMemberResult>;
|
|
627
641
|
/**
|
|
628
|
-
* Fetches
|
|
642
|
+
* Fetches members of a guild.
|
|
629
643
|
*
|
|
630
644
|
* @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
|
|
631
645
|
* @param guildId - The id of the guild
|
|
@@ -1061,9 +1075,7 @@ declare class GuildsAPI {
|
|
|
1061
1075
|
* @param body - The data for creating the sticker
|
|
1062
1076
|
* @param options - The options for creating the sticker
|
|
1063
1077
|
*/
|
|
1064
|
-
createSticker(guildId: Snowflake, { file, ...body }:
|
|
1065
|
-
file: RawFile;
|
|
1066
|
-
}, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
|
|
1078
|
+
createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
|
|
1067
1079
|
/**
|
|
1068
1080
|
* Edits a sticker for a guild
|
|
1069
1081
|
*
|
|
@@ -1155,6 +1167,15 @@ declare class GuildsAPI {
|
|
|
1155
1167
|
* @param options - The options for searching for guild members
|
|
1156
1168
|
*/
|
|
1157
1169
|
searchForMembers(guildId: Snowflake, query: RESTGetAPIGuildMembersSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersSearchResult>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Searches for messages.
|
|
1172
|
+
*
|
|
1173
|
+
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
|
1174
|
+
* @param guildId - The id of the guild to search in
|
|
1175
|
+
* @param query - The query to search for
|
|
1176
|
+
* @param options - The options for searching for messages
|
|
1177
|
+
*/
|
|
1178
|
+
searchForMessages(guildId: Snowflake, query: RESTGetAPIGuildMessagesSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMessagesSearchResult>;
|
|
1158
1179
|
/**
|
|
1159
1180
|
* Edits a guild member
|
|
1160
1181
|
*
|
|
@@ -1245,6 +1266,51 @@ declare class GuildsAPI {
|
|
|
1245
1266
|
* @param options - The options for editing the guild onboarding
|
|
1246
1267
|
*/
|
|
1247
1268
|
editOnboarding(guildId: Snowflake, body: RESTPutAPIGuildOnboardingJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildOnboarding>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Fetches all the soundboard sounds for a guild
|
|
1271
|
+
*
|
|
1272
|
+
* @see {@link https://discord.com/developers/docs/resources/soundboard#list-guild-soundboard-sounds}
|
|
1273
|
+
* @param guildId - The id of the guild to fetch the soundboard sounds for
|
|
1274
|
+
* @param options - The options for fetching the soundboard sounds
|
|
1275
|
+
*/
|
|
1276
|
+
getSoundboardSounds(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildSoundboardSoundsResult>;
|
|
1277
|
+
/**
|
|
1278
|
+
* Fetches a soundboard sound for a guild
|
|
1279
|
+
*
|
|
1280
|
+
* @see {@link https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound}
|
|
1281
|
+
* @param guildId - The id of the guild to fetch the soundboard sound for
|
|
1282
|
+
* @param soundId - The id of the soundboard sound to fetch
|
|
1283
|
+
* @param options - The options for fetching the soundboard sound
|
|
1284
|
+
*/
|
|
1285
|
+
getSoundboardSound(guildId: Snowflake, soundId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Creates a new soundboard sound for a guild
|
|
1288
|
+
*
|
|
1289
|
+
* @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound}
|
|
1290
|
+
* @param guildId - The id of the guild to create the soundboard sound for
|
|
1291
|
+
* @param body - The data for creating the soundboard sound
|
|
1292
|
+
* @param options - The options for creating the soundboard sound
|
|
1293
|
+
*/
|
|
1294
|
+
createSoundboardSound(guildId: Snowflake, body: RESTPostAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Edits a soundboard sound for a guild
|
|
1297
|
+
*
|
|
1298
|
+
* @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound}
|
|
1299
|
+
* @param guildId - The id of the guild to edit the soundboard sound for
|
|
1300
|
+
* @param soundId - The id of the soundboard sound to edit
|
|
1301
|
+
* @param body - The data for editing the soundboard sound
|
|
1302
|
+
* @param options - The options for editing the soundboard sound
|
|
1303
|
+
*/
|
|
1304
|
+
editSoundboardSound(guildId: Snowflake, soundId: Snowflake, body: RESTPatchAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
|
|
1305
|
+
/**
|
|
1306
|
+
* Deletes a soundboard sound for a guild
|
|
1307
|
+
*
|
|
1308
|
+
* @see {@link https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound}
|
|
1309
|
+
* @param guildId - The id of the guild to delete the soundboard sound for
|
|
1310
|
+
* @param soundId - The id of the soundboard sound to delete
|
|
1311
|
+
* @param options - The options for deleting the soundboard sound
|
|
1312
|
+
*/
|
|
1313
|
+
deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
1248
1314
|
/**
|
|
1249
1315
|
* Modifies incident actions for a guild.
|
|
1250
1316
|
*
|
|
@@ -1256,6 +1322,13 @@ declare class GuildsAPI {
|
|
|
1256
1322
|
editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
|
|
1257
1323
|
}
|
|
1258
1324
|
|
|
1325
|
+
type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
|
|
1326
|
+
files?: RawFile[];
|
|
1327
|
+
};
|
|
1328
|
+
type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
|
|
1329
|
+
files?: RawFile[];
|
|
1330
|
+
thread_id?: string;
|
|
1331
|
+
};
|
|
1259
1332
|
declare class WebhooksAPI {
|
|
1260
1333
|
private readonly rest;
|
|
1261
1334
|
constructor(rest: REST);
|
|
@@ -1302,8 +1375,7 @@ declare class WebhooksAPI {
|
|
|
1302
1375
|
* @param body - The data for executing the webhook
|
|
1303
1376
|
* @param options - The options for executing the webhook
|
|
1304
1377
|
*/
|
|
1305
|
-
execute(id: Snowflake, token: string, body:
|
|
1306
|
-
files?: RawFile[];
|
|
1378
|
+
execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
|
|
1307
1379
|
wait: true;
|
|
1308
1380
|
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
|
|
1309
1381
|
/**
|
|
@@ -1315,8 +1387,7 @@ declare class WebhooksAPI {
|
|
|
1315
1387
|
* @param body - The data for executing the webhook
|
|
1316
1388
|
* @param options - The options for executing the webhook
|
|
1317
1389
|
*/
|
|
1318
|
-
execute(id: Snowflake, token: string, body:
|
|
1319
|
-
files?: RawFile[];
|
|
1390
|
+
execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
|
|
1320
1391
|
wait?: false;
|
|
1321
1392
|
}, options?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1322
1393
|
/**
|
|
@@ -1362,9 +1433,7 @@ declare class WebhooksAPI {
|
|
|
1362
1433
|
* @param body - The data for editing the message
|
|
1363
1434
|
* @param options - The options for editing the message
|
|
1364
1435
|
*/
|
|
1365
|
-
editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }:
|
|
1366
|
-
files?: RawFile[];
|
|
1367
|
-
}, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1436
|
+
editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1368
1437
|
/**
|
|
1369
1438
|
* Deletes an associated message from a webhook
|
|
1370
1439
|
*
|
|
@@ -1380,10 +1449,37 @@ declare class WebhooksAPI {
|
|
|
1380
1449
|
}, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1381
1450
|
}
|
|
1382
1451
|
|
|
1452
|
+
interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
|
|
1453
|
+
files?: RawFile[];
|
|
1454
|
+
}
|
|
1455
|
+
type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
|
|
1456
|
+
type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
|
|
1457
|
+
files?: RawFile[];
|
|
1458
|
+
};
|
|
1459
|
+
type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
|
|
1460
|
+
files?: RawFile[];
|
|
1461
|
+
};
|
|
1462
|
+
type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
|
|
1463
|
+
files?: RawFile[];
|
|
1464
|
+
};
|
|
1465
|
+
type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
|
|
1466
|
+
type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
|
|
1383
1467
|
declare class InteractionsAPI {
|
|
1384
1468
|
private readonly rest;
|
|
1385
1469
|
private readonly webhooks;
|
|
1386
1470
|
constructor(rest: REST, webhooks: WebhooksAPI);
|
|
1471
|
+
/**
|
|
1472
|
+
* Replies to an interaction and returns an interaction callback object
|
|
1473
|
+
*
|
|
1474
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1475
|
+
* @param interactionId - The id of the interaction
|
|
1476
|
+
* @param interactionToken - The token of the interaction
|
|
1477
|
+
* @param body - The callback data for replying
|
|
1478
|
+
* @param options - The options for replying
|
|
1479
|
+
*/
|
|
1480
|
+
reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
|
|
1481
|
+
with_response: true;
|
|
1482
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
|
|
1387
1483
|
/**
|
|
1388
1484
|
* Replies to an interaction
|
|
1389
1485
|
*
|
|
@@ -1393,28 +1489,87 @@ declare class InteractionsAPI {
|
|
|
1393
1489
|
* @param body - The callback data for replying
|
|
1394
1490
|
* @param options - The options for replying
|
|
1395
1491
|
*/
|
|
1396
|
-
reply(interactionId: Snowflake, interactionToken: string,
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1492
|
+
reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
|
|
1493
|
+
with_response?: false;
|
|
1494
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Replies to an interaction
|
|
1497
|
+
*
|
|
1498
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1499
|
+
* @param interactionId - The id of the interaction
|
|
1500
|
+
* @param interactionToken - The token of the interaction
|
|
1501
|
+
* @param body - The callback data for replying
|
|
1502
|
+
* @param options - The options for replying
|
|
1503
|
+
*/
|
|
1504
|
+
reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
|
|
1505
|
+
/**
|
|
1506
|
+
* Defers the reply to an interaction and returns an interaction callback object
|
|
1507
|
+
*
|
|
1508
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1509
|
+
* @param interactionId - The id of the interaction
|
|
1510
|
+
* @param interactionToken - The token of the interaction
|
|
1511
|
+
* @param body - The callback data for deferring the reply
|
|
1512
|
+
* @param options - The options for deferring
|
|
1513
|
+
*/
|
|
1514
|
+
defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
|
|
1515
|
+
with_response: true;
|
|
1516
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Defers the reply to an interaction
|
|
1519
|
+
*
|
|
1520
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1521
|
+
* @param interactionId - The id of the interaction
|
|
1522
|
+
* @param interactionToken - The token of the interaction
|
|
1523
|
+
* @param body - The callback data for deferring the reply
|
|
1524
|
+
* @param options - The options for deferring
|
|
1525
|
+
*/
|
|
1526
|
+
defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
|
|
1527
|
+
with_response?: false;
|
|
1528
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1399
1529
|
/**
|
|
1400
1530
|
* Defers the reply to an interaction
|
|
1401
1531
|
*
|
|
1402
1532
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1403
1533
|
* @param interactionId - The id of the interaction
|
|
1404
1534
|
* @param interactionToken - The token of the interaction
|
|
1405
|
-
* @param
|
|
1535
|
+
* @param body - The callback data for deferring the reply
|
|
1536
|
+
* @param options - The options for deferring
|
|
1537
|
+
*/
|
|
1538
|
+
defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
|
|
1539
|
+
/**
|
|
1540
|
+
* Defers an update from a message component interaction and returns an interaction callback object
|
|
1541
|
+
*
|
|
1542
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1543
|
+
* @param interactionId - The id of the interaction
|
|
1544
|
+
* @param interactionToken - The token of the interaction
|
|
1545
|
+
* @param body - The callback data for deferring the update
|
|
1406
1546
|
* @param options - The options for deferring
|
|
1407
1547
|
*/
|
|
1408
|
-
|
|
1548
|
+
deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
|
|
1549
|
+
with_response: true;
|
|
1550
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
|
|
1409
1551
|
/**
|
|
1410
1552
|
* Defers an update from a message component interaction
|
|
1411
1553
|
*
|
|
1412
1554
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1413
1555
|
* @param interactionId - The id of the interaction
|
|
1414
1556
|
* @param interactionToken - The token of the interaction
|
|
1557
|
+
* @param body - The callback data for deferring the update
|
|
1415
1558
|
* @param options - The options for deferring
|
|
1416
1559
|
*/
|
|
1417
|
-
deferMessageUpdate(interactionId: Snowflake, interactionToken: string,
|
|
1560
|
+
deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
|
|
1561
|
+
with_response?: false;
|
|
1562
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1563
|
+
/**
|
|
1564
|
+
* Defers an update from a message component interaction
|
|
1565
|
+
*
|
|
1566
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1567
|
+
* @param interactionId - The id of the interaction
|
|
1568
|
+
* @param interactionToken - The token of the interaction
|
|
1569
|
+
* @param body - The callback data for deferring the update
|
|
1570
|
+
* @param options - The options for deferring
|
|
1571
|
+
*/
|
|
1572
|
+
deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
|
|
1418
1573
|
/**
|
|
1419
1574
|
* Reply to a deferred interaction
|
|
1420
1575
|
*
|
|
@@ -1424,9 +1579,7 @@ declare class InteractionsAPI {
|
|
|
1424
1579
|
* @param body - The callback data for replying
|
|
1425
1580
|
* @param options - The options for replying
|
|
1426
1581
|
*/
|
|
1427
|
-
followUp(applicationId: Snowflake, interactionToken: string, body:
|
|
1428
|
-
files?: RawFile[];
|
|
1429
|
-
}, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1582
|
+
followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1430
1583
|
/**
|
|
1431
1584
|
* Edits the initial reply to an interaction
|
|
1432
1585
|
*
|
|
@@ -1438,9 +1591,7 @@ declare class InteractionsAPI {
|
|
|
1438
1591
|
* @param messageId - The id of the message to edit. If omitted, the original reply will be edited
|
|
1439
1592
|
* @param options - The options for editing the reply
|
|
1440
1593
|
*/
|
|
1441
|
-
editReply(applicationId: Snowflake, interactionToken: string, callbackData:
|
|
1442
|
-
files?: RawFile[];
|
|
1443
|
-
}, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1594
|
+
editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1444
1595
|
/**
|
|
1445
1596
|
* Fetches the initial reply to an interaction
|
|
1446
1597
|
*
|
|
@@ -1461,6 +1612,18 @@ declare class InteractionsAPI {
|
|
|
1461
1612
|
* @param options - The options for deleting the reply
|
|
1462
1613
|
*/
|
|
1463
1614
|
deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1615
|
+
/**
|
|
1616
|
+
* Updates the message the component interaction was triggered on and returns an interaction callback object
|
|
1617
|
+
*
|
|
1618
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1619
|
+
* @param interactionId - The id of the interaction
|
|
1620
|
+
* @param interactionToken - The token of the interaction
|
|
1621
|
+
* @param callbackData - The callback data for updating the interaction
|
|
1622
|
+
* @param options - The options for updating the interaction
|
|
1623
|
+
*/
|
|
1624
|
+
updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
|
|
1625
|
+
with_response: true;
|
|
1626
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
|
|
1464
1627
|
/**
|
|
1465
1628
|
* Updates the message the component interaction was triggered on
|
|
1466
1629
|
*
|
|
@@ -1470,9 +1633,43 @@ declare class InteractionsAPI {
|
|
|
1470
1633
|
* @param callbackData - The callback data for updating the interaction
|
|
1471
1634
|
* @param options - The options for updating the interaction
|
|
1472
1635
|
*/
|
|
1473
|
-
updateMessage(interactionId: Snowflake, interactionToken: string,
|
|
1474
|
-
|
|
1475
|
-
},
|
|
1636
|
+
updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
|
|
1637
|
+
with_response?: false;
|
|
1638
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1639
|
+
/**
|
|
1640
|
+
* Updates the message the component interaction was triggered on
|
|
1641
|
+
*
|
|
1642
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1643
|
+
* @param interactionId - The id of the interaction
|
|
1644
|
+
* @param interactionToken - The token of the interaction
|
|
1645
|
+
* @param callbackData - The callback data for updating the interaction
|
|
1646
|
+
* @param options - The options for updating the interaction
|
|
1647
|
+
*/
|
|
1648
|
+
updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
|
|
1649
|
+
/**
|
|
1650
|
+
* Sends an autocomplete response to an interaction and returns an interaction callback object
|
|
1651
|
+
*
|
|
1652
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1653
|
+
* @param interactionId - The id of the interaction
|
|
1654
|
+
* @param interactionToken - The token of the interaction
|
|
1655
|
+
* @param callbackData - The callback data for the autocomplete response
|
|
1656
|
+
* @param options - The options for sending the autocomplete response
|
|
1657
|
+
*/
|
|
1658
|
+
createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
|
|
1659
|
+
with_response: true;
|
|
1660
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
|
|
1661
|
+
/**
|
|
1662
|
+
* Sends an autocomplete response to an interaction
|
|
1663
|
+
*
|
|
1664
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1665
|
+
* @param interactionId - The id of the interaction
|
|
1666
|
+
* @param interactionToken - The token of the interaction
|
|
1667
|
+
* @param callbackData - The callback data for the autocomplete response
|
|
1668
|
+
* @param options - The options for sending the autocomplete response
|
|
1669
|
+
*/
|
|
1670
|
+
createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
|
|
1671
|
+
with_response?: false;
|
|
1672
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1476
1673
|
/**
|
|
1477
1674
|
* Sends an autocomplete response to an interaction
|
|
1478
1675
|
*
|
|
@@ -1482,7 +1679,19 @@ declare class InteractionsAPI {
|
|
|
1482
1679
|
* @param callbackData - The callback data for the autocomplete response
|
|
1483
1680
|
* @param options - The options for sending the autocomplete response
|
|
1484
1681
|
*/
|
|
1485
|
-
createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData:
|
|
1682
|
+
createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
|
|
1683
|
+
/**
|
|
1684
|
+
* Sends a modal response to an interaction and returns an interaction callback object
|
|
1685
|
+
*
|
|
1686
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1687
|
+
* @param interactionId - The id of the interaction
|
|
1688
|
+
* @param interactionToken - The token of the interaction
|
|
1689
|
+
* @param callbackData - The modal callback data to send
|
|
1690
|
+
* @param options - The options for sending the modal
|
|
1691
|
+
*/
|
|
1692
|
+
createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
|
|
1693
|
+
with_response: true;
|
|
1694
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
|
|
1486
1695
|
/**
|
|
1487
1696
|
* Sends a modal response to an interaction
|
|
1488
1697
|
*
|
|
@@ -1492,9 +1701,21 @@ declare class InteractionsAPI {
|
|
|
1492
1701
|
* @param callbackData - The modal callback data to send
|
|
1493
1702
|
* @param options - The options for sending the modal
|
|
1494
1703
|
*/
|
|
1495
|
-
createModal(interactionId: Snowflake, interactionToken: string, callbackData:
|
|
1704
|
+
createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
|
|
1705
|
+
with_response?: false;
|
|
1706
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1496
1707
|
/**
|
|
1497
|
-
* Sends a
|
|
1708
|
+
* Sends a modal response to an interaction
|
|
1709
|
+
*
|
|
1710
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1711
|
+
* @param interactionId - The id of the interaction
|
|
1712
|
+
* @param interactionToken - The token of the interaction
|
|
1713
|
+
* @param callbackData - The modal callback data to send
|
|
1714
|
+
* @param options - The options for sending the modal
|
|
1715
|
+
*/
|
|
1716
|
+
createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Launches an activity and returns an interaction callback object
|
|
1498
1719
|
*
|
|
1499
1720
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1500
1721
|
* @param interactionId - The id of the interaction
|
|
@@ -1503,6 +1724,40 @@ declare class InteractionsAPI {
|
|
|
1503
1724
|
* @deprecated Sending a premium-style button is the new Discord behavior.
|
|
1504
1725
|
*/
|
|
1505
1726
|
sendPremiumRequired(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1727
|
+
/**
|
|
1728
|
+
* Launches an activity and returns an interaction callback object
|
|
1729
|
+
*
|
|
1730
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1731
|
+
* @param interactionId - The id of the interaction
|
|
1732
|
+
* @param interactionToken - The token of the interaction
|
|
1733
|
+
* @param body - The callback data for launching the activity
|
|
1734
|
+
* @param options - The options for launching the activity
|
|
1735
|
+
*/
|
|
1736
|
+
launchActivity(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
|
|
1737
|
+
with_response: true;
|
|
1738
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
|
|
1739
|
+
/**
|
|
1740
|
+
* Launches an activity
|
|
1741
|
+
*
|
|
1742
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1743
|
+
* @param interactionId - The id of the interaction
|
|
1744
|
+
* @param interactionToken - The token of the interaction
|
|
1745
|
+
* @param body - The callback data for launching the activity
|
|
1746
|
+
* @param options - The options for launching the activity
|
|
1747
|
+
*/
|
|
1748
|
+
launchActivity(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
|
|
1749
|
+
with_response?: false;
|
|
1750
|
+
}, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1751
|
+
/**
|
|
1752
|
+
* Launches an activity
|
|
1753
|
+
*
|
|
1754
|
+
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1755
|
+
* @param interactionId - The id of the interaction
|
|
1756
|
+
* @param interactionToken - The token of the interaction
|
|
1757
|
+
* @param body - The callback data for launching the activity
|
|
1758
|
+
* @param options - The options for launching the activity
|
|
1759
|
+
*/
|
|
1760
|
+
launchActivity(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
|
|
1506
1761
|
}
|
|
1507
1762
|
|
|
1508
1763
|
declare class InvitesAPI {
|
|
@@ -1524,7 +1779,7 @@ declare class InvitesAPI {
|
|
|
1524
1779
|
* @param code - The invite code
|
|
1525
1780
|
* @param options - The options for deleting the invite
|
|
1526
1781
|
*/
|
|
1527
|
-
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
1782
|
+
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1528
1783
|
}
|
|
1529
1784
|
|
|
1530
1785
|
declare class MonetizationAPI {
|
|
@@ -1533,23 +1788,51 @@ declare class MonetizationAPI {
|
|
|
1533
1788
|
/**
|
|
1534
1789
|
* Fetches the SKUs for an application.
|
|
1535
1790
|
*
|
|
1536
|
-
* @see {@link https://discord.com/developers/docs/
|
|
1791
|
+
* @see {@link https://discord.com/developers/docs/resources/sku#list-skus}
|
|
1792
|
+
* @param applicationId - The application id to fetch SKUs for
|
|
1537
1793
|
* @param options - The options for fetching the SKUs.
|
|
1538
1794
|
*/
|
|
1539
1795
|
getSKUs(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUsResult>;
|
|
1796
|
+
/**
|
|
1797
|
+
* Fetches subscriptions for an SKU.
|
|
1798
|
+
*
|
|
1799
|
+
* @see {@link https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions}
|
|
1800
|
+
* @param skuId - The SKU id to fetch subscriptions for
|
|
1801
|
+
* @param query - The query options for fetching subscriptions
|
|
1802
|
+
* @param options - The options for fetching subscriptions
|
|
1803
|
+
*/
|
|
1804
|
+
getSKUSubscriptions(skuId: Snowflake, query?: RESTGetAPISKUSubscriptionsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUSubscriptionsResult>;
|
|
1805
|
+
/**
|
|
1806
|
+
* Fetches a subscription for an SKU.
|
|
1807
|
+
*
|
|
1808
|
+
* @see {@link https://discord.com/developers/docs/resources/subscription#get-sku-subscription}
|
|
1809
|
+
* @param skuId - The SKU id to fetch subscription for
|
|
1810
|
+
* @param subscriptionId - The subscription id to fetch
|
|
1811
|
+
* @param options - The options for fetching the subscription
|
|
1812
|
+
*/
|
|
1813
|
+
getSKUSubscription(skuId: Snowflake, subscriptionId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISubscription>;
|
|
1540
1814
|
/**
|
|
1541
1815
|
* Fetches the entitlements for an application.
|
|
1542
1816
|
*
|
|
1543
|
-
* @see {@link https://discord.com/developers/docs/
|
|
1817
|
+
* @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
|
|
1544
1818
|
* @param applicationId - The application id to fetch entitlements for
|
|
1545
1819
|
* @param query - The query options for fetching entitlements
|
|
1546
1820
|
* @param options - The options for fetching entitlements
|
|
1547
1821
|
*/
|
|
1548
|
-
getEntitlements(applicationId: Snowflake, query
|
|
1822
|
+
getEntitlements(applicationId: Snowflake, query?: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
|
|
1823
|
+
/**
|
|
1824
|
+
* Fetches an entitlement for an application.
|
|
1825
|
+
*
|
|
1826
|
+
* @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
|
|
1827
|
+
* @param applicationId - The application id to fetch the entitlement for
|
|
1828
|
+
* @param entitlementId - The entitlement id to fetch
|
|
1829
|
+
* @param options - The options for fetching the entitlement
|
|
1830
|
+
*/
|
|
1831
|
+
getEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEntitlement>;
|
|
1549
1832
|
/**
|
|
1550
1833
|
* Creates a test entitlement for an application's SKU.
|
|
1551
1834
|
*
|
|
1552
|
-
* @see {@link https://discord.com/developers/docs/
|
|
1835
|
+
* @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement}
|
|
1553
1836
|
* @param applicationId - The application id to create the entitlement for
|
|
1554
1837
|
* @param body - The data for creating the entitlement
|
|
1555
1838
|
* @param options - The options for creating the entitlement
|
|
@@ -1558,7 +1841,7 @@ declare class MonetizationAPI {
|
|
|
1558
1841
|
/**
|
|
1559
1842
|
* Deletes a test entitlement for an application's SKU.
|
|
1560
1843
|
*
|
|
1561
|
-
* @see {@link https://discord.com/developers/docs/
|
|
1844
|
+
* @see {@link https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement}
|
|
1562
1845
|
* @param applicationId - The application id to delete the entitlement for
|
|
1563
1846
|
* @param entitlementId - The entitlement id to delete
|
|
1564
1847
|
* @param options - The options for deleting the entitlement
|
|
@@ -1567,7 +1850,7 @@ declare class MonetizationAPI {
|
|
|
1567
1850
|
/**
|
|
1568
1851
|
* Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
|
|
1569
1852
|
*
|
|
1570
|
-
* @see {@link https://discord.com/developers/docs/
|
|
1853
|
+
* @see {@link https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement}
|
|
1571
1854
|
* @param applicationId - The application id to consume the entitlement for
|
|
1572
1855
|
* @param entitlementId - The entitlement id to consume
|
|
1573
1856
|
* @param options - The options for consuming the entitlement
|
|
@@ -1617,7 +1900,7 @@ declare class OAuth2API {
|
|
|
1617
1900
|
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
|
|
1618
1901
|
* @param options - The options for the current bot application information request
|
|
1619
1902
|
*/
|
|
1620
|
-
getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1903
|
+
getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplication>;
|
|
1621
1904
|
/**
|
|
1622
1905
|
* Fetches the current authorization information
|
|
1623
1906
|
*
|
|
@@ -1650,7 +1933,7 @@ declare class PollAPI {
|
|
|
1650
1933
|
* @param query - The query for getting the list of voters
|
|
1651
1934
|
* @param options - The options for getting the list of voters
|
|
1652
1935
|
*/
|
|
1653
|
-
getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query
|
|
1936
|
+
getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query?: RESTGetAPIPollAnswerVotersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIPollAnswerVotersResult>;
|
|
1654
1937
|
/**
|
|
1655
1938
|
* Immediately expires (i.e. ends) a poll
|
|
1656
1939
|
*
|
|
@@ -1684,6 +1967,18 @@ declare class RoleConnectionsAPI {
|
|
|
1684
1967
|
updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
|
|
1685
1968
|
}
|
|
1686
1969
|
|
|
1970
|
+
declare class SoundboardSoundsAPI {
|
|
1971
|
+
private readonly rest;
|
|
1972
|
+
constructor(rest: REST);
|
|
1973
|
+
/**
|
|
1974
|
+
* Fetches all the soundboard default sounds.
|
|
1975
|
+
*
|
|
1976
|
+
* @see {@link https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds}
|
|
1977
|
+
* @param options - The options for fetching the soundboard default sounds.
|
|
1978
|
+
*/
|
|
1979
|
+
getSoundboardDefaultSounds({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISoundboardDefaultSoundsResult>;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1687
1982
|
declare class StageInstancesAPI {
|
|
1688
1983
|
private readonly rest;
|
|
1689
1984
|
constructor(rest: REST);
|
|
@@ -1965,6 +2260,7 @@ declare class API {
|
|
|
1965
2260
|
readonly oauth2: OAuth2API;
|
|
1966
2261
|
readonly poll: PollAPI;
|
|
1967
2262
|
readonly roleConnections: RoleConnectionsAPI;
|
|
2263
|
+
readonly soundboardSounds: SoundboardSoundsAPI;
|
|
1968
2264
|
readonly stageInstances: StageInstancesAPI;
|
|
1969
2265
|
readonly stickers: StickersAPI;
|
|
1970
2266
|
readonly threads: ThreadsAPI;
|
|
@@ -1990,18 +2286,18 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
1990
2286
|
description: string | undefined;
|
|
1991
2287
|
}[];
|
|
1992
2288
|
flags?: discord_api_types_v10.MessageFlags | undefined;
|
|
1993
|
-
content?: string | undefined;
|
|
1994
|
-
tts?: boolean | undefined;
|
|
1995
|
-
embeds?: discord_api_types_v10.APIEmbed[] | undefined;
|
|
2289
|
+
content?: string | undefined | undefined;
|
|
2290
|
+
tts?: boolean | undefined | undefined;
|
|
2291
|
+
embeds?: discord_api_types_v10.APIEmbed[] | undefined | undefined;
|
|
1996
2292
|
allowed_mentions?: discord_api_types_v10.APIAllowedMentions | undefined;
|
|
1997
|
-
components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined;
|
|
2293
|
+
components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined | undefined;
|
|
1998
2294
|
poll?: discord_api_types_v10.RESTAPIPoll | undefined;
|
|
1999
|
-
applied_tags?: discord_api_types_globals.Snowflake[] | undefined;
|
|
2000
|
-
thread_name?: string | undefined;
|
|
2295
|
+
applied_tags?: discord_api_types_globals.Snowflake[] | undefined | undefined;
|
|
2296
|
+
thread_name?: string | undefined | undefined;
|
|
2001
2297
|
};
|
|
2002
2298
|
files: {
|
|
2003
2299
|
name: string;
|
|
2004
|
-
data: string | number | boolean | Uint8Array | Buffer
|
|
2300
|
+
data: string | number | boolean | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
|
|
2005
2301
|
}[];
|
|
2006
2302
|
};
|
|
2007
2303
|
|
|
@@ -2011,4 +2307,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
2011
2307
|
*/
|
|
2012
2308
|
declare const version: string;
|
|
2013
2309
|
|
|
2014
|
-
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GatewayAPI, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
|
2310
|
+
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type CreateAutocompleteResponseOptions, type CreateInteractionDeferResponseOptions, type CreateInteractionFollowUpResponseOptions, type CreateInteractionResponseOptions, type CreateInteractionUpdateMessageResponseOptions, type CreateMessageOptions, type CreateModalResponseOptions, type CreateStickerOptions, type CreateWebhookMessageOptions, type DescriptiveRawFile, type EditInteractionResponseOptions, type EditMessageOptions, type EditWebhookMessageOptions, GatewayAPI, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|