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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, 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, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPostAPIGuildStickerFormDataBody, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTPostAPIInteractionCallbackWithResponseResult, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
  import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
6
6
  import { Awaitable } from '@discordjs/util';
@@ -229,6 +229,12 @@ interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
229
229
  files?: RawFile[];
230
230
  };
231
231
  }
232
+ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
233
+ files?: RawFile[];
234
+ }
235
+ interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
236
+ files?: RawFile[];
237
+ }
232
238
  declare class ChannelsAPI {
233
239
  private readonly rest;
234
240
  constructor(rest: REST);
@@ -240,9 +246,7 @@ declare class ChannelsAPI {
240
246
  * @param body - The data for sending the message
241
247
  * @param options - The options for sending the message
242
248
  */
243
- createMessage(channelId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
244
- files?: RawFile[];
245
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
249
+ createMessage(channelId: Snowflake, { files, ...body }: CreateMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
246
250
  /**
247
251
  * Edits a message
248
252
  *
@@ -252,9 +256,7 @@ declare class ChannelsAPI {
252
256
  * @param body - The data for editing the message
253
257
  * @param options - The options for editing the message
254
258
  */
255
- editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: RESTPatchAPIChannelMessageJSONBody & {
256
- files?: RawFile[];
257
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
259
+ editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: EditMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
258
260
  /**
259
261
  * Fetches the reactions for a message
260
262
  *
@@ -572,18 +574,12 @@ declare class ChannelsAPI {
572
574
  sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
573
575
  }
574
576
 
577
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
578
+ file: RawFile;
579
+ }
575
580
  declare class GuildsAPI {
576
581
  private readonly rest;
577
582
  constructor(rest: REST);
578
- /**
579
- * Fetches a guild
580
- *
581
- * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
582
- * @param guildId - The id of the guild
583
- * @param options - The options for fetching the guild
584
- * @deprecated Use the overload with a query instead.
585
- */
586
- get(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
587
583
  /**
588
584
  * Fetches a guild
589
585
  *
@@ -592,7 +588,7 @@ declare class GuildsAPI {
592
588
  * @param query - The query options for fetching the guild
593
589
  * @param options - The options for fetching the guild
594
590
  */
595
- get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
591
+ get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
596
592
  /**
597
593
  * Fetches a guild preview
598
594
  *
@@ -1072,9 +1068,7 @@ declare class GuildsAPI {
1072
1068
  * @param body - The data for creating the sticker
1073
1069
  * @param options - The options for creating the sticker
1074
1070
  */
1075
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1076
- file: RawFile;
1077
- }, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1071
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1078
1072
  /**
1079
1073
  * Edits a sticker for a guild
1080
1074
  *
@@ -1303,6 +1297,13 @@ declare class GuildsAPI {
1303
1297
  deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1304
1298
  }
1305
1299
 
1300
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1301
+ files?: RawFile[];
1302
+ };
1303
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1304
+ files?: RawFile[];
1305
+ thread_id?: string;
1306
+ };
1306
1307
  declare class WebhooksAPI {
1307
1308
  private readonly rest;
1308
1309
  constructor(rest: REST);
@@ -1349,8 +1350,7 @@ declare class WebhooksAPI {
1349
1350
  * @param body - The data for executing the webhook
1350
1351
  * @param options - The options for executing the webhook
1351
1352
  */
1352
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1353
- files?: RawFile[];
1353
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1354
1354
  wait: true;
1355
1355
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1356
1356
  /**
@@ -1362,8 +1362,7 @@ declare class WebhooksAPI {
1362
1362
  * @param body - The data for executing the webhook
1363
1363
  * @param options - The options for executing the webhook
1364
1364
  */
1365
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1366
- files?: RawFile[];
1365
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1367
1366
  wait?: false;
1368
1367
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1369
1368
  /**
@@ -1409,10 +1408,7 @@ declare class WebhooksAPI {
1409
1408
  * @param body - The data for editing the message
1410
1409
  * @param options - The options for editing the message
1411
1410
  */
1412
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1413
- files?: RawFile[];
1414
- thread_id?: string;
1415
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1411
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1416
1412
  /**
1417
1413
  * Deletes an associated message from a webhook
1418
1414
  *
@@ -1428,6 +1424,21 @@ declare class WebhooksAPI {
1428
1424
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1429
1425
  }
1430
1426
 
1427
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1428
+ files?: RawFile[];
1429
+ }
1430
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1431
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1432
+ files?: RawFile[];
1433
+ };
1434
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1435
+ files?: RawFile[];
1436
+ };
1437
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1438
+ files?: RawFile[];
1439
+ };
1440
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1441
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1431
1442
  declare class InteractionsAPI {
1432
1443
  private readonly rest;
1433
1444
  private readonly webhooks;
@@ -1441,8 +1452,7 @@ declare class InteractionsAPI {
1441
1452
  * @param body - The callback data for replying
1442
1453
  * @param options - The options for replying
1443
1454
  */
1444
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1445
- files?: RawFile[];
1455
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1446
1456
  with_response: true;
1447
1457
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1448
1458
  /**
@@ -1454,8 +1464,7 @@ declare class InteractionsAPI {
1454
1464
  * @param body - The callback data for replying
1455
1465
  * @param options - The options for replying
1456
1466
  */
1457
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1458
- files?: RawFile[];
1467
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1459
1468
  with_response?: false;
1460
1469
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1461
1470
  /**
@@ -1467,7 +1476,7 @@ declare class InteractionsAPI {
1467
1476
  * @param body - The callback data for deferring the reply
1468
1477
  * @param options - The options for deferring
1469
1478
  */
1470
- defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1479
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1471
1480
  with_response: true;
1472
1481
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1473
1482
  /**
@@ -1479,7 +1488,7 @@ declare class InteractionsAPI {
1479
1488
  * @param body - The callback data for deferring the reply
1480
1489
  * @param options - The options for deferring
1481
1490
  */
1482
- defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1491
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1483
1492
  with_response?: false;
1484
1493
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1485
1494
  /**
@@ -1515,9 +1524,7 @@ declare class InteractionsAPI {
1515
1524
  * @param body - The callback data for replying
1516
1525
  * @param options - The options for replying
1517
1526
  */
1518
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1519
- files?: RawFile[];
1520
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1527
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1521
1528
  /**
1522
1529
  * Edits the initial reply to an interaction
1523
1530
  *
@@ -1529,9 +1536,7 @@ declare class InteractionsAPI {
1529
1536
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1530
1537
  * @param options - The options for editing the reply
1531
1538
  */
1532
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1533
- files?: RawFile[];
1534
- }, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1539
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1535
1540
  /**
1536
1541
  * Fetches the initial reply to an interaction
1537
1542
  *
@@ -1561,8 +1566,7 @@ declare class InteractionsAPI {
1561
1566
  * @param callbackData - The callback data for updating the interaction
1562
1567
  * @param options - The options for updating the interaction
1563
1568
  */
1564
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1565
- files?: RawFile[];
1569
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1566
1570
  with_response: true;
1567
1571
  }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1568
1572
  /**
@@ -1574,8 +1578,7 @@ declare class InteractionsAPI {
1574
1578
  * @param callbackData - The callback data for updating the interaction
1575
1579
  * @param options - The options for updating the interaction
1576
1580
  */
1577
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1578
- files?: RawFile[];
1581
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1579
1582
  with_response?: false;
1580
1583
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1581
1584
  /**
@@ -1587,7 +1590,7 @@ declare class InteractionsAPI {
1587
1590
  * @param callbackData - The callback data for the autocomplete response
1588
1591
  * @param options - The options for sending the autocomplete response
1589
1592
  */
1590
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1593
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1591
1594
  with_response: true;
1592
1595
  }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1593
1596
  /**
@@ -1599,7 +1602,7 @@ declare class InteractionsAPI {
1599
1602
  * @param callbackData - The callback data for the autocomplete response
1600
1603
  * @param options - The options for sending the autocomplete response
1601
1604
  */
1602
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1605
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1603
1606
  with_response?: false;
1604
1607
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1605
1608
  /**
@@ -1611,7 +1614,7 @@ declare class InteractionsAPI {
1611
1614
  * @param callbackData - The modal callback data to send
1612
1615
  * @param options - The options for sending the modal
1613
1616
  */
1614
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1617
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1615
1618
  with_response: true;
1616
1619
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1617
1620
  /**
@@ -1623,7 +1626,7 @@ declare class InteractionsAPI {
1623
1626
  * @param callbackData - The modal callback data to send
1624
1627
  * @param options - The options for sending the modal
1625
1628
  */
1626
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1629
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1627
1630
  with_response?: false;
1628
1631
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1629
1632
  /**
@@ -1698,6 +1701,15 @@ declare class MonetizationAPI {
1698
1701
  * @param options - The options for fetching entitlements
1699
1702
  */
1700
1703
  getEntitlements(applicationId: Snowflake, query?: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1704
+ /**
1705
+ * Fetches an entitlement for an application.
1706
+ *
1707
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
1708
+ * @param applicationId - The application id to fetch the entitlement for
1709
+ * @param entitlementId - The entitlement id to fetch
1710
+ * @param options - The options for fetching the entitlement
1711
+ */
1712
+ getEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEntitlement>;
1701
1713
  /**
1702
1714
  * Creates a test entitlement for an application's SKU.
1703
1715
  *
@@ -2354,4 +2366,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2354
2366
  */
2355
2367
  declare const version: string;
2356
2368
 
2357
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, type DescriptiveRawFile, type Gateway, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
2369
+ export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, 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, type Gateway, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, 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, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPostAPIGuildStickerFormDataBody, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTPostAPIInteractionCallbackWithResponseResult, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
  import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
6
6
  import { Awaitable } from '@discordjs/util';
@@ -229,6 +229,12 @@ interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
229
229
  files?: RawFile[];
230
230
  };
231
231
  }
232
+ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
233
+ files?: RawFile[];
234
+ }
235
+ interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
236
+ files?: RawFile[];
237
+ }
232
238
  declare class ChannelsAPI {
233
239
  private readonly rest;
234
240
  constructor(rest: REST);
@@ -240,9 +246,7 @@ declare class ChannelsAPI {
240
246
  * @param body - The data for sending the message
241
247
  * @param options - The options for sending the message
242
248
  */
243
- createMessage(channelId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
244
- files?: RawFile[];
245
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
249
+ createMessage(channelId: Snowflake, { files, ...body }: CreateMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
246
250
  /**
247
251
  * Edits a message
248
252
  *
@@ -252,9 +256,7 @@ declare class ChannelsAPI {
252
256
  * @param body - The data for editing the message
253
257
  * @param options - The options for editing the message
254
258
  */
255
- editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: RESTPatchAPIChannelMessageJSONBody & {
256
- files?: RawFile[];
257
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
259
+ editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: EditMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
258
260
  /**
259
261
  * Fetches the reactions for a message
260
262
  *
@@ -572,18 +574,12 @@ declare class ChannelsAPI {
572
574
  sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
573
575
  }
574
576
 
577
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
578
+ file: RawFile;
579
+ }
575
580
  declare class GuildsAPI {
576
581
  private readonly rest;
577
582
  constructor(rest: REST);
578
- /**
579
- * Fetches a guild
580
- *
581
- * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
582
- * @param guildId - The id of the guild
583
- * @param options - The options for fetching the guild
584
- * @deprecated Use the overload with a query instead.
585
- */
586
- get(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
587
583
  /**
588
584
  * Fetches a guild
589
585
  *
@@ -592,7 +588,7 @@ declare class GuildsAPI {
592
588
  * @param query - The query options for fetching the guild
593
589
  * @param options - The options for fetching the guild
594
590
  */
595
- get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildResult>;
591
+ get(guildId: Snowflake, query?: RESTGetAPIGuildQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
596
592
  /**
597
593
  * Fetches a guild preview
598
594
  *
@@ -1072,9 +1068,7 @@ declare class GuildsAPI {
1072
1068
  * @param body - The data for creating the sticker
1073
1069
  * @param options - The options for creating the sticker
1074
1070
  */
1075
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1076
- file: RawFile;
1077
- }, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1071
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1078
1072
  /**
1079
1073
  * Edits a sticker for a guild
1080
1074
  *
@@ -1303,6 +1297,13 @@ declare class GuildsAPI {
1303
1297
  deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1304
1298
  }
1305
1299
 
1300
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1301
+ files?: RawFile[];
1302
+ };
1303
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1304
+ files?: RawFile[];
1305
+ thread_id?: string;
1306
+ };
1306
1307
  declare class WebhooksAPI {
1307
1308
  private readonly rest;
1308
1309
  constructor(rest: REST);
@@ -1349,8 +1350,7 @@ declare class WebhooksAPI {
1349
1350
  * @param body - The data for executing the webhook
1350
1351
  * @param options - The options for executing the webhook
1351
1352
  */
1352
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1353
- files?: RawFile[];
1353
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1354
1354
  wait: true;
1355
1355
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1356
1356
  /**
@@ -1362,8 +1362,7 @@ declare class WebhooksAPI {
1362
1362
  * @param body - The data for executing the webhook
1363
1363
  * @param options - The options for executing the webhook
1364
1364
  */
1365
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1366
- files?: RawFile[];
1365
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1367
1366
  wait?: false;
1368
1367
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1369
1368
  /**
@@ -1409,10 +1408,7 @@ declare class WebhooksAPI {
1409
1408
  * @param body - The data for editing the message
1410
1409
  * @param options - The options for editing the message
1411
1410
  */
1412
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & {
1413
- files?: RawFile[];
1414
- thread_id?: string;
1415
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1411
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1416
1412
  /**
1417
1413
  * Deletes an associated message from a webhook
1418
1414
  *
@@ -1428,6 +1424,21 @@ declare class WebhooksAPI {
1428
1424
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1429
1425
  }
1430
1426
 
1427
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1428
+ files?: RawFile[];
1429
+ }
1430
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1431
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1432
+ files?: RawFile[];
1433
+ };
1434
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1435
+ files?: RawFile[];
1436
+ };
1437
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1438
+ files?: RawFile[];
1439
+ };
1440
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1441
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1431
1442
  declare class InteractionsAPI {
1432
1443
  private readonly rest;
1433
1444
  private readonly webhooks;
@@ -1441,8 +1452,7 @@ declare class InteractionsAPI {
1441
1452
  * @param body - The callback data for replying
1442
1453
  * @param options - The options for replying
1443
1454
  */
1444
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1445
- files?: RawFile[];
1455
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1446
1456
  with_response: true;
1447
1457
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1448
1458
  /**
@@ -1454,8 +1464,7 @@ declare class InteractionsAPI {
1454
1464
  * @param body - The callback data for replying
1455
1465
  * @param options - The options for replying
1456
1466
  */
1457
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1458
- files?: RawFile[];
1467
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1459
1468
  with_response?: false;
1460
1469
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1461
1470
  /**
@@ -1467,7 +1476,7 @@ declare class InteractionsAPI {
1467
1476
  * @param body - The callback data for deferring the reply
1468
1477
  * @param options - The options for deferring
1469
1478
  */
1470
- defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1479
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1471
1480
  with_response: true;
1472
1481
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1473
1482
  /**
@@ -1479,7 +1488,7 @@ declare class InteractionsAPI {
1479
1488
  * @param body - The callback data for deferring the reply
1480
1489
  * @param options - The options for deferring
1481
1490
  */
1482
- defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1491
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1483
1492
  with_response?: false;
1484
1493
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1485
1494
  /**
@@ -1515,9 +1524,7 @@ declare class InteractionsAPI {
1515
1524
  * @param body - The callback data for replying
1516
1525
  * @param options - The options for replying
1517
1526
  */
1518
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1519
- files?: RawFile[];
1520
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1527
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1521
1528
  /**
1522
1529
  * Edits the initial reply to an interaction
1523
1530
  *
@@ -1529,9 +1536,7 @@ declare class InteractionsAPI {
1529
1536
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1530
1537
  * @param options - The options for editing the reply
1531
1538
  */
1532
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1533
- files?: RawFile[];
1534
- }, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1539
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1535
1540
  /**
1536
1541
  * Fetches the initial reply to an interaction
1537
1542
  *
@@ -1561,8 +1566,7 @@ declare class InteractionsAPI {
1561
1566
  * @param callbackData - The callback data for updating the interaction
1562
1567
  * @param options - The options for updating the interaction
1563
1568
  */
1564
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1565
- files?: RawFile[];
1569
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1566
1570
  with_response: true;
1567
1571
  }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1568
1572
  /**
@@ -1574,8 +1578,7 @@ declare class InteractionsAPI {
1574
1578
  * @param callbackData - The callback data for updating the interaction
1575
1579
  * @param options - The options for updating the interaction
1576
1580
  */
1577
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1578
- files?: RawFile[];
1581
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1579
1582
  with_response?: false;
1580
1583
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1581
1584
  /**
@@ -1587,7 +1590,7 @@ declare class InteractionsAPI {
1587
1590
  * @param callbackData - The callback data for the autocomplete response
1588
1591
  * @param options - The options for sending the autocomplete response
1589
1592
  */
1590
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1593
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1591
1594
  with_response: true;
1592
1595
  }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1593
1596
  /**
@@ -1599,7 +1602,7 @@ declare class InteractionsAPI {
1599
1602
  * @param callbackData - The callback data for the autocomplete response
1600
1603
  * @param options - The options for sending the autocomplete response
1601
1604
  */
1602
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1605
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1603
1606
  with_response?: false;
1604
1607
  }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1605
1608
  /**
@@ -1611,7 +1614,7 @@ declare class InteractionsAPI {
1611
1614
  * @param callbackData - The modal callback data to send
1612
1615
  * @param options - The options for sending the modal
1613
1616
  */
1614
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1617
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1615
1618
  with_response: true;
1616
1619
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1617
1620
  /**
@@ -1623,7 +1626,7 @@ declare class InteractionsAPI {
1623
1626
  * @param callbackData - The modal callback data to send
1624
1627
  * @param options - The options for sending the modal
1625
1628
  */
1626
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1629
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1627
1630
  with_response?: false;
1628
1631
  }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1629
1632
  /**
@@ -1698,6 +1701,15 @@ declare class MonetizationAPI {
1698
1701
  * @param options - The options for fetching entitlements
1699
1702
  */
1700
1703
  getEntitlements(applicationId: Snowflake, query?: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1704
+ /**
1705
+ * Fetches an entitlement for an application.
1706
+ *
1707
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
1708
+ * @param applicationId - The application id to fetch the entitlement for
1709
+ * @param entitlementId - The entitlement id to fetch
1710
+ * @param options - The options for fetching the entitlement
1711
+ */
1712
+ getEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEntitlement>;
1701
1713
  /**
1702
1714
  * Creates a test entitlement for an application's SKU.
1703
1715
  *
@@ -2354,4 +2366,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2354
2366
  */
2355
2367
  declare const version: string;
2356
2368
 
2357
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, type DescriptiveRawFile, type Gateway, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
2369
+ export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, 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, type Gateway, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };