@discordjs/core 2.1.0-dev.1732709132-97ffa201a → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,8 @@
9
9
  <a href="https://www.npmjs.com/package/@discordjs/core"><img src="https://img.shields.io/npm/v/@discordjs/core.svg?maxAge=3600" alt="npm version" /></a>
10
10
  <a href="https://www.npmjs.com/package/@discordjs/core"><img src="https://img.shields.io/npm/dt/@discordjs/core.svg?maxAge=3600" alt="npm downloads" /></a>
11
11
  <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
12
- <a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=core" alt="Code coverage" /></a>
12
+ <a href="https://github.com/discordjs/discord.js/commits/main/packages/core"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Fcore"></a>
13
+ <a href="https://codecov.io/gh/discordjs/discord.js"><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=core" alt="Code coverage" /></a>
13
14
  </p>
14
15
  <p>
15
16
  <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, 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, 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, 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
 
@@ -258,17 +258,9 @@ declare class ChannelsAPI {
258
258
  * @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
259
259
  * @param channelId - The id of the channel the message is in
260
260
  * @param messageId - The id of the message to get the reactions for
261
- * @param emoji - The emoji to get the reactions for. URL encoding happens internally
261
+ * @param emoji - The emoji to get the reactions for
262
262
  * @param query - The query options for fetching the reactions
263
263
  * @param options - The options for fetching the message reactions
264
- * @example
265
- * ```ts
266
- * // Unicode.
267
- * await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
268
- *
269
- * // Custom emoji.
270
- * await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
271
- * ```
272
264
  */
273
265
  getMessageReactions(channelId: Snowflake, messageId: Snowflake, emoji: string, query?: RESTGetAPIChannelMessageReactionUsersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelMessageReactionUsersResult>;
274
266
  /**
@@ -277,16 +269,8 @@ declare class ChannelsAPI {
277
269
  * @see {@link https://discord.com/developers/docs/resources/message#delete-own-reaction}
278
270
  * @param channelId - The id of the channel the message is in
279
271
  * @param messageId - The id of the message to delete the reaction for
280
- * @param emoji - The emoji to delete the reaction for. URL encoding happens internally
272
+ * @param emoji - The emoji to delete the reaction for
281
273
  * @param options - The options for deleting the reaction
282
- * @example
283
- * ```ts
284
- * // Unicode.
285
- * await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', '👍');
286
- *
287
- * // Custom emoji.
288
- * await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
289
- * ```
290
274
  */
291
275
  deleteOwnMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
292
276
  /**
@@ -295,17 +279,9 @@ declare class ChannelsAPI {
295
279
  * @see {@link https://discord.com/developers/docs/resources/message#delete-user-reaction}
296
280
  * @param channelId - The id of the channel the message is in
297
281
  * @param messageId - The id of the message to delete the reaction for
298
- * @param emoji - The emoji to delete the reaction for. URL encoding happens internally
282
+ * @param emoji - The emoji to delete the reaction for
299
283
  * @param userId - The id of the user to delete the reaction for
300
284
  * @param options - The options for deleting the reaction
301
- * @example
302
- * ```ts
303
- * // Unicode.
304
- * await api.channels.deleteUserMessageReaction('1234567890', '1234567890', '👍', '1234567890');
305
- *
306
- * // Custom emoji.
307
- * await api.channels.deleteUserMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890', '1234567890');
308
- * ```
309
285
  */
310
286
  deleteUserMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
311
287
  /**
@@ -323,16 +299,8 @@ declare class ChannelsAPI {
323
299
  * @see {@link https://discord.com/developers/docs/resources/message#delete-all-reactions-for-emoji}
324
300
  * @param channelId - The id of the channel the message is in
325
301
  * @param messageId - The id of the message to delete the reactions for
326
- * @param emoji - The emoji to delete the reactions for. URL encoding happens internally
302
+ * @param emoji - The emoji to delete the reactions for
327
303
  * @param options - The options for deleting the reactions
328
- * @example
329
- * ```ts
330
- * // Unicode.
331
- * await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', '👍');
332
- *
333
- * // Custom emoji.
334
- * await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', 'emoji_name:1234567890');
335
- * ```
336
304
  */
337
305
  deleteAllMessageReactionsForEmoji(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
338
306
  /**
@@ -341,16 +309,8 @@ declare class ChannelsAPI {
341
309
  * @see {@link https://discord.com/developers/docs/resources/message#create-reaction}
342
310
  * @param channelId - The id of the channel the message is in
343
311
  * @param messageId - The id of the message to add the reaction to
344
- * @param emoji - The emoji to add the reaction with. URL encoding happens internally
312
+ * @param emoji - The emoji to add the reaction with
345
313
  * @param options - The options for adding the reaction
346
- * @example
347
- * ```ts
348
- * // Unicode.
349
- * await api.channels.addMessageReaction('1234567890', '1234567890', '👍');
350
- *
351
- * // Custom emoji.
352
- * await api.channels.addMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
353
- * ```
354
314
  */
355
315
  addMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
356
316
  /**
@@ -558,15 +518,6 @@ declare class ChannelsAPI {
558
518
  * @param options - The options for deleting the permission overwrite
559
519
  */
560
520
  deletePermissionOverwrite(channelId: Snowflake, overwriteId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
561
- /**
562
- * Sends a soundboard sound in a channel
563
- *
564
- * @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
565
- * @param channelId - The id of the channel to send the soundboard sound in
566
- * @param body - The data for sending the soundboard sound
567
- * @param options - The options for sending the soundboard sound
568
- */
569
- sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
570
521
  }
571
522
 
572
523
  declare class GuildsAPI {
@@ -1253,51 +1204,6 @@ declare class GuildsAPI {
1253
1204
  * @param options - The options for editing the guild onboarding
1254
1205
  */
1255
1206
  editOnboarding(guildId: Snowflake, body: RESTPutAPIGuildOnboardingJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildOnboarding>;
1256
- /**
1257
- * Fetches all the soundboard sounds for a guild
1258
- *
1259
- * @see {@link https://discord.com/developers/docs/resources/soundboard#list-guild-soundboard-sounds}
1260
- * @param guildId - The id of the guild to fetch the soundboard sounds for
1261
- * @param options - The options for fetching the soundboard sounds
1262
- */
1263
- getSoundboardSounds(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildSoundboardSoundsResult>;
1264
- /**
1265
- * Fetches a soundboard sound for a guild
1266
- *
1267
- * @see {@link https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound}
1268
- * @param guildId - The id of the guild to fetch the soundboard sound for
1269
- * @param soundId - The id of the soundboard sound to fetch
1270
- * @param options - The options for fetching the soundboard sound
1271
- */
1272
- getSoundboardSound(guildId: Snowflake, soundId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1273
- /**
1274
- * Creates a new soundboard sound for a guild
1275
- *
1276
- * @see {@link https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound}
1277
- * @param guildId - The id of the guild to create the soundboard sound for
1278
- * @param body - The data for creating the soundboard sound
1279
- * @param options - The options for creating the soundboard sound
1280
- */
1281
- createSoundboardSound(guildId: Snowflake, body: RESTPostAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1282
- /**
1283
- * Edits a soundboard sound for a guild
1284
- *
1285
- * @see {@link https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound}
1286
- * @param guildId - The id of the guild to edit the soundboard sound for
1287
- * @param soundId - The id of the soundboard sound to edit
1288
- * @param body - The data for editing the soundboard sound
1289
- * @param options - The options for editing the soundboard sound
1290
- */
1291
- editSoundboardSound(guildId: Snowflake, soundId: Snowflake, body: RESTPatchAPIGuildSoundboardSoundJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
1292
- /**
1293
- * Deletes a soundboard sound for a guild
1294
- *
1295
- * @see {@link https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound}
1296
- * @param guildId - The id of the guild to delete the soundboard sound for
1297
- * @param soundId - The id of the soundboard sound to delete
1298
- * @param options - The options for deleting the soundboard sound
1299
- */
1300
- deleteSoundboardSound(guildId: Snowflake, soundId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1301
1207
  }
1302
1208
 
1303
1209
  declare class WebhooksAPI {
@@ -1429,19 +1335,6 @@ declare class InteractionsAPI {
1429
1335
  private readonly rest;
1430
1336
  private readonly webhooks;
1431
1337
  constructor(rest: REST, webhooks: WebhooksAPI);
1432
- /**
1433
- * Replies to an interaction and returns an interaction callback object
1434
- *
1435
- * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1436
- * @param interactionId - The id of the interaction
1437
- * @param interactionToken - The token of the interaction
1438
- * @param body - The callback data for replying
1439
- * @param options - The options for replying
1440
- */
1441
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1442
- files?: RawFile[];
1443
- with_response: true;
1444
- }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1445
1338
  /**
1446
1339
  * Replies to an interaction
1447
1340
  *
@@ -1451,58 +1344,28 @@ declare class InteractionsAPI {
1451
1344
  * @param body - The callback data for replying
1452
1345
  * @param options - The options for replying
1453
1346
  */
1454
- reply(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1347
+ reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1455
1348
  files?: RawFile[];
1456
- with_response?: false;
1457
- }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1458
- /**
1459
- * Defers the reply to an interaction and returns an interaction callback object
1460
- *
1461
- * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1462
- * @param interactionId - The id of the interaction
1463
- * @param interactionToken - The token of the interaction
1464
- * @param body - The callback data for deferring the reply
1465
- * @param options - The options for deferring
1466
- */
1467
- defer(interactionId: Snowflake, interactionToken: string, body: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1468
- with_response: true;
1469
- }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1349
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1470
1350
  /**
1471
1351
  * Defers the reply to an interaction
1472
1352
  *
1473
1353
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1474
1354
  * @param interactionId - The id of the interaction
1475
1355
  * @param interactionToken - The token of the interaction
1476
- * @param body - The callback data for deferring the reply
1477
- * @param options - The options for deferring
1478
- */
1479
- defer(interactionId: Snowflake, interactionToken: string, body?: APIInteractionResponseDeferredChannelMessageWithSource['data'] & RESTPostAPIInteractionCallbackQuery & {
1480
- with_response?: false;
1481
- }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1482
- /**
1483
- * Defers an update from a message component interaction and returns an interaction callback object
1484
- *
1485
- * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1486
- * @param interactionId - The id of the interaction
1487
- * @param interactionToken - The token of the interaction
1488
- * @param body - The callback data for deferring the update
1356
+ * @param data - The data for deferring the reply
1489
1357
  * @param options - The options for deferring
1490
1358
  */
1491
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body: RESTPostAPIInteractionCallbackQuery & {
1492
- with_response: true;
1493
- }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1359
+ defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1494
1360
  /**
1495
1361
  * Defers an update from a message component interaction
1496
1362
  *
1497
1363
  * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1498
1364
  * @param interactionId - The id of the interaction
1499
1365
  * @param interactionToken - The token of the interaction
1500
- * @param body - The callback data for deferring the update
1501
1366
  * @param options - The options for deferring
1502
1367
  */
1503
- deferMessageUpdate(interactionId: Snowflake, interactionToken: string, body?: RESTPostAPIInteractionCallbackQuery & {
1504
- with_response?: false;
1505
- }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1368
+ deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1506
1369
  /**
1507
1370
  * Reply to a deferred interaction
1508
1371
  *
@@ -1549,19 +1412,6 @@ declare class InteractionsAPI {
1549
1412
  * @param options - The options for deleting the reply
1550
1413
  */
1551
1414
  deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1552
- /**
1553
- * Updates the message the component interaction was triggered on and returns an interaction callback object
1554
- *
1555
- * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1556
- * @param interactionId - The id of the interaction
1557
- * @param interactionToken - The token of the interaction
1558
- * @param callbackData - The callback data for updating the interaction
1559
- * @param options - The options for updating the interaction
1560
- */
1561
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1562
- files?: RawFile[];
1563
- with_response: true;
1564
- }, options: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1565
1415
  /**
1566
1416
  * Updates the message the component interaction was triggered on
1567
1417
  *
@@ -1571,22 +1421,9 @@ declare class InteractionsAPI {
1571
1421
  * @param callbackData - The callback data for updating the interaction
1572
1422
  * @param options - The options for updating the interaction
1573
1423
  */
1574
- updateMessage(interactionId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1424
+ updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
1575
1425
  files?: RawFile[];
1576
- with_response?: false;
1577
- }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1578
- /**
1579
- * Sends an autocomplete response to an interaction and returns an interaction callback object
1580
- *
1581
- * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1582
- * @param interactionId - The id of the interaction
1583
- * @param interactionToken - The token of the interaction
1584
- * @param callbackData - The callback data for the autocomplete response
1585
- * @param options - The options for sending the autocomplete response
1586
- */
1587
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1588
- with_response: true;
1589
- }, options?: Pick<RequestData, 'signal'>): Promise<APICommandAutocompleteInteractionResponseCallbackData>;
1426
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1590
1427
  /**
1591
1428
  * Sends an autocomplete response to an interaction
1592
1429
  *
@@ -1596,21 +1433,7 @@ declare class InteractionsAPI {
1596
1433
  * @param callbackData - The callback data for the autocomplete response
1597
1434
  * @param options - The options for sending the autocomplete response
1598
1435
  */
1599
- createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1600
- with_response?: false;
1601
- }, options: Pick<RequestData, 'signal'>): Promise<undefined>;
1602
- /**
1603
- * Sends a modal response to an interaction and returns an interaction callback object
1604
- *
1605
- * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1606
- * @param interactionId - The id of the interaction
1607
- * @param interactionToken - The token of the interaction
1608
- * @param callbackData - The modal callback data to send
1609
- * @param options - The options for sending the modal
1610
- */
1611
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1612
- with_response: true;
1613
- }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;
1436
+ createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1614
1437
  /**
1615
1438
  * Sends a modal response to an interaction
1616
1439
  *
@@ -1620,9 +1443,7 @@ declare class InteractionsAPI {
1620
1443
  * @param callbackData - The modal callback data to send
1621
1444
  * @param options - The options for sending the modal
1622
1445
  */
1623
- createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & {
1624
- with_response?: false;
1625
- }, options?: Pick<RequestData, 'signal'>): Promise<undefined>;
1446
+ createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1626
1447
  /**
1627
1448
  * Sends a premium required response to an interaction
1628
1449
  *
@@ -1630,7 +1451,7 @@ declare class InteractionsAPI {
1630
1451
  * @param interactionId - The id of the interaction
1631
1452
  * @param interactionToken - The token of the interaction
1632
1453
  * @param options - The options for sending the premium required response
1633
- * @deprecated Sending a premium-style button is the new Discord behaviour.
1454
+ * @deprecated Sending a premium-style button is the new Discord behavior.
1634
1455
  */
1635
1456
  sendPremiumRequired(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1636
1457
  }
@@ -1663,33 +1484,14 @@ declare class MonetizationAPI {
1663
1484
  /**
1664
1485
  * Fetches the SKUs for an application.
1665
1486
  *
1666
- * @see {@link https://discord.com/developers/docs/resources/sku#list-skus}
1667
- * @param applicationId - The application id to fetch SKUs for
1487
+ * @see {@link https://discord.com/developers/docs/monetization/skus#list-skus}
1668
1488
  * @param options - The options for fetching the SKUs.
1669
1489
  */
1670
1490
  getSKUs(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUsResult>;
1671
- /**
1672
- * Fetches subscriptions for an SKU.
1673
- *
1674
- * @see {@link https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions}
1675
- * @param skuId - The SKU id to fetch subscriptions for
1676
- * @param query - The query options for fetching subscriptions
1677
- * @param options - The options for fetching subscriptions
1678
- */
1679
- getSKUSubscriptions(skuId: Snowflake, query: RESTGetAPISKUSubscriptionsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISKUSubscriptionsResult>;
1680
- /**
1681
- * Fetches a subscription for an SKU.
1682
- *
1683
- * @see {@link https://discord.com/developers/docs/resources/subscription#get-sku-subscription}
1684
- * @param skuId - The SKU id to fetch subscription for
1685
- * @param subscriptionId - The subscription id to fetch
1686
- * @param options - The options for fetching the subscription
1687
- */
1688
- getSKUSubscription(skuId: Snowflake, subscriptionId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISubscription>;
1689
1491
  /**
1690
1492
  * Fetches the entitlements for an application.
1691
1493
  *
1692
- * @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
1494
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
1693
1495
  * @param applicationId - The application id to fetch entitlements for
1694
1496
  * @param query - The query options for fetching entitlements
1695
1497
  * @param options - The options for fetching entitlements
@@ -1698,7 +1500,7 @@ declare class MonetizationAPI {
1698
1500
  /**
1699
1501
  * Creates a test entitlement for an application's SKU.
1700
1502
  *
1701
- * @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement}
1503
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement}
1702
1504
  * @param applicationId - The application id to create the entitlement for
1703
1505
  * @param body - The data for creating the entitlement
1704
1506
  * @param options - The options for creating the entitlement
@@ -1707,7 +1509,7 @@ declare class MonetizationAPI {
1707
1509
  /**
1708
1510
  * Deletes a test entitlement for an application's SKU.
1709
1511
  *
1710
- * @see {@link https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement}
1512
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement}
1711
1513
  * @param applicationId - The application id to delete the entitlement for
1712
1514
  * @param entitlementId - The entitlement id to delete
1713
1515
  * @param options - The options for deleting the entitlement
@@ -1716,7 +1518,7 @@ declare class MonetizationAPI {
1716
1518
  /**
1717
1519
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
1718
1520
  *
1719
- * @see {@link https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement}
1521
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement}
1720
1522
  * @param applicationId - The application id to consume the entitlement for
1721
1523
  * @param entitlementId - The entitlement id to consume
1722
1524
  * @param options - The options for consuming the entitlement
@@ -1833,18 +1635,6 @@ declare class RoleConnectionsAPI {
1833
1635
  updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
1834
1636
  }
1835
1637
 
1836
- declare class SoundboardSoundsAPI {
1837
- private readonly rest;
1838
- constructor(rest: REST);
1839
- /**
1840
- * Fetches all the soundboard default sounds.
1841
- *
1842
- * @see {@link https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds}
1843
- * @param options - The options for fetching the soundboard default sounds.
1844
- */
1845
- getSoundboardDefaultSounds({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPISoundboardDefaultSoundsResult>;
1846
- }
1847
-
1848
1638
  declare class StageInstancesAPI {
1849
1639
  private readonly rest;
1850
1640
  constructor(rest: REST);
@@ -2125,7 +1915,6 @@ declare class API {
2125
1915
  readonly oauth2: OAuth2API;
2126
1916
  readonly poll: PollAPI;
2127
1917
  readonly roleConnections: RoleConnectionsAPI;
2128
- readonly soundboardSounds: SoundboardSoundsAPI;
2129
1918
  readonly stageInstances: StageInstancesAPI;
2130
1919
  readonly stickers: StickersAPI;
2131
1920
  readonly threads: ThreadsAPI;
@@ -2150,12 +1939,12 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2150
1939
  id: string;
2151
1940
  description: string | undefined;
2152
1941
  }[];
2153
- flags?: discord_api_types_v10.MessageFlags;
1942
+ flags?: discord_api_types_v10.MessageFlags | undefined;
2154
1943
  content?: string | undefined;
2155
1944
  tts?: boolean | undefined;
2156
1945
  embeds?: discord_api_types_v10.APIEmbed[] | undefined;
2157
1946
  allowed_mentions?: discord_api_types_v10.APIAllowedMentions | undefined;
2158
- components?: discord_api_types_v10.APIActionRowComponent<discord_api_types_v10.APIMessageActionRowComponent>[] | undefined;
1947
+ components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined;
2159
1948
  poll?: discord_api_types_v10.RESTAPIPoll | undefined;
2160
1949
  applied_tags?: discord_api_types_globals.Snowflake[] | undefined;
2161
1950
  thread_name?: string | undefined;
@@ -2172,4 +1961,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2172
1961
  */
2173
1962
  declare const version: string;
2174
1963
 
2175
- export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
1964
+ export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, type DescriptiveRawFile, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };