@discordjs/core 0.6.1-dev.1684497912-b85a3f2.0 → 0.6.1-dev.1684757126-9345d1b.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/dist/{files-2a988976.d.ts → files-88c3bce2.d.ts} +54 -15
- package/dist/http-only.d.ts +1 -1
- package/dist/http-only.js +105 -41
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +106 -41
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +111 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +106 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIChannelWebhooksResult, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody,
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIChannelWebhooksResult, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPostAPIChannelWebhookJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetNitroStickerPacksResult, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, RESTPostAPIChannelThreadsJSONBody, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
4
4
|
|
|
5
5
|
declare class ApplicationCommandsAPI {
|
|
6
6
|
private readonly rest;
|
|
@@ -69,7 +69,7 @@ declare class ApplicationCommandsAPI {
|
|
|
69
69
|
* @param query - The data to use when fetching commands
|
|
70
70
|
* @param options - The options to use when fetching commands
|
|
71
71
|
*/
|
|
72
|
-
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
72
|
+
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationGuildCommandsResult>;
|
|
73
73
|
/**
|
|
74
74
|
* Creates a new command for a guild
|
|
75
75
|
*
|
|
@@ -79,7 +79,7 @@ declare class ApplicationCommandsAPI {
|
|
|
79
79
|
* @param body - The data to use when creating the command
|
|
80
80
|
* @param options - The options to use when creating the command
|
|
81
81
|
*/
|
|
82
|
-
createGuildCommand(applicationId: Snowflake, guildId: Snowflake, body:
|
|
82
|
+
createGuildCommand(applicationId: Snowflake, guildId: Snowflake, body: RESTPostAPIApplicationGuildCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIApplicationGuildCommandsResult>;
|
|
83
83
|
/**
|
|
84
84
|
* Fetches a guild command
|
|
85
85
|
*
|
|
@@ -89,7 +89,7 @@ declare class ApplicationCommandsAPI {
|
|
|
89
89
|
* @param commandId - The command id to fetch
|
|
90
90
|
* @param options - The options to use when fetching the command
|
|
91
91
|
*/
|
|
92
|
-
getGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
92
|
+
getGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationGuildCommandResult>;
|
|
93
93
|
/**
|
|
94
94
|
* Edits a guild command
|
|
95
95
|
*
|
|
@@ -100,7 +100,7 @@ declare class ApplicationCommandsAPI {
|
|
|
100
100
|
* @param body - The data to use when editing the command
|
|
101
101
|
* @param options - The options to use when editing the command
|
|
102
102
|
*/
|
|
103
|
-
editGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, body:
|
|
103
|
+
editGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, body: RESTPatchAPIApplicationGuildCommandJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPatchAPIApplicationGuildCommandResult>;
|
|
104
104
|
/**
|
|
105
105
|
* Deletes a guild command
|
|
106
106
|
*
|
|
@@ -120,7 +120,7 @@ declare class ApplicationCommandsAPI {
|
|
|
120
120
|
* @param body - The data to use when overwriting commands
|
|
121
121
|
* @param options - The options to use when overwriting the commands
|
|
122
122
|
*/
|
|
123
|
-
bulkOverwriteGuildCommands(applicationId: Snowflake, guildId: Snowflake, body:
|
|
123
|
+
bulkOverwriteGuildCommands(applicationId: Snowflake, guildId: Snowflake, body: RESTPutAPIApplicationGuildCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationGuildCommandsResult>;
|
|
124
124
|
/**
|
|
125
125
|
* Fetches the permissions for a guild command
|
|
126
126
|
*
|
|
@@ -410,7 +410,7 @@ declare class GuildsAPI {
|
|
|
410
410
|
* @param guildId - The id of the guild
|
|
411
411
|
* @param options - The options for fetching the guild
|
|
412
412
|
*/
|
|
413
|
-
get(guildId:
|
|
413
|
+
get(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
|
|
414
414
|
/**
|
|
415
415
|
* Fetches a guild preview
|
|
416
416
|
*
|
|
@@ -595,7 +595,7 @@ declare class GuildsAPI {
|
|
|
595
595
|
* @param body - The options for pruning members
|
|
596
596
|
* @param options - The options for initiating the prune
|
|
597
597
|
*/
|
|
598
|
-
beginPrune(guildId: Snowflake, body?: RESTPostAPIGuildPruneJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
598
|
+
beginPrune(guildId: Snowflake, body?: RESTPostAPIGuildPruneJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIGuildPruneResult>;
|
|
599
599
|
/**
|
|
600
600
|
* Fetches voice regions for a guild
|
|
601
601
|
*
|
|
@@ -636,7 +636,7 @@ declare class GuildsAPI {
|
|
|
636
636
|
* @param guildId - The id of the guild to fetch the widget settings from
|
|
637
637
|
* @param options - The options for fetching the widget settings
|
|
638
638
|
*/
|
|
639
|
-
getWidgetSettings(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
639
|
+
getWidgetSettings(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildWidgetSettings>;
|
|
640
640
|
/**
|
|
641
641
|
* Edits the widget settings for a guild
|
|
642
642
|
*
|
|
@@ -927,7 +927,7 @@ declare class GuildsAPI {
|
|
|
927
927
|
* @param body - The data for editing the auto moderation rule
|
|
928
928
|
* @param options - The options for editing the auto moderation rule
|
|
929
929
|
*/
|
|
930
|
-
editAutoModerationRule(guildId: Snowflake, ruleId: Snowflake, body: RESTPatchAPIAutoModerationRuleJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
930
|
+
editAutoModerationRule(guildId: Snowflake, ruleId: Snowflake, body: RESTPatchAPIAutoModerationRuleJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIAutoModerationRule>;
|
|
931
931
|
/**
|
|
932
932
|
* Deletes an auto moderation rule for a guild
|
|
933
933
|
*
|
|
@@ -1010,7 +1010,7 @@ declare class GuildsAPI {
|
|
|
1010
1010
|
* @param body - The data to use when creating the template
|
|
1011
1011
|
* @param options - The options for creating the template
|
|
1012
1012
|
*/
|
|
1013
|
-
createTemplate(templateCode: string, body:
|
|
1013
|
+
createTemplate(templateCode: string, body: RESTPostAPIGuildTemplatesJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
|
|
1014
1014
|
/**
|
|
1015
1015
|
* Fetches webhooks for a guild
|
|
1016
1016
|
*
|
|
@@ -1049,7 +1049,7 @@ declare class WebhooksAPI {
|
|
|
1049
1049
|
* @param body - The data to use when creating the webhook
|
|
1050
1050
|
* @param options - The options to use when creating the webhook
|
|
1051
1051
|
*/
|
|
1052
|
-
create(channelId: Snowflake, body: RESTPostAPIChannelWebhookJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
1052
|
+
create(channelId: Snowflake, body: RESTPostAPIChannelWebhookJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIWebhook>;
|
|
1053
1053
|
/**
|
|
1054
1054
|
* Edits a webhook
|
|
1055
1055
|
*
|
|
@@ -1157,7 +1157,7 @@ declare class WebhooksAPI {
|
|
|
1157
1157
|
* @param options - The options to use when deleting the message
|
|
1158
1158
|
*/
|
|
1159
1159
|
deleteMessage(id: Snowflake, token: string, messageId: Snowflake, query?: {
|
|
1160
|
-
thread_id?:
|
|
1160
|
+
thread_id?: Snowflake;
|
|
1161
1161
|
}, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
@@ -1207,7 +1207,7 @@ declare class InteractionsAPI {
|
|
|
1207
1207
|
*/
|
|
1208
1208
|
followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
|
|
1209
1209
|
files?: RawFile[];
|
|
1210
|
-
}, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1210
|
+
}, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1211
1211
|
/**
|
|
1212
1212
|
* Edits the initial reply to an interaction
|
|
1213
1213
|
*
|
|
@@ -1372,6 +1372,44 @@ declare class RoleConnectionsAPI {
|
|
|
1372
1372
|
updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
|
|
1373
1373
|
}
|
|
1374
1374
|
|
|
1375
|
+
declare class StageInstancesAPI {
|
|
1376
|
+
private readonly rest;
|
|
1377
|
+
constructor(rest: REST);
|
|
1378
|
+
/**
|
|
1379
|
+
* Creates a new stage instance
|
|
1380
|
+
*
|
|
1381
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
|
|
1382
|
+
* @param body - The data to use when creating the new stage instance
|
|
1383
|
+
* @param options - The options for creating the new stage instance
|
|
1384
|
+
*/
|
|
1385
|
+
create(body: RESTPostAPIStageInstanceJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIStageInstance>;
|
|
1386
|
+
/**
|
|
1387
|
+
* Fetches a stage instance
|
|
1388
|
+
*
|
|
1389
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
|
|
1390
|
+
* @param channelId - The id of the channel
|
|
1391
|
+
* @param options - The options for fetching the stage instance
|
|
1392
|
+
*/
|
|
1393
|
+
get(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIStageInstance>;
|
|
1394
|
+
/**
|
|
1395
|
+
* Edits a stage instance
|
|
1396
|
+
*
|
|
1397
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance}
|
|
1398
|
+
* @param channelId - The id of the channel
|
|
1399
|
+
* @param body - The new stage instance data
|
|
1400
|
+
* @param options - The options for editing the stage instance
|
|
1401
|
+
*/
|
|
1402
|
+
edit(channelId: Snowflake, body: RESTPatchAPIStageInstanceJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIStageInstance>;
|
|
1403
|
+
/**
|
|
1404
|
+
* Deletes a stage instance
|
|
1405
|
+
*
|
|
1406
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance}
|
|
1407
|
+
* @param channelId - The id of the channel
|
|
1408
|
+
* @param options - The options for deleting the stage instance
|
|
1409
|
+
*/
|
|
1410
|
+
delete(channelId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1375
1413
|
declare class StickersAPI {
|
|
1376
1414
|
private readonly rest;
|
|
1377
1415
|
constructor(rest: REST);
|
|
@@ -1595,6 +1633,7 @@ declare class API {
|
|
|
1595
1633
|
readonly invites: InvitesAPI;
|
|
1596
1634
|
readonly oauth2: OAuth2API;
|
|
1597
1635
|
readonly roleConnections: RoleConnectionsAPI;
|
|
1636
|
+
readonly stageInstances: StageInstancesAPI;
|
|
1598
1637
|
readonly stickers: StickersAPI;
|
|
1599
1638
|
readonly threads: ThreadsAPI;
|
|
1600
1639
|
readonly users: UsersAPI;
|
|
@@ -1632,4 +1671,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
1632
1671
|
}[];
|
|
1633
1672
|
};
|
|
1634
1673
|
|
|
1635
|
-
export { API as A, ChannelsAPI as C, DescriptiveRawFile as D, GuildsAPI as G, InteractionsAPI as I, OAuth2API as O, RoleConnectionsAPI as R,
|
|
1674
|
+
export { API as A, ChannelsAPI as C, DescriptiveRawFile as D, GuildsAPI as G, InteractionsAPI as I, OAuth2API as O, RoleConnectionsAPI as R, StageInstancesAPI as S, ThreadsAPI as T, UsersAPI as U, VoiceAPI as V, WebhooksAPI as W, ApplicationCommandsAPI as a, InvitesAPI as b, StickersAPI as c, StartForumThreadOptions as d, withFiles as w };
|
package/dist/http-only.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as API, a as ApplicationCommandsAPI, C as ChannelsAPI, D as DescriptiveRawFile, G as GuildsAPI, I as InteractionsAPI, b as InvitesAPI, O as OAuth2API, R as RoleConnectionsAPI,
|
|
1
|
+
export { A as API, a as ApplicationCommandsAPI, C as ChannelsAPI, D as DescriptiveRawFile, G as GuildsAPI, I as InteractionsAPI, b as InvitesAPI, O as OAuth2API, R as RoleConnectionsAPI, S as StageInstancesAPI, d as StartForumThreadOptions, c as StickersAPI, T as ThreadsAPI, U as UsersAPI, V as VoiceAPI, W as WebhooksAPI, w as withFiles } from './files-88c3bce2.js';
|
|
2
2
|
export * from 'discord-api-types/v10';
|
|
3
3
|
import '@discordjs/rest';
|
|
4
4
|
|
package/dist/http-only.js
CHANGED
|
@@ -30,6 +30,7 @@ __export(http_only_exports, {
|
|
|
30
30
|
InvitesAPI: () => InvitesAPI,
|
|
31
31
|
OAuth2API: () => OAuth2API,
|
|
32
32
|
RoleConnectionsAPI: () => RoleConnectionsAPI,
|
|
33
|
+
StageInstancesAPI: () => StageInstancesAPI,
|
|
33
34
|
StickersAPI: () => StickersAPI,
|
|
34
35
|
ThreadsAPI: () => ThreadsAPI,
|
|
35
36
|
UsersAPI: () => UsersAPI,
|
|
@@ -928,7 +929,9 @@ var GuildsAPI = class {
|
|
|
928
929
|
* @param options - The options for fetching the widget settings
|
|
929
930
|
*/
|
|
930
931
|
async getWidgetSettings(guildId, { signal } = {}) {
|
|
931
|
-
return this.rest.get(import_v103.Routes.guildWidgetSettings(guildId), {
|
|
932
|
+
return this.rest.get(import_v103.Routes.guildWidgetSettings(guildId), {
|
|
933
|
+
signal
|
|
934
|
+
});
|
|
932
935
|
}
|
|
933
936
|
/**
|
|
934
937
|
* Edits the widget settings for a guild
|
|
@@ -1555,7 +1558,7 @@ var InteractionsAPI = class {
|
|
|
1555
1558
|
* @param options - The options to use when replying
|
|
1556
1559
|
*/
|
|
1557
1560
|
async followUp(applicationId, interactionToken, body, { signal } = {}) {
|
|
1558
|
-
|
|
1561
|
+
return this.webhooks.execute(applicationId, interactionToken, { ...body, wait: true }, { signal });
|
|
1559
1562
|
}
|
|
1560
1563
|
/**
|
|
1561
1564
|
* Edits the initial reply to an interaction
|
|
@@ -1830,8 +1833,66 @@ var RoleConnectionsAPI = class {
|
|
|
1830
1833
|
};
|
|
1831
1834
|
__name(RoleConnectionsAPI, "RoleConnectionsAPI");
|
|
1832
1835
|
|
|
1833
|
-
// src/api/
|
|
1836
|
+
// src/api/stageInstances.ts
|
|
1834
1837
|
var import_v108 = require("discord-api-types/v10");
|
|
1838
|
+
var StageInstancesAPI = class {
|
|
1839
|
+
constructor(rest) {
|
|
1840
|
+
this.rest = rest;
|
|
1841
|
+
}
|
|
1842
|
+
/**
|
|
1843
|
+
* Creates a new stage instance
|
|
1844
|
+
*
|
|
1845
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
|
|
1846
|
+
* @param body - The data to use when creating the new stage instance
|
|
1847
|
+
* @param options - The options for creating the new stage instance
|
|
1848
|
+
*/
|
|
1849
|
+
async create(body, { reason, signal } = {}) {
|
|
1850
|
+
return this.rest.post(import_v108.Routes.stageInstances(), {
|
|
1851
|
+
body,
|
|
1852
|
+
reason,
|
|
1853
|
+
signal
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* Fetches a stage instance
|
|
1858
|
+
*
|
|
1859
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
|
|
1860
|
+
* @param channelId - The id of the channel
|
|
1861
|
+
* @param options - The options for fetching the stage instance
|
|
1862
|
+
*/
|
|
1863
|
+
async get(channelId, { signal } = {}) {
|
|
1864
|
+
return this.rest.get(import_v108.Routes.stageInstance(channelId), { signal });
|
|
1865
|
+
}
|
|
1866
|
+
/**
|
|
1867
|
+
* Edits a stage instance
|
|
1868
|
+
*
|
|
1869
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance}
|
|
1870
|
+
* @param channelId - The id of the channel
|
|
1871
|
+
* @param body - The new stage instance data
|
|
1872
|
+
* @param options - The options for editing the stage instance
|
|
1873
|
+
*/
|
|
1874
|
+
async edit(channelId, body, { reason, signal } = {}) {
|
|
1875
|
+
return this.rest.patch(import_v108.Routes.stageInstance(channelId), {
|
|
1876
|
+
body,
|
|
1877
|
+
reason,
|
|
1878
|
+
signal
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* Deletes a stage instance
|
|
1883
|
+
*
|
|
1884
|
+
* @see {@link https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance}
|
|
1885
|
+
* @param channelId - The id of the channel
|
|
1886
|
+
* @param options - The options for deleting the stage instance
|
|
1887
|
+
*/
|
|
1888
|
+
async delete(channelId, { reason, signal } = {}) {
|
|
1889
|
+
await this.rest.delete(import_v108.Routes.stageInstance(channelId), { reason, signal });
|
|
1890
|
+
}
|
|
1891
|
+
};
|
|
1892
|
+
__name(StageInstancesAPI, "StageInstancesAPI");
|
|
1893
|
+
|
|
1894
|
+
// src/api/sticker.ts
|
|
1895
|
+
var import_v109 = require("discord-api-types/v10");
|
|
1835
1896
|
var StickersAPI = class {
|
|
1836
1897
|
constructor(rest) {
|
|
1837
1898
|
this.rest = rest;
|
|
@@ -1843,7 +1904,7 @@ var StickersAPI = class {
|
|
|
1843
1904
|
* @param options - The options to use when fetching the sticker packs
|
|
1844
1905
|
*/
|
|
1845
1906
|
async getNitroStickers({ signal } = {}) {
|
|
1846
|
-
return this.rest.get(
|
|
1907
|
+
return this.rest.get(import_v109.Routes.nitroStickerPacks(), { signal });
|
|
1847
1908
|
}
|
|
1848
1909
|
/**
|
|
1849
1910
|
* Fetches a sticker
|
|
@@ -1853,13 +1914,13 @@ var StickersAPI = class {
|
|
|
1853
1914
|
* @param options - The options to use when fetching the sticker
|
|
1854
1915
|
*/
|
|
1855
1916
|
async get(stickerId, { signal } = {}) {
|
|
1856
|
-
return this.rest.get(
|
|
1917
|
+
return this.rest.get(import_v109.Routes.sticker(stickerId), { signal });
|
|
1857
1918
|
}
|
|
1858
1919
|
};
|
|
1859
1920
|
__name(StickersAPI, "StickersAPI");
|
|
1860
1921
|
|
|
1861
1922
|
// src/api/thread.ts
|
|
1862
|
-
var
|
|
1923
|
+
var import_v1010 = require("discord-api-types/v10");
|
|
1863
1924
|
var ThreadsAPI = class {
|
|
1864
1925
|
constructor(rest) {
|
|
1865
1926
|
this.rest = rest;
|
|
@@ -1872,7 +1933,7 @@ var ThreadsAPI = class {
|
|
|
1872
1933
|
* @param options - The options to use when fetching the thread
|
|
1873
1934
|
*/
|
|
1874
1935
|
async get(threadId, { signal } = {}) {
|
|
1875
|
-
return this.rest.get(
|
|
1936
|
+
return this.rest.get(import_v1010.Routes.channel(threadId), { signal });
|
|
1876
1937
|
}
|
|
1877
1938
|
/**
|
|
1878
1939
|
* Creates a new thread
|
|
@@ -1885,7 +1946,7 @@ var ThreadsAPI = class {
|
|
|
1885
1946
|
* @param options - The options to use when starting the thread
|
|
1886
1947
|
*/
|
|
1887
1948
|
async create(channelId, body, messageId, { signal } = {}) {
|
|
1888
|
-
return this.rest.post(
|
|
1949
|
+
return this.rest.post(import_v1010.Routes.threads(channelId, messageId), {
|
|
1889
1950
|
body,
|
|
1890
1951
|
signal
|
|
1891
1952
|
});
|
|
@@ -1904,7 +1965,7 @@ var ThreadsAPI = class {
|
|
|
1904
1965
|
...optionsBody,
|
|
1905
1966
|
message: messageBody
|
|
1906
1967
|
};
|
|
1907
|
-
return this.rest.post(
|
|
1968
|
+
return this.rest.post(import_v1010.Routes.threads(channelId), { files, body, signal });
|
|
1908
1969
|
}
|
|
1909
1970
|
/**
|
|
1910
1971
|
* Adds the current user to a thread
|
|
@@ -1914,7 +1975,7 @@ var ThreadsAPI = class {
|
|
|
1914
1975
|
* @param options - The options to use when joining the thread
|
|
1915
1976
|
*/
|
|
1916
1977
|
async join(threadId, { signal } = {}) {
|
|
1917
|
-
await this.rest.put(
|
|
1978
|
+
await this.rest.put(import_v1010.Routes.threadMembers(threadId, "@me"), { signal });
|
|
1918
1979
|
}
|
|
1919
1980
|
/**
|
|
1920
1981
|
* Adds a member to a thread
|
|
@@ -1925,7 +1986,7 @@ var ThreadsAPI = class {
|
|
|
1925
1986
|
* @param options - The options to use when adding the member to the thread
|
|
1926
1987
|
*/
|
|
1927
1988
|
async addMember(threadId, userId, { signal } = {}) {
|
|
1928
|
-
await this.rest.put(
|
|
1989
|
+
await this.rest.put(import_v1010.Routes.threadMembers(threadId, userId), { signal });
|
|
1929
1990
|
}
|
|
1930
1991
|
/**
|
|
1931
1992
|
* Removes the current user from a thread
|
|
@@ -1935,7 +1996,7 @@ var ThreadsAPI = class {
|
|
|
1935
1996
|
* @param options - The options to use when leaving the thread
|
|
1936
1997
|
*/
|
|
1937
1998
|
async leave(threadId, { signal } = {}) {
|
|
1938
|
-
await this.rest.delete(
|
|
1999
|
+
await this.rest.delete(import_v1010.Routes.threadMembers(threadId, "@me"), { signal });
|
|
1939
2000
|
}
|
|
1940
2001
|
/**
|
|
1941
2002
|
* Removes a member from a thread
|
|
@@ -1946,7 +2007,7 @@ var ThreadsAPI = class {
|
|
|
1946
2007
|
* @param options - The options to use when removing the member from the thread
|
|
1947
2008
|
*/
|
|
1948
2009
|
async removeMember(threadId, userId, { signal } = {}) {
|
|
1949
|
-
await this.rest.delete(
|
|
2010
|
+
await this.rest.delete(import_v1010.Routes.threadMembers(threadId, userId), { signal });
|
|
1950
2011
|
}
|
|
1951
2012
|
/**
|
|
1952
2013
|
* Fetches a member of a thread
|
|
@@ -1957,7 +2018,7 @@ var ThreadsAPI = class {
|
|
|
1957
2018
|
* @param options - The options to use when fetching the member
|
|
1958
2019
|
*/
|
|
1959
2020
|
async getMember(threadId, userId, { signal } = {}) {
|
|
1960
|
-
return this.rest.get(
|
|
2021
|
+
return this.rest.get(import_v1010.Routes.threadMembers(threadId, userId), { signal });
|
|
1961
2022
|
}
|
|
1962
2023
|
/**
|
|
1963
2024
|
* Fetches all members of a thread
|
|
@@ -1967,14 +2028,14 @@ var ThreadsAPI = class {
|
|
|
1967
2028
|
* @param options - The options to use when fetching the members
|
|
1968
2029
|
*/
|
|
1969
2030
|
async getAllMembers(threadId, { signal } = {}) {
|
|
1970
|
-
return this.rest.get(
|
|
2031
|
+
return this.rest.get(import_v1010.Routes.threadMembers(threadId), { signal });
|
|
1971
2032
|
}
|
|
1972
2033
|
};
|
|
1973
2034
|
__name(ThreadsAPI, "ThreadsAPI");
|
|
1974
2035
|
|
|
1975
2036
|
// src/api/user.ts
|
|
1976
2037
|
var import_rest6 = require("@discordjs/rest");
|
|
1977
|
-
var
|
|
2038
|
+
var import_v1011 = require("discord-api-types/v10");
|
|
1978
2039
|
var UsersAPI = class {
|
|
1979
2040
|
constructor(rest) {
|
|
1980
2041
|
this.rest = rest;
|
|
@@ -1987,7 +2048,7 @@ var UsersAPI = class {
|
|
|
1987
2048
|
* @param options - The options to use when fetching the user
|
|
1988
2049
|
*/
|
|
1989
2050
|
async get(userId, { signal } = {}) {
|
|
1990
|
-
return this.rest.get(
|
|
2051
|
+
return this.rest.get(import_v1011.Routes.user(userId), { signal });
|
|
1991
2052
|
}
|
|
1992
2053
|
/**
|
|
1993
2054
|
* Returns the user object of the requester's account
|
|
@@ -1996,7 +2057,7 @@ var UsersAPI = class {
|
|
|
1996
2057
|
* @param options - The options to use when fetching the current user
|
|
1997
2058
|
*/
|
|
1998
2059
|
async getCurrent({ signal } = {}) {
|
|
1999
|
-
return this.rest.get(
|
|
2060
|
+
return this.rest.get(import_v1011.Routes.user("@me"), { signal });
|
|
2000
2061
|
}
|
|
2001
2062
|
/**
|
|
2002
2063
|
* Returns a list of partial guild objects the current user is a member of
|
|
@@ -2006,7 +2067,7 @@ var UsersAPI = class {
|
|
|
2006
2067
|
* @param options - The options to use when fetching the guilds
|
|
2007
2068
|
*/
|
|
2008
2069
|
async getGuilds(query = {}, { signal } = {}) {
|
|
2009
|
-
return this.rest.get(
|
|
2070
|
+
return this.rest.get(import_v1011.Routes.userGuilds(), {
|
|
2010
2071
|
query: (0, import_rest6.makeURLSearchParams)(query),
|
|
2011
2072
|
signal
|
|
2012
2073
|
});
|
|
@@ -2019,7 +2080,7 @@ var UsersAPI = class {
|
|
|
2019
2080
|
* @param options - The options for leaving the guild
|
|
2020
2081
|
*/
|
|
2021
2082
|
async leaveGuild(guildId, { signal } = {}) {
|
|
2022
|
-
await this.rest.delete(
|
|
2083
|
+
await this.rest.delete(import_v1011.Routes.userGuild(guildId), { signal });
|
|
2023
2084
|
}
|
|
2024
2085
|
/**
|
|
2025
2086
|
* Edits the current user
|
|
@@ -2029,7 +2090,7 @@ var UsersAPI = class {
|
|
|
2029
2090
|
* @param options - The options for editing the user
|
|
2030
2091
|
*/
|
|
2031
2092
|
async edit(body, { signal } = {}) {
|
|
2032
|
-
return this.rest.patch(
|
|
2093
|
+
return this.rest.patch(import_v1011.Routes.user("@me"), { body, signal });
|
|
2033
2094
|
}
|
|
2034
2095
|
/**
|
|
2035
2096
|
* Fetches the guild member for the current user
|
|
@@ -2039,7 +2100,7 @@ var UsersAPI = class {
|
|
|
2039
2100
|
* @param options - The options for fetching the guild member
|
|
2040
2101
|
*/
|
|
2041
2102
|
async getGuildMember(guildId, { signal } = {}) {
|
|
2042
|
-
return this.rest.get(
|
|
2103
|
+
return this.rest.get(import_v1011.Routes.userGuildMember(guildId), { signal });
|
|
2043
2104
|
}
|
|
2044
2105
|
/**
|
|
2045
2106
|
* Edits the guild member for the current user
|
|
@@ -2050,7 +2111,7 @@ var UsersAPI = class {
|
|
|
2050
2111
|
* @param options - The options for editing the guild member
|
|
2051
2112
|
*/
|
|
2052
2113
|
async editCurrentGuildMember(guildId, body = {}, { reason, signal } = {}) {
|
|
2053
|
-
return this.rest.patch(
|
|
2114
|
+
return this.rest.patch(import_v1011.Routes.guildMember(guildId, "@me"), {
|
|
2054
2115
|
reason,
|
|
2055
2116
|
body,
|
|
2056
2117
|
signal
|
|
@@ -2064,7 +2125,7 @@ var UsersAPI = class {
|
|
|
2064
2125
|
* @param options - The options for opening the DM
|
|
2065
2126
|
*/
|
|
2066
2127
|
async createDM(userId, { signal } = {}) {
|
|
2067
|
-
return this.rest.post(
|
|
2128
|
+
return this.rest.post(import_v1011.Routes.userChannels(), {
|
|
2068
2129
|
body: { recipient_id: userId },
|
|
2069
2130
|
signal
|
|
2070
2131
|
});
|
|
@@ -2076,7 +2137,7 @@ var UsersAPI = class {
|
|
|
2076
2137
|
* @param options - The options for fetching the user's connections
|
|
2077
2138
|
*/
|
|
2078
2139
|
async getConnections({ signal } = {}) {
|
|
2079
|
-
return this.rest.get(
|
|
2140
|
+
return this.rest.get(import_v1011.Routes.userConnections(), { signal });
|
|
2080
2141
|
}
|
|
2081
2142
|
/**
|
|
2082
2143
|
* Gets the current user's active application role connection
|
|
@@ -2086,7 +2147,7 @@ var UsersAPI = class {
|
|
|
2086
2147
|
* @param options - The options for fetching the role connections
|
|
2087
2148
|
*/
|
|
2088
2149
|
async getApplicationRoleConnection(applicationId, { signal } = {}) {
|
|
2089
|
-
return this.rest.get(
|
|
2150
|
+
return this.rest.get(import_v1011.Routes.userApplicationRoleConnection(applicationId), {
|
|
2090
2151
|
signal
|
|
2091
2152
|
});
|
|
2092
2153
|
}
|
|
@@ -2099,7 +2160,7 @@ var UsersAPI = class {
|
|
|
2099
2160
|
* @param options - The options to use when updating the application role connection
|
|
2100
2161
|
*/
|
|
2101
2162
|
async updateApplicationRoleConnection(applicationId, body, { signal } = {}) {
|
|
2102
|
-
return this.rest.put(
|
|
2163
|
+
return this.rest.put(import_v1011.Routes.userApplicationRoleConnection(applicationId), {
|
|
2103
2164
|
body,
|
|
2104
2165
|
signal
|
|
2105
2166
|
});
|
|
@@ -2108,7 +2169,7 @@ var UsersAPI = class {
|
|
|
2108
2169
|
__name(UsersAPI, "UsersAPI");
|
|
2109
2170
|
|
|
2110
2171
|
// src/api/voice.ts
|
|
2111
|
-
var
|
|
2172
|
+
var import_v1012 = require("discord-api-types/v10");
|
|
2112
2173
|
var VoiceAPI = class {
|
|
2113
2174
|
constructor(rest) {
|
|
2114
2175
|
this.rest = rest;
|
|
@@ -2120,14 +2181,14 @@ var VoiceAPI = class {
|
|
|
2120
2181
|
* @param options - The options to use when fetching the voice regions
|
|
2121
2182
|
*/
|
|
2122
2183
|
async getVoiceRegions({ signal } = {}) {
|
|
2123
|
-
return this.rest.get(
|
|
2184
|
+
return this.rest.get(import_v1012.Routes.voiceRegions(), { signal });
|
|
2124
2185
|
}
|
|
2125
2186
|
};
|
|
2126
2187
|
__name(VoiceAPI, "VoiceAPI");
|
|
2127
2188
|
|
|
2128
2189
|
// src/api/webhook.ts
|
|
2129
2190
|
var import_rest7 = require("@discordjs/rest");
|
|
2130
|
-
var
|
|
2191
|
+
var import_v1013 = require("discord-api-types/v10");
|
|
2131
2192
|
var WebhooksAPI = class {
|
|
2132
2193
|
constructor(rest) {
|
|
2133
2194
|
this.rest = rest;
|
|
@@ -2142,7 +2203,7 @@ var WebhooksAPI = class {
|
|
|
2142
2203
|
* @param options - The options to use when fetching the webhook
|
|
2143
2204
|
*/
|
|
2144
2205
|
async get(id, token, { signal } = {}) {
|
|
2145
|
-
return this.rest.get(
|
|
2206
|
+
return this.rest.get(import_v1013.Routes.webhook(id, token), { signal });
|
|
2146
2207
|
}
|
|
2147
2208
|
/**
|
|
2148
2209
|
* Creates a new webhook
|
|
@@ -2153,7 +2214,7 @@ var WebhooksAPI = class {
|
|
|
2153
2214
|
* @param options - The options to use when creating the webhook
|
|
2154
2215
|
*/
|
|
2155
2216
|
async create(channelId, body, { reason, signal } = {}) {
|
|
2156
|
-
return this.rest.post(
|
|
2217
|
+
return this.rest.post(import_v1013.Routes.channelWebhooks(channelId), {
|
|
2157
2218
|
reason,
|
|
2158
2219
|
body,
|
|
2159
2220
|
signal
|
|
@@ -2169,7 +2230,7 @@ var WebhooksAPI = class {
|
|
|
2169
2230
|
* @param options - The options to use when editing the webhook
|
|
2170
2231
|
*/
|
|
2171
2232
|
async edit(id, body, { token, reason, signal } = {}) {
|
|
2172
|
-
return this.rest.patch(
|
|
2233
|
+
return this.rest.patch(import_v1013.Routes.webhook(id, token), {
|
|
2173
2234
|
reason,
|
|
2174
2235
|
body,
|
|
2175
2236
|
signal
|
|
@@ -2184,7 +2245,7 @@ var WebhooksAPI = class {
|
|
|
2184
2245
|
* @param options - The options to use when deleting the webhook
|
|
2185
2246
|
*/
|
|
2186
2247
|
async delete(id, { token, reason, signal } = {}) {
|
|
2187
|
-
await this.rest.delete(
|
|
2248
|
+
await this.rest.delete(import_v1013.Routes.webhook(id, token), { reason, signal });
|
|
2188
2249
|
}
|
|
2189
2250
|
/**
|
|
2190
2251
|
* Executes a webhook
|
|
@@ -2201,7 +2262,7 @@ var WebhooksAPI = class {
|
|
|
2201
2262
|
files,
|
|
2202
2263
|
...body
|
|
2203
2264
|
}, { signal } = {}) {
|
|
2204
|
-
return this.rest.post(
|
|
2265
|
+
return this.rest.post(import_v1013.Routes.webhook(id, token), {
|
|
2205
2266
|
query: (0, import_rest7.makeURLSearchParams)({ wait, thread_id }),
|
|
2206
2267
|
files,
|
|
2207
2268
|
body,
|
|
@@ -2221,7 +2282,7 @@ var WebhooksAPI = class {
|
|
|
2221
2282
|
* @param options - The options to use when executing the webhook
|
|
2222
2283
|
*/
|
|
2223
2284
|
async executeSlack(id, token, body, query = {}, { signal } = {}) {
|
|
2224
|
-
await this.rest.post(
|
|
2285
|
+
await this.rest.post(import_v1013.Routes.webhookPlatform(id, token, "slack"), {
|
|
2225
2286
|
query: (0, import_rest7.makeURLSearchParams)(query),
|
|
2226
2287
|
body,
|
|
2227
2288
|
auth: false,
|
|
@@ -2239,7 +2300,7 @@ var WebhooksAPI = class {
|
|
|
2239
2300
|
* @param options - The options to use when executing the webhook
|
|
2240
2301
|
*/
|
|
2241
2302
|
async executeGitHub(id, token, body, query = {}, { signal } = {}) {
|
|
2242
|
-
await this.rest.post(
|
|
2303
|
+
await this.rest.post(import_v1013.Routes.webhookPlatform(id, token, "github"), {
|
|
2243
2304
|
query: (0, import_rest7.makeURLSearchParams)(query),
|
|
2244
2305
|
body,
|
|
2245
2306
|
signal,
|
|
@@ -2257,7 +2318,7 @@ var WebhooksAPI = class {
|
|
|
2257
2318
|
* @param options - The options to use when fetching the message
|
|
2258
2319
|
*/
|
|
2259
2320
|
async getMessage(id, token, messageId, query = {}, { signal } = {}) {
|
|
2260
|
-
return this.rest.get(
|
|
2321
|
+
return this.rest.get(import_v1013.Routes.webhookMessage(id, token, messageId), {
|
|
2261
2322
|
query: (0, import_rest7.makeURLSearchParams)(query),
|
|
2262
2323
|
auth: false,
|
|
2263
2324
|
signal
|
|
@@ -2278,7 +2339,7 @@ var WebhooksAPI = class {
|
|
|
2278
2339
|
files,
|
|
2279
2340
|
...body
|
|
2280
2341
|
}, { signal } = {}) {
|
|
2281
|
-
return this.rest.patch(
|
|
2342
|
+
return this.rest.patch(import_v1013.Routes.webhookMessage(id, token, messageId), {
|
|
2282
2343
|
query: (0, import_rest7.makeURLSearchParams)({ thread_id }),
|
|
2283
2344
|
auth: false,
|
|
2284
2345
|
body,
|
|
@@ -2297,7 +2358,7 @@ var WebhooksAPI = class {
|
|
|
2297
2358
|
* @param options - The options to use when deleting the message
|
|
2298
2359
|
*/
|
|
2299
2360
|
async deleteMessage(id, token, messageId, query = {}, { signal } = {}) {
|
|
2300
|
-
await this.rest.delete(
|
|
2361
|
+
await this.rest.delete(import_v1013.Routes.webhookMessage(id, token, messageId), {
|
|
2301
2362
|
query: (0, import_rest7.makeURLSearchParams)(query),
|
|
2302
2363
|
auth: false,
|
|
2303
2364
|
signal
|
|
@@ -2316,6 +2377,7 @@ var API = class {
|
|
|
2316
2377
|
this.invites = new InvitesAPI(rest);
|
|
2317
2378
|
this.roleConnections = new RoleConnectionsAPI(rest);
|
|
2318
2379
|
this.oauth2 = new OAuth2API(rest);
|
|
2380
|
+
this.stageInstances = new StageInstancesAPI(rest);
|
|
2319
2381
|
this.stickers = new StickersAPI(rest);
|
|
2320
2382
|
this.threads = new ThreadsAPI(rest);
|
|
2321
2383
|
this.users = new UsersAPI(rest);
|
|
@@ -2330,6 +2392,7 @@ var API = class {
|
|
|
2330
2392
|
invites;
|
|
2331
2393
|
oauth2;
|
|
2332
2394
|
roleConnections;
|
|
2395
|
+
stageInstances;
|
|
2333
2396
|
stickers;
|
|
2334
2397
|
threads;
|
|
2335
2398
|
users;
|
|
@@ -2357,7 +2420,7 @@ __name(withFiles, "withFiles");
|
|
|
2357
2420
|
|
|
2358
2421
|
// src/http-only/index.ts
|
|
2359
2422
|
__reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
|
|
2360
|
-
var version = "0.6.1-dev.
|
|
2423
|
+
var version = "0.6.1-dev.1684757126-9345d1b.0";
|
|
2361
2424
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2362
2425
|
0 && (module.exports = {
|
|
2363
2426
|
API,
|
|
@@ -2368,6 +2431,7 @@ var version = "0.6.1-dev.1684497912-b85a3f2.0";
|
|
|
2368
2431
|
InvitesAPI,
|
|
2369
2432
|
OAuth2API,
|
|
2370
2433
|
RoleConnectionsAPI,
|
|
2434
|
+
StageInstancesAPI,
|
|
2371
2435
|
StickersAPI,
|
|
2372
2436
|
ThreadsAPI,
|
|
2373
2437
|
UsersAPI,
|