@discordjs/core 2.0.0-dev.1724112651-87776bb0e → 2.0.0-dev.1724199051-00accf747

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, 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, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, 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, RESTPostAPIEntitlementBody, 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
 
6
6
  declare class ApplicationCommandsAPI {
@@ -173,6 +173,51 @@ declare class ApplicationsAPI {
173
173
  * @param options - The options for editing the application
174
174
  */
175
175
  editCurrent(body: RESTPatchCurrentApplicationJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplication>;
176
+ /**
177
+ * Fetches all emojis of an application
178
+ *
179
+ * @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
180
+ * @param applicationId - The id of the application to fetch the emojis of
181
+ * @param options - The options for fetching the emojis
182
+ */
183
+ getEmojis(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationEmojisResult>;
184
+ /**
185
+ * Fetches an emoji of an application
186
+ *
187
+ * @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
188
+ * @param applicationId - The id of the application to fetch the emoji of
189
+ * @param emojiId - The id of the emoji to fetch
190
+ * @param options - The options for fetching the emoji
191
+ */
192
+ getEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
193
+ /**
194
+ * Creates a new emoji of an application
195
+ *
196
+ * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
197
+ * @param applicationId - The id of the application to create the emoji of
198
+ * @param body - The data for creating the emoji
199
+ * @param options - The options for creating the emoji
200
+ */
201
+ createEmoji(applicationId: Snowflake, body: RESTPostAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
202
+ /**
203
+ * Edits an emoji of an application
204
+ *
205
+ * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
206
+ * @param applicationId - The id of the application to edit the emoji of
207
+ * @param emojiId - The id of the emoji to edit
208
+ * @param body - The data for editing the emoji
209
+ * @param options - The options for editing the emoji
210
+ */
211
+ editEmoji(applicationId: Snowflake, emojiId: Snowflake, body: RESTPatchAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
212
+ /**
213
+ * Deletes an emoji of an application
214
+ *
215
+ * @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
216
+ * @param applicationId - The id of the application to delete the emoji of
217
+ * @param emojiId - The id of the emoji to delete
218
+ * @param options - The options for deleting the emoji
219
+ */
220
+ deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
176
221
  }
177
222
 
178
223
  interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
@@ -794,13 +839,14 @@ declare class GuildsAPI {
794
839
  /**
795
840
  * Edits a user's voice state in a guild
796
841
  *
797
- * @see {@link https://discord.com/developers/docs/resources/guild#modify-user-voice-state}
842
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state}
798
843
  * @param guildId - The id of the guild to edit the current user's voice state in
799
844
  * @param userId - The id of the user to edit the voice state for
800
845
  * @param body - The data for editing the voice state
801
846
  * @param options - The options for editing the voice state
847
+ * @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
802
848
  */
803
- editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
849
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
804
850
  /**
805
851
  * Fetches all emojis for a guild
806
852
  *
@@ -1124,11 +1170,13 @@ declare class GuildsAPI {
1124
1170
  /**
1125
1171
  * Sets the voice state for the current user
1126
1172
  *
1127
- * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
1173
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state}
1128
1174
  * @param guildId - The id of the guild
1129
- * @param body - The options for setting the voice state
1175
+ * @param body - The data for setting the voice state
1176
+ * @param options - The options for setting the voice state
1177
+ * @deprecated Use {@link VoiceAPI.editVoiceState} instead
1130
1178
  */
1131
- setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody): Promise<never>;
1179
+ setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
1132
1180
  /**
1133
1181
  * Fetches a guild onboarding
1134
1182
  *
@@ -1518,6 +1566,16 @@ declare class OAuth2API {
1518
1566
  * @param options - The options for the current authorization information request
1519
1567
  */
1520
1568
  getCurrentAuthorizationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>;
1569
+ /**
1570
+ * Revokes an OAuth2 token
1571
+ *
1572
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example}
1573
+ * @param applicationId - The application id
1574
+ * @param applicationSecret - The application secret
1575
+ * @param body - The body of the token revocation request
1576
+ * @param options - The options for the token revocation request
1577
+ */
1578
+ revokeToken(applicationId: Snowflake, applicationSecret: string, body: RESTPostOAuth2TokenRevocationQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1521
1579
  }
1522
1580
 
1523
1581
  declare class PollAPI {
@@ -1608,6 +1666,14 @@ declare class StageInstancesAPI {
1608
1666
  declare class StickersAPI {
1609
1667
  private readonly rest;
1610
1668
  constructor(rest: REST);
1669
+ /**
1670
+ * Fetches a sticker pack
1671
+ *
1672
+ * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker-pack}
1673
+ * @param packId - The id of the sticker pack
1674
+ * @param options - The options for fetching the sticker pack
1675
+ */
1676
+ getStickerPack(packId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIStickerPack>;
1611
1677
  /**
1612
1678
  * Fetches all of the sticker packs
1613
1679
  *
@@ -1792,6 +1858,39 @@ declare class VoiceAPI {
1792
1858
  * @param options - The options for fetching the voice regions
1793
1859
  */
1794
1860
  getVoiceRegions({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIVoiceRegionsResult>;
1861
+ /**
1862
+ * Fetches voice state of a user by their id
1863
+ *
1864
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-user-voice-state}
1865
+ * @param options - The options for fetching user voice state
1866
+ */
1867
+ getUserVoiceState(guildId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIVoiceState>;
1868
+ /**
1869
+ * Fetches the current user's voice state
1870
+ *
1871
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-current-user-voice-state}
1872
+ * @param options - The options for fetching user voice state
1873
+ */
1874
+ getVoiceState(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIVoiceState>;
1875
+ /**
1876
+ * Edits a user's voice state in a guild
1877
+ *
1878
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state}
1879
+ * @param guildId - The id of the guild to edit the current user's voice state in
1880
+ * @param userId - The id of the user to edit the voice state for
1881
+ * @param body - The data for editing the voice state
1882
+ * @param options - The options for editing the voice state
1883
+ */
1884
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
1885
+ /**
1886
+ * Edits the voice state for the current user
1887
+ *
1888
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state}
1889
+ * @param guildId - The id of the guild
1890
+ * @param body - The data for editing the voice state
1891
+ * @param options - The options for editing the voice state
1892
+ */
1893
+ editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
1795
1894
  }
1796
1895
 
1797
1896
  declare class API {
@@ -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, 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, RESTPostAPIEntitlementBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, 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, RESTPostAPIEntitlementBody, 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
 
6
6
  declare class ApplicationCommandsAPI {
@@ -173,6 +173,51 @@ declare class ApplicationsAPI {
173
173
  * @param options - The options for editing the application
174
174
  */
175
175
  editCurrent(body: RESTPatchCurrentApplicationJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplication>;
176
+ /**
177
+ * Fetches all emojis of an application
178
+ *
179
+ * @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
180
+ * @param applicationId - The id of the application to fetch the emojis of
181
+ * @param options - The options for fetching the emojis
182
+ */
183
+ getEmojis(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationEmojisResult>;
184
+ /**
185
+ * Fetches an emoji of an application
186
+ *
187
+ * @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
188
+ * @param applicationId - The id of the application to fetch the emoji of
189
+ * @param emojiId - The id of the emoji to fetch
190
+ * @param options - The options for fetching the emoji
191
+ */
192
+ getEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
193
+ /**
194
+ * Creates a new emoji of an application
195
+ *
196
+ * @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
197
+ * @param applicationId - The id of the application to create the emoji of
198
+ * @param body - The data for creating the emoji
199
+ * @param options - The options for creating the emoji
200
+ */
201
+ createEmoji(applicationId: Snowflake, body: RESTPostAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
202
+ /**
203
+ * Edits an emoji of an application
204
+ *
205
+ * @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
206
+ * @param applicationId - The id of the application to edit the emoji of
207
+ * @param emojiId - The id of the emoji to edit
208
+ * @param body - The data for editing the emoji
209
+ * @param options - The options for editing the emoji
210
+ */
211
+ editEmoji(applicationId: Snowflake, emojiId: Snowflake, body: RESTPatchAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
212
+ /**
213
+ * Deletes an emoji of an application
214
+ *
215
+ * @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
216
+ * @param applicationId - The id of the application to delete the emoji of
217
+ * @param emojiId - The id of the emoji to delete
218
+ * @param options - The options for deleting the emoji
219
+ */
220
+ deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
176
221
  }
177
222
 
178
223
  interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
@@ -794,13 +839,14 @@ declare class GuildsAPI {
794
839
  /**
795
840
  * Edits a user's voice state in a guild
796
841
  *
797
- * @see {@link https://discord.com/developers/docs/resources/guild#modify-user-voice-state}
842
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state}
798
843
  * @param guildId - The id of the guild to edit the current user's voice state in
799
844
  * @param userId - The id of the user to edit the voice state for
800
845
  * @param body - The data for editing the voice state
801
846
  * @param options - The options for editing the voice state
847
+ * @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
802
848
  */
803
- editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
849
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
804
850
  /**
805
851
  * Fetches all emojis for a guild
806
852
  *
@@ -1124,11 +1170,13 @@ declare class GuildsAPI {
1124
1170
  /**
1125
1171
  * Sets the voice state for the current user
1126
1172
  *
1127
- * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
1173
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state}
1128
1174
  * @param guildId - The id of the guild
1129
- * @param body - The options for setting the voice state
1175
+ * @param body - The data for setting the voice state
1176
+ * @param options - The options for setting the voice state
1177
+ * @deprecated Use {@link VoiceAPI.editVoiceState} instead
1130
1178
  */
1131
- setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody): Promise<never>;
1179
+ setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
1132
1180
  /**
1133
1181
  * Fetches a guild onboarding
1134
1182
  *
@@ -1518,6 +1566,16 @@ declare class OAuth2API {
1518
1566
  * @param options - The options for the current authorization information request
1519
1567
  */
1520
1568
  getCurrentAuthorizationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>;
1569
+ /**
1570
+ * Revokes an OAuth2 token
1571
+ *
1572
+ * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example}
1573
+ * @param applicationId - The application id
1574
+ * @param applicationSecret - The application secret
1575
+ * @param body - The body of the token revocation request
1576
+ * @param options - The options for the token revocation request
1577
+ */
1578
+ revokeToken(applicationId: Snowflake, applicationSecret: string, body: RESTPostOAuth2TokenRevocationQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
1521
1579
  }
1522
1580
 
1523
1581
  declare class PollAPI {
@@ -1608,6 +1666,14 @@ declare class StageInstancesAPI {
1608
1666
  declare class StickersAPI {
1609
1667
  private readonly rest;
1610
1668
  constructor(rest: REST);
1669
+ /**
1670
+ * Fetches a sticker pack
1671
+ *
1672
+ * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker-pack}
1673
+ * @param packId - The id of the sticker pack
1674
+ * @param options - The options for fetching the sticker pack
1675
+ */
1676
+ getStickerPack(packId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIStickerPack>;
1611
1677
  /**
1612
1678
  * Fetches all of the sticker packs
1613
1679
  *
@@ -1792,6 +1858,39 @@ declare class VoiceAPI {
1792
1858
  * @param options - The options for fetching the voice regions
1793
1859
  */
1794
1860
  getVoiceRegions({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIVoiceRegionsResult>;
1861
+ /**
1862
+ * Fetches voice state of a user by their id
1863
+ *
1864
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-user-voice-state}
1865
+ * @param options - The options for fetching user voice state
1866
+ */
1867
+ getUserVoiceState(guildId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIVoiceState>;
1868
+ /**
1869
+ * Fetches the current user's voice state
1870
+ *
1871
+ * @see {@link https://discord.com/developers/docs/resources/voice#get-current-user-voice-state}
1872
+ * @param options - The options for fetching user voice state
1873
+ */
1874
+ getVoiceState(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIVoiceState>;
1875
+ /**
1876
+ * Edits a user's voice state in a guild
1877
+ *
1878
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-user-voice-state}
1879
+ * @param guildId - The id of the guild to edit the current user's voice state in
1880
+ * @param userId - The id of the user to edit the voice state for
1881
+ * @param body - The data for editing the voice state
1882
+ * @param options - The options for editing the voice state
1883
+ */
1884
+ editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<never>;
1885
+ /**
1886
+ * Edits the voice state for the current user
1887
+ *
1888
+ * @see {@link https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state}
1889
+ * @param guildId - The id of the guild
1890
+ * @param body - The data for editing the voice state
1891
+ * @param options - The options for editing the voice state
1892
+ */
1893
+ editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
1795
1894
  }
1796
1895
 
1797
1896
  declare class API {