@discordjs/core 2.1.0-dev.1731672302-3669d5e11 → 2.1.0-dev.1731888785-40fbd827f

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, 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, 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';
4
4
  export * from 'discord-api-types/v10';
5
5
  import * as discord_api_types_globals from 'discord-api-types/globals';
6
6
 
@@ -1429,6 +1429,19 @@ declare class InteractionsAPI {
1429
1429
  private readonly rest;
1430
1430
  private readonly webhooks;
1431
1431
  constructor(rest: REST, webhooks: WebhooksAPI);
1432
+ /**
1433
+ * Replies to an interaction and returns an interaction callback object
1434
+ *
1435
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1436
+ * @param interactionId - The id of the interaction
1437
+ * @param interactionToken - The token of the interaction
1438
+ * @param body - The callback data for replying
1439
+ * @param options - The options for replying
1440
+ */
1441
+ reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
+ files?: RawFile[];
1443
+ with_response: true;
1444
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1432
1445
  /**
1433
1446
  * Replies to an interaction
1434
1447
  *
@@ -1438,28 +1451,58 @@ declare class InteractionsAPI {
1438
1451
  * @param body - The callback data for replying
1439
1452
  * @param options - The options for replying
1440
1453
  */
1441
- reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1454
+ reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
1455
  files?: RawFile[];
1443
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1456
+ with_response?: false;
1457
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1458
+ /**
1459
+ * Defers the reply to an interaction and returns an interaction callback object
1460
+ *
1461
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1462
+ * @param interactionId - The id of the interaction
1463
+ * @param interactionToken - The token of the interaction
1464
+ * @param body - The callback data for deferring the reply
1465
+ * @param options - The options for deferring
1466
+ */
1467
+ defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1468
+ with_response: true;
1469
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1444
1470
  /**
1445
1471
  * Defers the reply to an interaction
1446
1472
  *
1447
1473
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1448
1474
  * @param interactionId - The id of the interaction
1449
1475
  * @param interactionToken - The token of the interaction
1450
- * @param data - The data for deferring the reply
1476
+ * @param body - The callback data for deferring the reply
1477
+ * @param options - The options for deferring
1478
+ */
1479
+ defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1480
+ with_response?: false;
1481
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1482
+ /**
1483
+ * Defers an update from a message component interaction and returns an interaction callback object
1484
+ *
1485
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1486
+ * @param interactionId - The id of the interaction
1487
+ * @param interactionToken - The token of the interaction
1488
+ * @param body - The callback data for deferring the update
1451
1489
  * @param options - The options for deferring
1452
1490
  */
1453
- defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1491
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
1492
+ with_response: true;
1493
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1454
1494
  /**
1455
1495
  * Defers an update from a message component interaction
1456
1496
  *
1457
1497
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1458
1498
  * @param interactionId - The id of the interaction
1459
1499
  * @param interactionToken - The token of the interaction
1500
+ * @param body - The callback data for deferring the update
1460
1501
  * @param options - The options for deferring
1461
1502
  */
1462
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1503
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1504
+ with_response?: false;
1505
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1463
1506
  /**
1464
1507
  * Reply to a deferred interaction
1465
1508
  *
@@ -1506,6 +1549,19 @@ declare class InteractionsAPI {
1506
1549
  * @param options - The options for deleting the reply
1507
1550
  */
1508
1551
  deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1552
+ /**
1553
+ * Updates the message the component interaction was triggered on and returns an interaction callback object
1554
+ *
1555
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1556
+ * @param interactionId - The id of the interaction
1557
+ * @param interactionToken - The token of the interaction
1558
+ * @param callbackData - The callback data for updating the interaction
1559
+ * @param options - The options for updating the interaction
1560
+ */
1561
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1562
+ files?: RawFile[];
1563
+ with_response: true;
1564
+ }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1509
1565
  /**
1510
1566
  * Updates the message the component interaction was triggered on
1511
1567
  *
@@ -1515,9 +1571,22 @@ declare class InteractionsAPI {
1515
1571
  * @param callbackData - The callback data for updating the interaction
1516
1572
  * @param options - The options for updating the interaction
1517
1573
  */
1518
- updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1574
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1519
1575
  files?: RawFile[];
1520
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1576
+ with_response?: false;
1577
+ }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1578
+ /**
1579
+ * Sends an autocomplete response to an interaction and returns an interaction callback object
1580
+ *
1581
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1582
+ * @param interactionId - The id of the interaction
1583
+ * @param interactionToken - The token of the interaction
1584
+ * @param callbackData - The callback data for the autocomplete response
1585
+ * @param options - The options for sending the autocomplete response
1586
+ */
1587
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1588
+ with_response: true;
1589
+ }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1521
1590
  /**
1522
1591
  * Sends an autocomplete response to an interaction
1523
1592
  *
@@ -1527,7 +1596,21 @@ declare class InteractionsAPI {
1527
1596
  * @param callbackData - The callback data for the autocomplete response
1528
1597
  * @param options - The options for sending the autocomplete response
1529
1598
  */
1530
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1599
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1600
+ with_response?: false;
1601
+ }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1602
+ /**
1603
+ * Sends a modal response to an interaction and returns an interaction callback object
1604
+ *
1605
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1606
+ * @param interactionId - The id of the interaction
1607
+ * @param interactionToken - The token of the interaction
1608
+ * @param callbackData - The modal callback data to send
1609
+ * @param options - The options for sending the modal
1610
+ */
1611
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1612
+ with_response: true;
1613
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1531
1614
  /**
1532
1615
  * Sends a modal response to an interaction
1533
1616
  *
@@ -1537,7 +1620,9 @@ declare class InteractionsAPI {
1537
1620
  * @param callbackData - The modal callback data to send
1538
1621
  * @param options - The options for sending the modal
1539
1622
  */
1540
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1623
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1624
+ with_response?: false;
1625
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1541
1626
  /**
1542
1627
  * Sends a premium required response to an interaction
1543
1628
  *
@@ -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, 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, 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';
4
4
  export * from 'discord-api-types/v10';
5
5
  import * as discord_api_types_globals from 'discord-api-types/globals';
6
6
 
@@ -1429,6 +1429,19 @@ declare class InteractionsAPI {
1429
1429
  private readonly rest;
1430
1430
  private readonly webhooks;
1431
1431
  constructor(rest: REST, webhooks: WebhooksAPI);
1432
+ /**
1433
+ * Replies to an interaction and returns an interaction callback object
1434
+ *
1435
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1436
+ * @param interactionId - The id of the interaction
1437
+ * @param interactionToken - The token of the interaction
1438
+ * @param body - The callback data for replying
1439
+ * @param options - The options for replying
1440
+ */
1441
+ reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
+ files?: RawFile[];
1443
+ with_response: true;
1444
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1432
1445
  /**
1433
1446
  * Replies to an interaction
1434
1447
  *
@@ -1438,28 +1451,58 @@ declare class InteractionsAPI {
1438
1451
  * @param body - The callback data for replying
1439
1452
  * @param options - The options for replying
1440
1453
  */
1441
- reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1454
+ reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
1455
  files?: RawFile[];
1443
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1456
+ with_response?: false;
1457
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1458
+ /**
1459
+ * Defers the reply to an interaction and returns an interaction callback object
1460
+ *
1461
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1462
+ * @param interactionId - The id of the interaction
1463
+ * @param interactionToken - The token of the interaction
1464
+ * @param body - The callback data for deferring the reply
1465
+ * @param options - The options for deferring
1466
+ */
1467
+ defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1468
+ with_response: true;
1469
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1444
1470
  /**
1445
1471
  * Defers the reply to an interaction
1446
1472
  *
1447
1473
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1448
1474
  * @param interactionId - The id of the interaction
1449
1475
  * @param interactionToken - The token of the interaction
1450
- * @param data - The data for deferring the reply
1476
+ * @param body - The callback data for deferring the reply
1477
+ * @param options - The options for deferring
1478
+ */
1479
+ defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1480
+ with_response?: false;
1481
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1482
+ /**
1483
+ * Defers an update from a message component interaction and returns an interaction callback object
1484
+ *
1485
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1486
+ * @param interactionId - The id of the interaction
1487
+ * @param interactionToken - The token of the interaction
1488
+ * @param body - The callback data for deferring the update
1451
1489
  * @param options - The options for deferring
1452
1490
  */
