@discordjs/core 3.0.0-dev.1733357587-d0dc86488 → 3.0.0-dev.1733400321-abf4b6103

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, 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, 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,6 +571,9 @@ 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);
@@ -1069,9 +1074,7 @@ declare class GuildsAPI {
1069
1074
  * @param body - The data for creating the sticker
1070
1075
  * @param options - The options for creating the sticker
1071
1076
  */
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>;
1077
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1075
1078
  /**
1076
1079
  * Edits a sticker for a guild
1077
1080
  *
@@ -1300,6 +1303,13 @@ declare class GuildsAPI {
1300
1303
  deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1301
1304
  }
1302
1305
 
1306
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1307
+ files?: RawFile[];
1308
+ };
1309
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1310
+ files?: RawFile[];
1311
+ thread_id?: string;
1312
+ };
1303
1313
  declare class WebhooksAPI {
1304
1314
  private readonly rest;
1305
1315
  constructor(rest: REST);
@@ -1346,8 +1356,7 @@ declare class WebhooksAPI {
1346
1356
  * @param body - The data for executing the webhook
1347
1357
  * @param options - The options for executing the webhook
1348
1358
  */
1349
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1350
- files?: RawFile[];
1359
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1351
1360
  wait: true;
1352
1361
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1353
1362
  /**
@@ -1359,8 +1368,7 @@ declare class WebhooksAPI {
1359
1368
  * @param body - The data for executing the webhook
1360
1369
  * @param options - The options for executing the webhook
1361
1370
  */
1362
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1363
- files?: RawFile[];
1371
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1364
1372
  wait?: false;
1365
1373
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1366
1374
  /**
@@ -1406,10 +1414,7 @@ declare class WebhooksAPI {
1406
1414
  * @param body - The data for editing the message
1407
1415
  * @param options - The options for editing the message
1408
1416
  */
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>;
1417
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1413
1418
  /**
1414
1419
  * Deletes an associated message from a webhook
1415
1420
  *
@@ -1425,6 +1430,21 @@ declare class WebhooksAPI {
1425
1430
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1426
1431
  }
1427
1432
 
1433
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1434
+ files?: RawFile[];
1435
+ }
1436
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1437
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1438
+ files?: RawFile[];
1439
+ };
1440
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1441
+ files?: RawFile[];
1442
+ };
1443
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1444
+ files?: RawFile[];
1445
+ };
1446
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1447
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1428
1448
  declare class InteractionsAPI {
1429
1449
  private readonly rest;
1430
1450
  private readonly webhooks;
@@ -1438,8 +1458,7 @@ declare class InteractionsAPI {
1438
1458
  * @param body - The callback data for replying
1439
1459
  * @param options - The options for replying
1440
1460
  */
1441
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
- files?: RawFile[];
1461
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1443
1462
  with_response: true;
1444
1463
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1445
1464
  /**
@@ -1451,8 +1470,7 @@ declare class InteractionsAPI {
1451
1470
  * @param body - The callback data for replying
1452
1471
  * @param options - The options for replying
1453
1472
  */
1454
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1455
- files?: RawFile[];
1473
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1456
1474
  with_response?: false;
1457
1475
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1458
1476
  /**
@@ -1464,7 +1482,7 @@ declare class InteractionsAPI {
1464
1482
  * @param body - The callback data for deferring the reply
1465
1483
  * @param options - The options for deferring
1466
1484
  */
1467
- defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1485
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1468
1486
  with_response: true;
1469
1487
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1470
1488
  /**
@@ -1476,7 +1494,7 @@ declare class InteractionsAPI {
1476
1494
  * @param body - The callback data for deferring the reply
1477
1495
  * @param options - The options for deferring
1478
1496
  */
1479
- defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1497
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1480
1498
  with_response?: false;
1481
1499
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1482
1500
  /**
@@ -1512,9 +1530,7 @@ declare class InteractionsAPI {
1512
1530
  * @param body - The callback data for replying
1513
1531
  * @param options - The options for replying
1514
1532
  */
1515
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1516
- files?: RawFile[];
1517
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1533
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1518
1534
  /**
1519
1535
  * Edits the initial reply to an interaction
1520
1536
  *
@@ -1526,9 +1542,7 @@ declare class InteractionsAPI {
1526
1542
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1527
1543
  * @param options - The options for editing the reply
1528
1544
  */
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>;
1545
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1532
1546
  /**
1533
1547
  * Fetches the initial reply to an interaction
1534
1548
  *
@@ -1558,8 +1572,7 @@ declare class InteractionsAPI {
1558
1572
  * @param callbackData - The callback data for updating the interaction
1559
1573
  * @param options - The options for updating the interaction
1560
1574
  */
1561
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1562
- files?: RawFile[];
1575
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1563
1576
  with_response: true;
1564
1577
  }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1565
1578
  /**
@@ -1571,8 +1584,7 @@ declare class InteractionsAPI {
1571
1584
  * @param callbackData - The callback data for updating the interaction
1572
1585
  * @param options - The options for updating the interaction
1573
1586
  */
1574
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1575
- files?: RawFile[];
1587
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1576
1588
  with_response?: false;
1577
1589
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1578
1590
  /**
@@ -1584,7 +1596,7 @@ declare class InteractionsAPI {
1584
1596
  * @param callbackData - The callback data for the autocomplete response
1585
1597
  * @param options - The options for sending the autocomplete response
1586
1598
  */
1587
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1599
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1588
1600
  with_response: true;
1589
1601
  }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1590
1602
  /**
@@ -1596,7 +1608,7 @@ declare class InteractionsAPI {
1596
1608
  * @param callbackData - The callback data for the autocomplete response
1597
1609
  * @param options - The options for sending the autocomplete response
1598
1610
  */
1599
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1611
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1600
1612
  with_response?: false;
1601
1613
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1602
1614
  /**
@@ -1608,7 +1620,7 @@ declare class InteractionsAPI {
1608
1620
  * @param callbackData - The modal callback data to send
1609
1621
  * @param options - The options for sending the modal
1610
1622
  */
1611
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1623
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1612
1624
  with_response: true;
1613
1625
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1614
1626
  /**
@@ -1620,7 +1632,7 @@ declare class InteractionsAPI {
1620
1632
  * @param callbackData - The modal callback data to send
1621
1633
  * @param options - The options for sending the modal
1622
1634
  */
1623
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1635
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1624
1636
  with_response?: false;
1625
1637
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1626
1638
  /**
@@ -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, 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, 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,6 +571,9 @@ 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);
@@ -1069,9 +1074,7 @@ declare class GuildsAPI {
1069
1074
  * @param body - The data for creating the sticker
1070
1075
  * @param options - The options for creating the sticker
1071
1076
  */
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>;
1077
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1075
1078
  /**
1076
1079
  * Edits a sticker for a guild
1077
1080
  *
@@ -1300,6 +1303,13 @@ declare class GuildsAPI {
1300
1303
  deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1301
1304
  }
1302
1305
 
1306
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1307
+ files?: RawFile[];
1308
+ };
1309
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1310
+ files?: RawFile[];
1311
+ thread_id?: string;
1312
+ };
1303
1313
  declare class WebhooksAPI {
1304
1314
  private readonly rest;
1305
1315
  constructor(rest: REST);
@@ -1346,8 +1356,7 @@ declare class WebhooksAPI {
1346
1356
  * @param body - The data for executing the webhook
1347
1357
  * @param options - The options for executing the webhook
1348
1358
  */
1349
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1350
- files?: RawFile[];
1359
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1351
1360
  wait: true;
1352
1361
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1353
1362
  /**
@@ -1359,8 +1368,7 @@ declare class WebhooksAPI {
1359
1368
  * @param body - The data for executing the webhook
1360
1369
  * @param options - The options for executing the webhook
1361
1370
  */
1362
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1363
- files?: RawFile[];
1371
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1364
1372
  wait?: false;
1365
1373
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1366
1374
  /**
@@ -1406,10 +1414,7 @@ declare class WebhooksAPI {
1406
1414
  * @param body - The data for editing the message
1407
1415
  * @param options - The options for editing the message
1408
1416
  */
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>;
1417
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1413
1418
  /**
1414
1419
  * Deletes an associated message from a webhook
1415
1420
  *
@@ -1425,6 +1430,21 @@ declare class WebhooksAPI {
1425
1430
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1426
1431
  }
1427
1432
 
1433
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1434
+ files?: RawFile[];
1435
+ }
1436
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1437
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1438
+ files?: RawFile[];
1439
+ };
1440
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1441
+ files?: RawFile[];
1442
+ };
1443
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1444
+ files?: RawFile[];
1445
+ };
1446
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1447
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1428
1448
  declare class InteractionsAPI {
1429
1449
  private readonly rest;
1430
1450
  private readonly webhooks;
@@ -1438,8 +1458,7 @@ declare class InteractionsAPI {
1438
1458
  * @param body - The callback data for replying
1439
1459
  * @param options - The options for replying
1440
1460
  */
1441
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
- files?: RawFile[];
1461
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1443
1462
  with_response: true;
1444
1463
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1445
1464
  /**
@@ -1451,8 +1470,7 @@ declare class InteractionsAPI {
1451
1470
  * @param body - The callback data for replying
1452
1471
  * @param options - The options for replying
1453
1472
  */
1454
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1455
- files?: RawFile[];
1473
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1456
1474
  with_response?: false;
1457
1475
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1458
1476
  /**
@@ -1464,7 +1482,7 @@ declare class InteractionsAPI {
1464
1482
  * @param body - The callback data for deferring the reply
1465
1483
  * @param options - The options for deferring
1466
1484
  */
1467
- defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1485
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1468
1486
  with_response: true;
1469
1487
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1470
1488
  /**
@@ -1476,7 +1494,7 @@ declare class InteractionsAPI {
1476
1494
  * @param body - The callback data for deferring the reply
1477
1495
  * @param options - The options for deferring
1478
1496
  */
1479
- defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1497
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1480
1498
  with_response?: false;
1481
1499
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1482
1500
  /**
@@ -1512,9 +1530,7 @@ declare class InteractionsAPI {
1512
1530
  * @param body - The callback data for replying
1513
1531
  * @param options - The options for replying
1514
1532
  */
1515
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1516
- files?: RawFile[];
1517
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1533
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1518
1534
  /**
1519
1535
  * Edits the initial reply to an interaction
1520
1536
  *
@@ -1526,9 +1542,7 @@ declare class InteractionsAPI {
1526
1542
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1527
1543
  * @param options - The options for editing the reply
1528
1544
  */
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>;
1545
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1532
1546
  /**
1533
1547
  * Fetches the initial reply to an interaction
1534
1548
  *
@@ -1558,8 +1572,7 @@ declare class InteractionsAPI {
1558
1572
  * @param callbackData - The callback data for updating the interaction
1559
1573
  * @param options - The options for updating the interaction
1560
1574
  */
1561
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1562
- files?: RawFile[];
1575
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1563
1576
  with_response: true;
1564
1577
  }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1565
1578
  /**
@@ -1571,8 +1584,7 @@ declare class InteractionsAPI {
1571
1584
  * @param callbackData - The callback data for updating the interaction
1572
1585
  * @param options - The options for updating the interaction
1573
1586
  */
1574
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1575
- files?: RawFile[];
1587
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1576
1588
  with_response?: false;
1577
1589
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1578
1590
  /**
@@ -1584,7 +1596,7 @@ declare class InteractionsAPI {
1584
1596
  * @param callbackData - The callback data for the autocomplete response
1585
1597
  * @param options - The options for sending the autocomplete response
1586
1598
  */
1587
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1599
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1588
1600
  with_response: true;
1589
1601
  }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1590
1602
  /**
@@ -1596,7 +1608,7 @@ declare class InteractionsAPI {
1596
1608
  * @param callbackData - The callback data for the autocomplete response
1597
1609
  * @param options - The options for sending the autocomplete response
1598
1610
  */
1599
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1611
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1600
1612
  with_response?: false;
1601
1613
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1602
1614
  /**
@@ -1608,7 +1620,7 @@ declare class InteractionsAPI {
1608
1620
  * @param callbackData - The modal callback data to send
1609
1621
  * @param options - The options for sending the modal
1610
1622
  */
1611
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1623
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1612
1624
  with_response: true;
1613
1625
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1614
1626
  /**
@@ -1620,7 +1632,7 @@ declare class InteractionsAPI {
1620
1632
  * @param callbackData - The modal callback data to send
1621
1633
  * @param options - The options for sending the modal
1622
1634
  */
1623
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1635
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1624
1636
  with_response?: false;
