@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.
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, 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 } 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 } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
  import * as discord_api_types_globals from 'discord-api-types/globals';
6
6
 
@@ -226,6 +226,12 @@ interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
226
226
  files?: RawFile[];
227
227
  };
228
228
  }
229
+ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
230
+ files?: RawFile[];
231
+ }
232
+ interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
233
+ files?: RawFile[];
234
+ }
229
235
  declare class ChannelsAPI {
230
236
  private readonly rest;
231
237
  constructor(rest: REST);
@@ -237,9 +243,7 @@ declare class ChannelsAPI {
237
243
  * @param body - The data for sending the message
238
244
  * @param options - The options for sending the message
239
245
  */
240
- createMessage(channelId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
241
- files?: RawFile[];
242
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
246
+ createMessage(channelId: Snowflake, { files, ...body }: CreateMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
243
247
  /**
244
248
  * Edits a message
245
249
  *
@@ -249,9 +253,7 @@ declare class ChannelsAPI {
249
253
  * @param body - The data for editing the message
250
254
  * @param options - The options for editing the message
251
255
  */
252
- editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: RESTPatchAPIChannelMessageJSONBody & {
253
- files?: RawFile[];
254
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
256
+ editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: EditMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
255
257
  /**
256
258
  * Fetches the reactions for a message
257
259
  *
@@ -518,8 +520,58 @@ declare class ChannelsAPI {
518
520
  * @param options - The options for deleting the permission overwrite
519
521
  */
520
522
  deletePermissionOverwrite(channelId: Snowflake, overwriteId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
523
+ /**
524
+ * Sends a soundboard sound in a channel
525
+ *
526
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
527
+ * @param channelId - The id of the channel to send the soundboard sound in
528
+ * @param body - The data for sending the soundboard sound
529
+ * @param options - The options for sending the soundboard sound
530
+ */
531
+ sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
532
+ /**
533
+ * Adds a recipient to a group DM channel
534
+ *
535
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
536
+ * @param channelId - The id of the channel to add the recipient to
537
+ * @param userId - The id of the user to add as a recipient
538
+ * @param body - The data for adding the recipient
539
+ * @param options - The options for adding the recipient
540
+ */
541
+ addGroupDMRecipient(channelId: Snowflake, userId: Snowflake, body: RESTPutAPIChannelRecipientJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
542
+ /**
543
+ * Removes a recipient from a group DM channel
544
+ *
545
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient}
546
+ * @param channelId - The id of the channel to remove the recipient from
547
+ * @param userId - The id of the user to remove as a recipient
548
+ * @param options - The options for removing the recipient
549
+ */
550
+ removeGroupDMRecipient(channelId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
551
+ }
552
+
553
+ declare class GatewayAPI {
554
+ private readonly rest;
555
+ constructor(rest: REST);
556
+ /**
557
+ * Gets gateway information.
558
+ *
559
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway}
560
+ * @param options - The options for fetching the gateway information
561
+ */
562
+ get({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGatewayInfo>;
563
+ /**
564
+ * Gets gateway information with additional metadata.
565
+ *
566
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway-bot}
567
+ * @param options - The options for fetching the gateway information
568
+ */
569
+ getBot({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGatewayBotInfo>;
521
570
  }
522
571
 
572
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
573
+ file: RawFile;
574
+ }
523
575
  declare class GuildsAPI {
524
576
  private readonly rest;
525
577
  constructor(rest: REST);
@@ -587,7 +639,7 @@ declare class GuildsAPI {
587
639
  */
588
640
  addMember(guildId: Snowflake, userId: Snowflake, body: RESTPutAPIGuildMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIGuildMemberResult>;
589
641
  /**
590
- * Fetches all the members of a guild
642
+ * Fetches members of a guild.
591
643
  *
592
644
  * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
593
645
  * @param guildId - The id of the guild
@@ -1023,9 +1075,7 @@ declare class GuildsAPI {
1023
1075
  * @param body - The data for creating the sticker
1024
1076
  * @param options - The options for creating the sticker
1025
1077
  */
1026
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1027
- file: RawFile;
1028
- }, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1078
+ createSticker(guildId: Snowflake, { file, ...body }: CreateStickerOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISticker>;
1029
1079
  /**
1030
1080
  * Edits a sticker for a guild
1031
1081
  *
@@ -1207,8 +1257,69 @@ declare class GuildsAPI {
1207
1257
  * @param options - The options for editing the guild onboarding
1208
1258
  */
1209
1259
  editOnboarding(guildId: Snowflake, body: RESTPutAPIGuildOnboardingJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildOnboarding>;
1260
+ /**
1261
+ * Fetches all the soundboard sounds for a guild
1262
+ *
1263
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#list-guild-soundboard-sounds}
1264
+ * @param guildId - The id of the guild to fetch the soundboard sounds for
1265
+ * @param options - The options for fetching the soundboard sounds
1266
+ */
1267
+ getSoundboardSounds(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildSoundboardSoundsResult>;
1268
+ /**
1269
+ * Fetches a soundboard sound for a guild
1270
+ *
1271
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound}
1272
+ * @param guildId - The id of the guild to fetch the soundboard sound for
1273
+ * @param soundId - The id of the soundboard sound to fetch
1274
+ * @param options - The options for fetching the soundboard sound
1275
+ */
1276
+ getSoundboardSound(guildId: Snowflake, soundId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1277
+ /**
1278
+ * Creates a new soundboard sound for a guild
1279
+ *
1280
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound}
1281
+ * @param guildId - The id of the guild to create the soundboard sound for
1282
+ * @param body - The data for creating the soundboard sound
1283
+ * @param options - The options for creating the soundboard sound
1284
+ */
1285
+ createSoundboardSound(guildId: Snowflake, body: RESTPostAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1286
+ /**
1287
+ * Edits a soundboard sound for a guild
1288
+ *
1289
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound}
1290
+ * @param guildId - The id of the guild to edit the soundboard sound for
1291
+ * @param soundId - The id of the soundboard sound to edit
1292
+ * @param body - The data for editing the soundboard sound
1293
+ * @param options - The options for editing the soundboard sound
1294
+ */
1295
+ editSoundboardSound(guildId: Snowflake, soundId: Snowflake, body: RESTPatchAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1296
+ /**
1297
+ * Deletes a soundboard sound for a guild
1298
+ *
1299
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound}
1300
+ * @param guildId - The id of the guild to delete the soundboard sound for
1301
+ * @param soundId - The id of the soundboard sound to delete
1302
+ * @param options - The options for deleting the soundboard sound
1303
+ */
1304
+ deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1305
+ /**
1306
+ * Modifies incident actions for a guild.
1307
+ *
1308
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-incident-actions}
1309
+ * @param guildId - The id of the guild
1310
+ * @param body - The data for modifying guild incident actions
1311
+ * @param options - The options for modifying guild incident actions
1312
+ */
1313
+ editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
1210
1314
  }
1211
1315
 
1316
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1317
+ files?: RawFile[];
1318
+ };
1319
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1320
+ files?: RawFile[];
1321
+ thread_id?: string;
1322
+ };
1212
1323
  declare class WebhooksAPI {
1213
1324
  private readonly rest;
1214
1325
  constructor(rest: REST);
@@ -1255,8 +1366,7 @@ declare class WebhooksAPI {
1255
1366
  * @param body - The data for executing the webhook
1256
1367
  * @param options - The options for executing the webhook
1257
1368
  */
1258
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1259
- files?: RawFile[];
1369
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1260
1370
  wait: true;
1261
1371
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1262
1372
  /**
@@ -1268,8 +1378,7 @@ declare class WebhooksAPI {
1268
1378
  * @param body - The data for executing the webhook
1269
1379
  * @param options - The options for executing the webhook
1270
1380
  */
1271
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1272
- files?: RawFile[];
1381
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1273
1382
  wait?: false;
1274
1383
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1275
1384
  /**
@@ -1315,9 +1424,7 @@ declare class WebhooksAPI {
1315
1424
  * @param body - The data for editing the message
1316
1425
  * @param options - The options for editing the message
1317
1426
  */
1318
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1319
- files?: RawFile[];
1320
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1427
+ editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }: EditWebhookMessageOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1321
1428
  /**
1322
1429
  * Deletes an associated message from a webhook
1323
1430
  *
@@ -1333,10 +1440,37 @@ declare class WebhooksAPI {
1333
1440
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1334
1441
  }
1335
1442
 
1443
+ interface CreateInteractionResponseOptions extends APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery {
1444
+ files?: RawFile[];
1445
+ }
1446
+ type CreateInteractionDeferResponseOptions = APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery;
1447
+ type CreateInteractionFollowUpResponseOptions = APIInteractionResponseCallbackData & {
1448
+ files?: RawFile[];
1449
+ };
1450
+ type EditInteractionResponseOptions = APIInteractionResponseCallbackData & {
1451
+ files?: RawFile[];
1452
+ };
1453
+ type CreateInteractionUpdateMessageResponseOptions = APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1454
+ files?: RawFile[];
1455
+ };
1456
+ type CreateAutocompleteResponseOptions = APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1457
+ type CreateModalResponseOptions = APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery;
1336
1458
  declare class InteractionsAPI {
1337
1459
  private readonly rest;
1338
1460
  private readonly webhooks;
1339
1461
  constructor(rest: REST, webhooks: WebhooksAPI);
1462
+ /**
1463
+ * Replies to an interaction and returns an interaction callback object
1464
+ *
1465
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1466
+ * @param interactionId - The id of the interaction
1467
+ * @param interactionToken - The token of the interaction
1468
+ * @param body - The callback data for replying
1469
+ * @param options - The options for replying
1470
+ */
1471
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1472
+ with_response: true;
1473
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1340
1474
  /**
1341
1475
  * Replies to an interaction
1342
1476
  *
@@ -1346,28 +1480,87 @@ declare class InteractionsAPI {
1346
1480
  * @param body - The callback data for replying
1347
1481
  * @param options - The options for replying
1348
1482
  */
1349
- reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1350
- files?: RawFile[];
1351
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1483
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions & {
1484
+ with_response?: false;
1485
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1486
+ /**
1487
+ * Replies to an interaction
1488
+ *
1489
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1490
+ * @param interactionId - The id of the interaction
1491
+ * @param interactionToken - The token of the interaction
1492
+ * @param body - The callback data for replying
1493
+ * @param options - The options for replying
1494
+ */
1495
+ reply(interactionId: Snowflake, interactionToken: string, body: CreateInteractionResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1496
+ /**
1497
+ * Defers the reply to an interaction and returns an interaction callback object
1498
+ *
1499
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1500
+ * @param interactionId - The id of the interaction
1501
+ * @param interactionToken - The token of the interaction
1502
+ * @param body - The callback data for deferring the reply
1503
+ * @param options - The options for deferring
1504
+ */
1505
+ defer(interactionId: Snowflake, interactionToken: string, body: CreateInteractionDeferResponseOptions & {
1506
+ with_response: true;
1507
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1352
1508
  /**
1353
1509
  * Defers the reply to an interaction
1354
1510
  *
1355
1511
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1356
1512
  * @param interactionId - The id of the interaction
1357
1513
  * @param interactionToken - The token of the interaction
1358
- * @param data - The data for deferring the reply
1514
+ * @param body - The callback data for deferring the reply
1515
+ * @param options - The options for deferring
1516
+ */
1517
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions & {
1518
+ with_response?: false;
1519
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1520
+ /**
1521
+ * Defers the reply to an interaction
1522
+ *
1523
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1524
+ * @param interactionId - The id of the interaction
1525
+ * @param interactionToken - The token of the interaction
1526
+ * @param body - The callback data for deferring the reply
1527
+ * @param options - The options for deferring
1528
+ */
1529
+ defer(interactionId: Snowflake, interactionToken: string, body?: CreateInteractionDeferResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1530
+ /**
1531
+ * Defers an update from a message component interaction and returns an interaction callback object
1532
+ *
1533
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1534
+ * @param interactionId - The id of the interaction
1535
+ * @param interactionToken - The token of the interaction
1536
+ * @param body - The callback data for deferring the update
1537
+ * @param options - The options for deferring
1538
+ */
1539
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
1540
+ with_response: true;
1541
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1542
+ /**
1543
+ * Defers an update from a message component interaction
1544
+ *
1545
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1546
+ * @param interactionId - The id of the interaction
1547
+ * @param interactionToken - The token of the interaction
1548
+ * @param body - The callback data for deferring the update
1359
1549
  * @param options - The options for deferring
1360
1550
  */
1361
- defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1551
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1552
+ with_response?: false;
1553
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1362
1554
  /**
1363
1555
  * Defers an update from a message component interaction
1364
1556
  *
1365
1557
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1366
1558
  * @param interactionId - The id of the interaction
1367
1559
  * @param interactionToken - The token of the interaction
1560
+ * @param body - The callback data for deferring the update
1368
1561
  * @param options - The options for deferring
1369
1562
  */
1370
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1563
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1371
1564
  /**
1372
1565
  * Reply to a deferred interaction
1373
1566
  *
@@ -1377,9 +1570,7 @@ declare class InteractionsAPI {
1377
1570
  * @param body - The callback data for replying
1378
1571
  * @param options - The options for replying
1379
1572
  */
1380
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1381
- files?: RawFile[];
1382
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1573
+ followUp(applicationId: Snowflake, interactionToken: string, body: CreateInteractionFollowUpResponseOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1383
1574
  /**
1384
1575
  * Edits the initial reply to an interaction
1385
1576
  *
@@ -1391,9 +1582,7 @@ declare class InteractionsAPI {
1391
1582
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1392
1583
  * @param options - The options for editing the reply
1393
1584
  */
1394
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1395
- files?: RawFile[];
1396
- }, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1585
+ editReply(applicationId: Snowflake, interactionToken: string, callbackData: EditInteractionResponseOptions, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1397
1586
  /**
1398
1587
  * Fetches the initial reply to an interaction
1399
1588
  *
@@ -1414,6 +1603,18 @@ declare class InteractionsAPI {
1414
1603
  * @param options - The options for deleting the reply
1415
1604
  */
1416
1605
  deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1606
+ /**
1607
+ * Updates the message the component interaction was triggered on and returns an interaction callback object
1608
+ *
1609
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1610
+ * @param interactionId - The id of the interaction
1611
+ * @param interactionToken - The token of the interaction
1612
+ * @param callbackData - The callback data for updating the interaction
1613
+ * @param options - The options for updating the interaction
1614
+ */
1615
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1616
+ with_response: true;
1617
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1417
1618
  /**
1418
1619
  * Updates the message the component interaction was triggered on
1419
1620
  *
@@ -1423,9 +1624,43 @@ declare class InteractionsAPI {
1423
1624
  * @param callbackData - The callback data for updating the interaction
1424
1625
  * @param options - The options for updating the interaction
1425
1626
  */
1426
- updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1427
- files?: RawFile[];
1428
- }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1627
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions & {
1628
+ with_response?: false;
1629
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1630
+ /**
1631
+ * Updates the message the component interaction was triggered on
1632
+ *
1633
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1634
+ * @param interactionId - The id of the interaction
1635
+ * @param interactionToken - The token of the interaction
1636
+ * @param callbackData - The callback data for updating the interaction
1637
+ * @param options - The options for updating the interaction
1638
+ */
1639
+ updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: CreateInteractionUpdateMessageResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1640
+ /**
1641
+ * Sends an autocomplete response to an interaction and returns an interaction callback object
1642
+ *
1643
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1644
+ * @param interactionId - The id of the interaction
1645
+ * @param interactionToken - The token of the interaction
1646
+ * @param callbackData - The callback data for the autocomplete response
1647
+ * @param options - The options for sending the autocomplete response
1648
+ */
1649
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1650
+ with_response: true;
1651
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1652
+ /**
1653
+ * Sends an autocomplete response to an interaction
1654
+ *
1655
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1656
+ * @param interactionId - The id of the interaction
1657
+ * @param interactionToken - The token of the interaction
1658
+ * @param callbackData - The callback data for the autocomplete response
1659
+ * @param options - The options for sending the autocomplete response
1660
+ */
1661
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1662
+ with_response?: false;
1663
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1429
1664
  /**
1430
1665
  * Sends an autocomplete response to an interaction
1431
1666
  *
@@ -1435,7 +1670,31 @@ declare class InteractionsAPI {
1435
1670
  * @param callbackData - The callback data for the autocomplete response
1436
1671
  * @param options - The options for sending the autocomplete response
1437
1672
  */
1438
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1673
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1674
+ /**
1675
+ * Sends a modal response to an interaction and returns an interaction callback object
1676
+ *
1677
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1678
+ * @param interactionId - The id of the interaction
1679
+ * @param interactionToken - The token of the interaction
1680
+ * @param callbackData - The modal callback data to send
1681
+ * @param options - The options for sending the modal
1682
+ */
1683
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1684
+ with_response: true;
1685
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1686
+ /**
1687
+ * Sends a modal response to an interaction
1688
+ *
1689
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1690
+ * @param interactionId - The id of the interaction
1691
+ * @param interactionToken - The token of the interaction
1692
+ * @param callbackData - The modal callback data to send
1693
+ * @param options - The options for sending the modal
1694
+ */
1695
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1696
+ with_response?: false;
1697
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1439
1698
  /**
1440
1699
  * Sends a modal response to an interaction
1441
1700
  *
@@ -1445,9 +1704,9 @@ declare class InteractionsAPI {
1445
1704
  * @param callbackData - The modal callback data to send
1446
1705
  * @param options - The options for sending the modal
1447
1706
  */
1448
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1707
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1449
1708
  /**
1450
- * Sends a premium required response to an interaction
1709
+ * Launches an activity and returns an interaction callback object
1451
1710
  *
1452
1711
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1453
1712
  * @param interactionId - The id of the interaction
@@ -1456,6 +1715,40 @@ declare class InteractionsAPI {
1456
1715
  * @deprecated Sending a premium-style button is the new Discord behavior.
1457
1716
  */
1458
1717
  sendPremiumRequired(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1718
+ /**
1719
+ * Launches an activity and returns an interaction callback object
1720
+ *
1721
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1722
+ * @param interactionId - The id of the interaction
1723
+ * @param interactionToken - The token of the interaction
1724
+ * @param body - The callback data for launching the activity
1725
+ * @param options - The options for launching the activity
1726
+ */
1727
+ launchActivity(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
1728
+ with_response: true;
1729
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1730
+ /**
1731
+ * Launches an activity
1732
+ *
1733
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1734
+ * @param interactionId - The id of the interaction
1735
+ * @param interactionToken - The token of the interaction
1736
+ * @param body - The callback data for launching the activity
1737
+ * @param options - The options for launching the activity
1738
+ */
1739
+ launchActivity(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1740
+ with_response?: false;
1741
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1742
+ /**
1743
+ * Launches an activity
1744
+ *
1745
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1746
+ * @param interactionId - The id of the interaction
1747
+ * @param interactionToken - The token of the interaction
1748
+ * @param body - The callback data for launching the activity
1749
+ * @param options - The options for launching the activity
1750
+ */
1751
+ launchActivity(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1459
1752
  }
1460
1753
 
1461
1754
  declare class InvitesAPI {
@@ -1486,23 +1779,51 @@ declare class MonetizationAPI {
1486
1779
  /**
1487
1780
  * Fetches the SKUs for an application.
1488
1781
  *
1489
- * @see {@link https://discord.com/developers/docs/monetization/skus#list-skus}
1782
+ * @see {@link https://discord.com/developers/docs/resources/sku#list-skus}
1783
+ * @param applicationId - The application id to fetch SKUs for
1490
1784
  * @param options - The options for fetching the SKUs.
1491
1785
  */
1492
1786
  getSKUs(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUsResult>;
1787
+ /**
1788
+ * Fetches subscriptions for an SKU.
1789
+ *
1790
+ * @see {@link https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions}
1791
+ * @param skuId - The SKU id to fetch subscriptions for
1792
+ * @param query - The query options for fetching subscriptions
1793
+ * @param options - The options for fetching subscriptions
1794
+ */
1795
+ getSKUSubscriptions(skuId: Snowflake, query?: RESTGetAPISKUSubscriptionsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUSubscriptionsResult>;
1796
+ /**
1797
+ * Fetches a subscription for an SKU.
1798
+ *
1799
+ * @see {@link https://discord.com/developers/docs/resources/subscription#get-sku-subscription}
1800
+ * @param skuId - The SKU id to fetch subscription for
1801
+ * @param subscriptionId - The subscription id to fetch
1802
+ * @param options - The options for fetching the subscription
1803
+ */
1804
+ getSKUSubscription(skuId: Snowflake, subscriptionId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISubscription>;
1493
1805
  /**
1494
1806
  * Fetches the entitlements for an application.
1495
1807
  *
1496
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
1808
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
1497
1809
  * @param applicationId - The application id to fetch entitlements for
1498
1810
  * @param query - The query options for fetching entitlements
1499
1811
  * @param options - The options for fetching entitlements
1500
1812
  */
1501
- getEntitlements(applicationId: Snowflake, query: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1813
+ getEntitlements(applicationId: Snowflake, query?: RESTGetAPIEntitlementsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIEntitlementsResult>;
1814
+ /**
1815
+ * Fetches an entitlement for an application.
1816
+ *
1817
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
1818
+ * @param applicationId - The application id to fetch the entitlement for
1819
+ * @param entitlementId - The entitlement id to fetch
1820
+ * @param options - The options for fetching the entitlement
1821
+ */
1822
+ getEntitlement(applicationId: Snowflake, entitlementId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEntitlement>;
1502
1823
  /**
1503
1824
  * Creates a test entitlement for an application's SKU.
1504
1825
  *
1505
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement}
1826
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement}
1506
1827
  * @param applicationId - The application id to create the entitlement for
1507
1828
  * @param body - The data for creating the entitlement
1508
1829
  * @param options - The options for creating the entitlement
@@ -1511,7 +1832,7 @@ declare class MonetizationAPI {
1511
1832
  /**
1512
1833
  * Deletes a test entitlement for an application's SKU.
1513
1834
  *
1514
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement}
1835
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement}
1515
1836
  * @param applicationId - The application id to delete the entitlement for
1516
1837
  * @param entitlementId - The entitlement id to delete
1517
1838
  * @param options - The options for deleting the entitlement
@@ -1520,7 +1841,7 @@ declare class MonetizationAPI {
1520
1841
  /**
1521
1842
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1522
1843
  *
1523
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement}
1844
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement}
1524
1845
  * @param applicationId - The application id to consume the entitlement for
1525
1846
  * @param entitlementId - The entitlement id to consume
1526
1847
  * @param options - The options for consuming the entitlement
@@ -1603,7 +1924,7 @@ declare class PollAPI {
1603
1924
  * @param query - The query for getting the list of voters
1604
1925
  * @param options - The options for getting the list of voters
1605
1926
  */
1606
- getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query: RESTGetAPIPollAnswerVotersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIPollAnswerVotersResult>;
1927
+ getAnswerVoters(channelId: Snowflake, messageId: Snowflake, answerId: number, query?: RESTGetAPIPollAnswerVotersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIPollAnswerVotersResult>;
1607
1928
  /**
1608
1929
  * Immediately expires (i.e. ends) a poll
1609
1930
  *
@@ -1637,6 +1958,18 @@ declare class RoleConnectionsAPI {
1637
1958
  updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
1638
1959
  }
1639
1960
 
1961
+ declare class SoundboardSoundsAPI {
1962
+ private readonly rest;
1963
+ constructor(rest: REST);
1964
+ /**
1965
+ * Fetches all the soundboard default sounds.
1966
+ *
1967
+ * @see {@link https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds}
1968
+ * @param options - The options for fetching the soundboard default sounds.
1969
+ */
1970
+ getSoundboardDefaultSounds({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISoundboardDefaultSoundsResult>;
1971
+ }
1972
+
1640
1973
  declare class StageInstancesAPI {
1641
1974
  private readonly rest;
1642
1975
  constructor(rest: REST);
@@ -1910,6 +2243,7 @@ declare class API {
1910
2243
  readonly applicationCommands: ApplicationCommandsAPI;
1911
2244
  readonly applications: ApplicationsAPI;
1912
2245
  readonly channels: ChannelsAPI;
2246
+ readonly gateway: GatewayAPI;
1913
2247
  readonly guilds: GuildsAPI;
1914
2248
  readonly interactions: InteractionsAPI;
1915
2249
  readonly invites: InvitesAPI;
@@ -1917,6 +2251,7 @@ declare class API {
1917
2251
  readonly oauth2: OAuth2API;
1918
2252
  readonly poll: PollAPI;
1919
2253
  readonly roleConnections: RoleConnectionsAPI;
2254
+ readonly soundboardSounds: SoundboardSoundsAPI;
1920
2255
  readonly stageInstances: StageInstancesAPI;
1921
2256
  readonly stickers: StickersAPI;
1922
2257
  readonly threads: ThreadsAPI;
@@ -1963,4 +2298,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
1963
2298
  */
1964
2299
  declare const version: string;
1965
2300
 
1966
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
2301
+ export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type CreateAutocompleteResponseOptions, type CreateInteractionDeferResponseOptions, type CreateInteractionFollowUpResponseOptions, type CreateInteractionResponseOptions, type CreateInteractionUpdateMessageResponseOptions, type CreateMessageOptions, type CreateModalResponseOptions, type CreateStickerOptions, type CreateWebhookMessageOptions, type DescriptiveRawFile, type EditInteractionResponseOptions, type EditMessageOptions, type EditWebhookMessageOptions, GatewayAPI, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };