@discordjs/core 2.5.0 → 2.7.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 +9 -8
- package/dist/http-only.d.mts +69 -13
- package/dist/http-only.d.ts +69 -13
- package/dist/http-only.js +95 -7
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +95 -7
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +69 -13
- package/dist/index.d.ts +69 -13
- package/dist/index.js +95 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +95 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
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, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIGuildForumThreadsJSONBody,
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, Locale, 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, RESTGetAPIInviteTargetUsersJobStatusResult, 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, 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, GatewayRateLimitedDispatchData, 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';
|
|
@@ -19,7 +19,9 @@ declare class ApplicationCommandsAPI {
|
|
|
19
19
|
* @param query - The query options for fetching commands
|
|
20
20
|
* @param options - The options for fetching commands
|
|
21
21
|
*/
|
|
22
|
-
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
22
|
+
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
23
|
+
locale?: Locale;
|
|
24
|
+
}): Promise<RESTGetAPIApplicationCommandsResult>;
|
|
23
25
|
/**
|
|
24
26
|
* Creates a new global command
|
|
25
27
|
*
|
|
@@ -75,7 +77,9 @@ declare class ApplicationCommandsAPI {
|
|
|
75
77
|
* @param query - The data for fetching commands
|
|
76
78
|
* @param options - The options for fetching commands
|
|
77
79
|
*/
|
|
78
|
-
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
80
|
+
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
81
|
+
locale?: Locale;
|
|
82
|
+
}): Promise<RESTGetAPIApplicationGuildCommandsResult>;
|
|
79
83
|
/**
|
|
80
84
|
* Creates a new command for a guild
|
|
81
85
|
*
|
|
@@ -223,6 +227,15 @@ declare class ApplicationsAPI {
|
|
|
223
227
|
* @param options - The options for deleting the emoji
|
|
224
228
|
*/
|
|
225
229
|
deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Fetches an activity instance of an application
|
|
232
|
+
*
|
|
233
|
+
* @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
|
|
234
|
+
* @param applicationId - The id of the application to fetch the activity instance of
|
|
235
|
+
* @param instanceId - The id of the activity instance to fetch
|
|
236
|
+
* @param options - The options for fetching the activity instance
|
|
237
|
+
*/
|
|
238
|
+
getActivityInstance(applicationId: Snowflake, instanceId: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIActivityInstance>;
|
|
226
239
|
}
|
|
227
240
|
|
|
228
241
|
interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
|
|
@@ -236,6 +249,12 @@ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
|
|
|
236
249
|
interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
|
|
237
250
|
files?: RawFile[];
|
|
238
251
|
}
|
|
252
|
+
interface CreateInviteOptions extends RESTPostAPIChannelInviteJSONBody {
|
|
253
|
+
/**
|
|
254
|
+
* A CSV file with a single column of user ids for all the users able to accept this invite
|
|
255
|
+
*/
|
|
256
|
+
targetUsersFile?: RawFile;
|
|
257
|
+
}
|
|
239
258
|
declare class ChannelsAPI {
|
|
240
259
|
private readonly rest;
|
|
241
260
|
constructor(rest: REST);
|
|
@@ -440,7 +459,7 @@ declare class ChannelsAPI {
|
|
|
440
459
|
* @param body - The data for creating the invite
|
|
441
460
|
* @param options - The options for creating the invite
|
|
442
461
|
*/
|
|
443
|
-
createInvite(channelId: Snowflake, body:
|
|
462
|
+
createInvite(channelId: Snowflake, { targetUsersFile, ...body }: CreateInviteOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIExtendedInvite>;
|
|
444
463
|
/**
|
|
445
464
|
* Fetches the invites of a channel
|
|
446
465
|
*
|
|
@@ -468,7 +487,7 @@ declare class ChannelsAPI {
|
|
|
468
487
|
* @param body - The data for starting the thread
|
|
469
488
|
* @param options - The options for starting the thread
|
|
470
489
|
*/
|
|
471
|
-
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
490
|
+
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
|
|
472
491
|
/**
|
|
473
492
|
* Fetches the archived threads of a channel
|
|
474
493
|
*
|
|
@@ -532,7 +551,7 @@ declare class ChannelsAPI {
|
|
|
532
551
|
* @param body - The data for sending the soundboard sound
|
|
533
552
|
* @param options - The options for sending the soundboard sound
|
|
534
553
|
*/
|
|
535
|
-
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
554
|
+
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
536
555
|
/**
|
|
537
556
|
* Adds a recipient to a group DM channel
|
|
538
557
|
*
|
|
@@ -915,7 +934,7 @@ declare class GuildsAPI {
|
|
|
915
934
|
* @param options - The options for editing the voice state
|
|
916
935
|
* @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
|
|
917
936
|
*/
|
|
918
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
937
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
919
938
|
/**
|
|
920
939
|
* Fetches all emojis for a guild
|
|
921
940
|
*
|
|
@@ -1252,7 +1271,7 @@ declare class GuildsAPI {
|
|
|
1252
1271
|
* @param options - The options for setting the voice state
|
|
1253
1272
|
* @deprecated Use {@link VoiceAPI.editVoiceState} instead
|
|
1254
1273
|
*/
|
|
1255
|
-
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1274
|
+
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1256
1275
|
/**
|
|
1257
1276
|
* Fetches a guild onboarding
|
|
1258
1277
|
*
|
|
@@ -1324,6 +1343,14 @@ declare class GuildsAPI {
|
|
|
1324
1343
|
* @param options - The options for modifying guild incident actions
|
|
1325
1344
|
*/
|
|
1326
1345
|
editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
|
|
1346
|
+
/**
|
|
1347
|
+
* Fetches role member counts for a guild.
|
|
1348
|
+
*
|
|
1349
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
1350
|
+
* @param guildId - The id of the guild to fetch role member counts for
|
|
1351
|
+
* @param options - The options for fetching role member counts
|
|
1352
|
+
*/
|
|
1353
|
+
getRoleMemberCounts(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRoleMemberCountsResult>;
|
|
1327
1354
|
}
|
|
1328
1355
|
|
|
1329
1356
|
type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
|
|
@@ -1770,7 +1797,7 @@ declare class InvitesAPI {
|
|
|
1770
1797
|
/**
|
|
1771
1798
|
* Fetches an invite
|
|
1772
1799
|
*
|
|
1773
|
-
* @see {@link https://discord.com/developers/
|
|
1800
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1774
1801
|
* @param code - The invite code
|
|
1775
1802
|
* @param query - The options for fetching the invite
|
|
1776
1803
|
* @param options - The options for fetching the invite
|
|
@@ -1779,11 +1806,40 @@ declare class InvitesAPI {
|
|
|
1779
1806
|
/**
|
|
1780
1807
|
* Deletes an invite
|
|
1781
1808
|
*
|
|
1782
|
-
* @see {@link https://discord.com/developers/
|
|
1809
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#delete-invite}
|
|
1783
1810
|
* @param code - The invite code
|
|
1784
1811
|
* @param options - The options for deleting the invite
|
|
1785
1812
|
*/
|
|
1786
1813
|
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1814
|
+
/**
|
|
1815
|
+
* Fetches an invite's target users
|
|
1816
|
+
*
|
|
1817
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
1818
|
+
* @param code - The invite code
|
|
1819
|
+
* @param options - The options for fetching the invite target users
|
|
1820
|
+
* @returns
|
|
1821
|
+
*/
|
|
1822
|
+
getTargetUsers(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<ArrayBuffer>;
|
|
1823
|
+
/**
|
|
1824
|
+
* Updates an invite's target users
|
|
1825
|
+
*
|
|
1826
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
1827
|
+
* @param code - The invite code
|
|
1828
|
+
* @param targetUsersFile - A CSV file with a single column of user ids
|
|
1829
|
+
* for all the users able to accept this invite
|
|
1830
|
+
* @param options - The options for updating the invite target users
|
|
1831
|
+
* @returns
|
|
1832
|
+
*/
|
|
1833
|
+
updateTargetUsers(code: string, targetUsersFile: RawFile, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1834
|
+
/**
|
|
1835
|
+
* Fetches an invite's target users job status
|
|
1836
|
+
*
|
|
1837
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
1838
|
+
* @param code - The invite code
|
|
1839
|
+
* @param options - The options for fetching the invite target users job status
|
|
1840
|
+
* @returns
|
|
1841
|
+
*/
|
|
1842
|
+
getTargetUsersJobStatus(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIInviteTargetUsersJobStatusResult>;
|
|
1787
1843
|
}
|
|
1788
1844
|
|
|
1789
1845
|
declare class MonetizationAPI {
|
|
@@ -2239,7 +2295,7 @@ declare class VoiceAPI {
|
|
|
2239
2295
|
* @param body - The data for editing the voice state
|
|
2240
2296
|
* @param options - The options for editing the voice state
|
|
2241
2297
|
*/
|
|
2242
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
2298
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
2243
2299
|
/**
|
|
2244
2300
|
* Edits the voice state for the current user
|
|
2245
2301
|
*
|
|
@@ -2248,7 +2304,7 @@ declare class VoiceAPI {
|
|
|
2248
2304
|
* @param body - The data for editing the voice state
|
|
2249
2305
|
* @param options - The options for editing the voice state
|
|
2250
2306
|
*/
|
|
2251
|
-
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
2307
|
+
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
2252
2308
|
}
|
|
2253
2309
|
|
|
2254
2310
|
declare class API {
|
|
@@ -2527,4 +2583,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
2527
2583
|
*/
|
|
2528
2584
|
declare const version: string;
|
|
2529
2585
|
|
|
2530
|
-
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, type CreateAutocompleteResponseOptions, type CreateInteractionDeferResponseOptions, type CreateInteractionFollowUpResponseOptions, type CreateInteractionResponseOptions, type CreateInteractionUpdateMessageResponseOptions, type CreateMessageOptions, type CreateModalResponseOptions, type CreateStickerOptions, type CreateWebhookMessageOptions, type DescriptiveRawFile, type EditInteractionResponseOptions, type EditMessageOptions, type EditWebhookMessageOptions, type Gateway, GatewayAPI, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
|
2586
|
+
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, type CreateAutocompleteResponseOptions, type CreateInteractionDeferResponseOptions, type CreateInteractionFollowUpResponseOptions, type CreateInteractionResponseOptions, type CreateInteractionUpdateMessageResponseOptions, type CreateInviteOptions, type CreateMessageOptions, type CreateModalResponseOptions, type CreateStickerOptions, type CreateWebhookMessageOptions, type DescriptiveRawFile, type EditInteractionResponseOptions, type EditMessageOptions, type EditWebhookMessageOptions, type Gateway, GatewayAPI, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
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, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIGuildForumThreadsJSONBody,
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, Locale, 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, RESTGetAPIInviteTargetUsersJobStatusResult, 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, 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, GatewayRateLimitedDispatchData, 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';
|
|
@@ -19,7 +19,9 @@ declare class ApplicationCommandsAPI {
|
|
|
19
19
|
* @param query - The query options for fetching commands
|
|
20
20
|
* @param options - The options for fetching commands
|
|
21
21
|
*/
|
|
22
|
-
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
22
|
+
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
23
|
+
locale?: Locale;
|
|
24
|
+
}): Promise<RESTGetAPIApplicationCommandsResult>;
|
|
23
25
|
/**
|
|
24
26
|
* Creates a new global command
|
|
25
27
|
*
|
|
@@ -75,7 +77,9 @@ declare class ApplicationCommandsAPI {
|
|
|
75
77
|
* @param query - The data for fetching commands
|
|
76
78
|
* @param options - The options for fetching commands
|
|
77
79
|
*/
|
|
78
|
-
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
80
|
+
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
81
|
+
locale?: Locale;
|
|
82
|
+
}): Promise<RESTGetAPIApplicationGuildCommandsResult>;
|
|
79
83
|
/**
|
|
80
84
|
* Creates a new command for a guild
|
|
81
85
|
*
|
|
@@ -223,6 +227,15 @@ declare class ApplicationsAPI {
|
|
|
223
227
|
* @param options - The options for deleting the emoji
|
|
224
228
|
*/
|
|
225
229
|
deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Fetches an activity instance of an application
|
|
232
|
+
*
|
|
233
|
+
* @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
|
|
234
|
+
* @param applicationId - The id of the application to fetch the activity instance of
|
|
235
|
+
* @param instanceId - The id of the activity instance to fetch
|
|
236
|
+
* @param options - The options for fetching the activity instance
|
|
237
|
+
*/
|
|
238
|
+
getActivityInstance(applicationId: Snowflake, instanceId: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIActivityInstance>;
|
|
226
239
|
}
|
|
227
240
|
|
|
228
241
|
interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
|
|
@@ -236,6 +249,12 @@ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
|
|
|
236
249
|
interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
|
|
237
250
|
files?: RawFile[];
|
|
238
251
|
}
|
|
252
|
+
interface CreateInviteOptions extends RESTPostAPIChannelInviteJSONBody {
|
|
253
|
+
/**
|
|
254
|
+
* A CSV file with a single column of user ids for all the users able to accept this invite
|
|
255
|
+
*/
|
|
256
|
+
targetUsersFile?: RawFile;
|
|
257
|
+
}
|
|
239
258
|
declare class ChannelsAPI {
|
|
240
259
|
private readonly rest;
|
|
241
260
|
constructor(rest: REST);
|
|
@@ -440,7 +459,7 @@ declare class ChannelsAPI {
|
|
|
440
459
|
* @param body - The data for creating the invite
|
|
441
460
|
* @param options - The options for creating the invite
|
|
442
461
|
*/
|
|
443
|
-
createInvite(channelId: Snowflake, body:
|
|
462
|
+
createInvite(channelId: Snowflake, { targetUsersFile, ...body }: CreateInviteOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIExtendedInvite>;
|
|
444
463
|
/**
|
|
445
464
|
* Fetches the invites of a channel
|
|
446
465
|
*
|
|
@@ -468,7 +487,7 @@ declare class ChannelsAPI {
|
|
|
468
487
|
* @param body - The data for starting the thread
|
|
469
488
|
* @param options - The options for starting the thread
|
|
470
489
|
*/
|
|
471
|
-
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
490
|
+
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
|
|
472
491
|
/**
|
|
473
492
|
* Fetches the archived threads of a channel
|
|
474
493
|
*
|
|
@@ -532,7 +551,7 @@ declare class ChannelsAPI {
|
|
|
532
551
|
* @param body - The data for sending the soundboard sound
|
|
533
552
|
* @param options - The options for sending the soundboard sound
|
|
534
553
|
*/
|
|
535
|
-
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
554
|
+
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
536
555
|
/**
|
|
537
556
|
* Adds a recipient to a group DM channel
|
|
538
557
|
*
|
|
@@ -915,7 +934,7 @@ declare class GuildsAPI {
|
|
|
915
934
|
* @param options - The options for editing the voice state
|
|
916
935
|
* @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
|
|
917
936
|
*/
|
|
918
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
937
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
919
938
|
/**
|
|
920
939
|
* Fetches all emojis for a guild
|
|
921
940
|
*
|
|
@@ -1252,7 +1271,7 @@ declare class GuildsAPI {
|
|
|
1252
1271
|
* @param options - The options for setting the voice state
|
|
1253
1272
|
* @deprecated Use {@link VoiceAPI.editVoiceState} instead
|
|
1254
1273
|
*/
|
|
1255
|
-
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1274
|
+
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1256
1275
|
/**
|
|
1257
1276
|
* Fetches a guild onboarding
|
|
1258
1277
|
*
|
|
@@ -1324,6 +1343,14 @@ declare class GuildsAPI {
|
|
|
1324
1343
|
* @param options - The options for modifying guild incident actions
|
|
1325
1344
|
*/
|
|
1326
1345
|
editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
|
|
1346
|
+
/**
|
|
1347
|
+
* Fetches role member counts for a guild.
|
|
1348
|
+
*
|
|
1349
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
1350
|
+
* @param guildId - The id of the guild to fetch role member counts for
|
|
1351
|
+
* @param options - The options for fetching role member counts
|
|
1352
|
+
*/
|
|
1353
|
+
getRoleMemberCounts(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRoleMemberCountsResult>;
|
|
1327
1354
|
}
|
|
1328
1355
|
|
|
1329
1356
|
type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
|
|
@@ -1770,7 +1797,7 @@ declare class InvitesAPI {
|
|
|
1770
1797
|
/**
|
|
1771
1798
|
* Fetches an invite
|
|
1772
1799
|
*
|
|
1773
|
-
* @see {@link https://discord.com/developers/
|
|
1800
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1774
1801
|
* @param code - The invite code
|
|
1775
1802
|
* @param query - The options for fetching the invite
|
|
1776
1803
|
* @param options - The options for fetching the invite
|
|
@@ -1779,11 +1806,40 @@ declare class InvitesAPI {
|
|
|
1779
1806
|
/**
|
|
1780
1807
|
* Deletes an invite
|
|
1781
1808
|
*
|
|
1782
|
-
* @see {@link https://discord.com/developers/
|
|
1809
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#delete-invite}
|
|
1783
1810
|
* @param code - The invite code
|
|
1784
1811
|
* @param options - The options for deleting the invite
|
|
1785
1812
|
*/
|
|
1786
1813
|
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1814
|
+
/**
|
|
1815
|
+
* Fetches an invite's target users
|
|
1816
|
+
*
|
|
1817
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
1818
|
+
* @param code - The invite code
|
|
1819
|
+
* @param options - The options for fetching the invite target users
|
|
1820
|
+
* @returns
|
|
1821
|
+
*/
|
|
1822
|
+
getTargetUsers(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<ArrayBuffer>;
|
|
1823
|
+
/**
|
|
1824
|
+
* Updates an invite's target users
|
|
1825
|
+
*
|
|
1826
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
1827
|
+
* @param code - The invite code
|
|
1828
|
+
* @param targetUsersFile - A CSV file with a single column of user ids
|
|
1829
|
+
* for all the users able to accept this invite
|
|
1830
|
+
* @param options - The options for updating the invite target users
|
|
1831
|
+
* @returns
|
|
1832
|
+
*/
|
|
1833
|
+
updateTargetUsers(code: string, targetUsersFile: RawFile, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1834
|
+
/**
|
|
1835
|
+
* Fetches an invite's target users job status
|
|
1836
|
+
*
|
|
1837
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
1838
|
+
* @param code - The invite code
|
|
1839
|
+
* @param options - The options for fetching the invite target users job status
|
|
1840
|
+
* @returns
|
|
1841
|
+
*/
|
|
1842
|
+
getTargetUsersJobStatus(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIInviteTargetUsersJobStatusResult>;
|
|
1787
1843
|
}
|
|
1788
1844
|
|
|
1789
1845
|
declare class MonetizationAPI {
|
|
@@ -2239,7 +2295,7 @@ declare class VoiceAPI {
|
|
|
2239
2295
|
* @param body - The data for editing the voice state
|
|
2240
2296
|
* @param options - The options for editing the voice state
|
|
2241
2297
|
*/
|
|
2242
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
2298
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
2243
2299
|
/**
|
|
2244
2300
|
* Edits the voice state for the current user
|
|
2245
2301
|
*
|
|
@@ -2248,7 +2304,7 @@ declare class VoiceAPI {
|
|
|
2248
2304
|
* @param body - The data for editing the voice state
|
|
2249
2305
|
* @param options - The options for editing the voice state
|
|
2250
2306
|
*/
|
|
2251
|
-
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
2307
|
+
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
2252
2308
|
}
|
|
2253
2309
|
|
|
2254
2310
|
declare class API {
|
|
@@ -2527,4 +2583,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
2527
2583
|
*/
|
|
2528
2584
|
declare const version: string;
|
|
2529
2585
|
|
|
2530
|
-
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, type CreateAutocompleteResponseOptions, type CreateInteractionDeferResponseOptions, type CreateInteractionFollowUpResponseOptions, type CreateInteractionResponseOptions, type CreateInteractionUpdateMessageResponseOptions, type CreateMessageOptions, type CreateModalResponseOptions, type CreateStickerOptions, type CreateWebhookMessageOptions, type DescriptiveRawFile, type EditInteractionResponseOptions, type EditMessageOptions, type EditWebhookMessageOptions, type Gateway, GatewayAPI, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
|
2586
|
+
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, Client, type ClientOptions, type CreateAutocompleteResponseOptions, type CreateInteractionDeferResponseOptions, type CreateInteractionFollowUpResponseOptions, type CreateInteractionResponseOptions, type CreateInteractionUpdateMessageResponseOptions, type CreateInviteOptions, type CreateMessageOptions, type CreateModalResponseOptions, type CreateStickerOptions, type CreateWebhookMessageOptions, type DescriptiveRawFile, type EditInteractionResponseOptions, type EditMessageOptions, type EditWebhookMessageOptions, type Gateway, GatewayAPI, GuildsAPI, InteractionsAPI, type IntrinsicProps, InvitesAPI, type ManagerShardEventsMap, type MappedEvents, MonetizationAPI, OAuth2API, PollAPI, type RequestGuildMembersResult, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, type ToEventProps, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|