seyfert 4.5.0 → 4.6.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/lib/api/Routes/guilds.d.ts +12 -1
- package/lib/api/Routes/index.d.ts +3 -1
- package/lib/api/Routes/invites.d.ts +1 -1
- package/lib/api/Routes/oauth2.d.ts +11 -0
- package/lib/api/Routes/oauth2.js +2 -0
- package/lib/api/Routes/skus.d.ts +11 -4
- package/lib/api/Routes/users.d.ts +2 -1
- package/lib/api/Routes/voice.d.ts +4 -0
- package/lib/api/Routes/webhooks.d.ts +1 -1
- package/lib/api/api.d.ts +15 -5
- package/lib/api/api.js +243 -114
- package/lib/api/bucket.js +13 -7
- package/lib/api/shared.d.ts +3 -1
- package/lib/api/utils/constants.d.ts +1 -1
- package/lib/api/utils/constants.js +1 -1
- package/lib/builders/Attachment.d.ts +6 -1
- package/lib/builders/Attachment.js +13 -9
- package/lib/builders/CheckboxGroup.js +1 -1
- package/lib/builders/FileUpload.d.ts +8 -1
- package/lib/builders/FileUpload.js +9 -0
- package/lib/builders/RadioGroup.js +1 -1
- package/lib/client/base.d.ts +3 -3
- package/lib/client/collectors.d.ts +10 -8
- package/lib/client/transformers.d.ts +5 -0
- package/lib/client/workerclient.d.ts +8 -1
- package/lib/client/workerclient.js +28 -9
- package/lib/commands/applications/chat.d.ts +6 -4
- package/lib/commands/applications/options.d.ts +6 -4
- package/lib/commands/applications/shared.d.ts +2 -2
- package/lib/commands/handle.d.ts +7 -3
- package/lib/commands/handle.js +36 -11
- package/lib/commands/handler.js +11 -0
- package/lib/commands/optionresolver.d.ts +6 -7
- package/lib/common/it/error.d.ts +13 -0
- package/lib/common/it/error.js +15 -1
- package/lib/common/it/logger.js +12 -9
- package/lib/common/shorters/application.d.ts +1 -1
- package/lib/common/shorters/application.js +1 -1
- package/lib/common/shorters/bans.js +1 -1
- package/lib/common/shorters/guilds.js +5 -1
- package/lib/common/shorters/interaction.js +7 -4
- package/lib/common/shorters/invites.d.ts +5 -0
- package/lib/common/shorters/members.js +2 -1
- package/lib/common/shorters/messages.js +2 -2
- package/lib/common/shorters/threads.js +1 -1
- package/lib/common/shorters/webhook.js +3 -3
- package/lib/common/types/util.d.ts +7 -0
- package/lib/components/componentcommand.js +2 -2
- package/lib/components/customId.d.ts +3 -0
- package/lib/components/customId.js +11 -0
- package/lib/components/handler.js +2 -3
- package/lib/components/modalcommand.js +2 -2
- package/lib/events/hooks/invite.d.ts +1 -0
- package/lib/events/hooks/presence.d.ts +1 -0
- package/lib/events/hooks/thread.d.ts +1 -0
- package/lib/structures/AnonymousGuild.d.ts +1 -1
- package/lib/structures/AnonymousGuild.js +1 -1
- package/lib/structures/Guild.d.ts +3 -0
- package/lib/structures/GuildMember.d.ts +2 -2
- package/lib/structures/GuildMember.js +22 -4
- package/lib/structures/GuildPreview.d.ts +1 -1
- package/lib/structures/GuildPreview.js +1 -1
- package/lib/structures/GuildRole.d.ts +13 -0
- package/lib/structures/GuildRole.js +21 -0
- package/lib/structures/GuildTemplate.js +1 -1
- package/lib/structures/Interaction.d.ts +7 -7
- package/lib/structures/Interaction.js +35 -21
- package/lib/structures/Message.d.ts +2 -1
- package/lib/structures/channels.d.ts +29 -16
- package/lib/structures/channels.js +59 -19
- package/lib/structures/extra/BaseGuild.d.ts +4 -4
- package/lib/structures/extra/BaseGuild.js +4 -4
- package/lib/types/gateway.d.ts +243 -239
- package/lib/types/index.d.ts +2 -2
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/attachment.d.ts +5 -2
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.d.ts +2 -2
- package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.js +1 -1
- package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +7 -7
- package/lib/types/payloads/_interactions/_applicationCommands/contextMenu.d.ts +13 -13
- package/lib/types/payloads/_interactions/_applicationCommands/permissions.d.ts +4 -4
- package/lib/types/payloads/_interactions/_applicationCommands/permissions.js +2 -2
- package/lib/types/payloads/_interactions/applicationCommands.d.ts +10 -10
- package/lib/types/payloads/_interactions/applicationCommands.js +4 -4
- package/lib/types/payloads/_interactions/autocomplete.d.ts +2 -2
- package/lib/types/payloads/_interactions/base.d.ts +13 -7
- package/lib/types/payloads/_interactions/modalSubmit.d.ts +4 -4
- package/lib/types/payloads/_interactions/responses.d.ts +10 -10
- package/lib/types/payloads/_interactions/responses.js +2 -2
- package/lib/types/payloads/application.d.ts +21 -15
- package/lib/types/payloads/application.js +7 -7
- package/lib/types/payloads/auditLog.d.ts +22 -17
- package/lib/types/payloads/auditLog.js +7 -2
- package/lib/types/payloads/autoModeration.d.ts +11 -11
- package/lib/types/payloads/autoModeration.js +5 -5
- package/lib/types/payloads/channel.d.ts +87 -78
- package/lib/types/payloads/channel.js +16 -11
- package/lib/types/payloads/components.d.ts +41 -31
- package/lib/types/payloads/components.js +9 -5
- package/lib/types/payloads/emoji.d.ts +2 -2
- package/lib/types/payloads/emoji.js +1 -1
- package/lib/types/payloads/gateway.d.ts +33 -29
- package/lib/types/payloads/gateway.js +5 -5
- package/lib/types/payloads/guild.d.ts +68 -68
- package/lib/types/payloads/guild.js +14 -14
- package/lib/types/payloads/guildScheduledEvent.d.ts +11 -11
- package/lib/types/payloads/guildScheduledEvent.js +3 -3
- package/lib/types/payloads/index.d.ts +2 -2
- package/lib/types/payloads/interactions.d.ts +3 -3
- package/lib/types/payloads/invite.d.ts +11 -11
- package/lib/types/payloads/invite.js +3 -3
- package/lib/types/payloads/monetization.d.ts +4 -4
- package/lib/types/payloads/monetization.js +2 -2
- package/lib/types/payloads/oauth2.d.ts +21 -17
- package/lib/types/payloads/oauth2.js +21 -17
- package/lib/types/payloads/permissions.d.ts +5 -5
- package/lib/types/payloads/permissions.js +2 -2
- package/lib/types/payloads/poll.d.ts +7 -7
- package/lib/types/payloads/poll.js +2 -2
- package/lib/types/payloads/soundboard.d.ts +2 -2
- package/lib/types/payloads/soundboard.js +1 -1
- package/lib/types/payloads/stageInstance.d.ts +5 -5
- package/lib/types/payloads/stageInstance.js +1 -1
- package/lib/types/payloads/sticker.d.ts +8 -8
- package/lib/types/payloads/sticker.js +3 -3
- package/lib/types/payloads/teams.d.ts +8 -8
- package/lib/types/payloads/teams.js +3 -3
- package/lib/types/payloads/template.d.ts +3 -3
- package/lib/types/payloads/template.js +1 -1
- package/lib/types/payloads/user.d.ts +24 -22
- package/lib/types/payloads/user.js +7 -5
- package/lib/types/payloads/voice.d.ts +4 -4
- package/lib/types/payloads/voice.js +1 -1
- package/lib/types/payloads/webhokEvents.d.ts +5 -5
- package/lib/types/payloads/webhokEvents.js +2 -2
- package/lib/types/payloads/webhook.d.ts +4 -4
- package/lib/types/payloads/webhook.js +1 -1
- package/lib/types/rest/application.d.ts +14 -14
- package/lib/types/rest/auditLog.d.ts +1 -1
- package/lib/types/rest/autoModeration.d.ts +7 -7
- package/lib/types/rest/channel.d.ts +79 -74
- package/lib/types/rest/channel.js +1 -1
- package/lib/types/rest/emoji.d.ts +8 -8
- package/lib/types/rest/gateway.d.ts +2 -2
- package/lib/types/rest/guild.d.ts +98 -98
- package/lib/types/rest/guild.js +5 -5
- package/lib/types/rest/guildScheduledEvent.d.ts +11 -11
- package/lib/types/rest/index.d.ts +34 -3
- package/lib/types/rest/index.js +33 -2
- package/lib/types/rest/interactions.d.ts +48 -48
- package/lib/types/rest/invite.d.ts +5 -5
- package/lib/types/rest/monetization.d.ts +9 -9
- package/lib/types/rest/monetization.js +1 -1
- package/lib/types/rest/oauth2.d.ts +22 -18
- package/lib/types/rest/poll.d.ts +4 -4
- package/lib/types/rest/soundboard.d.ts +8 -8
- package/lib/types/rest/stageInstance.d.ts +6 -6
- package/lib/types/rest/sticker.d.ts +10 -10
- package/lib/types/rest/template.d.ts +11 -11
- package/lib/types/rest/user.d.ts +18 -14
- package/lib/types/rest/voice.d.ts +5 -5
- package/lib/types/rest/webhook.d.ts +38 -38
- package/lib/types/utils/index.d.ts +19 -19
- package/lib/types/utils/index.js +19 -19
- package/lib/websocket/SharedTypes.d.ts +2 -2
- package/lib/websocket/constants/index.js +2 -2
- package/lib/websocket/discord/heartbeater.d.ts +1 -0
- package/lib/websocket/discord/heartbeater.js +8 -0
- package/lib/websocket/discord/shard.d.ts +19 -10
- package/lib/websocket/discord/shard.js +254 -121
- package/lib/websocket/discord/sharder.d.ts +2 -2
- package/lib/websocket/discord/sharder.js +1 -1
- package/lib/websocket/discord/shared.d.ts +7 -2
- package/lib/websocket/discord/workermanager.d.ts +3 -1
- package/lib/websocket/discord/workermanager.js +31 -24
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
2
|
import type { APIStageInstance, StageInstancePrivacyLevel } from '../payloads';
|
|
3
3
|
/**
|
|
4
|
-
* https://discord.com/developers/
|
|
4
|
+
* https://docs.discord.com/developers/resources/stage-instance#create-stage-instance
|
|
5
5
|
*/
|
|
6
6
|
export interface RESTPostAPIStageInstanceJSONBody {
|
|
7
7
|
/**
|
|
@@ -28,15 +28,15 @@ export interface RESTPostAPIStageInstanceJSONBody {
|
|
|
28
28
|
guild_scheduled_event_id?: Snowflake | undefined;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* https://discord.com/developers/
|
|
31
|
+
* https://docs.discord.com/developers/resources/stage-instance#create-stage-instance
|
|
32
32
|
*/
|
|
33
33
|
export type RESTPostAPIStageInstanceResult = APIStageInstance;
|
|
34
34
|
/**
|
|
35
|
-
* https://discord.com/developers/
|
|
35
|
+
* https://docs.discord.com/developers/resources/stage-instance#get-stage-instance
|
|
36
36
|
*/
|
|
37
37
|
export type RESTGetAPIStageInstanceResult = APIStageInstance;
|
|
38
38
|
/**
|
|
39
|
-
* https://discord.com/developers/
|
|
39
|
+
* https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance
|
|
40
40
|
*/
|
|
41
41
|
export interface RESTPatchAPIStageInstanceJSONBody {
|
|
42
42
|
/**
|
|
@@ -49,10 +49,10 @@ export interface RESTPatchAPIStageInstanceJSONBody {
|
|
|
49
49
|
privacy_level?: StageInstancePrivacyLevel | undefined;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* https://discord.com/developers/
|
|
52
|
+
* https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance
|
|
53
53
|
*/
|
|
54
54
|
export type RESTPatchAPIStageInstanceResult = APIStageInstance;
|
|
55
55
|
/**
|
|
56
|
-
* https://discord.com/developers/
|
|
56
|
+
* https://docs.discord.com/developers/resources/stage-instance#delete-stage-instance
|
|
57
57
|
*/
|
|
58
58
|
export type RESTDeleteAPIStageInstanceResult = undefined;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import type { APISticker, APIStickerPack } from '../payloads';
|
|
2
2
|
/**
|
|
3
|
-
* https://discord.com/developers/
|
|
3
|
+
* https://docs.discord.com/developers/resources/sticker#get-sticker
|
|
4
4
|
*/
|
|
5
5
|
export type RESTGetAPIStickerResult = APISticker;
|
|
6
6
|
/**
|
|
7
|
-
* https://discord.com/developers/
|
|
7
|
+
* https://docs.discord.com/developers/resources/sticker#list-sticker-packs
|
|
8
8
|
*/
|
|
9
9
|
export interface RESTGetStickerPacksResult {
|
|
10
10
|
sticker_packs: APIStickerPack[];
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* https://discord.com/developers/
|
|
13
|
+
* https://docs.discord.com/developers/resources/sticker#get-sticker-pack
|
|
14
14
|
*/
|
|
15
15
|
export type RESTGetAPIStickerPackResult = APIStickerPack;
|
|
16
16
|
/**
|
|
17
|
-
* https://discord.com/developers/
|
|
17
|
+
* https://docs.discord.com/developers/resources/sticker#list-guild-stickers
|
|
18
18
|
*/
|
|
19
19
|
export type RESTGetAPIGuildStickersResult = APISticker[];
|
|
20
20
|
/**
|
|
21
|
-
* https://discord.com/developers/
|
|
21
|
+
* https://docs.discord.com/developers/resources/sticker#get-guild-sticker
|
|
22
22
|
*/
|
|
23
23
|
export type RESTGetAPIGuildStickerResult = APISticker;
|
|
24
24
|
/**
|
|
25
|
-
* https://discord.com/developers/
|
|
25
|
+
* https://docs.discord.com/developers/resources/sticker#create-guild-sticker
|
|
26
26
|
*/
|
|
27
27
|
export interface RESTPostAPIGuildStickerFormDataBody {
|
|
28
28
|
/**
|
|
@@ -45,11 +45,11 @@ export interface RESTPostAPIGuildStickerFormDataBody {
|
|
|
45
45
|
file: unknown;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* https://discord.com/developers/
|
|
48
|
+
* https://docs.discord.com/developers/resources/sticker#create-guild-sticker
|
|
49
49
|
*/
|
|
50
50
|
export type RESTPostAPIGuildStickerResult = APISticker;
|
|
51
51
|
/**
|
|
52
|
-
* https://discord.com/developers/
|
|
52
|
+
* https://docs.discord.com/developers/resources/sticker#modify-guild-sticker
|
|
53
53
|
*/
|
|
54
54
|
export interface RESTPatchAPIGuildStickerJSONBody {
|
|
55
55
|
/**
|
|
@@ -66,10 +66,10 @@ export interface RESTPatchAPIGuildStickerJSONBody {
|
|
|
66
66
|
tags?: string | undefined;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* https://discord.com/developers/
|
|
69
|
+
* https://docs.discord.com/developers/resources/sticker#modify-guild-sticker
|
|
70
70
|
*/
|
|
71
71
|
export type RESTPatchAPIGuildStickerResult = APISticker;
|
|
72
72
|
/**
|
|
73
|
-
* https://discord.com/developers/
|
|
73
|
+
* https://docs.discord.com/developers/resources/sticker#delete-guild-sticker
|
|
74
74
|
*/
|
|
75
75
|
export type RESTDeleteAPIGuildStickerResult = undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { APIGuild, APITemplate } from '../payloads';
|
|
2
2
|
import type { StrictPartial } from '../utils';
|
|
3
3
|
/**
|
|
4
|
-
* https://discord.com/developers/
|
|
4
|
+
* https://docs.discord.com/developers/resources/guild-template#get-guild-template
|
|
5
5
|
*/
|
|
6
6
|
export type RESTGetAPITemplateResult = APITemplate;
|
|
7
7
|
/**
|
|
8
|
-
* https://discord.com/developers/
|
|
8
|
+
* https://docs.discord.com/developers/resources/guild-template#create-guild-from-guild-template
|
|
9
9
|
*/
|
|
10
10
|
export interface RESTPostAPITemplateCreateGuildJSONBody {
|
|
11
11
|
/**
|
|
@@ -15,20 +15,20 @@ export interface RESTPostAPITemplateCreateGuildJSONBody {
|
|
|
15
15
|
/**
|
|
16
16
|
* base64 1024x1024 png/jpeg image for the guild icon
|
|
17
17
|
*
|
|
18
|
-
* See https://discord.com/developers/
|
|
18
|
+
* See https://docs.discord.com/developers/reference#image-data
|
|
19
19
|
*/
|
|
20
20
|
icon?: string | undefined;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* https://discord.com/developers/
|
|
23
|
+
* https://docs.discord.com/developers/resources/guild-template#create-guild-from-guild-template
|
|
24
24
|
*/
|
|
25
25
|
export type RESTPostAPITemplateCreateGuildResult = APIGuild;
|
|
26
26
|
/**
|
|
27
|
-
* https://discord.com/developers/
|
|
27
|
+
* https://docs.discord.com/developers/resources/guild-template#get-guild-templates
|
|
28
28
|
*/
|
|
29
29
|
export type RESTGetAPIGuildTemplatesResult = APITemplate[];
|
|
30
30
|
/**
|
|
31
|
-
* https://discord.com/developers/
|
|
31
|
+
* https://docs.discord.com/developers/resources/guild-template#create-guild-template
|
|
32
32
|
*/
|
|
33
33
|
export interface RESTPostAPIGuildTemplatesJSONBody {
|
|
34
34
|
/**
|
|
@@ -41,22 +41,22 @@ export interface RESTPostAPIGuildTemplatesJSONBody {
|
|
|
41
41
|
description?: string | null | undefined;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* https://discord.com/developers/
|
|
44
|
+
* https://docs.discord.com/developers/resources/guild-template#create-guild-template
|
|
45
45
|
*/
|
|
46
46
|
export type RESTPostAPIGuildTemplatesResult = APITemplate;
|
|
47
47
|
/**
|
|
48
|
-
* https://discord.com/developers/
|
|
48
|
+
* https://docs.discord.com/developers/resources/guild-template#sync-guild-template
|
|
49
49
|
*/
|
|
50
50
|
export type RESTPutAPIGuildTemplateSyncResult = APITemplate;
|
|
51
51
|
/**
|
|
52
|
-
* https://discord.com/developers/
|
|
52
|
+
* https://docs.discord.com/developers/resources/guild-template#modify-guild-template
|
|
53
53
|
*/
|
|
54
54
|
export type RESTPatchAPIGuildTemplateJSONBody = StrictPartial<RESTPostAPIGuildTemplatesJSONBody>;
|
|
55
55
|
/**
|
|
56
|
-
* https://discord.com/developers/
|
|
56
|
+
* https://docs.discord.com/developers/resources/guild-template#modify-guild-template
|
|
57
57
|
*/
|
|
58
58
|
export type RESTPatchAPIGuildTemplateResult = APITemplate;
|
|
59
59
|
/**
|
|
60
|
-
* https://discord.com/developers/
|
|
60
|
+
* https://docs.discord.com/developers/resources/guild-template#delete-guild-template
|
|
61
61
|
*/
|
|
62
62
|
export type RESTDeleteAPIGuildTemplateResult = APITemplate;
|
package/lib/types/rest/user.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { Permissions, Snowflake } from '..';
|
|
2
2
|
import type { APIApplicationRoleConnection, APIChannel, APIConnection, APIGuildMember, APIUser, GuildFeature } from '../payloads';
|
|
3
3
|
/**
|
|
4
|
-
* https://discord.com/developers/
|
|
4
|
+
* https://docs.discord.com/developers/resources/user#get-current-user
|
|
5
5
|
*/
|
|
6
6
|
export type RESTGetAPICurrentUserResult = APIUser;
|
|
7
7
|
/**
|
|
8
|
-
* https://discord.com/developers/
|
|
8
|
+
* https://docs.discord.com/developers/resources/user#get-user
|
|
9
9
|
*/
|
|
10
10
|
export type RESTGetAPIUserResult = APIUser;
|
|
11
11
|
/**
|
|
12
|
-
* https://discord.com/developers/
|
|
12
|
+
* https://docs.discord.com/developers/resources/user#get-current-user-guild-member
|
|
13
13
|
*/
|
|
14
14
|
export type RESTGetCurrentUserGuildMemberResult = APIGuildMember;
|
|
15
15
|
/**
|
|
16
|
-
* https://discord.com/developers/
|
|
16
|
+
* https://docs.discord.com/developers/resources/user#modify-current-user
|
|
17
17
|
*/
|
|
18
18
|
export interface RESTPatchAPICurrentUserJSONBody {
|
|
19
19
|
/**
|
|
@@ -30,11 +30,11 @@ export interface RESTPatchAPICurrentUserJSONBody {
|
|
|
30
30
|
banner?: string | null | undefined;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* https://discord.com/developers/
|
|
33
|
+
* https://docs.discord.com/developers/resources/user#modify-current-user
|
|
34
34
|
*/
|
|
35
35
|
export type RESTPatchAPICurrentUserResult = APIUser;
|
|
36
36
|
/**
|
|
37
|
-
* https://discord.com/developers/
|
|
37
|
+
* https://docs.discord.com/developers/resources/user#get-current-user-guilds
|
|
38
38
|
*/
|
|
39
39
|
export interface RESTGetAPICurrentUserGuildsQuery {
|
|
40
40
|
/**
|
|
@@ -69,15 +69,15 @@ export interface RESTAPIPartialCurrentUserGuild {
|
|
|
69
69
|
approximate_presence_count?: number;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* https://discord.com/developers/
|
|
72
|
+
* https://docs.discord.com/developers/resources/user#get-current-user-guilds
|
|
73
73
|
*/
|
|
74
74
|
export type RESTGetAPICurrentUserGuildsResult = RESTAPIPartialCurrentUserGuild[];
|
|
75
75
|
/**
|
|
76
|
-
* https://discord.com/developers/
|
|
76
|
+
* https://docs.discord.com/developers/resources/user#leave-guild
|
|
77
77
|
*/
|
|
78
78
|
export type RESTDeleteAPICurrentUserGuildResult = undefined;
|
|
79
79
|
/**
|
|
80
|
-
* https://discord.com/developers/
|
|
80
|
+
* https://docs.discord.com/developers/resources/user#create-dm
|
|
81
81
|
*/
|
|
82
82
|
export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
|
|
83
83
|
/**
|
|
@@ -86,19 +86,19 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
|
|
|
86
86
|
recipient_id: string;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
|
-
* https://discord.com/developers/
|
|
89
|
+
* https://docs.discord.com/developers/resources/user#create-dm
|
|
90
90
|
*/
|
|
91
91
|
export type RESTPostAPICurrentUserCreateDMChannelResult = APIChannel;
|
|
92
92
|
/**
|
|
93
|
-
* https://discord.com/developers/
|
|
93
|
+
* https://docs.discord.com/developers/resources/user#get-user-connections
|
|
94
94
|
*/
|
|
95
95
|
export type RESTGetAPICurrentUserConnectionsResult = APIConnection[];
|
|
96
96
|
/**
|
|
97
|
-
* https://discord.com/developers/
|
|
97
|
+
* https://docs.discord.com/developers/resources/user#get-user-application-role-connection
|
|
98
98
|
*/
|
|
99
99
|
export type RESTGetAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection;
|
|
100
100
|
/**
|
|
101
|
-
* https://discord.com/developers/
|
|
101
|
+
* https://docs.discord.com/developers/resources/user#update-user-application-role-connection
|
|
102
102
|
*/
|
|
103
103
|
export interface RESTPutAPICurrentUserApplicationRoleConnectionJSONBody {
|
|
104
104
|
/**
|
|
@@ -115,6 +115,10 @@ export interface RESTPutAPICurrentUserApplicationRoleConnectionJSONBody {
|
|
|
115
115
|
metadata?: Record<string, number | string> | undefined;
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
* https://discord.com/developers/
|
|
118
|
+
* https://docs.discord.com/developers/resources/user#update-user-application-role-connection
|
|
119
119
|
*/
|
|
120
120
|
export type RESTPutAPICurrentUserApplicationRoleConnectionResult = APIApplicationRoleConnection;
|
|
121
|
+
/**
|
|
122
|
+
* https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection
|
|
123
|
+
*/
|
|
124
|
+
export type RESTDeleteAPICurrentUserApplicationRoleConnectionResult = undefined;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { APIVoiceRegion, APIVoiceState } from '../payloads';
|
|
2
2
|
/**
|
|
3
|
-
* https://discord.com/developers/
|
|
3
|
+
* https://docs.discord.com/developers/resources/voice#list-voice-regions
|
|
4
4
|
*/
|
|
5
5
|
export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
|
6
6
|
/**
|
|
7
|
-
* https://discord.com/developers/
|
|
7
|
+
* https://docs.discord.com/developers/resources/voice#get-current-user-voice-state
|
|
8
8
|
*/
|
|
9
9
|
export type RESTGetAPICurrentUserVoiceState = RESTGetAPIUserVoiceState;
|
|
10
10
|
/**
|
|
11
|
-
* https://discord.com/developers/
|
|
11
|
+
* https://docs.discord.com/developers/resources/voice#get-current-user-voice-state
|
|
12
12
|
*/
|
|
13
13
|
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
|
14
14
|
/**
|
|
15
|
-
* https://discord.com/developers/
|
|
15
|
+
* https://docs.discord.com/developers/resources/voice#get-user-voice-state
|
|
16
16
|
*/
|
|
17
17
|
export type RESTGetAPIUserVoiceState = APIVoiceState;
|
|
18
18
|
/**
|
|
19
|
-
* https://discord.com/developers/
|
|
19
|
+
* https://docs.discord.com/developers/resources/voice#get-user-voice-state
|
|
20
20
|
*/
|
|
21
21
|
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
|
@@ -4,7 +4,7 @@ import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } f
|
|
|
4
4
|
import type { RESTAPIAttachment } from './channel';
|
|
5
5
|
import type { RESTAPIPollCreate } from './poll';
|
|
6
6
|
/**
|
|
7
|
-
* https://discord.com/developers/
|
|
7
|
+
* https://docs.discord.com/developers/resources/webhook#create-webhook
|
|
8
8
|
*/
|
|
9
9
|
export interface RESTPostAPIChannelWebhookJSONBody {
|
|
10
10
|
/**
|
|
@@ -14,32 +14,32 @@ export interface RESTPostAPIChannelWebhookJSONBody {
|
|
|
14
14
|
/**
|
|
15
15
|
* Image for the default webhook avatar
|
|
16
16
|
*
|
|
17
|
-
* See https://discord.com/developers/
|
|
17
|
+
* See https://docs.discord.com/developers/reference#image-data
|
|
18
18
|
*/
|
|
19
19
|
avatar?: string | null | undefined;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* https://discord.com/developers/
|
|
22
|
+
* https://docs.discord.com/developers/resources/webhook#create-webhook
|
|
23
23
|
*/
|
|
24
24
|
export type RESTPostAPIChannelWebhookResult = APIWebhook;
|
|
25
25
|
/**
|
|
26
|
-
* https://discord.com/developers/
|
|
26
|
+
* https://docs.discord.com/developers/resources/webhook#get-channel-webhooks
|
|
27
27
|
*/
|
|
28
28
|
export type RESTGetAPIChannelWebhooksResult = APIWebhook[];
|
|
29
29
|
/**
|
|
30
|
-
* https://discord.com/developers/
|
|
30
|
+
* https://docs.discord.com/developers/resources/webhook#get-guild-webhooks
|
|
31
31
|
*/
|
|
32
32
|
export type RESTGetAPIGuildWebhooksResult = APIWebhook[];
|
|
33
33
|
/**
|
|
34
|
-
* https://discord.com/developers/
|
|
34
|
+
* https://docs.discord.com/developers/resources/webhook#get-webhook
|
|
35
35
|
*/
|
|
36
36
|
export type RESTGetAPIWebhookResult = APIWebhook;
|
|
37
37
|
/**
|
|
38
|
-
* https://discord.com/developers/
|
|
38
|
+
* https://docs.discord.com/developers/resources/webhook#get-webhook-with-token
|
|
39
39
|
*/
|
|
40
40
|
export type RESTGetAPIWebhookWithTokenResult = Omit<APIWebhook, 'user'>;
|
|
41
41
|
/**
|
|
42
|
-
* https://discord.com/developers/
|
|
42
|
+
* https://docs.discord.com/developers/resources/webhook#modify-webhook
|
|
43
43
|
*/
|
|
44
44
|
export interface RESTPatchAPIWebhookJSONBody {
|
|
45
45
|
/**
|
|
@@ -49,7 +49,7 @@ export interface RESTPatchAPIWebhookJSONBody {
|
|
|
49
49
|
/**
|
|
50
50
|
* Image for the default webhook avatar
|
|
51
51
|
*
|
|
52
|
-
* See https://discord.com/developers/
|
|
52
|
+
* See https://docs.discord.com/developers/reference#image-data
|
|
53
53
|
*/
|
|
54
54
|
avatar?: string | null | undefined;
|
|
55
55
|
/**
|
|
@@ -58,27 +58,27 @@ export interface RESTPatchAPIWebhookJSONBody {
|
|
|
58
58
|
channel_id?: Snowflake | undefined;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* https://discord.com/developers/
|
|
61
|
+
* https://docs.discord.com/developers/resources/webhook#modify-webhook
|
|
62
62
|
*/
|
|
63
63
|
export type RESTPatchAPIWebhookResult = APIWebhook;
|
|
64
64
|
/**
|
|
65
|
-
* https://discord.com/developers/
|
|
65
|
+
* https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token
|
|
66
66
|
*/
|
|
67
67
|
export type RESTPatchAPIWebhookWithTokenJSONBody = Omit<RESTPatchAPIWebhookJSONBody, 'channel_id'>;
|
|
68
68
|
/**
|
|
69
|
-
* https://discord.com/developers/
|
|
69
|
+
* https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token
|
|
70
70
|
*/
|
|
71
71
|
export type RESTPatchAPIWebhookWithTokenResult = RESTGetAPIWebhookWithTokenResult;
|
|
72
72
|
/**
|
|
73
|
-
* https://discord.com/developers/
|
|
73
|
+
* https://docs.discord.com/developers/resources/webhook#delete-webhook
|
|
74
74
|
*/
|
|
75
75
|
export type RESTDeleteAPIWebhookResult = undefined;
|
|
76
76
|
/**
|
|
77
|
-
* https://discord.com/developers/
|
|
77
|
+
* https://docs.discord.com/developers/resources/webhook#delete-webhook-with-token
|
|
78
78
|
*/
|
|
79
79
|
export type RESTDeleteAPIWebhookWithTokenResult = undefined;
|
|
80
80
|
/**
|
|
81
|
-
* https://discord.com/developers/
|
|
81
|
+
* https://docs.discord.com/developers/resources/webhook#execute-webhook
|
|
82
82
|
*/
|
|
83
83
|
export interface RESTPostAPIWebhookWithTokenJSONBody {
|
|
84
84
|
/**
|
|
@@ -100,13 +100,13 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
|
|
100
100
|
/**
|
|
101
101
|
* Embedded `rich` content
|
|
102
102
|
*
|
|
103
|
-
* See https://discord.com/developers/
|
|
103
|
+
* See https://docs.discord.com/developers/resources/channel#embed-object
|
|
104
104
|
*/
|
|
105
105
|
embeds?: APIEmbed[] | undefined;
|
|
106
106
|
/**
|
|
107
107
|
* Allowed mentions for the message
|
|
108
108
|
*
|
|
109
|
-
* See https://discord.com/developers/
|
|
109
|
+
* See https://docs.discord.com/developers/resources/channel#allowed-mentions-object
|
|
110
110
|
*/
|
|
111
111
|
allowed_mentions?: APIAllowedMentions | undefined;
|
|
112
112
|
/**
|
|
@@ -114,7 +114,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
|
|
114
114
|
*
|
|
115
115
|
* Requires an application-owned webhook
|
|
116
116
|
*
|
|
117
|
-
* See https://discord.com/developers/
|
|
117
|
+
* See https://docs.discord.com/developers/interactions/message-components#component-object
|
|
118
118
|
*/
|
|
119
119
|
components?: APITopLevelComponent[] | undefined;
|
|
120
120
|
/**
|
|
@@ -141,7 +141,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
|
|
141
141
|
poll?: RESTAPIPollCreate | undefined;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
|
-
* https://discord.com/developers/
|
|
144
|
+
* https://docs.discord.com/developers/resources/webhook#execute-webhook
|
|
145
145
|
*/
|
|
146
146
|
export type RESTPostAPIWebhookWithTokenFormDataBody = (Record<`files[${bigint}]`, unknown> & {
|
|
147
147
|
/**
|
|
@@ -150,7 +150,7 @@ export type RESTPostAPIWebhookWithTokenFormDataBody = (Record<`files[${bigint}]`
|
|
|
150
150
|
payload_json?: string | undefined;
|
|
151
151
|
}) | (Record<`files[${bigint}]`, unknown> & RESTPostAPIWebhookWithTokenJSONBody);
|
|
152
152
|
/**
|
|
153
|
-
* https://discord.com/developers/
|
|
153
|
+
* https://docs.discord.com/developers/resources/webhook#execute-webhook-query-string-params
|
|
154
154
|
*/
|
|
155
155
|
export interface RESTPostAPIWebhookWithTokenQuery {
|
|
156
156
|
/**
|
|
@@ -175,58 +175,58 @@ export interface RESTPostAPIWebhookWithTokenQuery {
|
|
|
175
175
|
with_components?: boolean;
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
178
|
-
* https://discord.com/developers/
|
|
178
|
+
* https://docs.discord.com/developers/resources/webhook#execute-webhook
|
|
179
179
|
*/
|
|
180
180
|
export type RESTPostAPIWebhookWithTokenResult = undefined;
|
|
181
181
|
/**
|
|
182
|
-
* Received when a call to https://discord.com/developers/
|
|
182
|
+
* Received when a call to https://docs.discord.com/developers/resources/webhook#execute-webhook receives
|
|
183
183
|
* the `wait` query parameter set to `true`
|
|
184
184
|
*
|
|
185
|
-
* See https://discord.com/developers/
|
|
185
|
+
* See https://docs.discord.com/developers/resources/webhook#execute-webhook-query-string-params
|
|
186
186
|
*/
|
|
187
187
|
export type RESTPostAPIWebhookWithTokenWaitResult = APIMessage;
|
|
188
188
|
/**
|
|
189
|
-
* https://discord.com/developers/
|
|
189
|
+
* https://docs.discord.com/developers/resources/webhook#execute-slackcompatible-webhook-query-string-params
|
|
190
190
|
*/
|
|
191
191
|
export type RESTPostAPIWebhookWithTokenSlackQuery = Omit<RESTPostAPIWebhookWithTokenQuery, 'with_components'>;
|
|
192
192
|
/**
|
|
193
|
-
* https://discord.com/developers/
|
|
193
|
+
* https://docs.discord.com/developers/resources/webhook#execute-slackcompatible-webhook
|
|
194
194
|
*/
|
|
195
195
|
export type RESTPostAPIWebhookWithTokenSlackResult = undefined;
|
|
196
196
|
/**
|
|
197
|
-
* Received when a call to https://discord.com/developers/
|
|
197
|
+
* Received when a call to https://docs.discord.com/developers/resources/webhook#execute-webhook receives
|
|
198
198
|
* the `wait` query parameter set to `true`
|
|
199
199
|
*
|
|
200
|
-
* See https://discord.com/developers/
|
|
200
|
+
* See https://docs.discord.com/developers/resources/webhook#execute-slackcompatible-webhook-query-string-params
|
|
201
201
|
*/
|
|
202
202
|
export type RESTPostAPIWebhookWithTokenSlackWaitResult = APIMessage;
|
|
203
203
|
/**
|
|
204
|
-
* https://discord.com/developers/
|
|
204
|
+
* https://docs.discord.com/developers/resources/webhook#execute-githubcompatible-webhook-query-string-params
|
|
205
205
|
*/
|
|
206
206
|
export type RESTPostAPIWebhookWithTokenGitHubQuery = Omit<RESTPostAPIWebhookWithTokenQuery, 'with_components'>;
|
|
207
207
|
/**
|
|
208
|
-
* https://discord.com/developers/
|
|
208
|
+
* https://docs.discord.com/developers/resources/webhook#execute-githubcompatible-webhook
|
|
209
209
|
*/
|
|
210
210
|
export type RESTPostAPIWebhookWithTokenGitHubResult = undefined;
|
|
211
211
|
/**
|
|
212
|
-
* Received when a call to https://discord.com/developers/
|
|
212
|
+
* Received when a call to https://docs.discord.com/developers/resources/webhook#execute-webhook receives
|
|
213
213
|
* the `wait` query parameter set to `true`
|
|
214
214
|
*
|
|
215
|
-
* See https://discord.com/developers/
|
|
215
|
+
* See https://docs.discord.com/developers/resources/webhook#execute-githubcompatible-webhook-query-string-params
|
|
216
216
|
*/
|
|
217
217
|
export type RESTPostAPIWebhookWithTokenGitHubWaitResult = APIMessage;
|
|
218
218
|
/**
|
|
219
|
-
* https://discord.com/developers/
|
|
219
|
+
* https://docs.discord.com/developers/resources/webhook#get-webhook-message
|
|
220
220
|
*/
|
|
221
221
|
export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
|
|
222
222
|
/**
|
|
223
|
-
* https://discord.com/developers/
|
|
223
|
+
* https://docs.discord.com/developers/resources/webhook#get-webhook-message-query-string-params
|
|
224
224
|
*/
|
|
225
225
|
export interface RESTGetAPIWebhookWithTokenMessageQuery {
|
|
226
226
|
thread_id?: string;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
|
-
* https://discord.com/developers/
|
|
229
|
+
* https://docs.discord.com/developers/resources/webhook#edit-webhook-message
|
|
230
230
|
*/
|
|
231
231
|
export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds' | 'poll'>>> & {
|
|
232
232
|
/**
|
|
@@ -234,13 +234,13 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
|
|
|
234
234
|
*
|
|
235
235
|
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
|
|
236
236
|
*
|
|
237
|
-
* See https://discord.com/developers/
|
|
237
|
+
* See https://docs.discord.com/developers/resources/message#attachment-object
|
|
238
238
|
*/
|
|
239
239
|
attachments?: RESTAPIAttachment[] | undefined;
|
|
240
240
|
};
|
|
241
241
|
export type RESTPatchAPIWebhookWithTokenMessageQuery = Omit<RESTPostAPIWebhookWithTokenQuery, 'wait'>;
|
|
242
242
|
/**
|
|
243
|
-
* https://discord.com/developers/
|
|
243
|
+
* https://docs.discord.com/developers/resources/webhook#edit-webhook-message
|
|
244
244
|
*/
|
|
245
245
|
export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = (Record<`files[${bigint}]`, unknown> & {
|
|
246
246
|
/**
|
|
@@ -249,7 +249,7 @@ export type RESTPatchAPIWebhookWithTokenMessageFormDataBody = (Record<`files[${b
|
|
|
249
249
|
payload_json?: string | undefined;
|
|
250
250
|
}) | (Record<`files[${bigint}]`, unknown> & RESTPatchAPIWebhookWithTokenMessageJSONBody);
|
|
251
251
|
/**
|
|
252
|
-
* https://discord.com/developers/
|
|
252
|
+
* https://docs.discord.com/developers/resources/webhook#edit-webhook-message
|
|
253
253
|
*/
|
|
254
254
|
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
|
|
255
255
|
/**
|
|
@@ -257,6 +257,6 @@ export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
|
|
|
257
257
|
*/
|
|
258
258
|
export type RESTDeleteAPIWebhookWithTokenMessageQuery = Pick<RESTPostAPIWebhookWithTokenQuery, 'thread_id'>;
|
|
259
259
|
/**
|
|
260
|
-
* https://discord.com/developers/
|
|
260
|
+
* https://docs.discord.com/developers/resources/webhook#delete-webhook-message
|
|
261
261
|
*/
|
|
262
262
|
export type RESTDeleteAPIWebhookWithTokenMessageResult = undefined;
|