@discordjs/core 2.4.0 → 2.6.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
@@ -5,11 +5,12 @@
5
5
  </p>
6
6
  <br />
7
7
  <p>
8
- <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
8
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/badge/join_us-on_discord-5865F2?logo=discord&logoColor=white" alt="Discord server" /></a>
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://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>
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://opencollective.com/discordjs"><img src="https://img.shields.io/opencollective/backers/discordjs?maxAge=3600&logo=opencollective" alt="backers" /></a>
13
14
  <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>
14
15
  </p>
15
16
  <p>
@@ -88,7 +89,7 @@ const guild = await api.guilds.get('1234567891011');
88
89
  - [Guide][guide] ([source][guide-source])
89
90
  Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
90
91
  - [discord.js Discord server][discord]
91
- - [Discord API Discord server][discord-api]
92
+ - [Discord Developers Discord server][discord-developers]
92
93
  - [GitHub][source]
93
94
  - [npm][npm]
94
95
  - [Related libraries][related-libs]
@@ -106,12 +107,12 @@ If you don't understand something in the documentation, you are experiencing pro
106
107
  [website]: https://discord.js.org
107
108
  [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
108
109
  [documentation]: https://discord.js.org/docs/packages/core/stable
109
- [guide]: https://discordjs.guide/
110
- [guide-source]: https://github.com/discordjs/guide
111
- [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
110
+ [guide]: https://discordjs.guide
111
+ [guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
112
+ [guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
112
113
  [discord]: https://discord.gg/djs
113
- [discord-api]: https://discord.gg/discord-api
114
+ [discord-developers]: https://discord.gg/discord-developers
114
115
  [source]: https://github.com/discordjs/discord.js/tree/main/packages/core
115
116
  [npm]: https://www.npmjs.com/package/@discordjs/core
116
- [related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
117
+ [related-libs]: https://docs.discord.com/developers/developer-tools/community-resources#libraries
117
118
  [contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
@@ -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, 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';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIGuildForumThreadsJSONBody, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, 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, RESTGetAPIGuildMessagesSearchQuery, RESTGetAPIGuildMessagesSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPutAPIGuildIncidentActionsJSONBody, RESTGetAPIGuildRoleMemberCountsResult, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, 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
 
@@ -219,6 +219,15 @@ declare class ApplicationsAPI {
219
219
  * @param options - The options for deleting the emoji
220
220
  */
221
221
  deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
222
+ /**
223
+ * Fetches an activity instance of an application
224
+ *
225
+ * @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
226
+ * @param applicationId - The id of the application to fetch the activity instance of
227
+ * @param instanceId - The id of the activity instance to fetch
228
+ * @param options - The options for fetching the activity instance
229
+ */
230
+ getActivityInstance(applicationId: Snowflake, instanceId: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIActivityInstance>;
222
231
  }
223
232
 
224
233
  interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
@@ -464,7 +473,7 @@ declare class ChannelsAPI {
464
473
  * @param body - The data for starting the thread
465
474
  * @param options - The options for starting the thread
466
475
  */
467
- createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
476
+ createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
468
477
  /**
469
478
  * Fetches the archived threads of a channel
470
479
  *
@@ -528,7 +537,7 @@ declare class ChannelsAPI {
528
537
  * @param body - The data for sending the soundboard sound
529
538
  * @param options - The options for sending the soundboard sound
530
539
  */
531
- sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
540
+ sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
532
541
  /**
533
542
  * Adds a recipient to a group DM channel
534
543
  *
@@ -911,7 +920,7 @@ declare class GuildsAPI {
911
920
  * @param options - The options for editing the voice state
912
921
  * @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
913
922
  */
914
- editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
923
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
915
924
  /**
916
925
  * Fetches all emojis for a guild
917
926
  *
@@ -1167,6 +1176,15 @@ declare class GuildsAPI {
1167
1176
  * @param options - The options for searching for guild members
1168
1177
  */
1169
1178
  searchForMembers(guildId: Snowflake, query: RESTGetAPIGuildMembersSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersSearchResult>;
1179
+ /**
1180
+ * Searches for messages.
1181
+ *
1182
+ * @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
1183
+ * @param guildId - The id of the guild to search in
1184
+ * @param query - The query to search for
1185
+ * @param options - The options for searching for messages
1186
+ */
1187
+ searchForMessages(guildId: Snowflake, query: RESTGetAPIGuildMessagesSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMessagesSearchResult>;
1170
1188
  /**
1171
1189
  * Edits a guild member
1172
1190
  *
@@ -1239,7 +1257,7 @@ declare class GuildsAPI {
1239
1257
  * @param options - The options for setting the voice state
1240
1258
  * @deprecated Use {@link VoiceAPI.editVoiceState} instead
1241
1259
  */
1242
- setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
1260
+ setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
1243
1261
  /**
1244
1262
  * Fetches a guild onboarding
1245
1263
  *
@@ -1311,6 +1329,14 @@ declare class GuildsAPI {
1311
1329
  * @param options - The options for modifying guild incident actions
1312
1330
  */
1313
1331
  editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
1332
+ /**
1333
+ * Fetches role member counts for a guild.
1334
+ *
1335
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
1336
+ * @param guildId - The id of the guild to fetch role member counts for
1337
+ * @param options - The options for fetching role member counts
1338
+ */
1339
+ getRoleMemberCounts(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRoleMemberCountsResult>;
1314
1340
  }
1315
1341
 
1316
1342
  type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
@@ -1770,7 +1796,7 @@ declare class InvitesAPI {
1770
1796
  * @param code - The invite code
1771
1797
  * @param options - The options for deleting the invite
1772
1798
  */
1773
- delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1799
+ delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
1774
1800
  }
1775
1801
 
1776
1802
  declare class MonetizationAPI {
@@ -1891,7 +1917,7 @@ declare class OAuth2API {
1891
1917
  * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
1892
1918
  * @param options - The options for the current bot application information request
1893
1919
  */
1894
- getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentApplicationResult>;
1920
+ getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplication>;
1895
1921
  /**
1896
1922
  * Fetches the current authorization information
1897
1923
  *
@@ -2226,7 +2252,7 @@ declare class VoiceAPI {
2226
2252
  * @param body - The data for editing the voice state
2227
2253
  * @param options - The options for editing the voice state
2228
2254
  */
2229
- editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
2255
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
2230
2256
  /**
2231
2257
  * Edits the voice state for the current user
2232
2258
  *
@@ -2235,7 +2261,7 @@ declare class VoiceAPI {
2235
2261
  * @param body - The data for editing the voice state
2236
2262
  * @param options - The options for editing the voice state
2237
2263
  */
2238
- editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
2264
+ editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
2239
2265
  }
2240
2266
 
2241
2267
  declare class API {
@@ -2277,18 +2303,18 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2277
2303
  description: string | undefined;
2278
2304
  }[];
2279
2305
  flags?: discord_api_types_v10.MessageFlags | undefined;
2280
- content?: string | undefined;
2281
- tts?: boolean | undefined;
2282
- embeds?: discord_api_types_v10.APIEmbed[] | undefined;
2306
+ content?: string | undefined | undefined;
2307
+ tts?: boolean | undefined | undefined;
2308
+ embeds?: discord_api_types_v10.APIEmbed[] | undefined | undefined;
2283
2309
  allowed_mentions?: discord_api_types_v10.APIAllowedMentions | undefined;
2284
- components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined;
2310
+ components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined | undefined;
2285
2311
  poll?: discord_api_types_v10.RESTAPIPoll | undefined;
2286
- applied_tags?: discord_api_types_globals.Snowflake[] | undefined;
2287
- thread_name?: string | undefined;
2312
+ applied_tags?: discord_api_types_globals.Snowflake[] | undefined | undefined;
2313
+ thread_name?: string | undefined | undefined;
2288
2314
  };
2289
2315
  files: {
2290
2316
  name: string;
2291
- data: string | number | boolean | Uint8Array | Buffer;
2317
+ data: string | number | boolean | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
2292
2318
  }[];
2293
2319
  };
2294
2320
 
@@ -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, 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';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIGuildForumThreadsJSONBody, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, 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, RESTGetAPIGuildMessagesSearchQuery, RESTGetAPIGuildMessagesSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPutAPIGuildIncidentActionsJSONBody, RESTGetAPIGuildRoleMemberCountsResult, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, 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
 
@@ -219,6 +219,15 @@ declare class ApplicationsAPI {
219
219
  * @param options - The options for deleting the emoji
220
220
  */
221
221
  deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
222
+ /**
223
+ * Fetches an activity instance of an application
224
+ *
225
+ * @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
226
+ * @param applicationId - The id of the application to fetch the activity instance of
227
+ * @param instanceId - The id of the activity instance to fetch
228
+ * @param options - The options for fetching the activity instance
229
+ */
230
+ getActivityInstance(applicationId: Snowflake, instanceId: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIActivityInstance>;
222
231
  }
223
232
 
224
233
  interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
@@ -464,7 +473,7 @@ declare class ChannelsAPI {
464
473
  * @param body - The data for starting the thread
465
474
  * @param options - The options for starting the thread
466
475
  */
467
- createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
476
+ createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
468
477
  /**
469
478
  * Fetches the archived threads of a channel
470
479
  *
@@ -528,7 +537,7 @@ declare class ChannelsAPI {
528
537
  * @param body - The data for sending the soundboard sound
529
538
  * @param options - The options for sending the soundboard sound
530
539
  */
531
- sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISoundboardSound>;
540
+ sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
532
541
  /**
533
542
  * Adds a recipient to a group DM channel
534
543
  *
@@ -911,7 +920,7 @@ declare class GuildsAPI {
911
920
  * @param options - The options for editing the voice state
912
921
  * @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
913
922
  */
914
- editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
923
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
915
924
  /**
916
925
  * Fetches all emojis for a guild
917
926
  *
@@ -1167,6 +1176,15 @@ declare class GuildsAPI {
1167
1176
  * @param options - The options for searching for guild members
1168
1177
  */
1169
1178
  searchForMembers(guildId: Snowflake, query: RESTGetAPIGuildMembersSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersSearchResult>;
1179
+ /**
1180
+ * Searches for messages.
1181
+ *
1182
+ * @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
1183
+ * @param guildId - The id of the guild to search in
1184
+ * @param query - The query to search for
1185
+ * @param options - The options for searching for messages
1186
+ */
1187
+ searchForMessages(guildId: Snowflake, query: RESTGetAPIGuildMessagesSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMessagesSearchResult>;
1170
1188
  /**
1171
1189
  * Edits a guild member
1172
1190
  *
@@ -1239,7 +1257,7 @@ declare class GuildsAPI {
1239
1257
  * @param options - The options for setting the voice state
1240
1258
  * @deprecated Use {@link VoiceAPI.editVoiceState} instead
1241
1259
  */
1242
- setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
1260
+ setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
1243
1261
  /**
1244
1262
  * Fetches a guild onboarding
1245
1263
  *
@@ -1311,6 +1329,14 @@ declare class GuildsAPI {
1311
1329
  * @param options - The options for modifying guild incident actions
1312
1330
  */
1313
1331
  editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
1332
+ /**
1333
+ * Fetches role member counts for a guild.
1334
+ *
1335
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
1336
+ * @param guildId - The id of the guild to fetch role member counts for
1337
+ * @param options - The options for fetching role member counts
1338
+ */
1339
+ getRoleMemberCounts(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRoleMemberCountsResult>;
1314
1340
  }
1315
1341
 
1316
1342
  type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
@@ -1770,7 +1796,7 @@ declare class InvitesAPI {
1770
1796
  * @param code - The invite code
1771
1797
  * @param options - The options for deleting the invite
1772
1798
  */
1773
- delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
1799
+ delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
1774
1800
  }
1775
1801
 
1776
1802
  declare class MonetizationAPI {
@@ -1891,7 +1917,7 @@ declare class OAuth2API {
1891
1917
  * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
1892
1918
  * @param options - The options for the current bot application information request
1893
1919
  */
1894
- getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentApplicationResult>;
1920
+ getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplication>;
1895
1921
  /**
1896
1922
  * Fetches the current authorization information
1897
1923
  *
@@ -2226,7 +2252,7 @@ declare class VoiceAPI {
2226
2252
  * @param body - The data for editing the voice state
2227
2253
  * @param options - The options for editing the voice state
2228
2254
  */
2229
- editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
2255
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
2230
2256
  /**
2231
2257
  * Edits the voice state for the current user
2232
2258
  *
@@ -2235,7 +2261,7 @@ declare class VoiceAPI {
2235
2261
  * @param body - The data for editing the voice state
2236
2262
  * @param options - The options for editing the voice state
2237
2263
  */
2238
- editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
2264
+ editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
2239
2265
  }
2240
2266
 
2241
2267
  declare class API {
@@ -2277,18 +2303,18 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
2277
2303
  description: string | undefined;
2278
2304
  }[];
2279
2305
  flags?: discord_api_types_v10.MessageFlags | undefined;
2280
- content?: string | undefined;
2281
- tts?: boolean | undefined;
2282
- embeds?: discord_api_types_v10.APIEmbed[] | undefined;
2306
+ content?: string | undefined | undefined;
2307
+ tts?: boolean | undefined | undefined;
2308
+ embeds?: discord_api_types_v10.APIEmbed[] | undefined | undefined;
2283
2309
  allowed_mentions?: discord_api_types_v10.APIAllowedMentions | undefined;
2284
- components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined;
2310
+ components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined | undefined;
2285
2311
  poll?: discord_api_types_v10.RESTAPIPoll | undefined;
2286
- applied_tags?: discord_api_types_globals.Snowflake[] | undefined;
2287
- thread_name?: string | undefined;
2312
+ applied_tags?: discord_api_types_globals.Snowflake[] | undefined | undefined;
2313
+ thread_name?: string | undefined | undefined;
2288
2314
  };
2289
2315
  files: {
2290
2316
  name: string;
2291
- data: string | number | boolean | Uint8Array | Buffer;
2317
+ data: string | number | boolean | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
2292
2318
  }[];
2293
2319
  };
2294
2320
 
package/dist/http-only.js CHANGED
@@ -53,6 +53,7 @@ var ApplicationCommandsAPI = class {
53
53
  constructor(rest) {
54
54
  this.rest = rest;
55
55
  }
56
+ rest;
56
57
  static {
57
58
  __name(this, "ApplicationCommandsAPI");
58
59
  }
@@ -278,6 +279,7 @@ var ApplicationsAPI = class {
278
279
  constructor(rest) {
279
280
  this.rest = rest;
280
281
  }
282
+ rest;
281
283
  static {
282
284
  __name(this, "ApplicationsAPI");
283
285
  }
@@ -368,6 +370,19 @@ var ApplicationsAPI = class {
368
370
  async deleteEmoji(applicationId, emojiId, { signal } = {}) {
369
371
  await this.rest.delete(import_v102.Routes.applicationEmoji(applicationId, emojiId), { signal });
370
372
  }
373
+ /**
374
+ * Fetches an activity instance of an application
375
+ *
376
+ * @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
377
+ * @param applicationId - The id of the application to fetch the activity instance of
378
+ * @param instanceId - The id of the activity instance to fetch
379
+ * @param options - The options for fetching the activity instance
380
+ */
381
+ async getActivityInstance(applicationId, instanceId, { signal } = {}) {
382
+ return this.rest.get(import_v102.Routes.applicationActivityInstance(applicationId, instanceId), {
383
+ signal
384
+ });
385
+ }
371
386
  };
372
387
 
373
388
  // src/api/channel.ts
@@ -377,6 +392,7 @@ var ChannelsAPI = class {
377
392
  constructor(rest) {
378
393
  this.rest = rest;
379
394
  }
395
+ rest;
380
396
  static {
381
397
  __name(this, "ChannelsAPI");
382
398
  }
@@ -801,7 +817,7 @@ var ChannelsAPI = class {
801
817
  * @param options - The options for sending the soundboard sound
802
818
  */
803
819
  async sendSoundboardSound(channelId, body, { signal } = {}) {
804
- return this.rest.post(import_v103.Routes.sendSoundboardSound(channelId), {
820
+ await this.rest.post(import_v103.Routes.sendSoundboardSound(channelId), {
805
821
  body,
806
822
  signal
807
823
  });
@@ -842,6 +858,7 @@ var GatewayAPI = class {
842
858
  constructor(rest) {
843
859
  this.rest = rest;
844
860
  }
861
+ rest;
845
862
  static {
846
863
  __name(this, "GatewayAPI");
847
864
  }
@@ -878,6 +895,7 @@ var VoiceAPI = class {
878
895
  constructor(rest) {
879
896
  this.rest = rest;
880
897
  }
898
+ rest;
881
899
  static {
882
900
  __name(this, "VoiceAPI");
883
901
  }
@@ -949,6 +967,7 @@ var GuildsAPI = class {
949
967
  constructor(rest) {
950
968
  this.rest = rest;
951
969
  }
970
+ rest;
952
971
  static {
953
972
  __name(this, "GuildsAPI");
954
973
  }
@@ -1779,6 +1798,20 @@ var GuildsAPI = class {
1779
1798
  signal
1780
1799
  });
1781
1800
  }
1801
+ /**
1802
+ * Searches for messages.
1803
+ *
1804
+ * @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
1805
+ * @param guildId - The id of the guild to search in
1806
+ * @param query - The query to search for
1807
+ * @param options - The options for searching for messages
1808
+ */
1809
+ async searchForMessages(guildId, query, { signal } = {}) {
1810
+ return this.rest.get(import_v106.Routes.guildMessagesSearch(guildId), {
1811
+ query: (0, import_rest3.makeURLSearchParams)(query),
1812
+ signal
1813
+ });
1814
+ }
1782
1815
  /**
1783
1816
  * Edits a guild member
1784
1817
  *
@@ -1978,6 +2011,18 @@ var GuildsAPI = class {
1978
2011
  signal
1979
2012
  });
1980
2013
  }
2014
+ /**
2015
+ * Fetches role member counts for a guild.
2016
+ *
2017
+ * @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
2018
+ * @param guildId - The id of the guild to fetch role member counts for
2019
+ * @param options - The options for fetching role member counts
2020
+ */
2021
+ async getRoleMemberCounts(guildId, { signal } = {}) {
2022
+ return this.rest.get(import_v106.Routes.guildRoleMemberCounts(guildId), {
2023
+ signal
2024
+ });
2025
+ }
1981
2026
  };
1982
2027
 
1983
2028
  // src/api/interactions.ts
@@ -1988,6 +2033,8 @@ var InteractionsAPI = class {
1988
2033
  this.rest = rest;
1989
2034
  this.webhooks = webhooks;
1990
2035
  }
2036
+ rest;
2037
+ webhooks;
1991
2038
  static {
1992
2039
  __name(this, "InteractionsAPI");
1993
2040
  }
@@ -2160,6 +2207,7 @@ var InvitesAPI = class {
2160
2207
  constructor(rest) {
2161
2208
  this.rest = rest;
2162
2209
  }
2210
+ rest;
2163
2211
  static {
2164
2212
  __name(this, "InvitesAPI");
2165
2213
  }
@@ -2185,7 +2233,7 @@ var InvitesAPI = class {
2185
2233
  * @param options - The options for deleting the invite
2186
2234
  */
2187
2235
  async delete(code, { reason, signal } = {}) {
2188
- await this.rest.delete(import_v108.Routes.invite(code), { reason, signal });
2236
+ return this.rest.delete(import_v108.Routes.invite(code), { reason, signal });
2189
2237
  }
2190
2238
  };
2191
2239
 
@@ -2196,6 +2244,7 @@ var MonetizationAPI = class {
2196
2244
  constructor(rest) {
2197
2245
  this.rest = rest;
2198
2246
  }
2247
+ rest;
2199
2248
  static {
2200
2249
  __name(this, "MonetizationAPI");
2201
2250
  }
@@ -2308,6 +2357,7 @@ var OAuth2API = class {
2308
2357
  constructor(rest) {
2309
2358
  this.rest = rest;
2310
2359
  }
2360
+ rest;
2311
2361
  static {
2312
2362
  __name(this, "OAuth2API");
2313
2363
  }
@@ -2430,6 +2480,7 @@ var PollAPI = class {
2430
2480
  constructor(rest) {
2431
2481
  this.rest = rest;
2432
2482
  }
2483
+ rest;
2433
2484
  static {
2434
2485
  __name(this, "PollAPI");
2435
2486
  }
@@ -2470,6 +2521,7 @@ var RoleConnectionsAPI = class {
2470
2521
  constructor(rest) {
2471
2522
  this.rest = rest;
2472
2523
  }
2524
+ rest;
2473
2525
  static {
2474
2526
  __name(this, "RoleConnectionsAPI");
2475
2527
  }
@@ -2507,6 +2559,7 @@ var SoundboardSoundsAPI = class {
2507
2559
  constructor(rest) {
2508
2560
  this.rest = rest;
2509
2561
  }
2562
+ rest;
2510
2563
  static {
2511
2564
  __name(this, "SoundboardSoundsAPI");
2512
2565
  }
@@ -2529,6 +2582,7 @@ var StageInstancesAPI = class {
2529
2582
  constructor(rest) {
2530
2583
  this.rest = rest;
2531
2584
  }
2585
+ rest;
2532
2586
  static {
2533
2587
  __name(this, "StageInstancesAPI");
2534
2588
  }
@@ -2589,6 +2643,7 @@ var StickersAPI = class {
2589
2643
  constructor(rest) {
2590
2644
  this.rest = rest;
2591
2645
  }
2646
+ rest;
2592
2647
  static {
2593
2648
  __name(this, "StickersAPI");
2594
2649
  }
@@ -2639,6 +2694,7 @@ var ThreadsAPI = class {
2639
2694
  constructor(rest) {
2640
2695
  this.rest = rest;
2641
2696
  }
2697
+ rest;
2642
2698
  static {
2643
2699
  __name(this, "ThreadsAPI");
2644
2700
  }
@@ -2714,6 +2770,7 @@ var UsersAPI = class {
2714
2770
  constructor(rest) {
2715
2771
  this.rest = rest;
2716
2772
  }
2773
+ rest;
2717
2774
  static {
2718
2775
  __name(this, "UsersAPI");
2719
2776
  }
@@ -2851,6 +2908,7 @@ var WebhooksAPI = class {
2851
2908
  constructor(rest) {
2852
2909
  this.rest = rest;
2853
2910
  }
2911
+ rest;
2854
2912
  static {
2855
2913
  __name(this, "WebhooksAPI");
2856
2914
  }
@@ -3033,6 +3091,7 @@ var API = class {
3033
3091
  this.webhooks = new WebhooksAPI(rest);
3034
3092
  this.interactions = new InteractionsAPI(rest, this.webhooks);
3035
3093
  }
3094
+ rest;
3036
3095
  static {
3037
3096
  __name(this, "API");
3038
3097
  }
@@ -3075,7 +3134,7 @@ __name(withFiles, "withFiles");
3075
3134
 
3076
3135
  // src/http-only/index.ts
3077
3136
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
3078
- var version = "2.4.0";
3137
+ var version = "2.6.0";
3079
3138
  // Annotate the CommonJS export names for ESM import in node:
3080
3139
  0 && (module.exports = {
3081
3140
  API,