1625
1637
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1626
1638
  /**
@@ -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 };
package/dist/http-only.js CHANGED
@@ -1943,11 +1943,7 @@ var InteractionsAPI = class {
1943
1943
  static {
1944
1944
  __name(this, "InteractionsAPI");
1945
1945
  }
1946
- async reply(interactionId, interactionToken, {
1947
- files,
1948
- with_response,
1949
- ...data
1950
- }, { signal } = {}) {
1946
+ async reply(interactionId, interactionToken, { files, with_response, ...data }, { signal } = {}) {
1951
1947
  const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1952
1948
  query: (0, import_rest4.makeURLSearchParams)({ with_response }),
1953
1949
  files,
@@ -1960,10 +1956,7 @@ var InteractionsAPI = class {
1960
1956
  });
1961
1957
  return with_response ? response : void 0;
1962
1958
  }
1963
- async defer(interactionId, interactionToken, {
1964
- with_response,
1965
- ...data
1966
- } = {}, { signal } = {}) {
1959
+ async defer(interactionId, interactionToken, { with_response, ...data } = {}, { signal } = {}) {
1967
1960
  const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1968
1961
  query: (0, import_rest4.makeURLSearchParams)({ with_response }),
1969
1962
  auth: false,
@@ -2044,11 +2037,7 @@ var InteractionsAPI = class {
2044
2037
  async deleteReply(applicationId, interactionToken, messageId, { signal } = {}) {
2045
2038
  await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? "@original", {}, { signal });
2046
2039
  }
2047
- async updateMessage(interactionId, interactionToken, {
2048
- files,
2049
- with_response,
2050
- ...data
2051
- }, { signal } = {}) {
2040
+ async updateMessage(interactionId, interactionToken, { files, with_response, ...data }, { signal } = {}) {
2052
2041
  const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2053
2042
  files,
2054
2043
  auth: false,
@@ -2060,10 +2049,7 @@ var InteractionsAPI = class {
2060
2049
  });
2061
2050
  return with_response ? response : void 0;
2062
2051
  }
2063
- async createAutocompleteResponse(interactionId, interactionToken, {
2064
- with_response,
2065
- ...data
2066
- }, { signal } = {}) {
2052
+ async createAutocompleteResponse(interactionId, interactionToken, { with_response, ...data }, { signal } = {}) {
2067
2053
  const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2068
2054
  auth: false,
2069
2055
  body: {
@@ -2848,12 +2834,7 @@ var WebhooksAPI = class {
2848
2834
  * @param body - The data for executing the webhook
2849
2835
  * @param options - The options for executing the webhook
2850
2836
  */
2851
- async execute(id, token, {
2852
- wait,
2853
- thread_id,
2854
- files,
2855
- ...body
2856
- }, { signal } = {}) {
2837
+ async execute(id, token, { wait, thread_id, files, ...body }, { signal } = {}) {
2857
2838
  return this.rest.post(import_v1017.Routes.webhook(id, token), {
2858
2839
  query: (0, import_rest10.makeURLSearchParams)({ wait, thread_id }),
2859
2840
  files,
@@ -2926,11 +2907,7 @@ var WebhooksAPI = class {
2926
2907
  * @param body - The data for editing the message
2927
2908
  * @param options - The options for editing the message
2928
2909
  */
2929
- async editMessage(id, token, messageId, {
2930
- thread_id,
2931
- files,
2932
- ...body
2933
- }, { signal } = {}) {
2910
+ async editMessage(id, token, messageId, { thread_id, files, ...body }, { signal } = {}) {
2934
2911
  return this.rest.patch(import_v1017.Routes.webhookMessage(id, token, messageId), {
2935
2912
  query: (0, import_rest10.makeURLSearchParams)({ thread_id }),
2936
2913
  auth: false,
@@ -3021,7 +2998,7 @@ __name(withFiles, "withFiles");
3021
2998
 
3022
2999
  // src/http-only/index.ts
3023
3000
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
3024
- var version = "3.0.0-dev.1733357587-d0dc86488";
3001
+ var version = "3.0.0-dev.1733400321-abf4b6103";
3025
3002
  // Annotate the CommonJS export names for ESM import in node:
3026
3003
  0 && (module.exports = {
3027
3004
  API,