1453
- defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1491
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
1492
+ with_response: true;
1493
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1454
1494
  /**
1455
1495
  * Defers an update from a message component interaction
1456
1496
  *
1457
1497
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1458
1498
  * @param interactionId - The id of the interaction
1459
1499
  * @param interactionToken - The token of the interaction
1500
+ * @param body - The callback data for deferring the update
1460
1501
  * @param options - The options for deferring
1461
1502
  */
1462
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1503
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1504
+ with_response?: false;
1505
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1463
1506
  /**
1464
1507
  * Reply to a deferred interaction
1465
1508
  *
@@ -1506,6 +1549,19 @@ declare class InteractionsAPI {
1506
1549
  * @param options - The options for deleting the reply
1507
1550
  */
1508
1551
  deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1552
+ /**
1553
+ * Updates the message the component interaction was triggered on and returns an interaction callback object
1554
+ *
1555
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1556
+ * @param interactionId - The id of the interaction
1557
+ * @param interactionToken - The token of the interaction
1558
+ * @param callbackData - The callback data for updating the interaction
1559
+ * @param options - The options for updating the interaction
1560
+ */
1561
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1562
+ files?: RawFile[];
1563
+ with_response: true;
1564
+ }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1509
1565
  /**
1510
1566
  * Updates the message the component interaction was triggered on
1511
1567
  *
@@ -1515,9 +1571,22 @@ declare class InteractionsAPI {
1515
1571
  * @param callbackData - The callback data for updating the interaction
1516
1572
  * @param options - The options for updating the interaction
1517
1573
  */
1518
- updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1574
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1519
1575
  files?: RawFile[];
1520
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1576
+ with_response?: false;
1577
+ }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1578
+ /**
1579
+ * Sends an autocomplete response to an interaction and returns an interaction callback object
1580
+ *
1581
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1582
+ * @param interactionId - The id of the interaction
1583
+ * @param interactionToken - The token of the interaction
1584
+ * @param callbackData - The callback data for the autocomplete response
1585
+ * @param options - The options for sending the autocomplete response
1586
+ */
1587
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1588
+ with_response: true;
1589
+ }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1521
1590
  /**
1522
1591
  * Sends an autocomplete response to an interaction
1523
1592
  *
@@ -1527,7 +1596,21 @@ declare class InteractionsAPI {
1527
1596
  * @param callbackData - The callback data for the autocomplete response
1528
1597
  * @param options - The options for sending the autocomplete response
1529
1598
  */
1530
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1599
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1600
+ with_response?: false;
1601
+ }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1602
+ /**
1603
+ * Sends a modal response to an interaction and returns an interaction callback object
1604
+ *
1605
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1606
+ * @param interactionId - The id of the interaction
1607
+ * @param interactionToken - The token of the interaction
1608
+ * @param callbackData - The modal callback data to send
1609
+ * @param options - The options for sending the modal
1610
+ */
1611
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1612
+ with_response: true;
1613
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1531
1614
  /**
1532
1615
  * Sends a modal response to an interaction
1533
1616
  *
@@ -1537,7 +1620,9 @@ declare class InteractionsAPI {
1537
1620
  * @param callbackData - The modal callback data to send
1538
1621
  * @param options - The options for sending the modal
1539
1622
  */
1540
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1623
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1624
+ with_response?: false;
1625
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1541
1626
  /**
1542
1627
  * Sends a premium required response to an interaction
1543
1628
  *