@discordjs/core 2.2.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
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, RESTPostAPIChannelThreadsResult, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, 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, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentGuildMemberJSONBody, 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, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, 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, RESTPostAPIChannelThreadsResult, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPutAPIChannelRecipientJSONBody, 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, RESTPutAPIGuildIncidentActionsJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, 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, RESTPatchAPICurrentGuildMemberJSONBody, 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, GatewaySoundboardSoundsDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayRateLimitedDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayRequestSoundboardSoundsData, 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';
7
+ export { GatewayRateLimitError } from '@discordjs/util';
7
8
  import { WebSocketShardEvents, ManagerShardEventsMap as ManagerShardEventsMap$1 } from '@discordjs/ws';
8
9
  import * as discord_api_types_globals from 'discord-api-types/globals';
9
10
 
@@ -229,6 +230,12 @@ interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
229
230
  files?: RawFile[];
230
231
  };
231
232
  }
233
+ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
234
+ files?: RawFile[];
235
+ }
236
+ interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
237
+ files?: RawFile[];
238
+ }
232
239
  declare class ChannelsAPI {
233
240
  private readonly rest;
234
241
  constructor(rest: REST);
@@ -240,9 +247,7 @@ declare class ChannelsAPI {
240
247
  * @param body - The data for sending the message
241
248
  * @param options - The options for sending the message
242
249
  */
243
- createMessage(channelId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
244
- files?: RawFile[];
245
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
250
+ createMessage(channelId: Snowflake, { files, ...body }: CreateMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
246
251
  /**
247
252
  * Edits a message
248
253
  *
@@ -252,9 +257,7 @@ declare class ChannelsAPI {
252
257
  * @param body - The data for editing the message
253
258
  * @param options - The options for editing the message
254
259
  */
255
- editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: RESTPatchAPIChannelMessageJSONBody & {
256
- files?: RawFile[];
257
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
260
+ editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: EditMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
258
261
  /**
259
262
  * Fetches the reactions for a message
260
263
  *
@@ -521,8 +524,58 @@ declare class ChannelsAPI {
521
524
  * @param options - The options for deleting the permission overwrite
522
525
  */
523
526
  deletePermissionOverwrite(channelId: Snowflake, overwriteId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
527
+ /**
528
+ * Sends a soundboard sound in a channel
529
+ *
530
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
531
+ * @param channelId - The id of the channel to send the soundboard sound in
532
+ * @param body - The data for sending the soundboard sound
533
+ * @param options - The options for sending the soundboard sound
534
+ */
535
+ sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
536
+ /**
537
+ * Adds a recipient to a group DM channel
538
+ *
539
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
540
+ * @param channelId - The id of the channel to add the recipient to
541
+ * @param userId - The id of the user to add as a recipient
542
+ * @param body - The data for adding the recipient
543
+ * @param options - The options for adding the recipient
544
+ */
545
+ addGroupDMRecipient(channelId: Snowflake, userId: Snowflake, body: RESTPutAPIChannelRecipientJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
546
+ /**
547
+ * Removes a recipient from a group DM channel
548
+ *
549
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient}
550
+ * @param channelId - The id of the channel to remove the recipient from
551
+ * @param userId - The id of the user to remove as a recipient
552
+ * @param options - The options for removing the recipient
553
+ */
554
+ removeGroupDMRecipient(channelId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
524
555
  }
525
556
 
557
+ declare class GatewayAPI {
558
+ private readonly rest;
559
+ constructor(rest: REST);
560
+ /**
561
+ * Gets gateway information.
562
+ *
563
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway}
564
+ * @param options - The options for fetching the gateway information
565
+ */
566
+ get({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGatewayInfo>;
567
+ /**
568
+ * Gets gateway information with additional metadata.
569
+ *
570
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway-bot}
571
+ * @param options - The options for fetching the gateway information
572
+ */
573
+ getBot({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGatewayBotInfo>;
574
+ }
575
+
576
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
577
+ file: RawFile;
578
+ }
526
579
  declare class GuildsAPI {
527
580
  private readonly rest;
528
581
  constructor(rest: REST);
@@ -590,7 +643,7 @@ declare class GuildsAPI {
590
643
  */
591
644
  addMember(guildId: Snowflake, userId: Snowflake, body: RESTPutAPIGuildMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIGuildMemberResult>;
592
645
  /**
593
- * Fetches all the members of a guild
646
+ * Fetches members of a guild.
594
647
  *
595
648
  * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
596
649
  * @param guildId - The id of the guild
@@ -1026,9 +1079,7 @@ declare class GuildsAPI {
1026
1079
  * @param body - The data for creating the sticker
1027
1080
  * @param options - The options for creating the sticker
1028
1081
  */
1029
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1030
- file: RawFile;
1031
- }, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1082
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1032
1083
  /**
1033
1084
  * Edits a sticker for a guild
1034
1085
  *
@@ -1210,8 +1261,69 @@ declare class GuildsAPI {
1210
1261
  * @param options - The options for editing the guild onboarding
1211
1262
  */
1212
1263
  editOnboarding(guildId: Snowflake, body: RESTPutAPIGuildOnboardingJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildOnboarding>;
1264
+ /**
1265
+ * Fetches all the soundboard sounds for a guild
1266
+ *
1267
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#list-guild-soundboard-sounds}
1268
+ * @param guildId - The id of the guild to fetch the soundboard sounds for
1269
+ * @param options - The options for fetching the soundboard sounds
1270
+ */
1271
+ getSoundboardSounds(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildSoundboardSoundsResult>;
1272
+ /**
1273
+ * Fetches a soundboard sound for a guild
1274
+ *
1275
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound}
1276
+ * @param guildId - The id of the guild to fetch the soundboard sound for
1277
+ * @param soundId - The id of the soundboard sound to fetch
1278
+ * @param options - The options for fetching the soundboard sound
1279
+ */
1280
+ getSoundboardSound(guildId: Snowflake, soundId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1281
+ /**
1282
+ * Creates a new soundboard sound for a guild
1283
+ *
1284
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound}
1285
+ * @param guildId - The id of the guild to create the soundboard sound for
1286
+ * @param body - The data for creating the soundboard sound
1287
+ * @param options - The options for creating the soundboard sound
1288
+ */
1289
+ createSoundboardSound(guildId: Snowflake, body: RESTPostAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1290
+ /**
1291
+ * Edits a soundboard sound for a guild
1292
+ *
1293
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound}
1294
+ * @param guildId - The id of the guild to edit the soundboard sound for
1295
+ * @param soundId - The id of the soundboard sound to edit
1296
+ * @param body - The data for editing the soundboard sound
1297
+ * @param options - The options for editing the soundboard sound
1298
+ */
1299
+ editSoundboardSound(guildId: Snowflake, soundId: Snowflake, body: RESTPatchAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1300
+ /**
1301
+ * Deletes a soundboard sound for a guild
1302
+ *
1303
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound}
1304
+ * @param guildId - The id of the guild to delete the soundboard sound for
1305
+ * @param soundId - The id of the soundboard sound to delete
1306
+ * @param options - The options for deleting the soundboard sound
1307
+ */
1308
+ deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1309
+ /**
1310
+ * Modifies incident actions for a guild.
1311
+ *
1312
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-incident-actions}
1313
+ * @param guildId - The id of the guild
1314
+ * @param body - The data for modifying guild incident actions
1315
+ * @param options - The options for modifying guild incident actions
1316
+ */
1317
+ editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
1213
1318
  }
1214
1319
 
1320
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1321
+ files?: RawFile[];
1322
+ };
1323
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1324
+ files?: RawFile[];
1325
+ thread_id?: string;
1326
+ };
1215
1327
  declare class WebhooksAPI {
1216
1328
  private readonly rest;
1217
1329
  constructor(rest: REST);
@@ -1258,8 +1370,7 @@ declare class WebhooksAPI {
1258
1370
  * @param body - The data for executing the webhook
1259
1371
  * @param options - The options for executing the webhook
1260
1372
  */
1261
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1262
- files?: RawFile[];
1373
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1263
1374
  wait: true;
1264
1375
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1265
1376
  /**
@@ -1271,8 +1382,7 @@ declare class WebhooksAPI {
1271
1382
  * @param body - The data for executing the webhook
1272
1383
  * @param options - The options for executing the webhook
1273
1384
  */
1274
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1275
- files?: RawFile[];
1385
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1276
1386
  wait?: false;
1277
1387
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1278
1388
  /**
@@ -1318,9 +1428,7 @@ declare class WebhooksAPI {
1318
1428
  * @param body - The data for editing the message
1319
1429
  * @param options - The options for editing the message
1320
1430
  */
1321
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1322
- files?: RawFile[];
1323
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1431
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1324
1432
  /**
1325
1433
  * Deletes an associated message from a webhook
1326
1434
  *
@@ -1336,10 +1444,37 @@ declare class WebhooksAPI {
1336
1444
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1337
1445
  }
1338
1446
 
1447
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1448
+ files?: RawFile[];
1449
+ }
1450
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1451
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1452
+ files?: RawFile[];
1453
+ };
1454
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1455
+ files?: RawFile[];
1456
+ };
1457
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1458
+ files?: RawFile[];
1459
+ };
1460
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1461
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1339
1462
  declare class InteractionsAPI {
1340
1463
  private readonly rest;
1341
1464
  private readonly webhooks;
1342
1465
  constructor(rest: REST, webhooks: WebhooksAPI);
1466
+ /**
1467
+ * Replies to an interaction and returns an interaction callback object
1468
+ *
1469
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1470
+ * @param interactionId - The id of the interaction
1471
+ * @param interactionToken - The token of the interaction
1472
+ * @param body - The callback data for replying
1473
+ * @param options - The options for replying
1474
+ */
1475
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1476
+ with_response: true;
1477
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1343
1478
  /**
1344
1479
  * Replies to an interaction
1345
1480
  *
@@ -1349,28 +1484,87 @@ declare class InteractionsAPI {
1349
1484
  * @param body - The callback data for replying
1350
1485
  * @param options - The options for replying
1351
1486
  */
1352
- reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1353
- files?: RawFile[];
1354
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1487
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1488
+ with_response?: false;
1489
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1490
+ /**
1491
+ * Replies to an interaction
1492
+ *
1493
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1494
+ * @param interactionId - The id of the interaction
1495
+ * @param interactionToken - The token of the interaction
1496
+ * @param body - The callback data for replying
1497
+ * @param options - The options for replying
1498
+ */
1499
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1500
+ /**
1501
+ * Defers the reply to an interaction and returns an interaction callback object
1502
+ *
1503
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1504
+ * @param interactionId - The id of the interaction
1505
+ * @param interactionToken - The token of the interaction
1506
+ * @param body - The callback data for deferring the reply
1507
+ * @param options - The options for deferring
1508
+ */
1509
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1510
+ with_response: true;
1511
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1355
1512
  /**
1356
1513
  * Defers the reply to an interaction
1357
1514
  *
1358
1515
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1359
1516
  * @param interactionId - The id of the interaction
1360
1517
  * @param interactionToken - The token of the interaction
1361
- * @param data - The data for deferring the reply
1518
+ * @param body - The callback data for deferring the reply
1362
1519
  * @param options - The options for deferring
1363
1520
  */
1364
- defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1521
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1522
+ with_response?: false;
1523
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1524
+ /**
1525
+ * Defers the reply to an interaction
1526
+ *
1527
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1528
+ * @param interactionId - The id of the interaction
1529
+ * @param interactionToken - The token of the interaction
1530
+ * @param body - The callback data for deferring the reply
1531
+ * @param options - The options for deferring
1532
+ */
1533
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1534
+ /**
1535
+ * Defers an update from a message component interaction and returns an interaction callback object
1536
+ *
1537
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1538
+ * @param interactionId - The id of the interaction
1539
+ * @param interactionToken - The token of the interaction
1540
+ * @param body - The callback data for deferring the update
1541
+ * @param options - The options for deferring
1542
+ */
1543
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
1544
+ with_response: true;
1545
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1365
1546
  /**
1366
1547
  * Defers an update from a message component interaction
1367
1548
  *
1368
1549
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1369
1550
  * @param interactionId - The id of the interaction
1370
1551
  * @param interactionToken - The token of the interaction
1552
+ * @param body - The callback data for deferring the update
1371
1553
  * @param options - The options for deferring
1372
1554
  */
1373
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1555
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1556
+ with_response?: false;
1557
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1558
+ /**
1559
+ * Defers an update from a message component interaction
1560
+ *
1561
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1562
+ * @param interactionId - The id of the interaction
1563
+ * @param interactionToken - The token of the interaction
1564
+ * @param body - The callback data for deferring the update
1565
+ * @param options - The options for deferring
1566
+ */
1567
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1374
1568
  /**
1375
1569
  * Reply to a deferred interaction
1376
1570
  *
@@ -1380,9 +1574,7 @@ declare class InteractionsAPI {
1380
1574
  * @param body - The callback data for replying
1381
1575
  * @param options - The options for replying
1382
1576
  */
1383
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1384
- files?: RawFile[];
1385
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1577
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1386
1578
  /**
1387
1579
  * Edits the initial reply to an interaction
1388
1580
  *
@@ -1394,9 +1586,7 @@ declare class InteractionsAPI {
1394
1586
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1395
1587
  * @param options - The options for editing the reply
1396
1588
  */
1397
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1398
- files?: RawFile[];
1399
- }, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1589
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1400
1590
  /**
1401
1591
  * Fetches the initial reply to an interaction
1402
1592
  *
@@ -1417,6 +1607,18 @@ declare class InteractionsAPI {
1417
1607
  * @param options - The options for deleting the reply
1418
1608
  */
1419
1609
  deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1610
+ /**
1611
+ * Updates the message the component interaction was triggered on and returns an interaction callback object
1612
+ *
1613
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1614
+ * @param interactionId - The id of the interaction
1615
+ * @param interactionToken - The token of the interaction
1616
+ * @param callbackData - The callback data for updating the interaction
1617
+ * @param options - The options for updating the interaction
1618
+ */
1619
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1620
+ with_response: true;
1621
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1420
1622
  /**
1421
1623
  * Updates the message the component interaction was triggered on
1422
1624
  *
@@ -1426,9 +1628,31 @@ declare class InteractionsAPI {
1426
1628
  * @param callbackData - The callback data for updating the interaction
1427
1629
  * @param options - The options for updating the interaction
1428
1630
  */
1429
- updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1430
- files?: RawFile[];
1431
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1631
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1632
+ with_response?: false;
1633
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1634
+ /**
1635
+ * Updates the message the component interaction was triggered on
1636
+ *
1637
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1638
+ * @param interactionId - The id of the interaction
1639
+ * @param interactionToken - The token of the interaction
1640
+ * @param callbackData - The callback data for updating the interaction
1641
+ * @param options - The options for updating the interaction
1642
+ */
1643
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1644
+ /**
1645
+ * Sends an autocomplete response to an interaction and returns an interaction callback object
1646
+ *
1647
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1648
+ * @param interactionId - The id of the interaction
1649
+ * @param interactionToken - The token of the interaction
1650
+ * @param callbackData - The callback data for the autocomplete response
1651
+ * @param options - The options for sending the autocomplete response
1652
+ */
1653
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1654
+ with_response: true;
1655
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1432
1656
  /**
1433
1657
  * Sends an autocomplete response to an interaction
1434
1658
  *
@@ -1438,7 +1662,43 @@ declare class InteractionsAPI {
1438
1662
  * @param callbackData - The callback data for the autocomplete response
1439
1663
  * @param options - The options for sending the autocomplete response
1440
1664
  */
1441
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1665
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1666
+ with_response?: false;
1667
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1668
+ /**
1669
+ * Sends an autocomplete response to an interaction
1670
+ *
1671
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1672
+ * @param interactionId - The id of the interaction
1673
+ * @param interactionToken - The token of the interaction
1674
+ * @param callbackData - The callback data for the autocomplete response
1675
+ * @param options - The options for sending the autocomplete response
1676
+ */
1677
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1678
+ /**
1679
+ * Sends a modal response to an interaction and returns an interaction callback object
1680
+ *
1681
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1682
+ * @param interactionId - The id of the interaction
1683
+ * @param interactionToken - The token of the interaction
1684
+ * @param callbackData - The modal callback data to send
1685
+ * @param options - The options for sending the modal
1686
+ */
1687
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1688
+ with_response: true;
1689
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1690
+ /**
1691
+ * Sends a modal response to an interaction
1692
+ *
1693
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1694
+ * @param interactionId - The id of the interaction
1695
+ * @param interactionToken - The token of the interaction
1696
+ * @param callbackData - The modal callback data to send
1697
+ * @param options - The options for sending the modal
1698
+ */
1699
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1700
+ with_response?: false;
1701
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1442
1702
  /**
1443
1703
  * Sends a modal response to an interaction
1444
1704
  *
@@ -1448,9 +1708,9 @@ declare class InteractionsAPI {
1448
1708
  * @param callbackData - The modal callback data to send
1449
1709
  * @param options - The options for sending the modal
1450
1710
  */
1451
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1711
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1452
1712
  /**
1453
- * Sends a premium required response to an interaction
1713
+ * Launches an activity and returns an interaction callback object
1454
1714
  *
1455
1715
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1456
1716
  * @param interactionId - The id of the interaction
@@ -1459,6 +1719,40 @@ declare class InteractionsAPI {
1459
1719
  * @deprecated Sending a premium-style button is the new Discord behavior.
1460
1720
  */
1461
1721
  sendPremiumRequired(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1722
+ /**
1723
+ * Launches an activity and returns an interaction callback object
1724
+ *
1725
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1726
+ * @param interactionId - The id of the interaction
1727
+ * @param interactionToken - The token of the interaction
1728
+ * @param body - The callback data for launching the activity
1729
+ * @param options - The options for launching the activity
1730
+ */
1731
+ launchActivity(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
1732
+ with_response: true;
1733
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1734
+ /**
1735
+ * Launches an activity
1736
+ *
1737
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1738
+ * @param interactionId - The id of the interaction
1739
+ * @param interactionToken - The token of the interaction
1740
+ * @param body - The callback data for launching the activity
1741
+ * @param options - The options for launching the activity
1742
+ */
1743
+ launchActivity(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1744
+ with_response?: false;
1745
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1746
+ /**
1747
+ * Launches an activity
1748
+ *
1749
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1750
+ * @param interactionId - The id of the interaction
1751
+ * @param interactionToken - The token of the interaction
1752
+ * @param body - The callback data for launching the activity
1753
+ * @param options - The options for launching the activity
1754
+ */
1755
+ launchActivity(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1462
1756
  }
1463
1757
 
1464
1758
  declare class InvitesAPI {
@@ -1489,23 +1783,51 @@ declare class MonetizationAPI {
1489
1783
  /**
1490
1784
  * Fetches the SKUs for an application.
1491
1785
  *
1492
- * @see {@link https://discord.com/developers/docs/monetization/skus#list-skus}
1786
+ * @see {@link https://discord.com/developers/docs/resources/sku#list-skus}
1787
+ * @param applicationId - The application id to fetch SKUs for
1493
1788
  * @param options - The options for fetching the SKUs.
1494
1789
  */
1495
1790
  getSKUs(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUsResult>;
1791
+ /**
1792
+ * Fetches subscriptions for an SKU.
1793
+ *
1794
+ * @see {@link https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions}
1795
+ * @param skuId - The SKU id to fetch subscriptions for
1796
+ * @param query - The query options for fetching subscriptions
1797
+ * @param options - The options for fetching subscriptions
1798
+ */
1799
+ getSKUSubscriptions(skuId: Snowflake, query?: RESTGetAPISKUSubscriptionsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUSubscriptionsResult>;
1800
+ /**
1801
+ * Fetches a subscription for an SKU.
1802
+ *
1803
+ * @see {@link https://discord.com/developers/docs/resources/subscription#get-sku-subscription}
1804
+ * @param skuId - The SKU id to fetch subscription for
1805
+ * @param subscriptionId - The subscription id to fetch
1806
+ * @param options - The options for fetching the subscription
1807
+ */
1808
+ getSKUSubscription(skuId: Snowflake, subscriptionId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISubscription>;
1496
1809
  /**
1497
1810
  * Fetches the entitlements for an application.
1498
1811
  *
1499
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
1812
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
1500
1813
  * @param applicationId - The application id to fetch entitlements for
1501
1814
  * @param query - The query options for fetching entitlements
1502
1815
  * @param options - The options for fetching entitlements
1503
1816
  */
1504
- getEntitlements(applicationId: Snowflake, query: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1817
+ getEntitlements(applicationId: Snowflake, query?: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1818
+ /**
1819
+ * Fetches an entitlement for an application.
1820
+ *
1821
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
1822
+ * @param applicationId - The application id to fetch the entitlement for
1823
+ * @param entitlementId - The entitlement id to fetch
1824
+ * @param options - The options for fetching the entitlement
1825
+ */
1826
+ getEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEntitlement>;
1505
1827
  /**
1506
1828
  * Creates a test entitlement for an application's SKU.
1507
1829
  *
1508
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement}
1830
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement}
1509
1831
  * @param applicationId - The application id to create the entitlement for
1510
1832
  * @param body - The data for creating the entitlement
1511
1833
  * @param options - The options for creating the entitlement
@@ -1514,7 +1836,7 @@ declare class MonetizationAPI {
1514
1836
  /**
1515
1837
  * Deletes a test entitlement for an application's SKU.
1516
1838
  *
1517
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement}
1839
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement}
1518
1840
  * @param applicationId - The application id to delete the entitlement for
1519
1841
  * @param entitlementId - The entitlement id to delete
1520
1842
  * @param options - The options for deleting the entitlement
@@ -1523,7 +1845,7 @@ declare class MonetizationAPI {
1523
1845
  /**
1524
1846
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1525
1847
  *
1526
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement}
1848
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement}
1527
1849
  * @param applicationId - The application id to consume the entitlement for
1528
1850
  * @param entitlementId - The entitlement id to consume
1529
1851
  * @param options - The options for consuming the entitlement
@@ -1606,7 +1928,7 @@ declare class PollAPI {
1606
1928
  * @param query - The query for getting the list of voters
1607
1929
  * @param options - The options for getting the list of voters
1608
1930
  */
1609
- getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query: RESTGetAPIPollAnswerVotersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIPollAnswerVotersResult>;
1931
+ getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query?: RESTGetAPIPollAnswerVotersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIPollAnswerVotersResult>;
1610
1932
  /**
1611
1933
  * Immediately expires (i.e. ends) a poll
1612
1934
  *
@@ -1640,6 +1962,18 @@ declare class RoleConnectionsAPI {
1640
1962
  updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
1641
1963
  }
1642
1964
 
1965
+ declare class SoundboardSoundsAPI {
1966
+ private readonly rest;
1967
+ constructor(rest: REST);
1968
+ /**
1969
+ * Fetches all the soundboard default sounds.
1970
+ *
1971
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds}
1972
+ * @param options - The options for fetching the soundboard default sounds.
1973
+ */
1974
+ getSoundboardDefaultSounds({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISoundboardDefaultSoundsResult>;
1975
+ }
1976
+
1643
1977
  declare class StageInstancesAPI {
1644
1978
  private readonly rest;
1645
1979
  constructor(rest: REST);
@@ -1913,6 +2247,7 @@ declare class API {
1913
2247
  readonly applicationCommands: ApplicationCommandsAPI;
1914
2248
  readonly applications: ApplicationsAPI;
1915
2249
  readonly channels: ChannelsAPI;
2250
+ readonly gateway: GatewayAPI;
1916
2251
  readonly guilds: GuildsAPI;
1917
2252
  readonly interactions: InteractionsAPI;
1918
2253
  readonly invites: InvitesAPI;
@@ -1920,6 +2255,7 @@ declare class API {
1920
2255
  readonly oauth2: OAuth2API;
1921
2256
  readonly poll: PollAPI;
1922
2257
  readonly roleConnections: RoleConnectionsAPI;
2258
+ readonly soundboardSounds: SoundboardSoundsAPI;
1923
2259
  readonly stageInstances: StageInstancesAPI;
1924
2260
  readonly stickers: StickersAPI;
1925
2261
  readonly threads: ThreadsAPI;
@@ -1991,6 +2327,11 @@ interface MappedEvents {
1991
2327
  [GatewayDispatchEvents.GuildScheduledEventUserRemove]: [
1992
2328
  ToEventProps<GatewayGuildScheduledEventUserRemoveDispatchData>
1993
2329
  ];
2330
+ [GatewayDispatchEvents.GuildSoundboardSoundCreate]: [ToEventProps<GatewayGuildSoundboardSoundCreateDispatch>];
2331
+ [GatewayDispatchEvents.GuildSoundboardSoundDelete]: [ToEventProps<GatewayGuildSoundboardSoundDeleteDispatch>];
2332
+ [GatewayDispatchEvents.GuildSoundboardSoundUpdate]: [ToEventProps<GatewayGuildSoundboardSoundUpdateDispatch>];
2333
+ [GatewayDispatchEvents.GuildSoundboardSoundsUpdate]: [ToEventProps<GatewayGuildSoundboardSoundsUpdateDispatch>];
2334
+ [GatewayDispatchEvents.SoundboardSounds]: [ToEventProps<GatewaySoundboardSoundsDispatchData>];
1994
2335
  [GatewayDispatchEvents.GuildStickersUpdate]: [ToEventProps<GatewayGuildStickersUpdateDispatchData>];
1995
2336
  [GatewayDispatchEvents.GuildUpdate]: [ToEventProps<GatewayGuildUpdateDispatchData>];
1996
2337
  [GatewayDispatchEvents.IntegrationCreate]: [ToEventProps<GatewayIntegrationCreateDispatchData>];
@@ -2010,11 +2351,15 @@ interface MappedEvents {
2010
2351
  [GatewayDispatchEvents.MessageReactionRemoveEmoji]: [ToEventProps<GatewayMessageReactionRemoveEmojiDispatchData>];
2011
2352
  [GatewayDispatchEvents.MessageUpdate]: [ToEventProps<GatewayMessageUpdateDispatchData>];
2012
2353
  [GatewayDispatchEvents.PresenceUpdate]: [ToEventProps<GatewayPresenceUpdateDispatchData>];
2354
+ [GatewayDispatchEvents.RateLimited]: [ToEventProps<GatewayRateLimitedDispatchData>];
2013
2355
  [GatewayDispatchEvents.Ready]: [ToEventProps<GatewayReadyDispatchData>];
2014
2356
  [GatewayDispatchEvents.Resumed]: [ToEventProps<never>];
2015
2357
  [GatewayDispatchEvents.StageInstanceCreate]: [ToEventProps<GatewayStageInstanceCreateDispatchData>];
2016
2358
  [GatewayDispatchEvents.StageInstanceDelete]: [ToEventProps<GatewayStageInstanceDeleteDispatchData>];
2017
2359
  [GatewayDispatchEvents.StageInstanceUpdate]: [ToEventProps<GatewayStageInstanceUpdateDispatchData>];
2360
+ [GatewayDispatchEvents.SubscriptionCreate]: [ToEventProps<GatewaySubscriptionCreateDispatchData>];
2361
+ [GatewayDispatchEvents.SubscriptionDelete]: [ToEventProps<GatewaySubscriptionDeleteDispatchData>];
2362
+ [GatewayDispatchEvents.SubscriptionUpdate]: [ToEventProps<GatewaySubscriptionUpdateDispatchData>];
2018
2363
  [GatewayDispatchEvents.ThreadCreate]: [ToEventProps<GatewayThreadCreateDispatchData>];
2019
2364
  [GatewayDispatchEvents.ThreadDelete]: [ToEventProps<GatewayThreadDeleteDispatchData>];
2020
2365
  [GatewayDispatchEvents.ThreadListSync]: [ToEventProps<GatewayThreadListSyncDispatchData>];
@@ -2084,6 +2429,41 @@ declare class Client extends AsyncEventEmitter<MappedEvents> {
2084
2429
  notFound: unknown[];
2085
2430
  presences: discord_api_types_v10.GatewayGuildMembersChunkPresence[];
2086
2431
  }>;
2432
+ /**
2433
+ * Requests soundboard sounds from the gateway and returns an async iterator that yields the data from each soundboard sounds event.
2434
+ *
2435
+ * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
2436
+ * @param options - The options for the request
2437
+ * @param timeout - The timeout for waiting for each soundboard sounds
2438
+ * @example
2439
+ * Requesting soundboard sounds for specific guilds
2440
+ * ```ts
2441
+ * for await (const { guildId, soundboardSounds } of this.requestSoundboardSoundsIterator({
2442
+ * guild_ids: ['1234567890', '9876543210'],
2443
+ * })) {
2444
+ * console.log(`Soundboard sounds for guild ${guildId}:`, soundboardSounds);
2445
+ * }
2446
+ * ```
2447
+ */
2448
+ requestSoundboardSoundsIterator(options: GatewayRequestSoundboardSoundsData, timeout?: number): AsyncGenerator<{
2449
+ guildId: string;
2450
+ soundboardSounds: discord_api_types_v10.APISoundboardSound[];
2451
+ }, void, unknown>;
2452
+ /**
2453
+ * Requests soundboard sounds from the gateway.
2454
+ *
2455
+ * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
2456
+ * @param options - The options for the request
2457
+ * @param timeout - The timeout for waiting for each soundboard sounds event
2458
+ * @example
2459
+ * Requesting soundboard sounds for specific guilds
2460
+ * ```ts
2461
+ * const soundboardSounds = await client.requestSoundboardSounds({ guild_ids: ['1234567890', '9876543210'], });
2462
+ *
2463
+ * console.log(soundboardSounds.get('1234567890'));
2464
+ * ```
2465
+ */
2466
+ requestSoundboardSounds(options: GatewayRequestSoundboardSoundsData, timeout?: number): Promise<Map<string, discord_api_types_v10.APISoundboardSound[]>>;
2087
2467
  /**
2088
2468
  * Updates the voice state of the bot user
2089
2469
  *
@@ -2138,4 +2518,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2138
2518
  */
2139
2519
  declare const version: string;
2140
2520
 
2141
- 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, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
2521
+ 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, GatewayAPI, 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 };