@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.
@@ -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, 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 } 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,6 +520,15 @@ 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>;
521
532
  /**
522
533
  * Adds a recipient to a group DM channel
523
534
  *
@@ -558,6 +569,9 @@ declare class GatewayAPI {
558
569
  getBot({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGatewayBotInfo>;
559
570
  }
560
571
 
572
+ interface CreateStickerOptions extends Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> {
573
+ file: RawFile;
574
+ }
561
575
  declare class GuildsAPI {
562
576
  private readonly rest;
563
577
  constructor(rest: REST);
@@ -625,7 +639,7 @@ declare class GuildsAPI {
625
639
  */
626
640
  addMember(guildId: Snowflake, userId: Snowflake, body: RESTPutAPIGuildMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIGuildMemberResult>;
627
641
  /**
628
- * Fetches all the members of a guild
642
+ * Fetches members of a guild.
629
643
  *
630
644
  * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
631
645
  * @param guildId - The id of the guild
@@ -1061,9 +1075,7 @@ declare class GuildsAPI {
1061
1075
  * @param body - The data for creating the sticker
1062
1076
  * @param options - The options for creating the sticker
1063
1077
  */
1064
- createSticker(guildId: Snowflake, { file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & {
1065
- file: RawFile;
1066
- }, { 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>;
1067
1079
  /**
1068
1080
  * Edits a sticker for a guild
1069
1081
  *
@@ -1245,6 +1257,51 @@ declare class GuildsAPI {
1245
1257
  * @param options - The options for editing the guild onboarding
1246
1258
  */
1247
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>;
1248
1305
  /**
1249
1306
  * Modifies incident actions for a guild.
1250
1307
  *
@@ -1256,6 +1313,13 @@ declare class GuildsAPI {
1256
1313
  editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
1257
1314
  }
1258
1315
 
1316
+ type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1317
+ files?: RawFile[];
1318
+ };
1319
+ type EditWebhookMessageOptions = RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1320
+ files?: RawFile[];
1321
+ thread_id?: string;
1322
+ };
1259
1323
  declare class WebhooksAPI {
1260
1324
  private readonly rest;
1261
1325
  constructor(rest: REST);
@@ -1302,8 +1366,7 @@ declare class WebhooksAPI {
1302
1366
  * @param body - The data for executing the webhook
1303
1367
  * @param options - The options for executing the webhook
1304
1368
  */
1305
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1306
- files?: RawFile[];
1369
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1307
1370
  wait: true;
1308
1371
  }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1309
1372
  /**
@@ -1315,8 +1378,7 @@ declare class WebhooksAPI {
1315
1378
  * @param body - The data for executing the webhook
1316
1379
  * @param options - The options for executing the webhook
1317
1380
  */
1318
- execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1319
- files?: RawFile[];
1381
+ execute(id: Snowflake, token: string, body: CreateWebhookMessageOptions & {
1320
1382
  wait?: false;
1321
1383
  }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1322
1384
  /**
@@ -1362,9 +1424,7 @@ declare class WebhooksAPI {
1362
1424
  * @param body - The data for editing the message
1363
1425
  * @param options - The options for editing the message
1364
1426
  */
1365
- editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, with_components, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & RESTPatchAPIWebhookWithTokenMessageQuery & {
1366
- files?: RawFile[];
1367
- }, { 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>;
1368
1428
  /**
1369
1429
  * Deletes an associated message from a webhook
1370
1430
  *
@@ -1380,10 +1440,37 @@ declare class WebhooksAPI {
1380
1440
  }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1381
1441
  }
1382
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;
1383
1458
  declare class InteractionsAPI {
1384
1459
  private readonly rest;
1385
1460
  private readonly webhooks;
1386
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>;
1387
1474
  /**
1388
1475
  * Replies to an interaction
1389
1476
  *
@@ -1393,28 +1480,87 @@ declare class InteractionsAPI {
1393
1480
  * @param body - The callback data for replying
1394
1481
  * @param options - The options for replying
1395
1482
  */
1396
- reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1397
- files?: RawFile[];
1398
- }, { 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>;
1508
+ /**
1509
+ * Defers the reply to an interaction
1510
+ *
1511
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1512
+ * @param interactionId - The id of the interaction
1513
+ * @param interactionToken - The token of the interaction
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>;
1399
1520
  /**
1400
1521
  * Defers the reply to an interaction
1401
1522
  *
1402
1523
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1403
1524
  * @param interactionId - The id of the interaction
1404
1525
  * @param interactionToken - The token of the interaction
1405
- * @param data - The data for deferring the reply
1526
+ * @param body - The callback data for deferring the reply
1406
1527
  * @param options - The options for deferring
1407
1528
  */
1408
- defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
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>;
1409
1542
  /**
1410
1543
  * Defers an update from a message component interaction
1411
1544
  *
1412
1545
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1413
1546
  * @param interactionId - The id of the interaction
1414
1547
  * @param interactionToken - The token of the interaction
1548
+ * @param body - The callback data for deferring the update
1415
1549
  * @param options - The options for deferring
1416
1550
  */
1417
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { 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>;
1554
+ /**
1555
+ * Defers an update from a message component interaction
1556
+ *
1557
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1558
+ * @param interactionId - The id of the interaction
1559
+ * @param interactionToken - The token of the interaction
1560
+ * @param body - The callback data for deferring the update
1561
+ * @param options - The options for deferring
1562
+ */
1563
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1418
1564
  /**
1419
1565
  * Reply to a deferred interaction
1420
1566
  *
@@ -1424,9 +1570,7 @@ declare class InteractionsAPI {
1424
1570
  * @param body - The callback data for replying
1425
1571
  * @param options - The options for replying
1426
1572
  */
1427
- followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
1428
- files?: RawFile[];
1429
- }, { 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>;
1430
1574
  /**
1431
1575
  * Edits the initial reply to an interaction
1432
1576
  *
@@ -1438,9 +1582,7 @@ declare class InteractionsAPI {
1438
1582
  * @param messageId - The id of the message to edit. If omitted, the original reply will be edited
1439
1583
  * @param options - The options for editing the reply
1440
1584
  */
1441
- editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
1442
- files?: RawFile[];
1443
- }, 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>;
1444
1586
  /**
1445
1587
  * Fetches the initial reply to an interaction
1446
1588
  *
@@ -1461,6 +1603,18 @@ declare class InteractionsAPI {
1461
1603
  * @param options - The options for deleting the reply
1462
1604
  */
1463
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>;
1464
1618
  /**
1465
1619
  * Updates the message the component interaction was triggered on
1466
1620
  *
@@ -1470,9 +1624,31 @@ declare class InteractionsAPI {
1470
1624
  * @param callbackData - The callback data for updating the interaction
1471
1625
  * @param options - The options for updating the interaction
1472
1626
  */
1473
- updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1474
- files?: RawFile[];
1475
- }, { 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>;
1476
1652
  /**
1477
1653
  * Sends an autocomplete response to an interaction
1478
1654
  *
@@ -1482,7 +1658,31 @@ declare class InteractionsAPI {
1482
1658
  * @param callbackData - The callback data for the autocomplete response
1483
1659
  * @param options - The options for sending the autocomplete response
1484
1660
  */
1485
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1661
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: CreateAutocompleteResponseOptions & {
1662
+ with_response?: false;
1663
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1664
+ /**
1665
+ * Sends an autocomplete response to an interaction
1666
+ *
1667
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1668
+ * @param interactionId - The id of the interaction
1669
+ * @param interactionToken - The token of the interaction
1670
+ * @param callbackData - The callback data for the autocomplete response
1671
+ * @param options - The options for sending the autocomplete response
1672
+ */
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>;
1486
1686
  /**
1487
1687
  * Sends a modal response to an interaction
1488
1688
  *
@@ -1492,9 +1692,21 @@ declare class InteractionsAPI {
1492
1692
  * @param callbackData - The modal callback data to send
1493
1693
  * @param options - The options for sending the modal
1494
1694
  */
1495
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1695
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions & {
1696
+ with_response?: false;
1697
+ }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1496
1698
  /**
1497
- * Sends a premium required response to an interaction
1699
+ * Sends a modal response to an interaction
1700
+ *
1701
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1702
+ * @param interactionId - The id of the interaction
1703
+ * @param interactionToken - The token of the interaction
1704
+ * @param callbackData - The modal callback data to send
1705
+ * @param options - The options for sending the modal
1706
+ */
1707
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: CreateModalResponseOptions, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;
1708
+ /**
1709
+ * Launches an activity and returns an interaction callback object
1498
1710
  *
1499
1711
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1500
1712
  * @param interactionId - The id of the interaction
@@ -1503,6 +1715,40 @@ declare class InteractionsAPI {
1503
1715
  * @deprecated Sending a premium-style button is the new Discord behavior.
1504
1716
  */
1505
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>;
1506
1752
  }
1507
1753
 
1508
1754
  declare class InvitesAPI {
@@ -1533,23 +1779,51 @@ declare class MonetizationAPI {
1533
1779
  /**
1534
1780
  * Fetches the SKUs for an application.
1535
1781
  *
1536
- * @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
1537
1784
  * @param options - The options for fetching the SKUs.
1538
1785
  */
1539
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>;
1540
1805
  /**
1541
1806
  * Fetches the entitlements for an application.
1542
1807
  *
1543
- * @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
1808
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
1544
1809
  * @param applicationId - The application id to fetch entitlements for
1545
1810
  * @param query - The query options for fetching entitlements
1546
1811
  * @param options - The options for fetching entitlements
1547
1812
  */
1548
- 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>;
1549
1823
  /**
1550
1824
  * Creates a test entitlement for an application's SKU.
1551
1825
  *
1552
- * @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}
1553
1827
  * @param applicationId - The application id to create the entitlement for
1554
1828
  * @param body - The data for creating the entitlement
1555
1829
  * @param options - The options for creating the entitlement
@@ -1558,7 +1832,7 @@ declare class MonetizationAPI {
1558
1832
  /**
1559
1833
  * Deletes a test entitlement for an application's SKU.
1560
1834
  *
1561
- * @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}
1562
1836
  * @param applicationId - The application id to delete the entitlement for
1563
1837
  * @param entitlementId - The entitlement id to delete
1564
1838
  * @param options - The options for deleting the entitlement
@@ -1567,7 +1841,7 @@ declare class MonetizationAPI {
1567
1841
  /**
1568
1842
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1569
1843
  *
1570
- * @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}
1571
1845
  * @param applicationId - The application id to consume the entitlement for
1572
1846
  * @param entitlementId - The entitlement id to consume
1573
1847
  * @param options - The options for consuming the entitlement
@@ -1650,7 +1924,7 @@ declare class PollAPI {
1650
1924
  * @param query - The query for getting the list of voters
1651
1925
  * @param options - The options for getting the list of voters
1652
1926
  */
1653
- 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>;
1654
1928
  /**
1655
1929
  * Immediately expires (i.e. ends) a poll
1656
1930
  *
@@ -1684,6 +1958,18 @@ declare class RoleConnectionsAPI {
1684
1958
  updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
1685
1959
  }
1686
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
+
1687
1973
  declare class StageInstancesAPI {
1688
1974
  private readonly rest;
1689
1975
  constructor(rest: REST);
@@ -1965,6 +2251,7 @@ declare class API {
1965
2251
  readonly oauth2: OAuth2API;
1966
2252
  readonly poll: PollAPI;
1967
2253
  readonly roleConnections: RoleConnectionsAPI;
2254
+ readonly soundboardSounds: SoundboardSoundsAPI;
1968
2255
  readonly stageInstances: StageInstancesAPI;
1969
2256
  readonly stickers: StickersAPI;
1970
2257
  readonly threads: ThreadsAPI;
@@ -2011,4 +2298,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2011
2298
  */
2012
2299
  declare const version: string;
2013
2300
 
2014
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GatewayAPI, 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 };