@discordjs/core 3.0.0-dev.1733357587-d0dc86488 → 3.0.0-dev.1733443981-00dceb32b

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.
@@ -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, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, 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, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } 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, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPostAPIGuildStickerFormDataBody, 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, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTPostAPIInteractionCallbackWithResponseResult, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, 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 }: RESTPostAPIChannelMessageJSONBody & {
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 }: RESTPatchAPIChannelMessageJSONBody & {
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
  *
@@ -569,18 +571,12 @@ declare class ChannelsAPI {
569
571
  sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
570
572
  }
571
573
 
574
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
575
+ file: RawFile;
576
+ }
572
577
  declare class GuildsAPI {
573
578
  private readonly rest;
574
579
  constructor(rest: REST);
575
- /**
576
- * Fetches a guild
577
- *
578
- * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
579
- * @param guildId - The id of the guild
580
- * @param options - The options for fetching the guild
581
- * @deprecated Use the overload with a query instead.
582
- */
583
- get(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
584
580
  /**
585
581
  * Fetches a guild
586
582
  *
@@ -589,7 +585,7 @@ declare class GuildsAPI {
589
585
  * @param query - The query options for fetching the guild
590
586
  * @param options - The options for fetching the guild
591
587
  */
592
- get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
588
+ get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
593
589
  /**
594
590
  * Fetches a guild preview
595
591
  *
@@ -1069,9 +1065,7 @@ declare class GuildsAPI {
1069
1065
  * @param body - The data for creating the sticker
1070
1066
  * @param options - The options for creating the sticker
1071
1067
  */
1072
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1073
- file: RawFile;
1074
- }, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1068
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1075
1069
  /**
1076
1070
  * Edits a sticker for a guild
1077
1071
  *
@@ -1300,6 +1294,13 @@ declare class GuildsAPI {
1300
1294
  deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1301
1295
  }
1302
1296
 
1297
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1298
+ files?: RawFile[];
1299
+ };
1300
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1301
+ files?: RawFile[];
1302
+ thread_id?: string;
1303
+ };
1303
1304
  declare class WebhooksAPI {
1304
1305
  private readonly rest;
1305
1306
  constructor(rest: REST);
@@ -1346,8 +1347,7 @@ declare class WebhooksAPI {
1346
1347
  * @param body - The data for executing the webhook
1347
1348
  * @param options - The options for executing the webhook
1348
1349
  */
1349
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1350
- files?: RawFile[];
1350
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1351
1351
  wait: true;
1352
1352
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1353
1353
  /**
@@ -1359,8 +1359,7 @@ declare class WebhooksAPI {
1359
1359
  * @param body - The data for executing the webhook
1360
1360
  * @param options - The options for executing the webhook
1361
1361
  */
1362
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1363
- files?: RawFile[];
1362
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1364
1363
  wait?: false;
1365
1364
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1366
1365
  /**
@@ -1406,10 +1405,7 @@ declare class WebhooksAPI {
1406
1405
  * @param body - The data for editing the message
1407
1406
  * @param options - The options for editing the message
1408
1407
  */
1409
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1410
- files?: RawFile[];
1411
- thread_id?: string;
1412
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1408
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1413
1409
  /**
1414
1410
  * Deletes an associated message from a webhook
1415
1411
  *
@@ -1425,6 +1421,21 @@ declare class WebhooksAPI {
1425
1421
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1426
1422
  }
1427
1423
 
1424
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1425
+ files?: RawFile[];
1426
+ }
1427
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1428
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1429
+ files?: RawFile[];
1430
+ };
1431
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1432
+ files?: RawFile[];
1433
+ };
1434
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1435
+ files?: RawFile[];
1436
+ };
1437
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1438
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1428
1439
  declare class InteractionsAPI {
1429
1440
  private readonly rest;
1430
1441
  private readonly webhooks;
@@ -1438,8 +1449,7 @@ declare class InteractionsAPI {
1438
1449
  * @param body - The callback data for replying
1439
1450
  * @param options - The options for replying
1440
1451
  */
1441
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
- files?: RawFile[];
1452
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1443
1453
  with_response: true;
1444
1454
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1445
1455
  /**
@@ -1451,8 +1461,7 @@ declare class InteractionsAPI {
1451
1461
  * @param body - The callback data for replying
1452
1462
  * @param options - The options for replying
1453
1463
  */
1454
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1455
- files?: RawFile[];
1464
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1456
1465
  with_response?: false;
1457
1466
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1458
1467
  /**
@@ -1464,7 +1473,7 @@ declare class InteractionsAPI {
1464
1473
  * @param body - The callback data for deferring the reply
1465
1474
  * @param options - The options for deferring
1466
1475
  */
1467
- defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1476
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1468
1477
  with_response: true;
1469
1478
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1470
1479
  /**
@@ -1476,7 +1485,7 @@ declare class InteractionsAPI {
1476
1485
  * @param body - The callback data for deferring the reply
1477
1486
  * @param options - The options for deferring
1478
1487
  */
1479
- defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1488
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1480
1489
  with_response?: false;
1481
1490
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1482
1491
  /**
@@ -1512,9 +1521,7 @@ declare class InteractionsAPI {
1512
1521
  * @param body - The callback data for replying
1513
1522
  * @param options - The options for replying
1514
1523
  */
1515
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1516
- files?: RawFile[];
1517
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1524
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1518
1525
  /**
1519
1526
  * Edits the initial reply to an interaction
1520
1527
  *
@@ -1526,9 +1533,7 @@ declare class InteractionsAPI {
1526
1533
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1527
1534
  * @param options - The options for editing the reply
1528
1535
  */
1529
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1530
- files?: RawFile[];
1531
- }, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1536
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1532
1537
  /**
1533
1538
  * Fetches the initial reply to an interaction
1534
1539
  *
@@ -1558,8 +1563,7 @@ declare class InteractionsAPI {
1558
1563
  * @param callbackData - The callback data for updating the interaction
1559
1564
  * @param options - The options for updating the interaction
1560
1565
  */
1561
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1562
- files?: RawFile[];
1566
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1563
1567
  with_response: true;
1564
1568
  }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1565
1569
  /**
@@ -1571,8 +1575,7 @@ declare class InteractionsAPI {
1571
1575
  * @param callbackData - The callback data for updating the interaction
1572
1576
  * @param options - The options for updating the interaction
1573
1577
  */
1574
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1575
- files?: RawFile[];
1578
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1576
1579
  with_response?: false;
1577
1580
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1578
1581
  /**
@@ -1584,7 +1587,7 @@ declare class InteractionsAPI {
1584
1587
  * @param callbackData - The callback data for the autocomplete response
1585
1588
  * @param options - The options for sending the autocomplete response
1586
1589
  */
1587
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1590
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1588
1591
  with_response: true;
1589
1592
  }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1590
1593
  /**
@@ -1596,7 +1599,7 @@ declare class InteractionsAPI {
1596
1599
  * @param callbackData - The callback data for the autocomplete response
1597
1600
  * @param options - The options for sending the autocomplete response
1598
1601
  */
1599
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1602
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1600
1603
  with_response?: false;
1601
1604
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1602
1605
  /**
@@ -1608,7 +1611,7 @@ declare class InteractionsAPI {
1608
1611
  * @param callbackData - The modal callback data to send
1609
1612
  * @param options - The options for sending the modal
1610
1613
  */
1611
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1614
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1612
1615
  with_response: true;
1613
1616
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1614
1617
  /**
@@ -1620,7 +1623,7 @@ declare class InteractionsAPI {
1620
1623
  * @param callbackData - The modal callback data to send
1621
1624
  * @param options - The options for sending the modal
1622
1625
  */
1623
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1626
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1624
1627
  with_response?: false;
1625
1628
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1626
1629
  /**
@@ -1695,6 +1698,15 @@ declare class MonetizationAPI {
1695
1698
  * @param options - The options for fetching entitlements
1696
1699
  */
