@discordjs/core 2.3.0 → 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.ts 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, RESTPutAPIChannelRecipientJSONBody, 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, RESTPutAPIGuildIncidentActionsJSONBody, 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,6 +524,15 @@ 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>;
524
536
  /**
525
537
  * Adds a recipient to a group DM channel
526
538
  *
@@ -561,6 +573,9 @@ declare class GatewayAPI {
561
573
  getBot({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGatewayBotInfo>;
562
574
  }
563
575
 
576
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
577
+ file: RawFile;
578
+ }
564
579
  declare class GuildsAPI {
565
580
  private readonly rest;
566
581
  constructor(rest: REST);
@@ -628,7 +643,7 @@ declare class GuildsAPI {
628
643
  */
629
644
  addMember(guildId: Snowflake, userId: Snowflake, body: RESTPutAPIGuildMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIGuildMemberResult>;
630
645
  /**
631
- * Fetches all the members of a guild
646
+ * Fetches members of a guild.
632
647
  *
633
648
  * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
634
649
  * @param guildId - The id of the guild
@@ -1064,9 +1079,7 @@ declare class GuildsAPI {
1064
1079
  * @param body - The data for creating the sticker
1065
1080
  * @param options - The options for creating the sticker
1066
1081
  */
1067
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1068
- file: RawFile;
1069
- }, { 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>;
1070
1083
  /**
1071
1084
  * Edits a sticker for a guild
1072
1085
  *
@@ -1248,6 +1261,51 @@ declare class GuildsAPI {
1248
1261
  * @param options - The options for editing the guild onboarding
1249
1262
  */
1250
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>;
1251
1309
  /**
1252
1310
  * Modifies incident actions for a guild.
1253
1311
  *
@@ -1259,6 +1317,13 @@ declare class GuildsAPI {
1259
1317
  editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
1260
1318
  }
1261
1319
 
1320
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1321
+ files?: RawFile[];
1322
+ };
1323
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1324
+ files?: RawFile[];
1325
+ thread_id?: string;
1326
+ };
1262
1327
  declare class WebhooksAPI {
1263
1328
  private readonly rest;
1264
1329
  constructor(rest: REST);
@@ -1305,8 +1370,7 @@ declare class WebhooksAPI {
1305
1370
  * @param body - The data for executing the webhook
1306
1371
  * @param options - The options for executing the webhook
1307
1372
  */
1308
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1309
- files?: RawFile[];
1373
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1310
1374
  wait: true;
1311
1375
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1312
1376
  /**
@@ -1318,8 +1382,7 @@ declare class WebhooksAPI {
1318
1382
  * @param body - The data for executing the webhook
1319
1383
  * @param options - The options for executing the webhook
1320
1384
  */
1321
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1322
- files?: RawFile[];
1385
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1323
1386
  wait?: false;
1324
1387
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1325
1388
  /**
@@ -1365,9 +1428,7 @@ declare class WebhooksAPI {
1365
1428
  * @param body - The data for editing the message
1366
1429
  * @param options - The options for editing the message
1367
1430
  */
1368
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1369
- files?: RawFile[];
1370
- }, { 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>;
1371
1432
  /**
1372
1433
  * Deletes an associated message from a webhook
1373
1434
  *
@@ -1383,10 +1444,37 @@ declare class WebhooksAPI {
1383
1444
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1384
1445
  }
1385
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;
1386
1462
  declare class InteractionsAPI {
1387
1463
  private readonly rest;
1388
1464
  private readonly webhooks;
1389
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>;
1390
1478
  /**
1391
1479
  * Replies to an interaction
1392
1480
  *
@@ -1396,28 +1484,87 @@ declare class InteractionsAPI {
1396
1484
  * @param body - The callback data for replying
1397
1485
  * @param options - The options for replying
1398
1486
  */
1399
- reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1400
- files?: RawFile[];
1401
- }, { 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>;
1512
+ /**
1513
+ * Defers the reply to an interaction
1514
+ *
1515
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1516
+ * @param interactionId - The id of the interaction
1517
+ * @param interactionToken - The token of the interaction
1518
+ * @param body - The callback data for deferring the reply
1519
+ * @param options - The options for deferring
1520
+ */
1521
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1522
+ with_response?: false;
1523
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1402
1524
  /**
1403
1525
  * Defers the reply to an interaction
1404
1526
  *
1405
1527
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1406
1528
  * @param interactionId - The id of the interaction
1407
1529
  * @param interactionToken - The token of the interaction
1408
- * @param data - The data for deferring the reply
1530
+ * @param body - The callback data for deferring the reply
1409
1531
  * @param options - The options for deferring
1410
1532
  */
1411
- defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
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>;
1546
+ /**
1547
+ * Defers an update from a message component interaction
1548
+ *
1549
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1550
+ * @param interactionId - The id of the interaction
1551
+ * @param interactionToken - The token of the interaction
1552
+ * @param body - The callback data for deferring the update
1553
+ * @param options - The options for deferring
1554
+ */
1555
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1556
+ with_response?: false;
1557
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1412
1558
  /**
1413
1559
  * Defers an update from a message component interaction
1414
1560
  *
1415
1561
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1416
1562
  * @param interactionId - The id of the interaction
1417
1563
  * @param interactionToken - The token of the interaction
1564
+ * @param body - The callback data for deferring the update
1418
1565
  * @param options - The options for deferring
1419
1566
  */
1420
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1567
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1421
1568
  /**
1422
1569
  * Reply to a deferred interaction
1423
1570
  *
@@ -1427,9 +1574,7 @@ declare class InteractionsAPI {
1427
1574
  * @param body - The callback data for replying
1428
1575
  * @param options - The options for replying
1429
1576
  */
1430
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1431
- files?: RawFile[];
1432
- }, { 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>;
1433
1578
  /**
1434
1579
  * Edits the initial reply to an interaction
1435
1580
  *
@@ -1441,9 +1586,7 @@ declare class InteractionsAPI {
1441
1586
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1442
1587
  * @param options - The options for editing the reply
1443
1588
  */
1444
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1445
- files?: RawFile[];
1446
- }, 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>;
1447
1590
  /**
1448
1591
  * Fetches the initial reply to an interaction
1449
1592
  *
@@ -1464,6 +1607,18 @@ declare class InteractionsAPI {
1464
1607
  * @param options - The options for deleting the reply
1465
1608
  */
1466
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>;
1467
1622
  /**
1468
1623
  * Updates the message the component interaction was triggered on
1469
1624
  *
@@ -1473,9 +1628,31 @@ declare class InteractionsAPI {
1473
1628
  * @param callbackData - The callback data for updating the interaction
1474
1629
  * @param options - The options for updating the interaction
1475
1630
  */
1476
- updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1477
- files?: RawFile[];
1478
- }, { 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>;
1479
1656
  /**
1480
1657
  * Sends an autocomplete response to an interaction
1481
1658
  *
@@ -1485,7 +1662,31 @@ declare class InteractionsAPI {
1485
1662
  * @param callbackData - The callback data for the autocomplete response
1486
1663
  * @param options - The options for sending the autocomplete response
1487
1664
  */
1488
- 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>;
1489
1690
  /**
1490
1691
  * Sends a modal response to an interaction
1491
1692
  *
@@ -1495,9 +1696,21 @@ declare class InteractionsAPI {
1495
1696
  * @param callbackData - The modal callback data to send
1496
1697
  * @param options - The options for sending the modal
1497
1698
  */
1498
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1699
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1700
+ with_response?: false;
1701
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1499
1702
  /**
1500
- * Sends a premium required response to an interaction
1703
+ * Sends a modal response to an interaction
1704
+ *
1705
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1706
+ * @param interactionId - The id of the interaction
1707
+ * @param interactionToken - The token of the interaction
1708
+ * @param callbackData - The modal callback data to send
1709
+ * @param options - The options for sending the modal
1710
+ */
1711
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1712
+ /**
1713
+ * Launches an activity and returns an interaction callback object
1501
1714
  *
1502
1715
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1503
1716
  * @param interactionId - The id of the interaction
@@ -1506,6 +1719,40 @@ declare class InteractionsAPI {
1506
1719
  * @deprecated Sending a premium-style button is the new Discord behavior.
1507
1720
  */
1508
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>;
1509
1756
  }
1510
1757
 
1511
1758
  declare class InvitesAPI {
@@ -1536,23 +1783,51 @@ declare class MonetizationAPI {
1536
1783
  /**
1537
1784
  * Fetches the SKUs for an application.
1538
1785
  *
1539
- * @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
1540
1788
  * @param options - The options for fetching the SKUs.
1541
1789
  */
1542
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>;
1543
1809
  /**
1544
1810
  * Fetches the entitlements for an application.
1545
1811
  *
1546
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
1812
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
1547
1813
  * @param applicationId - The application id to fetch entitlements for
1548
1814
  * @param query - The query options for fetching entitlements
1549
1815
  * @param options - The options for fetching entitlements
1550
1816
  */
1551
- 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>;
1552
1827
  /**
1553
1828
  * Creates a test entitlement for an application's SKU.
1554
1829
  *
1555
- * @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}
1556
1831
  * @param applicationId - The application id to create the entitlement for
1557
1832
  * @param body - The data for creating the entitlement
1558
1833
  * @param options - The options for creating the entitlement
@@ -1561,7 +1836,7 @@ declare class MonetizationAPI {
1561
1836
  /**
1562
1837
  * Deletes a test entitlement for an application's SKU.
1563
1838
  *
1564
- * @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}
1565
1840
  * @param applicationId - The application id to delete the entitlement for
1566
1841
  * @param entitlementId - The entitlement id to delete
1567
1842
  * @param options - The options for deleting the entitlement
@@ -1570,7 +1845,7 @@ declare class MonetizationAPI {
1570
1845
  /**
1571
1846
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1572
1847
  *
1573
- * @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}
1574
1849
  * @param applicationId - The application id to consume the entitlement for
1575
1850
  * @param entitlementId - The entitlement id to consume
1576
1851
  * @param options - The options for consuming the entitlement
@@ -1653,7 +1928,7 @@ declare class PollAPI {
1653
1928
  * @param query - The query for getting the list of voters
1654
1929
  * @param options - The options for getting the list of voters
1655
1930
  */
1656
- 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>;
1657
1932
  /**
1658
1933
  * Immediately expires (i.e. ends) a poll
1659
1934
  *
@@ -1687,6 +1962,18 @@ declare class RoleConnectionsAPI {
1687
1962
  updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
1688
1963
  }
1689
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
+
1690
1977
  declare class StageInstancesAPI {
1691
1978
  private readonly rest;
1692
1979
  constructor(rest: REST);
@@ -1968,6 +2255,7 @@ declare class API {
1968
2255
  readonly oauth2: OAuth2API;
1969
2256
  readonly poll: PollAPI;
1970
2257
  readonly roleConnections: RoleConnectionsAPI;
2258
+ readonly soundboardSounds: SoundboardSoundsAPI;
1971
2259
  readonly stageInstances: StageInstancesAPI;
1972
2260
  readonly stickers: StickersAPI;
1973
2261
  readonly threads: ThreadsAPI;
@@ -2039,6 +2327,11 @@ interface MappedEvents {
2039
2327
  [GatewayDispatchEvents.GuildScheduledEventUserRemove]: [
2040
2328
  ToEventProps<GatewayGuildScheduledEventUserRemoveDispatchData>
2041
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>];
2042
2335
  [GatewayDispatchEvents.GuildStickersUpdate]: [ToEventProps<GatewayGuildStickersUpdateDispatchData>];
2043
2336
  [GatewayDispatchEvents.GuildUpdate]: [ToEventProps<GatewayGuildUpdateDispatchData>];
2044
2337
  [GatewayDispatchEvents.IntegrationCreate]: [ToEventProps<GatewayIntegrationCreateDispatchData>];
@@ -2058,11 +2351,15 @@ interface MappedEvents {
2058
2351
  [GatewayDispatchEvents.MessageReactionRemoveEmoji]: [ToEventProps<GatewayMessageReactionRemoveEmojiDispatchData>];
2059
2352
  [GatewayDispatchEvents.MessageUpdate]: [ToEventProps<GatewayMessageUpdateDispatchData>];
2060
2353
  [GatewayDispatchEvents.PresenceUpdate]: [ToEventProps<GatewayPresenceUpdateDispatchData>];
2354
+ [GatewayDispatchEvents.RateLimited]: [ToEventProps<GatewayRateLimitedDispatchData>];
2061
2355
  [GatewayDispatchEvents.Ready]: [ToEventProps<GatewayReadyDispatchData>];
2062
2356
  [GatewayDispatchEvents.Resumed]: [ToEventProps<never>];
2063
2357
  [GatewayDispatchEvents.StageInstanceCreate]: [ToEventProps<GatewayStageInstanceCreateDispatchData>];
2064
2358
  [GatewayDispatchEvents.StageInstanceDelete]: [ToEventProps<GatewayStageInstanceDeleteDispatchData>];
2065
2359
  [GatewayDispatchEvents.StageInstanceUpdate]: [ToEventProps<GatewayStageInstanceUpdateDispatchData>];
2360
+ [GatewayDispatchEvents.SubscriptionCreate]: [ToEventProps<GatewaySubscriptionCreateDispatchData>];
2361
+ [GatewayDispatchEvents.SubscriptionDelete]: [ToEventProps<GatewaySubscriptionDeleteDispatchData>];
2362
+ [GatewayDispatchEvents.SubscriptionUpdate]: [ToEventProps<GatewaySubscriptionUpdateDispatchData>];
2066
2363
  [GatewayDispatchEvents.ThreadCreate]: [ToEventProps<GatewayThreadCreateDispatchData>];
2067
2364
  [GatewayDispatchEvents.ThreadDelete]: [ToEventProps<GatewayThreadDeleteDispatchData>];
2068
2365
  [GatewayDispatchEvents.ThreadListSync]: [ToEventProps<GatewayThreadListSyncDispatchData>];
@@ -2132,6 +2429,41 @@ declare class Client extends AsyncEventEmitter<MappedEvents> {
2132
2429
  notFound: unknown[];
2133
2430
  presences: discord_api_types_v10.GatewayGuildMembersChunkPresence[];
2134
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[]>>;
2135
2467
  /**
2136
2468
  * Updates the voice state of the bot user
2137
2469
  *
@@ -2186,4 +2518,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2186
2518
  */
2187
2519
  declare const version: string;
2188
2520
 
2189
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, type DescriptiveRawFile, type Gateway, GatewayAPI, 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 };