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,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Types extracted from https://discord.com/developers/
|
|
2
|
+
* Types extracted from https://docs.discord.com/developers/resources/webhook
|
|
3
3
|
*/
|
|
4
4
|
import type { Snowflake } from '../index';
|
|
5
5
|
import type { APIPartialChannel, APIPartialGuild, APIUser } from './index';
|
|
6
6
|
/**
|
|
7
|
-
* https://discord.com/developers/
|
|
7
|
+
* https://docs.discord.com/developers/resources/webhook#webhook-object
|
|
8
8
|
*/
|
|
9
9
|
export interface APIWebhook {
|
|
10
10
|
/**
|
|
@@ -14,7 +14,7 @@ export interface APIWebhook {
|
|
|
14
14
|
/**
|
|
15
15
|
* The type of the webhook
|
|
16
16
|
*
|
|
17
|
-
* See https://discord.com/developers/
|
|
17
|
+
* See https://docs.discord.com/developers/resources/webhook#webhook-object-webhook-types
|
|
18
18
|
*/
|
|
19
19
|
type: WebhookType;
|
|
20
20
|
/**
|
|
@@ -28,7 +28,7 @@ export interface APIWebhook {
|
|
|
28
28
|
/**
|
|
29
29
|
* The user this webhook was created by (not returned when getting a webhook with its token)
|
|
30
30
|
*
|
|
31
|
-
* See https://discord.com/developers/
|
|
31
|
+
* See https://docs.discord.com/developers/resources/user#user-object
|
|
32
32
|
*/
|
|
33
33
|
user?: APIUser;
|
|
34
34
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Types extracted from https://discord.com/developers/
|
|
3
|
+
* Types extracted from https://docs.discord.com/developers/resources/webhook
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.WebhookType = void 0;
|
|
@@ -2,60 +2,60 @@ import type { APIActivityInstance, APIApplication, APIApplicationEmoji, APIAppli
|
|
|
2
2
|
import type { Nullable, StrictPartial } from '../utils';
|
|
3
3
|
import type { RESTPatchAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiJSONBody } from './emoji';
|
|
4
4
|
/**
|
|
5
|
-
* https://discord.com/developers/
|
|
5
|
+
* https://docs.discord.com/developers/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
|
|
6
6
|
*/
|
|
7
7
|
export type RESTGetAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
|
|
8
8
|
/**
|
|
9
|
-
* https://discord.com/developers/
|
|
9
|
+
* https://docs.discord.com/developers/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
|
|
10
10
|
*/
|
|
11
11
|
export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplicationRoleConnectionMetadata[];
|
|
12
12
|
/**
|
|
13
|
-
* https://discord.com/developers/
|
|
13
|
+
* https://docs.discord.com/developers/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
|
|
14
14
|
*/
|
|
15
15
|
export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
|
|
16
16
|
/**
|
|
17
|
-
* https://discord.com/developers/
|
|
17
|
+
* https://docs.discord.com/developers/resources/application#get-current-application
|
|
18
18
|
*/
|
|
19
19
|
export type RESTGetCurrentApplicationResult = APIApplication;
|
|
20
20
|
/**
|
|
21
|
-
* https://discord.com/developers/
|
|
21
|
+
* https://docs.discord.com/developers/resources/application#edit-current-application
|
|
22
22
|
*/
|
|
23
23
|
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> & Pick<APIApplication, 'custom_install_url' | 'description' | 'flags' | 'install_params' | 'integration_types_config' | 'interactions_endpoint_url' | 'role_connections_verification_url' | 'tags'>>;
|
|
24
24
|
/**
|
|
25
|
-
* https://discord.com/developers/
|
|
25
|
+
* https://docs.discord.com/developers/resources/application#edit-current-application
|
|
26
26
|
*/
|
|
27
27
|
export type RESTPatchCurrentApplicationResult = APIApplication;
|
|
28
28
|
/**
|
|
29
|
-
* https://discord.com/developers/
|
|
29
|
+
* https://docs.discord.com/developers/resources/emoji#list-application-emojis
|
|
30
30
|
*/
|
|
31
31
|
export interface RESTGetAPIApplicationEmojisResult {
|
|
32
32
|
items: APIApplicationEmoji[];
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* https://discord.com/developers/
|
|
35
|
+
* https://docs.discord.com/developers/resources/emoji#get-application-emoji
|
|
36
36
|
*/
|
|
37
37
|
export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji;
|
|
38
38
|
/**
|
|
39
|
-
* https://discord.com/developers/
|
|
39
|
+
* https://docs.discord.com/developers/resources/emoji#create-application-emoji-json-params
|
|
40
40
|
*/
|
|
41
41
|
export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSONBody, 'image' | 'name'>;
|
|
42
42
|
/**
|
|
43
|
-
* https://discord.com/developers/
|
|
43
|
+
* https://docs.discord.com/developers/resources/emoji#create-application-emoji
|
|
44
44
|
*/
|
|
45
45
|
export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji;
|
|
46
46
|
/**
|
|
47
|
-
* https://discord.com/developers/
|
|
47
|
+
* https://docs.discord.com/developers/resources/emoji#modify-application-emoji
|
|
48
48
|
*/
|
|
49
49
|
export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJSONBody, 'name'>;
|
|
50
50
|
/**
|
|
51
|
-
* https://discord.com/developers/
|
|
51
|
+
* https://docs.discord.com/developers/resources/emoji#modify-application-emoji
|
|
52
52
|
*/
|
|
53
53
|
export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji;
|
|
54
54
|
/**
|
|
55
|
-
* https://discord.com/developers/
|
|
55
|
+
* https://docs.discord.com/developers/resources/emoji#delete-application-emoji
|
|
56
56
|
*/
|
|
57
57
|
export type RESTDeleteAPIApplicationEmojiResult = undefined;
|
|
58
58
|
/**
|
|
59
|
-
* https://discord.com/developers/
|
|
59
|
+
* https://docs.discord.com/developers/resources/application#get-application-activity-instance
|
|
60
60
|
*/
|
|
61
61
|
export type RestGetAPIApplicationActivityInstanceResult = APIActivityInstance | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
2
|
import type { APIAuditLog, AuditLogEvent } from '../payloads';
|
|
3
3
|
/**
|
|
4
|
-
* https://discord.com/developers/
|
|
4
|
+
* https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log
|
|
5
5
|
*/
|
|
6
6
|
export interface RESTGetAPIAuditLogQuery {
|
|
7
7
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleEventType, AutoModerationRuleTriggerType, Snowflake } from '..';
|
|
2
2
|
/**
|
|
3
|
-
* https://discord.com/developers/
|
|
3
|
+
* https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild
|
|
4
4
|
*/
|
|
5
5
|
export type RESTGetAPIAutoModerationRulesResult = APIAutoModerationRule[];
|
|
6
6
|
/**
|
|
7
|
-
* https://discord.com/developers/
|
|
7
|
+
* https://docs.discord.com/developers/resources/auto-moderation#get-auto-moderation-rule
|
|
8
8
|
*/
|
|
9
9
|
export type RESTGetAPIAutoModerationRuleResult = APIAutoModerationRule;
|
|
10
10
|
/**
|
|
11
|
-
* https://discord.com/developers/
|
|
11
|
+
* https://docs.discord.com/developers/resources/auto-moderation#create-auto-moderation-rule
|
|
12
12
|
*/
|
|
13
13
|
export interface RESTPostAPIAutoModerationRuleJSONBody {
|
|
14
14
|
/**
|
|
@@ -49,18 +49,18 @@ export interface RESTPostAPIAutoModerationRuleJSONBody {
|
|
|
49
49
|
exempt_channels?: Snowflake[] | undefined;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* https://discord.com/developers/
|
|
52
|
+
* https://docs.discord.com/developers/resources/auto-moderation#create-auto-moderation-rule
|
|
53
53
|
*/
|
|
54
54
|
export type RESTPostAPIAutoModerationRuleResult = APIAutoModerationRule;
|
|
55
55
|
/**
|
|
56
|
-
* https://discord.com/developers/
|
|
56
|
+
* https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule
|
|
57
57
|
*/
|
|
58
58
|
export type RESTPatchAPIAutoModerationRuleJSONBody = Omit<Partial<RESTPostAPIAutoModerationRuleJSONBody>, 'trigger_type'>;
|
|
59
59
|
/**
|
|
60
|
-
* https://discord.com/developers/
|
|
60
|
+
* https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule
|
|
61
61
|
*/
|
|
62
62
|
export type RESTPatchAPIAutoModerationRuleResult = APIAutoModerationRule;
|
|
63
63
|
/**
|
|
64
|
-
* https://discord.com/developers/
|
|
64
|
+
* https://docs.discord.com/developers/resources/auto-moderation#delete-auto-moderation-rule
|
|
65
65
|
*/
|
|
66
66
|
export type RESTDeleteAPIAutoModerationRuleResult = undefined;
|