1697
1700
  getEntitlements(applicationId: Snowflake, query?: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1701
+ /**
1702
+ * Fetches an entitlement for an application.
1703
+ *
1704
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
1705
+ * @param applicationId - The application id to fetch the entitlement for
1706
+ * @param entitlementId - The entitlement id to fetch
1707
+ * @param options - The options for fetching the entitlement
1708
+ */
1709
+ getEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEntitlement>;
1698
1710
  /**
1699
1711
  * Creates a test entitlement for an application's SKU.
1700
1712
  *
@@ -2172,4 +2184,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2172
2184
  */
2173
2185
  declare const version: string;
2174
2186
 
2175
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
2187
+ 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, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
@@ -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, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, 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, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } 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, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPostAPIGuildStickerFormDataBody, 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, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTPostAPIInteractionCallbackWithResponseResult, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, 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 }: RESTPostAPIChannelMessageJSONBody & {
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 }: RESTPatchAPIChannelMessageJSONBody & {
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
  *
@@ -569,18 +571,12 @@ declare class ChannelsAPI {
569
571
  sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
570
572
  }
571
573
 
574
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
575
+ file: RawFile;
576
+ }
572
577
  declare class GuildsAPI {
573
578
  private readonly rest;
574
579
  constructor(rest: REST);
575
- /**
576
- * Fetches a guild
577
- *
578
- * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
579
- * @param guildId - The id of the guild
580
- * @param options - The options for fetching the guild
581
- * @deprecated Use the overload with a query instead.
582
- */
583
- get(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
584
580
  /**
585
581
  * Fetches a guild
586
582
  *
@@ -589,7 +585,7 @@ declare class GuildsAPI {
589
585
  * @param query - The query options for fetching the guild
590
586
  * @param options - The options for fetching the guild
591
587
  */
592
- get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
588
+ get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
593
589
  /**
594
590
  * Fetches a guild preview
595
591
  *
@@ -1069,9 +1065,7 @@ declare class GuildsAPI {
1069
1065
  * @param body - The data for creating the sticker
1070
1066
  * @param options - The options for creating the sticker
1071
1067
  */
1072
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1073
- file: RawFile;
1074
- }, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1068
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1075
1069
  /**
1076
1070
  * Edits a sticker for a guild
1077
1071
  *
@@ -1300,6 +1294,13 @@ declare class GuildsAPI {
1300
1294
  deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1301
1295
  }
1302
1296
 
1297
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1298
+ files?: RawFile[];
1299
+ };
1300
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1301
+ files?: RawFile[];
1302
+ thread_id?: string;
1303
+ };
1303
1304
  declare class WebhooksAPI {
1304
1305
  private readonly rest;
1305
1306
  constructor(rest: REST);
@@ -1346,8 +1347,7 @@ declare class WebhooksAPI {
1346
1347
  * @param body - The data for executing the webhook
1347
1348
  * @param options - The options for executing the webhook
1348
1349
  */
1349
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1350
- files?: RawFile[];
1350
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1351
1351
  wait: true;
1352
1352
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1353
1353
  /**
@@ -1359,8 +1359,7 @@ declare class WebhooksAPI {
1359
1359
  * @param body - The data for executing the webhook
1360
1360
  * @param options - The options for executing the webhook
1361
1361
  */
1362
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1363
- files?: RawFile[];
1362
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1364
1363
  wait?: false;
1365
1364
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1366
1365
  /**
@@ -1406,10 +1405,7 @@ declare class WebhooksAPI {
1406
1405
  * @param body - The data for editing the message
1407
1406
  * @param options - The options for editing the message
1408
1407
  */
1409
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1410
- files?: RawFile[];
1411
- thread_id?: string;
1412
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1408
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1413
1409
  /**
1414
1410
  * Deletes an associated message from a webhook
1415
1411
  *
@@ -1425,6 +1421,21 @@ declare class WebhooksAPI {
1425
1421
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1426
1422
  }
1427
1423
 
1424
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1425
+ files?: RawFile[];
1426
+ }
1427
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1428
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1429
+ files?: RawFile[];
1430
+ };
1431
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1432
+ files?: RawFile[];
1433
+ };
1434
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1435
+ files?: RawFile[];
1436
+ };
1437
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1438
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1428
1439
  declare class InteractionsAPI {
1429
1440
  private readonly rest;
1430
1441
  private readonly webhooks;
@@ -1438,8 +1449,7 @@ declare class InteractionsAPI {
1438
1449
  * @param body - The callback data for replying
1439
1450
  * @param options - The options for replying
1440
1451
  */
1441
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
- files?: RawFile[];
1452
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1443
1453
  with_response: true;
1444
1454
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1445
1455
  /**
@@ -1451,8 +1461,7 @@ declare class InteractionsAPI {
1451
1461
  * @param body - The callback data for replying
1452
1462
  * @param options - The options for replying
1453
1463
  */
1454
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1455
- files?: RawFile[];
1464
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1456
1465
  with_response?: false;
1457
1466
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1458
1467
  /**
@@ -1464,7 +1473,7 @@ declare class InteractionsAPI {
1464
1473
  * @param body - The callback data for deferring the reply
1465
1474
  * @param options - The options for deferring
1466
1475
  */
1467
- defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1476
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1468
1477
  with_response: true;
1469
1478
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1470
1479
  /**
@@ -1476,7 +1485,7 @@ declare class InteractionsAPI {
1476
1485
  * @param body - The callback data for deferring the reply
1477
1486
  * @param options - The options for deferring
1478
1487
  */
1479
- defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1488
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1480
1489
  with_response?: false;
1481
1490
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1482
1491
  /**
@@ -1512,9 +1521,7 @@ declare class InteractionsAPI {
1512
1521
  * @param body - The callback data for replying
1513
1522
  * @param options - The options for replying
1514
1523
  */
1515
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1516
- files?: RawFile[];
1517
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1524
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1518
1525
  /**
1519
1526
  * Edits the initial reply to an interaction
1520
1527
  *
@@ -1526,9 +1533,7 @@ declare class InteractionsAPI {
1526
1533
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1527
1534
  * @param options - The options for editing the reply
1528
1535
  */
1529
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1530
- files?: RawFile[];
1531
- }, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1536
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1532
1537
  /**
1533
1538
  * Fetches the initial reply to an interaction
1534
1539
  *
@@ -1558,8 +1563,7 @@ declare class InteractionsAPI {
1558
1563
  * @param callbackData - The callback data for updating the interaction
1559
1564
  * @param options - The options for updating the interaction
1560
1565
  */
