@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/README.md
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
<br />
|
|
7
7
|
<p>
|
|
8
|
-
<a href="https://discord.gg/djs"><img src="https://img.shields.io/
|
|
8
|
+
<a href="https://discord.gg/djs"><img src="https://img.shields.io/badge/join_us-on_discord-5865F2?logo=discord&logoColor=white" alt="Discord server" /></a>
|
|
9
9
|
<a href="https://www.npmjs.com/package/@discordjs/core"><img src="https://img.shields.io/npm/v/@discordjs/core.svg?maxAge=3600" alt="npm version" /></a>
|
|
10
10
|
<a href="https://www.npmjs.com/package/@discordjs/core"><img src="https://img.shields.io/npm/dt/@discordjs/core.svg?maxAge=3600" alt="npm downloads" /></a>
|
|
11
11
|
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
|
|
12
|
-
<a href="https://github.com/discordjs/discord.js/commits/main/packages/core"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Fcore"
|
|
12
|
+
<a href="https://github.com/discordjs/discord.js/commits/main/packages/core"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Fcore" /></a>
|
|
13
|
+
<a href="https://opencollective.com/discordjs"><img src="https://img.shields.io/opencollective/backers/discordjs?maxAge=3600&logo=opencollective" alt="backers" /></a>
|
|
13
14
|
<a href="https://codecov.io/gh/discordjs/discord.js"><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=core" alt="Code coverage" /></a>
|
|
14
15
|
</p>
|
|
15
16
|
<p>
|
|
@@ -88,7 +89,7 @@ const guild = await api.guilds.get('1234567891011');
|
|
|
88
89
|
- [Guide][guide] ([source][guide-source])
|
|
89
90
|
Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
|
|
90
91
|
- [discord.js Discord server][discord]
|
|
91
|
-
- [Discord
|
|
92
|
+
- [Discord Developers Discord server][discord-developers]
|
|
92
93
|
- [GitHub][source]
|
|
93
94
|
- [npm][npm]
|
|
94
95
|
- [Related libraries][related-libs]
|
|
@@ -106,12 +107,12 @@ If you don't understand something in the documentation, you are experiencing pro
|
|
|
106
107
|
[website]: https://discord.js.org
|
|
107
108
|
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
|
108
109
|
[documentation]: https://discord.js.org/docs/packages/core/stable
|
|
109
|
-
[guide]: https://discordjs.guide
|
|
110
|
-
[guide-source]: https://github.com/discordjs/guide
|
|
111
|
-
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14
|
|
110
|
+
[guide]: https://discordjs.guide
|
|
111
|
+
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
|
112
|
+
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
|
112
113
|
[discord]: https://discord.gg/djs
|
|
113
|
-
[discord-
|
|
114
|
+
[discord-developers]: https://discord.gg/discord-developers
|
|
114
115
|
[source]: https://github.com/discordjs/discord.js/tree/main/packages/core
|
|
115
116
|
[npm]: https://www.npmjs.com/package/@discordjs/core
|
|
116
|
-
[related-libs]: https://discord.com/developers/
|
|
117
|
+
[related-libs]: https://docs.discord.com/developers/developer-tools/community-resources#libraries
|
|
117
118
|
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
|
package/dist/http-only.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 } from 'discord-api-types/v10';
|
|
4
4
|
export * from 'discord-api-types/v10';
|
|
5
5
|
import * as discord_api_types_globals from 'discord-api-types/globals';
|
|
6
6
|
|
|
@@ -15,7 +15,9 @@ declare class ApplicationCommandsAPI {
|
|
|
15
15
|
* @param query - The query options for fetching commands
|
|
16
16
|
* @param options - The options for fetching commands
|
|
17
17
|
*/
|
|
18
|
-
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
18
|
+
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
19
|
+
locale?: Locale;
|
|
20
|
+
}): Promise<RESTGetAPIApplicationCommandsResult>;
|
|
19
21
|
/**
|
|
20
22
|
* Creates a new global command
|
|
21
23
|
*
|
|
@@ -71,7 +73,9 @@ declare class ApplicationCommandsAPI {
|
|
|
71
73
|
* @param query - The data for fetching commands
|
|
72
74
|
* @param options - The options for fetching commands
|
|
73
75
|
*/
|
|
74
|
-
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
76
|
+
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
77
|
+
locale?: Locale;
|
|
78
|
+
}): Promise<RESTGetAPIApplicationGuildCommandsResult>;
|
|
75
79
|
/**
|
|
76
80
|
* Creates a new command for a guild
|
|
77
81
|
*
|
|
@@ -219,6 +223,15 @@ declare class ApplicationsAPI {
|
|
|
219
223
|
* @param options - The options for deleting the emoji
|
|
220
224
|
*/
|
|
221
225
|
deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
226
|
+
/**
|
|
227
|
+
* Fetches an activity instance of an application
|
|
228
|
+
*
|
|
229
|
+
* @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
|
|
230
|
+
* @param applicationId - The id of the application to fetch the activity instance of
|
|
231
|
+
* @param instanceId - The id of the activity instance to fetch
|
|
232
|
+
* @param options - The options for fetching the activity instance
|
|
233
|
+
*/
|
|
234
|
+
getActivityInstance(applicationId: Snowflake, instanceId: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIActivityInstance>;
|
|
222
235
|
}
|
|
223
236
|
|
|
224
237
|
interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
|
|
@@ -232,6 +245,12 @@ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
|
|
|
232
245
|
interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
|
|
233
246
|
files?: RawFile[];
|
|
234
247
|
}
|
|
248
|
+
interface CreateInviteOptions extends RESTPostAPIChannelInviteJSONBody {
|
|
249
|
+
/**
|
|
250
|
+
* A CSV file with a single column of user ids for all the users able to accept this invite
|
|
251
|
+
*/
|
|
252
|
+
targetUsersFile?: RawFile;
|
|
253
|
+
}
|
|
235
254
|
declare class ChannelsAPI {
|
|
236
255
|
private readonly rest;
|
|
237
256
|
constructor(rest: REST);
|
|
@@ -436,7 +455,7 @@ declare class ChannelsAPI {
|
|
|
436
455
|
* @param body - The data for creating the invite
|
|
437
456
|
* @param options - The options for creating the invite
|
|
438
457
|
*/
|
|
439
|
-
createInvite(channelId: Snowflake, body:
|
|
458
|
+
createInvite(channelId: Snowflake, { targetUsersFile, ...body }: CreateInviteOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIExtendedInvite>;
|
|
440
459
|
/**
|
|
441
460
|
* Fetches the invites of a channel
|
|
442
461
|
*
|
|
@@ -464,7 +483,7 @@ declare class ChannelsAPI {
|
|
|
464
483
|
* @param body - The data for starting the thread
|
|
465
484
|
* @param options - The options for starting the thread
|
|
466
485
|
*/
|
|
467
|
-
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
486
|
+
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
|
|
468
487
|
/**
|
|
469
488
|
* Fetches the archived threads of a channel
|
|
470
489
|
*
|
|
@@ -528,7 +547,7 @@ declare class ChannelsAPI {
|
|
|
528
547
|
* @param body - The data for sending the soundboard sound
|
|
529
548
|
* @param options - The options for sending the soundboard sound
|
|
530
549
|
*/
|
|
531
|
-
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
550
|
+
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
532
551
|
/**
|
|
533
552
|
* Adds a recipient to a group DM channel
|
|
534
553
|
*
|
|
@@ -911,7 +930,7 @@ declare class GuildsAPI {
|
|
|
911
930
|
* @param options - The options for editing the voice state
|
|
912
931
|
* @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
|
|
913
932
|
*/
|
|
914
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
933
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
915
934
|
/**
|
|
916
935
|
* Fetches all emojis for a guild
|
|
917
936
|
*
|
|
@@ -1248,7 +1267,7 @@ declare class GuildsAPI {
|
|
|
1248
1267
|
* @param options - The options for setting the voice state
|
|
1249
1268
|
* @deprecated Use {@link VoiceAPI.editVoiceState} instead
|
|
1250
1269
|
*/
|
|
1251
|
-
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1270
|
+
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1252
1271
|
/**
|
|
1253
1272
|
* Fetches a guild onboarding
|
|
1254
1273
|
*
|
|
@@ -1320,6 +1339,14 @@ declare class GuildsAPI {
|
|
|
1320
1339
|
* @param options - The options for modifying guild incident actions
|
|
1321
1340
|
*/
|
|
1322
1341
|
editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
|
|
1342
|
+
/**
|
|
1343
|
+
* Fetches role member counts for a guild.
|
|
1344
|
+
*
|
|
1345
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
1346
|
+
* @param guildId - The id of the guild to fetch role member counts for
|
|
1347
|
+
* @param options - The options for fetching role member counts
|
|
1348
|
+
*/
|
|
1349
|
+
getRoleMemberCounts(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRoleMemberCountsResult>;
|
|
1323
1350
|
}
|
|
1324
1351
|
|
|
1325
1352
|
type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
|
|
@@ -1766,7 +1793,7 @@ declare class InvitesAPI {
|
|
|
1766
1793
|
/**
|
|
1767
1794
|
* Fetches an invite
|
|
1768
1795
|
*
|
|
1769
|
-
* @see {@link https://discord.com/developers/
|
|
1796
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1770
1797
|
* @param code - The invite code
|
|
1771
1798
|
* @param query - The options for fetching the invite
|
|
1772
1799
|
* @param options - The options for fetching the invite
|
|
@@ -1775,11 +1802,40 @@ declare class InvitesAPI {
|
|
|
1775
1802
|
/**
|
|
1776
1803
|
* Deletes an invite
|
|
1777
1804
|
*
|
|
1778
|
-
* @see {@link https://discord.com/developers/
|
|
1805
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#delete-invite}
|
|
1779
1806
|
* @param code - The invite code
|
|
1780
1807
|
* @param options - The options for deleting the invite
|
|
1781
1808
|
*/
|
|
1782
1809
|
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1810
|
+
/**
|
|
1811
|
+
* Fetches an invite's target users
|
|
1812
|
+
*
|
|
1813
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
1814
|
+
* @param code - The invite code
|
|
1815
|
+
* @param options - The options for fetching the invite target users
|
|
1816
|
+
* @returns
|
|
1817
|
+
*/
|
|
1818
|
+
getTargetUsers(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<ArrayBuffer>;
|
|
1819
|
+
/**
|
|
1820
|
+
* Updates an invite's target users
|
|
1821
|
+
*
|
|
1822
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
1823
|
+
* @param code - The invite code
|
|
1824
|
+
* @param targetUsersFile - A CSV file with a single column of user ids
|
|
1825
|
+
* for all the users able to accept this invite
|
|
1826
|
+
* @param options - The options for updating the invite target users
|
|
1827
|
+
* @returns
|
|
1828
|
+
*/
|
|
1829
|
+
updateTargetUsers(code: string, targetUsersFile: RawFile, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1830
|
+
/**
|
|
1831
|
+
* Fetches an invite's target users job status
|
|
1832
|
+
*
|
|
1833
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
1834
|
+
* @param code - The invite code
|
|
1835
|
+
* @param options - The options for fetching the invite target users job status
|
|
1836
|
+
* @returns
|
|
1837
|
+
*/
|
|
1838
|
+
getTargetUsersJobStatus(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIInviteTargetUsersJobStatusResult>;
|
|
1783
1839
|
}
|
|
1784
1840
|
|
|
1785
1841
|
declare class MonetizationAPI {
|
|
@@ -2235,7 +2291,7 @@ declare class VoiceAPI {
|
|
|
2235
2291
|
* @param body - The data for editing the voice state
|
|
2236
2292
|
* @param options - The options for editing the voice state
|
|
2237
2293
|
*/
|
|
2238
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
2294
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
2239
2295
|
/**
|
|
2240
2296
|
* Edits the voice state for the current user
|
|
2241
2297
|
*
|
|
@@ -2244,7 +2300,7 @@ declare class VoiceAPI {
|
|
|
2244
2300
|
* @param body - The data for editing the voice state
|
|
2245
2301
|
* @param options - The options for editing the voice state
|
|
2246
2302
|
*/
|
|
2247
|
-
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
2303
|
+
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
2248
2304
|
}
|
|
2249
2305
|
|
|
2250
2306
|
declare class API {
|
|
@@ -2307,4 +2363,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
2307
2363
|
*/
|
|
2308
2364
|
declare const version: string;
|
|
2309
2365
|
|
|
2310
|
-
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, 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, GatewayAPI, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
|
2366
|
+
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, 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, GatewayAPI, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
package/dist/http-only.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 } from 'discord-api-types/v10';
|
|
4
4
|
export * from 'discord-api-types/v10';
|
|
5
5
|
import * as discord_api_types_globals from 'discord-api-types/globals';
|
|
6
6
|
|
|
@@ -15,7 +15,9 @@ declare class ApplicationCommandsAPI {
|
|
|
15
15
|
* @param query - The query options for fetching commands
|
|
16
16
|
* @param options - The options for fetching commands
|
|
17
17
|
*/
|
|
18
|
-
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
18
|
+
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
19
|
+
locale?: Locale;
|
|
20
|
+
}): Promise<RESTGetAPIApplicationCommandsResult>;
|
|
19
21
|
/**
|
|
20
22
|
* Creates a new global command
|
|
21
23
|
*
|
|
@@ -71,7 +73,9 @@ declare class ApplicationCommandsAPI {
|
|
|
71
73
|
* @param query - The data for fetching commands
|
|
72
74
|
* @param options - The options for fetching commands
|
|
73
75
|
*/
|
|
74
|
-
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>
|
|
76
|
+
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { locale, signal }?: Pick<RequestData, 'signal'> & {
|
|
77
|
+
locale?: Locale;
|
|
78
|
+
}): Promise<RESTGetAPIApplicationGuildCommandsResult>;
|
|
75
79
|
/**
|
|
76
80
|
* Creates a new command for a guild
|
|
77
81
|
*
|
|
@@ -219,6 +223,15 @@ declare class ApplicationsAPI {
|
|
|
219
223
|
* @param options - The options for deleting the emoji
|
|
220
224
|
*/
|
|
221
225
|
deleteEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
226
|
+
/**
|
|
227
|
+
* Fetches an activity instance of an application
|
|
228
|
+
*
|
|
229
|
+
* @see {@link https://docs.discord.com/developers/resources/application#get-application-activity-instance}
|
|
230
|
+
* @param applicationId - The id of the application to fetch the activity instance of
|
|
231
|
+
* @param instanceId - The id of the activity instance to fetch
|
|
232
|
+
* @param options - The options for fetching the activity instance
|
|
233
|
+
*/
|
|
234
|
+
getActivityInstance(applicationId: Snowflake, instanceId: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIActivityInstance>;
|
|
222
235
|
}
|
|
223
236
|
|
|
224
237
|
interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
|
|
@@ -232,6 +245,12 @@ interface CreateMessageOptions extends RESTPostAPIChannelMessageJSONBody {
|
|
|
232
245
|
interface EditMessageOptions extends RESTPatchAPIChannelMessageJSONBody {
|
|
233
246
|
files?: RawFile[];
|
|
234
247
|
}
|
|
248
|
+
interface CreateInviteOptions extends RESTPostAPIChannelInviteJSONBody {
|
|
249
|
+
/**
|
|
250
|
+
* A CSV file with a single column of user ids for all the users able to accept this invite
|
|
251
|
+
*/
|
|
252
|
+
targetUsersFile?: RawFile;
|
|
253
|
+
}
|
|
235
254
|
declare class ChannelsAPI {
|
|
236
255
|
private readonly rest;
|
|
237
256
|
constructor(rest: REST);
|
|
@@ -436,7 +455,7 @@ declare class ChannelsAPI {
|
|
|
436
455
|
* @param body - The data for creating the invite
|
|
437
456
|
* @param options - The options for creating the invite
|
|
438
457
|
*/
|
|
439
|
-
createInvite(channelId: Snowflake, body:
|
|
458
|
+
createInvite(channelId: Snowflake, { targetUsersFile, ...body }: CreateInviteOptions, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIExtendedInvite>;
|
|
440
459
|
/**
|
|
441
460
|
* Fetches the invites of a channel
|
|
442
461
|
*
|
|
@@ -464,7 +483,7 @@ declare class ChannelsAPI {
|
|
|
464
483
|
* @param body - The data for starting the thread
|
|
465
484
|
* @param options - The options for starting the thread
|
|
466
485
|
*/
|
|
467
|
-
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
486
|
+
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
|
|
468
487
|
/**
|
|
469
488
|
* Fetches the archived threads of a channel
|
|
470
489
|
*
|
|
@@ -528,7 +547,7 @@ declare class ChannelsAPI {
|
|
|
528
547
|
* @param body - The data for sending the soundboard sound
|
|
529
548
|
* @param options - The options for sending the soundboard sound
|
|
530
549
|
*/
|
|
531
|
-
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
550
|
+
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
532
551
|
/**
|
|
533
552
|
* Adds a recipient to a group DM channel
|
|
534
553
|
*
|
|
@@ -911,7 +930,7 @@ declare class GuildsAPI {
|
|
|
911
930
|
* @param options - The options for editing the voice state
|
|
912
931
|
* @deprecated Use {@link VoiceAPI.editUserVoiceState} instead
|
|
913
932
|
*/
|
|
914
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
933
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
915
934
|
/**
|
|
916
935
|
* Fetches all emojis for a guild
|
|
917
936
|
*
|
|
@@ -1248,7 +1267,7 @@ declare class GuildsAPI {
|
|
|
1248
1267
|
* @param options - The options for setting the voice state
|
|
1249
1268
|
* @deprecated Use {@link VoiceAPI.editVoiceState} instead
|
|
1250
1269
|
*/
|
|
1251
|
-
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1270
|
+
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1252
1271
|
/**
|
|
1253
1272
|
* Fetches a guild onboarding
|
|
1254
1273
|
*
|
|
@@ -1320,6 +1339,14 @@ declare class GuildsAPI {
|
|
|
1320
1339
|
* @param options - The options for modifying guild incident actions
|
|
1321
1340
|
*/
|
|
1322
1341
|
editIncidentActions(guildId: Snowflake, body: RESTPutAPIGuildIncidentActionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIIncidentsData>;
|
|
1342
|
+
/**
|
|
1343
|
+
* Fetches role member counts for a guild.
|
|
1344
|
+
*
|
|
1345
|
+
* @see {@link https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts}
|
|
1346
|
+
* @param guildId - The id of the guild to fetch role member counts for
|
|
1347
|
+
* @param options - The options for fetching role member counts
|
|
1348
|
+
*/
|
|
1349
|
+
getRoleMemberCounts(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRoleMemberCountsResult>;
|
|
1323
1350
|
}
|
|
1324
1351
|
|
|
1325
1352
|
type CreateWebhookMessageOptions = RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
|
|
@@ -1766,7 +1793,7 @@ declare class InvitesAPI {
|
|
|
1766
1793
|
/**
|
|
1767
1794
|
* Fetches an invite
|
|
1768
1795
|
*
|
|
1769
|
-
* @see {@link https://discord.com/developers/
|
|
1796
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-invite}
|
|
1770
1797
|
* @param code - The invite code
|
|
1771
1798
|
* @param query - The options for fetching the invite
|
|
1772
1799
|
* @param options - The options for fetching the invite
|
|
@@ -1775,11 +1802,40 @@ declare class InvitesAPI {
|
|
|
1775
1802
|
/**
|
|
1776
1803
|
* Deletes an invite
|
|
1777
1804
|
*
|
|
1778
|
-
* @see {@link https://discord.com/developers/
|
|
1805
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#delete-invite}
|
|
1779
1806
|
* @param code - The invite code
|
|
1780
1807
|
* @param options - The options for deleting the invite
|
|
1781
1808
|
*/
|
|
1782
1809
|
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1810
|
+
/**
|
|
1811
|
+
* Fetches an invite's target users
|
|
1812
|
+
*
|
|
1813
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users}
|
|
1814
|
+
* @param code - The invite code
|
|
1815
|
+
* @param options - The options for fetching the invite target users
|
|
1816
|
+
* @returns
|
|
1817
|
+
*/
|
|
1818
|
+
getTargetUsers(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<ArrayBuffer>;
|
|
1819
|
+
/**
|
|
1820
|
+
* Updates an invite's target users
|
|
1821
|
+
*
|
|
1822
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#update-target-users}
|
|
1823
|
+
* @param code - The invite code
|
|
1824
|
+
* @param targetUsersFile - A CSV file with a single column of user ids
|
|
1825
|
+
* for all the users able to accept this invite
|
|
1826
|
+
* @param options - The options for updating the invite target users
|
|
1827
|
+
* @returns
|
|
1828
|
+
*/
|
|
1829
|
+
updateTargetUsers(code: string, targetUsersFile: RawFile, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
1830
|
+
/**
|
|
1831
|
+
* Fetches an invite's target users job status
|
|
1832
|
+
*
|
|
1833
|
+
* @see {@link https://docs.discord.com/developers/resources/invite#get-target-users-job-status}
|
|
1834
|
+
* @param code - The invite code
|
|
1835
|
+
* @param options - The options for fetching the invite target users job status
|
|
1836
|
+
* @returns
|
|
1837
|
+
*/
|
|
1838
|
+
getTargetUsersJobStatus(code: string, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIInviteTargetUsersJobStatusResult>;
|
|
1783
1839
|
}
|
|
1784
1840
|
|
|
1785
1841
|
declare class MonetizationAPI {
|
|
@@ -2235,7 +2291,7 @@ declare class VoiceAPI {
|
|
|
2235
2291
|
* @param body - The data for editing the voice state
|
|
2236
2292
|
* @param options - The options for editing the voice state
|
|
2237
2293
|
*/
|
|
2238
|
-
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
2294
|
+
editUserVoiceState(guildId: Snowflake, userId: Snowflake, body: RESTPatchAPIGuildVoiceStateUserJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<undefined>;
|
|
2239
2295
|
/**
|
|
2240
2296
|
* Edits the voice state for the current user
|
|
2241
2297
|
*
|
|
@@ -2244,7 +2300,7 @@ declare class VoiceAPI {
|
|
|
2244
2300
|
* @param body - The data for editing the voice state
|
|
2245
2301
|
* @param options - The options for editing the voice state
|
|
2246
2302
|
*/
|
|
2247
|
-
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
2303
|
+
editVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<undefined>;
|
|
2248
2304
|
}
|
|
2249
2305
|
|
|
2250
2306
|
declare class API {
|
|
@@ -2307,4 +2363,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
2307
2363
|
*/
|
|
2308
2364
|
declare const version: string;
|
|
2309
2365
|
|
|
2310
|
-
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, 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, GatewayAPI, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|
|
2366
|
+
export { API, ApplicationCommandsAPI, ApplicationsAPI, ChannelsAPI, 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, GatewayAPI, GuildsAPI, InteractionsAPI, InvitesAPI, MonetizationAPI, OAuth2API, PollAPI, RoleConnectionsAPI, SoundboardSoundsAPI, StageInstancesAPI, type StartForumThreadOptions, StickersAPI, ThreadsAPI, UsersAPI, VoiceAPI, WebhooksAPI, version, withFiles };
|