@discordjs/core 3.0.0-dev.1738066740-6df42db33 → 3.0.0-dev.1738109515-fa0d4b507
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/dist/http-only.js +1 -1
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +1 -1
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +88 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -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, RESTPostAPIGuildStickerFormDataBody, 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, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, 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, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } 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, RESTPostAPIGuildStickerFormDataBody, 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, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, 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, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewaySoundboardSoundsDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayRequestSoundboardSoundsData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } from 'discord-api-types/v10';
|
|
4
4
|
export * from 'discord-api-types/v10';
|
|
5
5
|
import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
|
|
6
6
|
import { Awaitable } from '@discordjs/util';
|
|
@@ -2273,6 +2273,7 @@ interface MappedEvents {
|
|
|
2273
2273
|
[GatewayDispatchEvents.GuildSoundboardSoundDelete]: [ToEventProps<GatewayGuildSoundboardSoundDeleteDispatch>];
|
|
2274
2274
|
[GatewayDispatchEvents.GuildSoundboardSoundUpdate]: [ToEventProps<GatewayGuildSoundboardSoundUpdateDispatch>];
|
|
2275
2275
|
[GatewayDispatchEvents.GuildSoundboardSoundsUpdate]: [ToEventProps<GatewayGuildSoundboardSoundsUpdateDispatch>];
|
|
2276
|
+
[GatewayDispatchEvents.SoundboardSounds]: [ToEventProps<GatewaySoundboardSoundsDispatchData>];
|
|
2276
2277
|
[GatewayDispatchEvents.GuildStickersUpdate]: [ToEventProps<GatewayGuildStickersUpdateDispatchData>];
|
|
2277
2278
|
[GatewayDispatchEvents.GuildUpdate]: [ToEventProps<GatewayGuildUpdateDispatchData>];
|
|
2278
2279
|
[GatewayDispatchEvents.IntegrationCreate]: [ToEventProps<GatewayIntegrationCreateDispatchData>];
|
|
@@ -2369,6 +2370,41 @@ declare class Client extends AsyncEventEmitter<MappedEvents> {
|
|
|
2369
2370
|
notFound: unknown[];
|
|
2370
2371
|
presences: discord_api_types_v10.GatewayGuildMembersChunkPresence[];
|
|
2371
2372
|
}>;
|
|
2373
|
+
/**
|
|
2374
|
+
* Requests soundboard sounds from the gateway and returns an async iterator that yields the data from each soundboard sounds event.
|
|
2375
|
+
*
|
|
2376
|
+
* @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
|
|
2377
|
+
* @param options - The options for the request
|
|
2378
|
+
* @param timeout - The timeout for waiting for each soundboard sounds
|
|
2379
|
+
* @example
|
|
2380
|
+
* Requesting soundboard sounds for specific guilds
|
|
2381
|
+
* ```ts
|
|
2382
|
+
* for await (const { guildId, soundboardSounds } of this.requestSoundboardSoundsIterator({
|
|
2383
|
+
* guild_ids: ['1234567890', '9876543210'],
|
|
2384
|
+
* })) {
|
|
2385
|
+
* console.log(`Soundboard sounds for guild ${guildId}:`, soundboardSounds);
|
|
2386
|
+
* }
|
|
2387
|
+
* ```
|
|
2388
|
+
*/
|
|
2389
|
+
requestSoundboardSoundsIterator(options: GatewayRequestSoundboardSoundsData, timeout?: number): AsyncGenerator<{
|
|
2390
|
+
guildId: string;
|
|
2391
|
+
soundboardSounds: discord_api_types_v10.APISoundboardSound[];
|
|
2392
|
+
}, void, unknown>;
|
|
2393
|
+
/**
|
|
2394
|
+
* Requests soundboard sounds from the gateway.
|
|
2395
|
+
*
|
|
2396
|
+
* @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
|
|
2397
|
+
* @param options - The options for the request
|
|
2398
|
+
* @param timeout - The timeout for waiting for each soundboard sounds event
|
|
2399
|
+
* @example
|
|
2400
|
+
* Requesting soundboard sounds for specific guilds
|
|
2401
|
+
* ```ts
|
|
2402
|
+
* const soundboardSounds = await client.requestSoundboardSounds({ guild_ids: ['1234567890', '9876543210'], });
|
|
2403
|
+
*
|
|
2404
|
+
* console.log(soundboardSounds.get('1234567890'));
|
|
2405
|
+
* ```
|
|
2406
|
+
*/
|
|
2407
|
+
requestSoundboardSounds(options: GatewayRequestSoundboardSoundsData, timeout?: number): Promise<Map<string, discord_api_types_v10.APISoundboardSound[]>>;
|
|
2372
2408
|
/**
|
|
2373
2409
|
* Updates the voice state of the bot user
|
|
2374
2410
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -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, RESTPostAPIGuildStickerFormDataBody, 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, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, 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, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } 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, RESTPostAPIGuildStickerFormDataBody, 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, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, 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, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, GatewaySendPayload, GatewayDispatchEvents, GatewayApplicationCommandPermissionsUpdateDispatchData, GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData, GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData, GatewayEntitlementCreateDispatchData, GatewayEntitlementDeleteDispatchData, GatewayEntitlementUpdateDispatchData, GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundCreateDispatch, GatewayGuildSoundboardSoundDeleteDispatch, GatewayGuildSoundboardSoundUpdateDispatch, GatewayGuildSoundboardSoundsUpdateDispatch, GatewaySoundboardSoundsDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData, GatewayInteractionCreateDispatchData, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageCreateDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayReadyDispatchData, GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData, GatewaySubscriptionCreateDispatchData, GatewaySubscriptionDeleteDispatchData, GatewaySubscriptionUpdateDispatchData, GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GatewayRequestGuildMembersData, GatewayRequestSoundboardSoundsData, GatewayVoiceStateUpdateData, GatewayPresenceUpdateData } from 'discord-api-types/v10';
|
|
4
4
|
export * from 'discord-api-types/v10';
|
|
5
5
|
import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
|
|
6
6
|
import { Awaitable } from '@discordjs/util';
|
|
@@ -2273,6 +2273,7 @@ interface MappedEvents {
|
|
|
2273
2273
|
[GatewayDispatchEvents.GuildSoundboardSoundDelete]: [ToEventProps<GatewayGuildSoundboardSoundDeleteDispatch>];
|
|
2274
2274
|
[GatewayDispatchEvents.GuildSoundboardSoundUpdate]: [ToEventProps<GatewayGuildSoundboardSoundUpdateDispatch>];
|
|
2275
2275
|
[GatewayDispatchEvents.GuildSoundboardSoundsUpdate]: [ToEventProps<GatewayGuildSoundboardSoundsUpdateDispatch>];
|
|
2276
|
+
[GatewayDispatchEvents.SoundboardSounds]: [ToEventProps<GatewaySoundboardSoundsDispatchData>];
|
|
2276
2277
|
[GatewayDispatchEvents.GuildStickersUpdate]: [ToEventProps<GatewayGuildStickersUpdateDispatchData>];
|
|
2277
2278
|
[GatewayDispatchEvents.GuildUpdate]: [ToEventProps<GatewayGuildUpdateDispatchData>];
|
|
2278
2279
|
[GatewayDispatchEvents.IntegrationCreate]: [ToEventProps<GatewayIntegrationCreateDispatchData>];
|
|
@@ -2369,6 +2370,41 @@ declare class Client extends AsyncEventEmitter<MappedEvents> {
|
|
|
2369
2370
|
notFound: unknown[];
|
|
2370
2371
|
presences: discord_api_types_v10.GatewayGuildMembersChunkPresence[];
|
|
2371
2372
|
}>;
|
|
2373
|
+
/**
|
|
2374
|
+
* Requests soundboard sounds from the gateway and returns an async iterator that yields the data from each soundboard sounds event.
|
|
2375
|
+
*
|
|
2376
|
+
* @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
|
|
2377
|
+
* @param options - The options for the request
|
|
2378
|
+
* @param timeout - The timeout for waiting for each soundboard sounds
|
|
2379
|
+
* @example
|
|
2380
|
+
* Requesting soundboard sounds for specific guilds
|
|
2381
|
+
* ```ts
|
|
2382
|
+
* for await (const { guildId, soundboardSounds } of this.requestSoundboardSoundsIterator({
|
|
2383
|
+
* guild_ids: ['1234567890', '9876543210'],
|
|
2384
|
+
* })) {
|
|
2385
|
+
* console.log(`Soundboard sounds for guild ${guildId}:`, soundboardSounds);
|
|
2386
|
+
* }
|
|
2387
|
+
* ```
|
|
2388
|
+
*/
|
|
2389
|
+
requestSoundboardSoundsIterator(options: GatewayRequestSoundboardSoundsData, timeout?: number): AsyncGenerator<{
|
|
2390
|
+
guildId: string;
|
|
2391
|
+
soundboardSounds: discord_api_types_v10.APISoundboardSound[];
|
|
2392
|
+
}, void, unknown>;
|
|
2393
|
+
/**
|
|
2394
|
+
* Requests soundboard sounds from the gateway.
|
|
2395
|
+
*
|
|
2396
|
+
* @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
|
|
2397
|
+
* @param options - The options for the request
|
|
2398
|
+
* @param timeout - The timeout for waiting for each soundboard sounds event
|
|
2399
|
+
* @example
|
|
2400
|
+
* Requesting soundboard sounds for specific guilds
|
|
2401
|
+
* ```ts
|
|
2402
|
+
* const soundboardSounds = await client.requestSoundboardSounds({ guild_ids: ['1234567890', '9876543210'], });
|
|
2403
|
+
*
|
|
2404
|
+
* console.log(soundboardSounds.get('1234567890'));
|
|
2405
|
+
* ```
|
|
2406
|
+
*/
|
|
2407
|
+
requestSoundboardSounds(options: GatewayRequestSoundboardSoundsData, timeout?: number): Promise<Map<string, discord_api_types_v10.APISoundboardSound[]>>;
|
|
2372
2408
|
/**
|
|
2373
2409
|
* Updates the voice state of the bot user
|
|
2374
2410
|
*
|
package/dist/index.js
CHANGED
|
@@ -3101,6 +3101,10 @@ var import_ws = require("@discordjs/ws");
|
|
|
3101
3101
|
var import_snowflake = require("@sapphire/snowflake");
|
|
3102
3102
|
var import_async_event_emitter = require("@vladfrangu/async_event_emitter");
|
|
3103
3103
|
var import_v1018 = require("discord-api-types/v10");
|
|
3104
|
+
function createTimer(controller, timeout) {
|
|
3105
|
+
return (0, import_node_timers.setTimeout)(() => controller.abort(), timeout);
|
|
3106
|
+
}
|
|
3107
|
+
__name(createTimer, "createTimer");
|
|
3104
3108
|
var Client = class extends import_async_event_emitter.AsyncEventEmitter {
|
|
3105
3109
|
static {
|
|
3106
3110
|
__name(this, "Client");
|
|
@@ -3135,10 +3139,7 @@ var Client = class extends import_async_event_emitter.AsyncEventEmitter {
|
|
|
3135
3139
|
const shardId = (0, import_util.calculateShardId)(options.guild_id, await this.gateway.getShardCount());
|
|
3136
3140
|
const nonce = options.nonce ?? import_snowflake.DiscordSnowflake.generate().toString();
|
|
3137
3141
|
const controller = new AbortController();
|
|
3138
|
-
|
|
3139
|
-
controller.abort();
|
|
3140
|
-
}, timeout), "createTimer");
|
|
3141
|
-
let timer = createTimer();
|
|
3142
|
+
let timer = createTimer(controller, timeout);
|
|
3142
3143
|
await this.gateway.send(shardId, {
|
|
3143
3144
|
op: import_v1018.GatewayOpcodes.RequestGuildMembers,
|
|
3144
3145
|
// eslint-disable-next-line id-length
|
|
@@ -3163,11 +3164,8 @@ var Client = class extends import_async_event_emitter.AsyncEventEmitter {
|
|
|
3163
3164
|
chunkIndex: data.chunk_index,
|
|
3164
3165
|
chunkCount: data.chunk_count
|
|
3165
3166
|
};
|
|
3166
|
-
if (data.chunk_index >= data.chunk_count - 1)
|
|
3167
|
-
|
|
3168
|
-
} else {
|
|
3169
|
-
timer = createTimer();
|
|
3170
|
-
}
|
|
3167
|
+
if (data.chunk_index >= data.chunk_count - 1) break;
|
|
3168
|
+
timer = createTimer(controller, timeout);
|
|
3171
3169
|
}
|
|
3172
3170
|
} catch (error) {
|
|
3173
3171
|
if (error instanceof Error && error.name === "AbortError") {
|
|
@@ -3204,6 +3202,86 @@ var Client = class extends import_async_event_emitter.AsyncEventEmitter {
|
|
|
3204
3202
|
}
|
|
3205
3203
|
return { members, nonce, notFound, presences };
|
|
3206
3204
|
}
|
|
3205
|
+
/**
|
|
3206
|
+
* Requests soundboard sounds from the gateway and returns an async iterator that yields the data from each soundboard sounds event.
|
|
3207
|
+
*
|
|
3208
|
+
* @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
|
|
3209
|
+
* @param options - The options for the request
|
|
3210
|
+
* @param timeout - The timeout for waiting for each soundboard sounds
|
|
3211
|
+
* @example
|
|
3212
|
+
* Requesting soundboard sounds for specific guilds
|
|
3213
|
+
* ```ts
|
|
3214
|
+
* for await (const { guildId, soundboardSounds } of this.requestSoundboardSoundsIterator({
|
|
3215
|
+
* guild_ids: ['1234567890', '9876543210'],
|
|
3216
|
+
* })) {
|
|
3217
|
+
* console.log(`Soundboard sounds for guild ${guildId}:`, soundboardSounds);
|
|
3218
|
+
* }
|
|
3219
|
+
* ```
|
|
3220
|
+
*/
|
|
3221
|
+
async *requestSoundboardSoundsIterator(options, timeout = 1e4) {
|
|
3222
|
+
const shardCount = await this.gateway.getShardCount();
|
|
3223
|
+
const shardIds = Map.groupBy(options.guild_ids, (guildId) => (0, import_util.calculateShardId)(guildId, shardCount));
|
|
3224
|
+
const controller = new AbortController();
|
|
3225
|
+
let timer = createTimer(controller, timeout);
|
|
3226
|
+
for (const [shardId, guildIds] of shardIds) {
|
|
3227
|
+
await this.gateway.send(shardId, {
|
|
3228
|
+
op: import_v1018.GatewayOpcodes.RequestSoundboardSounds,
|
|
3229
|
+
// eslint-disable-next-line id-length
|
|
3230
|
+
d: {
|
|
3231
|
+
...options,
|
|
3232
|
+
guild_ids: guildIds
|
|
3233
|
+
}
|
|
3234
|
+
});
|
|
3235
|
+
}
|
|
3236
|
+
try {
|
|
3237
|
+
const iterator = import_async_event_emitter.AsyncEventEmitter.on(this, import_v1018.GatewayDispatchEvents.SoundboardSounds, {
|
|
3238
|
+
signal: controller.signal
|
|
3239
|
+
});
|
|
3240
|
+
const guildIds = new Set(options.guild_ids);
|
|
3241
|
+
for await (const [{ data }] of iterator) {
|
|
3242
|
+
if (!guildIds.has(data.guild_id)) continue;
|
|
3243
|
+
(0, import_node_timers.clearTimeout)(timer);
|
|
3244
|
+
timer = void 0;
|
|
3245
|
+
yield {
|
|
3246
|
+
guildId: data.guild_id,
|
|
3247
|
+
soundboardSounds: data.soundboard_sounds
|
|
3248
|
+
};
|
|
3249
|
+
guildIds.delete(data.guild_id);
|
|
3250
|
+
if (guildIds.size === 0) break;
|
|
3251
|
+
timer = createTimer(controller, timeout);
|
|
3252
|
+
}
|
|
3253
|
+
} catch (error) {
|
|
3254
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
3255
|
+
throw new Error("Request timed out");
|
|
3256
|
+
}
|
|
3257
|
+
throw error;
|
|
3258
|
+
} finally {
|
|
3259
|
+
if (timer) {
|
|
3260
|
+
(0, import_node_timers.clearTimeout)(timer);
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
/**
|
|
3265
|
+
* Requests soundboard sounds from the gateway.
|
|
3266
|
+
*
|
|
3267
|
+
* @see {@link https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds}
|
|
3268
|
+
* @param options - The options for the request
|
|
3269
|
+
* @param timeout - The timeout for waiting for each soundboard sounds event
|
|
3270
|
+
* @example
|
|
3271
|
+
* Requesting soundboard sounds for specific guilds
|
|
3272
|
+
* ```ts
|
|
3273
|
+
* const soundboardSounds = await client.requestSoundboardSounds({ guild_ids: ['1234567890', '9876543210'], });
|
|
3274
|
+
*
|
|
3275
|
+
* console.log(soundboardSounds.get('1234567890'));
|
|
3276
|
+
* ```
|
|
3277
|
+
*/
|
|
3278
|
+
async requestSoundboardSounds(options, timeout = 1e4) {
|
|
3279
|
+
const soundboardSounds = /* @__PURE__ */ new Map();
|
|
3280
|
+
for await (const data of this.requestSoundboardSoundsIterator(options, timeout)) {
|
|
3281
|
+
soundboardSounds.set(data.guildId, data.soundboardSounds);
|
|
3282
|
+
}
|
|
3283
|
+
return soundboardSounds;
|
|
3284
|
+
}
|
|
3207
3285
|
/**
|
|
3208
3286
|
* Updates the voice state of the bot user
|
|
3209
3287
|
*
|
|
@@ -3259,7 +3337,7 @@ __name(withFiles, "withFiles");
|
|
|
3259
3337
|
|
|
3260
3338
|
// src/index.ts
|
|
3261
3339
|
__reExport(index_exports, require("discord-api-types/v10"), module.exports);
|
|
3262
|
-
var version = "3.0.0-dev.
|
|
3340
|
+
var version = "3.0.0-dev.1738109515-fa0d4b507";
|
|
3263
3341
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3264
3342
|
0 && (module.exports = {
|
|
3265
3343
|
API,
|