@discordjs/core 0.7.0-dev.1686744274-a873ec1.0 → 0.7.0-dev.1688817870-df40dcd.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-88c3bce2.d.ts → files-460c6b65.d.ts} +151 -132
- package/dist/http-only.d.ts +1 -1
- package/dist/http-only.js +175 -145
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +178 -146
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +175 -145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +178 -146
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -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, 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,
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, 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, 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, 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;
|
|
@@ -10,8 +10,8 @@ declare class ApplicationCommandsAPI {
|
|
|
10
10
|
*
|
|
11
11
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
|
|
12
12
|
* @param applicationId - The application id to fetch commands for
|
|
13
|
-
* @param query - The query options
|
|
14
|
-
* @param options - The options
|
|
13
|
+
* @param query - The query options for fetching commands
|
|
14
|
+
* @param options - The options for fetching commands
|
|
15
15
|
*/
|
|
16
16
|
getGlobalCommands(applicationId: Snowflake, query?: RESTGetAPIApplicationCommandsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationCommandsResult>;
|
|
17
17
|
/**
|
|
@@ -19,8 +19,8 @@ declare class ApplicationCommandsAPI {
|
|
|
19
19
|
*
|
|
20
20
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
|
|
21
21
|
* @param applicationId - The application id to create the command for
|
|
22
|
-
* @param body - The data
|
|
23
|
-
* @param options - The options
|
|
22
|
+
* @param body - The data for creating the command
|
|
23
|
+
* @param options - The options for creating the command
|
|
24
24
|
*/
|
|
25
25
|
createGlobalCommand(applicationId: Snowflake, body: RESTPostAPIApplicationCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
|
|
26
26
|
/**
|
|
@@ -29,7 +29,7 @@ declare class ApplicationCommandsAPI {
|
|
|
29
29
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
|
|
30
30
|
* @param applicationId - The application id to fetch the command from
|
|
31
31
|
* @param commandId - The command id to fetch
|
|
32
|
-
* @param options - The options
|
|
32
|
+
* @param options - The options for fetching the command
|
|
33
33
|
*/
|
|
34
34
|
getGlobalCommand(applicationId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
|
|
35
35
|
/**
|
|
@@ -38,7 +38,7 @@ declare class ApplicationCommandsAPI {
|
|
|
38
38
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
|
|
39
39
|
* @param applicationId - The application id of the command
|
|
40
40
|
* @param commandId - The id of the command to edit
|
|
41
|
-
* @param body - The data
|
|
41
|
+
* @param body - The data for editing the command
|
|
42
42
|
* @param options - The options for editing the command
|
|
43
43
|
*/
|
|
44
44
|
editGlobalCommand(applicationId: Snowflake, commandId: Snowflake, body: RESTPatchAPIApplicationCommandJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationCommand>;
|
|
@@ -56,7 +56,7 @@ declare class ApplicationCommandsAPI {
|
|
|
56
56
|
*
|
|
57
57
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
|
|
58
58
|
* @param applicationId - The application id to overwrite commands for
|
|
59
|
-
* @param body - The data
|
|
59
|
+
* @param body - The data for overwriting commands
|
|
60
60
|
* @param options - The options for overwriting commands
|
|
61
61
|
*/
|
|
62
62
|
bulkOverwriteGlobalCommands(applicationId: Snowflake, body: RESTPutAPIApplicationCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationCommandsResult>;
|
|
@@ -66,8 +66,8 @@ declare class ApplicationCommandsAPI {
|
|
|
66
66
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}
|
|
67
67
|
* @param applicationId - The application id to fetch commands for
|
|
68
68
|
* @param guildId - The guild id to fetch commands for
|
|
69
|
-
* @param query - The data
|
|
70
|
-
* @param options - The options
|
|
69
|
+
* @param query - The data for fetching commands
|
|
70
|
+
* @param options - The options for fetching commands
|
|
71
71
|
*/
|
|
72
72
|
getGuildCommands(applicationId: Snowflake, guildId: Snowflake, query?: RESTGetAPIApplicationGuildCommandsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationGuildCommandsResult>;
|
|
73
73
|
/**
|
|
@@ -76,8 +76,8 @@ declare class ApplicationCommandsAPI {
|
|
|
76
76
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
|
|
77
77
|
* @param applicationId - The application id to create the command for
|
|
78
78
|
* @param guildId - The guild id to create the command for
|
|
79
|
-
* @param body - The data
|
|
80
|
-
* @param options - The options
|
|
79
|
+
* @param body - The data for creating the command
|
|
80
|
+
* @param options - The options for creating the command
|
|
81
81
|
*/
|
|
82
82
|
createGuildCommand(applicationId: Snowflake, guildId: Snowflake, body: RESTPostAPIApplicationGuildCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIApplicationGuildCommandsResult>;
|
|
83
83
|
/**
|
|
@@ -87,7 +87,7 @@ declare class ApplicationCommandsAPI {
|
|
|
87
87
|
* @param applicationId - The application id to fetch the command from
|
|
88
88
|
* @param guildId - The guild id to fetch the command from
|
|
89
89
|
* @param commandId - The command id to fetch
|
|
90
|
-
* @param options - The options
|
|
90
|
+
* @param options - The options for fetching the command
|
|
91
91
|
*/
|
|
92
92
|
getGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationGuildCommandResult>;
|
|
93
93
|
/**
|
|
@@ -97,8 +97,8 @@ declare class ApplicationCommandsAPI {
|
|
|
97
97
|
* @param applicationId - The application id of the command
|
|
98
98
|
* @param guildId - The guild id of the command
|
|
99
99
|
* @param commandId - The command id to edit
|
|
100
|
-
* @param body - The data
|
|
101
|
-
* @param options - The options
|
|
100
|
+
* @param body - The data for editing the command
|
|
101
|
+
* @param options - The options for editing the command
|
|
102
102
|
*/
|
|
103
103
|
editGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, body: RESTPatchAPIApplicationGuildCommandJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPatchAPIApplicationGuildCommandResult>;
|
|
104
104
|
/**
|
|
@@ -117,8 +117,8 @@ declare class ApplicationCommandsAPI {
|
|
|
117
117
|
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
|
|
118
118
|
* @param applicationId - The application id to overwrite commands for
|
|
119
119
|
* @param guildId - The guild id to overwrite commands for
|
|
120
|
-
* @param body - The data
|
|
121
|
-
* @param options - The options
|
|
120
|
+
* @param body - The data for overwriting commands
|
|
121
|
+
* @param options - The options for overwriting the commands
|
|
122
122
|
*/
|
|
123
123
|
bulkOverwriteGuildCommands(applicationId: Snowflake, guildId: Snowflake, body: RESTPutAPIApplicationGuildCommandsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationGuildCommandsResult>;
|
|
124
124
|
/**
|
|
@@ -148,12 +148,17 @@ declare class ApplicationCommandsAPI {
|
|
|
148
148
|
* @param applicationId - The application id to edit the permissions for
|
|
149
149
|
* @param guildId - The guild id to edit the permissions for
|
|
150
150
|
* @param commandId - The id of the command to edit the permissions for
|
|
151
|
-
* @param body - The data
|
|
152
|
-
* @param options - The options
|
|
151
|
+
* @param body - The data for editing the permissions
|
|
152
|
+
* @param options - The options for editing the permissions
|
|
153
153
|
*/
|
|
154
154
|
editGuildCommandPermissions(userToken: string, applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake, body: RESTPutAPIApplicationCommandPermissionsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildApplicationCommandPermissions>;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
|
|
158
|
+
message: RESTPostAPIGuildForumThreadsJSONBody['message'] & {
|
|
159
|
+
files?: RawFile[];
|
|
160
|
+
};
|
|
161
|
+
}
|
|
157
162
|
declare class ChannelsAPI {
|
|
158
163
|
private readonly rest;
|
|
159
164
|
constructor(rest: REST);
|
|
@@ -162,8 +167,8 @@ declare class ChannelsAPI {
|
|
|
162
167
|
*
|
|
163
168
|
* @see {@link https://discord.com/developers/docs/resources/channel#create-message}
|
|
164
169
|
* @param channelId - The id of the channel to send the message in
|
|
165
|
-
* @param body - The data
|
|
166
|
-
* @param options - The options
|
|
170
|
+
* @param body - The data for sending the message
|
|
171
|
+
* @param options - The options for sending the message
|
|
167
172
|
*/
|
|
168
173
|
createMessage(channelId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
|
|
169
174
|
files?: RawFile[];
|
|
@@ -174,8 +179,8 @@ declare class ChannelsAPI {
|
|
|
174
179
|
* @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
|
|
175
180
|
* @param channelId - The id of the channel the message is in
|
|
176
181
|
* @param messageId - The id of the message to edit
|
|
177
|
-
* @param body - The data
|
|
178
|
-
* @param options - The options
|
|
182
|
+
* @param body - The data for editing the message
|
|
183
|
+
* @param options - The options for editing the message
|
|
179
184
|
*/
|
|
180
185
|
editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: RESTPatchAPIChannelMessageJSONBody & {
|
|
181
186
|
files?: RawFile[];
|
|
@@ -187,7 +192,7 @@ declare class ChannelsAPI {
|
|
|
187
192
|
* @param channelId - The id of the channel the message is in
|
|
188
193
|
* @param messageId - The id of the message to get the reactions for
|
|
189
194
|
* @param emoji - The emoji to get the reactions for
|
|
190
|
-
* @param query - The query options
|
|
195
|
+
* @param query - The query options for fetching the reactions
|
|
191
196
|
* @param options - The options for fetching the message reactions
|
|
192
197
|
*/
|
|
193
198
|
getMessageReactions(channelId: Snowflake, messageId: Snowflake, emoji: string, query?: RESTGetAPIChannelMessageReactionUsersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelMessageReactionUsersResult>;
|
|
@@ -271,7 +276,7 @@ declare class ChannelsAPI {
|
|
|
271
276
|
*
|
|
272
277
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
|
|
273
278
|
* @param channelId - The id of the channel to fetch messages from
|
|
274
|
-
* @param query - The query options
|
|
279
|
+
* @param query - The query options for fetching messages
|
|
275
280
|
* @param options - The options for fetching the messages
|
|
276
281
|
*/
|
|
277
282
|
getMessages(channelId: Snowflake, query?: RESTGetAPIChannelMessagesQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelMessagesResult>;
|
|
@@ -359,7 +364,7 @@ declare class ChannelsAPI {
|
|
|
359
364
|
*
|
|
360
365
|
* @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
|
|
361
366
|
* @param channelId - The id of the channel to create an invite for
|
|
362
|
-
* @param body - The data
|
|
367
|
+
* @param body - The data for creating the invite
|
|
363
368
|
* @param options - The options for creating the invite
|
|
364
369
|
*/
|
|
365
370
|
createInvite(channelId: Snowflake, body: RESTPostAPIChannelInviteJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIExtendedInvite>;
|
|
@@ -371,6 +376,26 @@ declare class ChannelsAPI {
|
|
|
371
376
|
* @param options - The options for fetching the invites
|
|
372
377
|
*/
|
|
373
378
|
getInvites(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelInvitesResult>;
|
|
379
|
+
/**
|
|
380
|
+
* Creates a new thread
|
|
381
|
+
*
|
|
382
|
+
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
|
|
383
|
+
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
|
|
384
|
+
* @param channelId - The id of the channel to start the thread in
|
|
385
|
+
* @param body - The data for starting the thread
|
|
386
|
+
* @param messageId - The id of the message to start the thread from
|
|
387
|
+
* @param options - The options for starting the thread
|
|
388
|
+
*/
|
|
389
|
+
createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
390
|
+
/**
|
|
391
|
+
* Creates a new forum post
|
|
392
|
+
*
|
|
393
|
+
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
|
|
394
|
+
* @param channelId - The id of the forum channel to start the thread in
|
|
395
|
+
* @param body - The data for starting the thread
|
|
396
|
+
* @param options - The options for starting the thread
|
|
397
|
+
*/
|
|
398
|
+
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadChannel>;
|
|
374
399
|
/**
|
|
375
400
|
* Fetches the archived threads of a channel
|
|
376
401
|
*
|
|
@@ -378,7 +403,7 @@ declare class ChannelsAPI {
|
|
|
378
403
|
* @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
|
|
379
404
|
* @param channelId - The id of the channel to fetch archived threads from
|
|
380
405
|
* @param archivedStatus - The archived status of the threads to fetch
|
|
381
|
-
* @param query - The options
|
|
406
|
+
* @param query - The options for fetching archived threads
|
|
382
407
|
* @param options - The options for fetching archived threads
|
|
383
408
|
*/
|
|
384
409
|
getArchivedThreads(channelId: Snowflake, archivedStatus: 'private' | 'public', query?: RESTGetAPIChannelThreadsArchivedQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;
|
|
@@ -387,17 +412,45 @@ declare class ChannelsAPI {
|
|
|
387
412
|
*
|
|
388
413
|
* @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
|
|
389
414
|
* @param channelId - The id of the channel to fetch joined archived threads from
|
|
390
|
-
* @param query - The options
|
|
415
|
+
* @param query - The options for fetching joined archived threads
|
|
391
416
|
* @param options - The options for fetching joined archived threads
|
|
392
417
|
*/
|
|
393
418
|
getJoinedPrivateArchivedThreads(channelId: Snowflake, query?: RESTGetAPIChannelThreadsArchivedQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;
|
|
419
|
+
/**
|
|
420
|
+
* Creates a new webhook
|
|
421
|
+
*
|
|
422
|
+
* @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
|
|
423
|
+
* @param channelId - The id of the channel to create the webhook in
|
|
424
|
+
* @param body - The data for creating the webhook
|
|
425
|
+
* @param options - The options for creating the webhook
|
|
426
|
+
*/
|
|
427
|
+
createWebhook(channelId: Snowflake, body: RESTPostAPIChannelWebhookJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIWebhook>;
|
|
394
428
|
/**
|
|
395
429
|
* Fetches the webhooks of a channel
|
|
396
430
|
*
|
|
397
431
|
* @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks}
|
|
398
|
-
* @param
|
|
432
|
+
* @param channelId - The id of the channel
|
|
399
433
|
*/
|
|
400
|
-
getWebhooks(
|
|
434
|
+
getWebhooks(channelId: Snowflake): Promise<RESTGetAPIChannelWebhooksResult>;
|
|
435
|
+
/**
|
|
436
|
+
* Edits the permission overwrite for a user or role in a channel
|
|
437
|
+
*
|
|
438
|
+
* @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions}
|
|
439
|
+
* @param channelId - The id of the channel to edit the permission overwrite in
|
|
440
|
+
* @param overwriteId - The id of the user or role to edit the permission overwrite for
|
|
441
|
+
* @param body - The data for editing the permission overwrite
|
|
442
|
+
* @param options - The options for editing the permission overwrite
|
|
443
|
+
*/
|
|
444
|
+
editPermissionOverwrite(channelId: Snowflake, overwriteId: Snowflake, body: RESTPutAPIChannelPermissionJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
445
|
+
/**
|
|
446
|
+
* Deletes the permission overwrite for a user or role in a channel
|
|
447
|
+
*
|
|
448
|
+
* @see {@link https://discord.com/developers/docs/resources/channel#delete-channel-permission}
|
|
449
|
+
* @param channelId - The id of the channel to delete the permission overwrite in
|
|
450
|
+
* @param overwriteId - The id of the user or role to delete the permission overwrite for
|
|
451
|
+
* @param options - The options for deleting the permission overwrite
|
|
452
|
+
*/
|
|
453
|
+
deletePermissionOverwrite(channelId: Snowflake, overwriteId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
401
454
|
}
|
|
402
455
|
|
|
403
456
|
declare class GuildsAPI {
|
|
@@ -449,7 +502,7 @@ declare class GuildsAPI {
|
|
|
449
502
|
*
|
|
450
503
|
* @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
|
|
451
504
|
* @param guildId - The id of the guild
|
|
452
|
-
* @param query - The query
|
|
505
|
+
* @param query - The query for fetching the guild members
|
|
453
506
|
* @param options - The options for fetching the guild members
|
|
454
507
|
*/
|
|
455
508
|
getMembers(guildId: Snowflake, query?: RESTGetAPIGuildMembersQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersResult>;
|
|
@@ -961,7 +1014,7 @@ declare class GuildsAPI {
|
|
|
961
1014
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
|
|
962
1015
|
* @param guildId - The id of the guild
|
|
963
1016
|
* @param userId - The id of the user
|
|
964
|
-
* @param body - The data
|
|
1017
|
+
* @param body - The data for editing the guild member
|
|
965
1018
|
* @param options - The options for editing the guild member
|
|
966
1019
|
*/
|
|
967
1020
|
editMember(guildId: Snowflake, userId: Snowflake, body?: RESTPatchAPIGuildMemberJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
|
|
@@ -1007,7 +1060,7 @@ declare class GuildsAPI {
|
|
|
1007
1060
|
*
|
|
1008
1061
|
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
|
|
1009
1062
|
* @param templateCode - The code of the template
|
|
1010
|
-
* @param body - The data
|
|
1063
|
+
* @param body - The data for creating the template
|
|
1011
1064
|
* @param options - The options for creating the template
|
|
1012
1065
|
*/
|
|
1013
1066
|
createTemplate(templateCode: string, body: RESTPostAPIGuildTemplatesJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
|
|
@@ -1023,9 +1076,17 @@ declare class GuildsAPI {
|
|
|
1023
1076
|
*
|
|
1024
1077
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
|
|
1025
1078
|
* @param guildId - The id of the guild
|
|
1026
|
-
* @param body - The options
|
|
1079
|
+
* @param body - The options for setting the voice state
|
|
1027
1080
|
*/
|
|
1028
1081
|
setVoiceState(guildId: Snowflake, body?: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody): Promise<never>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Fetches a guild onboarding
|
|
1084
|
+
*
|
|
1085
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-onboarding}
|
|
1086
|
+
* @param guildId - The id of the guild
|
|
1087
|
+
* @param options - The options for fetching the guild onboarding
|
|
1088
|
+
*/
|
|
1089
|
+
getOnboarding(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildOnboarding>;
|
|
1029
1090
|
}
|
|
1030
1091
|
|
|
1031
1092
|
declare class WebhooksAPI {
|
|
@@ -1038,18 +1099,9 @@ declare class WebhooksAPI {
|
|
|
1038
1099
|
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}
|
|
1039
1100
|
* @param id - The id of the webhook
|
|
1040
1101
|
* @param token - The token of the webhook
|
|
1041
|
-
* @param options - The options
|
|
1102
|
+
* @param options - The options for fetching the webhook
|
|
1042
1103
|
*/
|
|
1043
1104
|
get(id: Snowflake, token?: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIWebhook>;
|
|
1044
|
-
/**
|
|
1045
|
-
* Creates a new webhook
|
|
1046
|
-
*
|
|
1047
|
-
* @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}
|
|
1048
|
-
* @param channelId - The id of the channel to create the webhook in
|
|
1049
|
-
* @param body - The data to use when creating the webhook
|
|
1050
|
-
* @param options - The options to use when creating the webhook
|
|
1051
|
-
*/
|
|
1052
|
-
create(channelId: Snowflake, body: RESTPostAPIChannelWebhookJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIWebhook>;
|
|
1053
1105
|
/**
|
|
1054
1106
|
* Edits a webhook
|
|
1055
1107
|
*
|
|
@@ -1057,7 +1109,7 @@ declare class WebhooksAPI {
|
|
|
1057
1109
|
* @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}
|
|
1058
1110
|
* @param id - The id of the webhook to edit
|
|
1059
1111
|
* @param body - The new webhook data
|
|
1060
|
-
* @param options - The options
|
|
1112
|
+
* @param options - The options for editing the webhook
|
|
1061
1113
|
*/
|
|
1062
1114
|
edit(id: Snowflake, body: RESTPatchAPIWebhookJSONBody, { token, reason, signal }?: Pick<RequestData, 'reason' | 'signal'> & {
|
|
1063
1115
|
token?: string | undefined;
|
|
@@ -1068,7 +1120,7 @@ declare class WebhooksAPI {
|
|
|
1068
1120
|
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook}
|
|
1069
1121
|
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token}
|
|
1070
1122
|
* @param id - The id of the webhook to delete
|
|
1071
|
-
* @param options - The options
|
|
1123
|
+
* @param options - The options for deleting the webhook
|
|
1072
1124
|
*/
|
|
1073
1125
|
delete(id: Snowflake, { token, reason, signal }?: Pick<RequestData, 'reason' | 'signal'> & {
|
|
1074
1126
|
token?: string | undefined;
|
|
@@ -1079,8 +1131,8 @@ declare class WebhooksAPI {
|
|
|
1079
1131
|
* @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
|
|
1080
1132
|
* @param id - The id of the webhook
|
|
1081
1133
|
* @param token - The token of the webhook
|
|
1082
|
-
* @param body - The data
|
|
1083
|
-
* @param options - The options
|
|
1134
|
+
* @param body - The data for executing the webhook
|
|
1135
|
+
* @param options - The options for executing the webhook
|
|
1084
1136
|
*/
|
|
1085
1137
|
execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
|
|
1086
1138
|
files?: RawFile[];
|
|
@@ -1092,8 +1144,8 @@ declare class WebhooksAPI {
|
|
|
1092
1144
|
* @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}
|
|
1093
1145
|
* @param id - The id of the webhook
|
|
1094
1146
|
* @param token - The token of the webhook
|
|
1095
|
-
* @param body - The data
|
|
1096
|
-
* @param options - The options
|
|
1147
|
+
* @param body - The data for executing the webhook
|
|
1148
|
+
* @param options - The options for executing the webhook
|
|
1097
1149
|
*/
|
|
1098
1150
|
execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
|
|
1099
1151
|
files?: RawFile[];
|
|
@@ -1105,9 +1157,9 @@ declare class WebhooksAPI {
|
|
|
1105
1157
|
* @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook}
|
|
1106
1158
|
* @param id - The id of the webhook
|
|
1107
1159
|
* @param token - The token of the webhook
|
|
1108
|
-
* @param body - The data
|
|
1109
|
-
* @param query - The query options
|
|
1110
|
-
* @param options - The options
|
|
1160
|
+
* @param body - The data for executing the webhook
|
|
1161
|
+
* @param query - The query options for executing the webhook
|
|
1162
|
+
* @param options - The options for executing the webhook
|
|
1111
1163
|
*/
|
|
1112
1164
|
executeSlack(id: Snowflake, token: string, body: unknown, query?: RESTPostAPIWebhookWithTokenSlackQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1113
1165
|
/**
|
|
@@ -1116,9 +1168,9 @@ declare class WebhooksAPI {
|
|
|
1116
1168
|
* @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook}
|
|
1117
1169
|
* @param id - The id of the webhook
|
|
1118
1170
|
* @param token - The token of the webhook
|
|
1119
|
-
* @param body - The data
|
|
1120
|
-
* @param query - The options
|
|
1121
|
-
* @param options - The options
|
|
1171
|
+
* @param body - The data for executing the webhook
|
|
1172
|
+
* @param query - The options for executing the webhook
|
|
1173
|
+
* @param options - The options for executing the webhook
|
|
1122
1174
|
*/
|
|
1123
1175
|
executeGitHub(id: Snowflake, token: string, body: unknown, query?: RESTPostAPIWebhookWithTokenGitHubQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1124
1176
|
/**
|
|
@@ -1128,8 +1180,8 @@ declare class WebhooksAPI {
|
|
|
1128
1180
|
* @param id - The id of the webhook
|
|
1129
1181
|
* @param token - The token of the webhook
|
|
1130
1182
|
* @param messageId - The id of the message to fetch
|
|
1131
|
-
* @param query - The query options
|
|
1132
|
-
* @param options - The options
|
|
1183
|
+
* @param query - The query options for fetching the message
|
|
1184
|
+
* @param options - The options for fetching the message
|
|
1133
1185
|
*/
|
|
1134
1186
|
getMessage(id: Snowflake, token: string, messageId: Snowflake, query?: RESTGetAPIWebhookWithTokenMessageQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1135
1187
|
/**
|
|
@@ -1139,8 +1191,8 @@ declare class WebhooksAPI {
|
|
|
1139
1191
|
* @param id - The id of the webhook
|
|
1140
1192
|
* @param token - The token of the webhook
|
|
1141
1193
|
* @param messageId - The id of the message to edit
|
|
1142
|
-
* @param body - The data
|
|
1143
|
-
* @param options - The options
|
|
1194
|
+
* @param body - The data for editing the message
|
|
1195
|
+
* @param options - The options for editing the message
|
|
1144
1196
|
*/
|
|
1145
1197
|
editMessage(id: Snowflake, token: string, messageId: Snowflake, { thread_id, files, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & {
|
|
1146
1198
|
files?: RawFile[];
|
|
@@ -1153,8 +1205,8 @@ declare class WebhooksAPI {
|
|
|
1153
1205
|
* @param id - The id of the webhook
|
|
1154
1206
|
* @param token - The token of the webhook
|
|
1155
1207
|
* @param messageId - The id of the message to delete
|
|
1156
|
-
* @param query - The options
|
|
1157
|
-
* @param options - The options
|
|
1208
|
+
* @param query - The options for deleting the message
|
|
1209
|
+
* @param options - The options for deleting the message
|
|
1158
1210
|
*/
|
|
1159
1211
|
deleteMessage(id: Snowflake, token: string, messageId: Snowflake, query?: {
|
|
1160
1212
|
thread_id?: Snowflake;
|
|
@@ -1171,8 +1223,8 @@ declare class InteractionsAPI {
|
|
|
1171
1223
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1172
1224
|
* @param interactionId - The id of the interaction
|
|
1173
1225
|
* @param interactionToken - The token of the interaction
|
|
1174
|
-
* @param body - The callback data
|
|
1175
|
-
* @param options - The options
|
|
1226
|
+
* @param body - The callback data for replying
|
|
1227
|
+
* @param options - The options for replying
|
|
1176
1228
|
*/
|
|
1177
1229
|
reply(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
|
|
1178
1230
|
files?: RawFile[];
|
|
@@ -1183,8 +1235,8 @@ declare class InteractionsAPI {
|
|
|
1183
1235
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1184
1236
|
* @param interactionId - The id of the interaction
|
|
1185
1237
|
* @param interactionToken - The token of the interaction
|
|
1186
|
-
* @param data - The data
|
|
1187
|
-
* @param options - The options
|
|
1238
|
+
* @param data - The data for deferring the reply
|
|
1239
|
+
* @param options - The options for deferring
|
|
1188
1240
|
*/
|
|
1189
1241
|
defer(interactionId: Snowflake, interactionToken: string, data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1190
1242
|
/**
|
|
@@ -1193,7 +1245,7 @@ declare class InteractionsAPI {
|
|
|
1193
1245
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1194
1246
|
* @param interactionId - The id of the interaction
|
|
1195
1247
|
* @param interactionToken - The token of the interaction
|
|
1196
|
-
* @param options - The options
|
|
1248
|
+
* @param options - The options for deferring
|
|
1197
1249
|
*/
|
|
1198
1250
|
deferMessageUpdate(interactionId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1199
1251
|
/**
|
|
@@ -1202,8 +1254,8 @@ declare class InteractionsAPI {
|
|
|
1202
1254
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
|
|
1203
1255
|
* @param applicationId - The application id of the interaction
|
|
1204
1256
|
* @param interactionToken - The token of the interaction
|
|
1205
|
-
* @param body - The callback data
|
|
1206
|
-
* @param options - The options
|
|
1257
|
+
* @param body - The callback data for replying
|
|
1258
|
+
* @param options - The options for replying
|
|
1207
1259
|
*/
|
|
1208
1260
|
followUp(applicationId: Snowflake, interactionToken: string, body: APIInteractionResponseCallbackData & {
|
|
1209
1261
|
files?: RawFile[];
|
|
@@ -1215,9 +1267,9 @@ declare class InteractionsAPI {
|
|
|
1215
1267
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
|
|
1216
1268
|
* @param applicationId - The application id of the interaction
|
|
1217
1269
|
* @param interactionToken - The token of the interaction
|
|
1218
|
-
* @param callbackData - The callback data
|
|
1270
|
+
* @param callbackData - The callback data for editing the reply
|
|
1219
1271
|
* @param messageId - The id of the message to edit. If omitted, the original reply will be edited
|
|
1220
|
-
* @param options - The options
|
|
1272
|
+
* @param options - The options for editing the reply
|
|
1221
1273
|
*/
|
|
1222
1274
|
editReply(applicationId: Snowflake, interactionToken: string, callbackData: APIInteractionResponseCallbackData & {
|
|
1223
1275
|
files?: RawFile[];
|
|
@@ -1228,7 +1280,7 @@ declare class InteractionsAPI {
|
|
|
1228
1280
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
|
|
1229
1281
|
* @param applicationId - The application id of the interaction
|
|
1230
1282
|
* @param interactionToken - The token of the interaction
|
|
1231
|
-
* @param options - The options
|
|
1283
|
+
* @param options - The options for fetching the reply
|
|
1232
1284
|
*/
|
|
1233
1285
|
getOriginalReply(applicationId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
|
|
1234
1286
|
/**
|
|
@@ -1239,7 +1291,7 @@ declare class InteractionsAPI {
|
|
|
1239
1291
|
* @param applicationId - The application id of the interaction
|
|
1240
1292
|
* @param interactionToken - The token of the interaction
|
|
1241
1293
|
* @param messageId - The id of the message to delete. If omitted, the original reply will be deleted
|
|
1242
|
-
* @param options - The options
|
|
1294
|
+
* @param options - The options for deleting the reply
|
|
1243
1295
|
*/
|
|
1244
1296
|
deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original', { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1245
1297
|
/**
|
|
@@ -1248,8 +1300,8 @@ declare class InteractionsAPI {
|
|
|
1248
1300
|
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
|
|
1249
1301
|
* @param interactionId - The id of the interaction
|
|
1250
1302
|
* @param interactionToken - The token of the interaction
|
|
1251
|
-
* @param callbackData - The callback data
|
|
1252
|
-
* @param options - The options
|
|
1303
|
+
* @param callbackData - The callback data for updating the interaction
|
|
1304
|
+
* @param options - The options for updating the interaction
|
|
1253
1305
|
*/
|
|
1254
1306
|
updateMessage(interactionId: Snowflake, interactionToken: string, { files, ...data }: APIInteractionResponseCallbackData & {
|
|
1255
1307
|
files?: RawFile[];
|
|
@@ -1261,7 +1313,7 @@ declare class InteractionsAPI {
|
|
|
1261
1313
|
* @param interactionId - The id of the interaction
|
|
1262
1314
|
* @param interactionToken - The token of the interaction
|
|
1263
1315
|
* @param callbackData - The callback data for the autocomplete response
|
|
1264
|
-
* @param options - The options
|
|
1316
|
+
* @param options - The options for sending the autocomplete response
|
|
1265
1317
|
*/
|
|
1266
1318
|
createAutocompleteResponse(interactionId: Snowflake, interactionToken: string, callbackData: APICommandAutocompleteInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1267
1319
|
/**
|
|
@@ -1271,7 +1323,7 @@ declare class InteractionsAPI {
|
|
|
1271
1323
|
* @param interactionId - The id of the interaction
|
|
1272
1324
|
* @param interactionToken - The token of the interaction
|
|
1273
1325
|
* @param callbackData - The modal callback data to send
|
|
1274
|
-
* @param options - The options
|
|
1326
|
+
* @param options - The options for sending the modal
|
|
1275
1327
|
*/
|
|
1276
1328
|
createModal(interactionId: Snowflake, interactionToken: string, callbackData: APIModalInteractionResponseCallbackData, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1277
1329
|
}
|
|
@@ -1284,8 +1336,8 @@ declare class InvitesAPI {
|
|
|
1284
1336
|
*
|
|
1285
1337
|
* @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
|
|
1286
1338
|
* @param code - The invite code
|
|
1287
|
-
* @param query - The options
|
|
1288
|
-
* @param options - The options
|
|
1339
|
+
* @param query - The options for fetching the invite
|
|
1340
|
+
* @param options - The options for fetching the invite
|
|
1289
1341
|
*/
|
|
1290
1342
|
get(code: string, query?: RESTGetAPIInviteQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1291
1343
|
/**
|
|
@@ -1293,7 +1345,7 @@ declare class InvitesAPI {
|
|
|
1293
1345
|
*
|
|
1294
1346
|
* @see {@link https://discord.com/developers/docs/resources/invite#delete-invite}
|
|
1295
1347
|
* @param code - The invite code
|
|
1296
|
-
* @param options - The options
|
|
1348
|
+
* @param options - The options for deleting the invite
|
|
1297
1349
|
*/
|
|
1298
1350
|
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
|
|
1299
1351
|
}
|
|
@@ -1358,7 +1410,7 @@ declare class RoleConnectionsAPI {
|
|
|
1358
1410
|
*
|
|
1359
1411
|
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records}
|
|
1360
1412
|
* @param applicationId - The id of the application to get role connection metadata records for
|
|
1361
|
-
* @param options - The options
|
|
1413
|
+
* @param options - The options for fetching the role connection metadata records
|
|
1362
1414
|
*/
|
|
1363
1415
|
getMetadataRecords(applicationId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIApplicationRoleConnectionMetadataResult>;
|
|
1364
1416
|
/**
|
|
@@ -1367,7 +1419,7 @@ declare class RoleConnectionsAPI {
|
|
|
1367
1419
|
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}
|
|
1368
1420
|
* @param applicationId - The id of the application to update role connection metadata records for
|
|
1369
1421
|
* @param body - The new role connection metadata records
|
|
1370
|
-
* @param options - The options
|
|
1422
|
+
* @param options - The options for updating the role connection metadata records
|
|
1371
1423
|
*/
|
|
1372
1424
|
updateMetadataRecords(applicationId: Snowflake, body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;
|
|
1373
1425
|
}
|
|
@@ -1379,7 +1431,7 @@ declare class StageInstancesAPI {
|
|
|
1379
1431
|
* Creates a new stage instance
|
|
1380
1432
|
*
|
|
1381
1433
|
* @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance}
|
|
1382
|
-
* @param body - The data
|
|
1434
|
+
* @param body - The data for creating the new stage instance
|
|
1383
1435
|
* @param options - The options for creating the new stage instance
|
|
1384
1436
|
*/
|
|
1385
1437
|
create(body: RESTPostAPIStageInstanceJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIStageInstance>;
|
|
@@ -1417,7 +1469,7 @@ declare class StickersAPI {
|
|
|
1417
1469
|
* Fetches all of the nitro sticker packs
|
|
1418
1470
|
*
|
|
1419
1471
|
* @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}
|
|
1420
|
-
* @param options - The options
|
|
1472
|
+
* @param options - The options for fetching the sticker packs
|
|
1421
1473
|
*/
|
|
1422
1474
|
getNitroStickers({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetNitroStickerPacksResult>;
|
|
1423
1475
|
/**
|
|
@@ -1425,53 +1477,20 @@ declare class StickersAPI {
|
|
|
1425
1477
|
*
|
|
1426
1478
|
* @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}
|
|
1427
1479
|
* @param stickerId - The id of the sticker
|
|
1428
|
-
* @param options - The options
|
|
1480
|
+
* @param options - The options for fetching the sticker
|
|
1429
1481
|
*/
|
|
1430
1482
|
get(stickerId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APISticker>;
|
|
1431
1483
|
}
|
|
1432
1484
|
|
|
1433
|
-
interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {
|
|
1434
|
-
message: RESTPostAPIGuildForumThreadsJSONBody['message'] & {
|
|
1435
|
-
files?: RawFile[];
|
|
1436
|
-
};
|
|
1437
|
-
}
|
|
1438
1485
|
declare class ThreadsAPI {
|
|
1439
1486
|
private readonly rest;
|
|
1440
1487
|
constructor(rest: REST);
|
|
1441
|
-
/**
|
|
1442
|
-
* Fetches a thread
|
|
1443
|
-
*
|
|
1444
|
-
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
|
|
1445
|
-
* @param threadId - The id of the thread
|
|
1446
|
-
* @param options - The options to use when fetching the thread
|
|
1447
|
-
*/
|
|
1448
|
-
get(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadChannel>;
|
|
1449
|
-
/**
|
|
1450
|
-
* Creates a new thread
|
|
1451
|
-
*
|
|
1452
|
-
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
|
|
1453
|
-
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
|
|
1454
|
-
* @param channelId - The id of the channel to start the thread in
|
|
1455
|
-
* @param body - The data to use when starting the thread
|
|
1456
|
-
* @param messageId - The id of the message to start the thread from
|
|
1457
|
-
* @param options - The options to use when starting the thread
|
|
1458
|
-
*/
|
|
1459
|
-
create(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
1460
|
-
/**
|
|
1461
|
-
* Creates a new forum post
|
|
1462
|
-
*
|
|
1463
|
-
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
|
|
1464
|
-
* @param channelId - The id of the forum channel to start the thread in
|
|
1465
|
-
* @param body - The data to use when starting the thread
|
|
1466
|
-
* @param options - The options to use when starting the thread
|
|
1467
|
-
*/
|
|
1468
|
-
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadChannel>;
|
|
1469
1488
|
/**
|
|
1470
1489
|
* Adds the current user to a thread
|
|
1471
1490
|
*
|
|
1472
1491
|
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
|
|
1473
1492
|
* @param threadId - The id of the thread to join
|
|
1474
|
-
* @param options - The options
|
|
1493
|
+
* @param options - The options for joining the thread
|
|
1475
1494
|
*/
|
|
1476
1495
|
join(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1477
1496
|
/**
|
|
@@ -1480,7 +1499,7 @@ declare class ThreadsAPI {
|
|
|
1480
1499
|
* @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}
|
|
1481
1500
|
* @param threadId - The id of the thread to add the member to
|
|
1482
1501
|
* @param userId - The id of the user to add to the thread
|
|
1483
|
-
* @param options - The options
|
|
1502
|
+
* @param options - The options for adding the member to the thread
|
|
1484
1503
|
*/
|
|
1485
1504
|
addMember(threadId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1486
1505
|
/**
|
|
@@ -1488,7 +1507,7 @@ declare class ThreadsAPI {
|
|
|
1488
1507
|
*
|
|
1489
1508
|
* @see {@link https://discord.com/developers/docs/resources/channel#leave-thread}
|
|
1490
1509
|
* @param threadId - The id of the thread to leave
|
|
1491
|
-
* @param options - The options
|
|
1510
|
+
* @param options - The options for leaving the thread
|
|
1492
1511
|
*/
|
|
1493
1512
|
leave(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1494
1513
|
/**
|
|
@@ -1497,7 +1516,7 @@ declare class ThreadsAPI {
|
|
|
1497
1516
|
* @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}
|
|
1498
1517
|
* @param threadId - The id of the thread to remove the member from
|
|
1499
1518
|
* @param userId - The id of the user to remove from the thread
|
|
1500
|
-
* @param options - The options
|
|
1519
|
+
* @param options - The options for removing the member from the thread
|
|
1501
1520
|
*/
|
|
1502
1521
|
removeMember(threadId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
|
|
1503
1522
|
/**
|
|
@@ -1506,7 +1525,7 @@ declare class ThreadsAPI {
|
|
|
1506
1525
|
* @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
|
|
1507
1526
|
* @param threadId - The id of the thread to fetch the member from
|
|
1508
1527
|
* @param userId - The id of the user
|
|
1509
|
-
* @param options - The options
|
|
1528
|
+
* @param options - The options for fetching the member
|
|
1510
1529
|
*/
|
|
1511
1530
|
getMember(threadId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadMember>;
|
|
1512
1531
|
/**
|
|
@@ -1514,7 +1533,7 @@ declare class ThreadsAPI {
|
|
|
1514
1533
|
*
|
|
1515
1534
|
* @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
|
|
1516
1535
|
* @param threadId - The id of the thread to fetch the members from
|
|
1517
|
-
* @param options - The options
|
|
1536
|
+
* @param options - The options for fetching the members
|
|
1518
1537
|
*/
|
|
1519
1538
|
getAllMembers(threadId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIChannelThreadMembersResult>;
|
|
1520
1539
|
}
|
|
@@ -1527,22 +1546,22 @@ declare class UsersAPI {
|
|
|
1527
1546
|
*
|
|
1528
1547
|
* @see {@link https://discord.com/developers/docs/resources/user#get-user}
|
|
1529
1548
|
* @param userId - The id of the user to fetch
|
|
1530
|
-
* @param options - The options
|
|
1549
|
+
* @param options - The options for fetching the user
|
|
1531
1550
|
*/
|
|
1532
1551
|
get(userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIUser>;
|
|
1533
1552
|
/**
|
|
1534
1553
|
* Returns the user object of the requester's account
|
|
1535
1554
|
*
|
|
1536
1555
|
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
|
|
1537
|
-
* @param options - The options
|
|
1556
|
+
* @param options - The options for fetching the current user
|
|
1538
1557
|
*/
|
|
1539
1558
|
getCurrent({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIUser>;
|
|
1540
1559
|
/**
|
|
1541
1560
|
* Returns a list of partial guild objects the current user is a member of
|
|
1542
1561
|
*
|
|
1543
1562
|
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
|
|
1544
|
-
* @param query - The query options
|
|
1545
|
-
* @param options - The options
|
|
1563
|
+
* @param query - The query options for fetching the current user's guilds
|
|
1564
|
+
* @param options - The options for fetching the guilds
|
|
1546
1565
|
*/
|
|
1547
1566
|
getGuilds(query?: RESTGetAPICurrentUserGuildsQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPICurrentUserGuildsResult>;
|
|
1548
1567
|
/**
|
|
@@ -1606,8 +1625,8 @@ declare class UsersAPI {
|
|
|
1606
1625
|
*
|
|
1607
1626
|
* @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}
|
|
1608
1627
|
* @param applicationId - The id of the application
|
|
1609
|
-
* @param body - The data
|
|
1610
|
-
* @param options - The options
|
|
1628
|
+
* @param body - The data for updating the application role connection
|
|
1629
|
+
* @param options - The options for updating the application role connection
|
|
1611
1630
|
*/
|
|
1612
1631
|
updateApplicationRoleConnection(applicationId: Snowflake, body: RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationRoleConnection>;
|
|
1613
1632
|
}
|
|
@@ -1619,7 +1638,7 @@ declare class VoiceAPI {
|
|
|
1619
1638
|
* Fetches all voice regions
|
|
1620
1639
|
*
|
|
1621
1640
|
* @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions}
|
|
1622
|
-
* @param options - The options
|
|
1641
|
+
* @param options - The options for fetching the voice regions
|
|
1623
1642
|
*/
|
|
1624
1643
|
getVoiceRegions({ signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIVoiceRegionsResult>;
|
|
1625
1644
|
}
|
|
@@ -1671,4 +1690,4 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
1671
1690
|
}[];
|
|
1672
1691
|
};
|
|
1673
1692
|
|
|
1674
|
-
export { API as A, ChannelsAPI as C, DescriptiveRawFile as D, GuildsAPI as G, InteractionsAPI as I, OAuth2API as O, RoleConnectionsAPI as R,
|
|
1693
|
+
export { API as A, ChannelsAPI as C, DescriptiveRawFile as D, GuildsAPI as G, InteractionsAPI as I, OAuth2API as O, RoleConnectionsAPI as R, StartForumThreadOptions as S, ThreadsAPI as T, UsersAPI as U, VoiceAPI as V, WebhooksAPI as W, ApplicationCommandsAPI as a, InvitesAPI as b, StageInstancesAPI as c, StickersAPI as d, withFiles as w };
|