1561
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1562
- files?: RawFile[];
1566
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1563
1567
  with_response: true;
1564
1568
  }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1565
1569
  /**
@@ -1571,8 +1575,7 @@ declare class InteractionsAPI {
1571
1575
  * @param callbackData - The callback data for updating the interaction
1572
1576
  * @param options - The options for updating the interaction
1573
1577
  */
1574
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1575
- files?: RawFile[];
1578
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1576
1579
  with_response?: false;
1577
1580
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1578
1581
  /**
@@ -1584,7 +1587,7 @@ declare class InteractionsAPI {
1584
1587
  * @param callbackData - The callback data for the autocomplete response
1585
1588
  * @param options - The options for sending the autocomplete response
1586
1589
  */
1587
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1590
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1588
1591
  with_response: true;
1589
1592
  }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1590
1593
  /**
@@ -1596,7 +1599,7 @@ declare class InteractionsAPI {
1596
1599
  * @param callbackData - The callback data for the autocomplete response
1597
1600
  * @param options - The options for sending the autocomplete response
1598
1601
  */
1599
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1602
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1600
1603
  with_response?: false;
1601
1604
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1602
1605
  /**
@@ -1608,7 +1611,7 @@ declare class InteractionsAPI {
1608
1611
  * @param callbackData - The modal callback data to send
1609
1612
  * @param options - The options for sending the modal
1610
1613
  */
1611
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1614
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1612
1615
  with_response: true;
1613
1616
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1614
1617
  /**
@@ -1620,7 +1623,7 @@ declare class InteractionsAPI {
1620
1623
  * @param callbackData - The modal callback data to send
1621
1624
  * @param options - The options for sending the modal
1622
1625
  */
1623
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1626
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1624
1627
  with_response?: false;
1625
1628
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1626
1629
  /**
@@ -1695,6 +1698,15 @@ declare class MonetizationAPI {
1695
1698
  * @param options - The options for fetching entitlements
1696
1699
  */
1697
1700
  getEntitlements(applicationId: Snowflake, query?: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1701
+ /**
1702
+ * Fetches an entitlement for an application.
1703
+ *
1704
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
1705
+ * @param applicationId - The application id to fetch the entitlement for
1706
+ * @param entitlementId - The entitlement id to fetch
1707
+ * @param options - The options for fetching the entitlement
1708
+ */
1709
+ getEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEntitlement>;
1698
1710
  /**
1699
1711
  * Creates a test entitlement for an application's SKU.
1700
1712
  *
@@ -2172,4 +2184,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2172
2184
  */
2173
2185
  declare const version: string;
2174
2186
 
2175
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
2187
+ 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, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };