seyfert 4.5.0 → 5.0.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/cdn.d.ts +2 -2
- package/lib/api/Routes/guilds.d.ts +2 -2
- package/lib/api/Routes/invites.d.ts +2 -2
- package/lib/api/api.d.ts +20 -8
- package/lib/api/api.js +198 -44
- package/lib/api/shared.d.ts +30 -1
- package/lib/api/utils/constants.d.ts +1 -1
- package/lib/api/utils/constants.js +1 -1
- package/lib/api/utils/utils.d.ts +2 -1
- package/lib/api/utils/utils.js +1 -1
- package/lib/builders/Attachment.d.ts +1 -1
- package/lib/builders/Attachment.js +30 -8
- package/lib/builders/MediaGallery.d.ts +2 -2
- package/lib/builders/MediaGallery.js +10 -0
- package/lib/builders/Modal.d.ts +18 -8
- package/lib/builders/Modal.js +36 -7
- package/lib/builders/Poll.js +18 -0
- package/lib/builders/RadioGroup.d.ts +4 -3
- package/lib/builders/RadioGroup.js +24 -3
- package/lib/builders/SelectMenu.d.ts +8 -6
- package/lib/builders/SelectMenu.js +24 -3
- package/lib/builders/types.d.ts +3 -2
- package/lib/cache/adapters/default.d.ts +1 -1
- package/lib/cache/adapters/default.js +23 -26
- package/lib/cache/adapters/limited.d.ts +1 -0
- package/lib/cache/adapters/limited.js +47 -33
- package/lib/cache/index.d.ts +19 -25
- package/lib/cache/index.js +58 -6
- package/lib/cache/resources/bans.d.ts +1 -1
- package/lib/cache/resources/bans.js +4 -4
- package/lib/cache/resources/channels.d.ts +1 -1
- package/lib/cache/resources/channels.js +4 -4
- package/lib/cache/resources/default/base.d.ts +1 -1
- package/lib/cache/resources/default/base.js +8 -8
- package/lib/cache/resources/default/guild-based.d.ts +5 -5
- package/lib/cache/resources/default/guild-based.js +29 -16
- package/lib/cache/resources/default/guild-related.d.ts +5 -5
- package/lib/cache/resources/default/guild-related.js +14 -14
- package/lib/cache/resources/emojis.d.ts +1 -1
- package/lib/cache/resources/emojis.js +4 -4
- package/lib/cache/resources/guilds.js +28 -15
- package/lib/cache/resources/members.d.ts +1 -1
- package/lib/cache/resources/members.js +6 -6
- package/lib/cache/resources/messages.d.ts +7 -2
- package/lib/cache/resources/messages.js +43 -20
- package/lib/cache/resources/overwrites.d.ts +1 -1
- package/lib/cache/resources/overwrites.js +5 -8
- package/lib/cache/resources/roles.d.ts +1 -1
- package/lib/cache/resources/roles.js +4 -4
- package/lib/cache/resources/stickers.d.ts +1 -1
- package/lib/cache/resources/stickers.js +4 -4
- package/lib/cache/resources/users.js +4 -4
- package/lib/cache/resources/voice-states.d.ts +1 -1
- package/lib/cache/resources/voice-states.js +4 -4
- package/lib/client/base.d.ts +83 -24
- package/lib/client/base.js +594 -39
- package/lib/client/client.d.ts +28 -3
- package/lib/client/client.js +33 -9
- package/lib/client/collectors.d.ts +9 -8
- package/lib/client/collectors.js +19 -52
- package/lib/client/httpclient.d.ts +3 -0
- package/lib/client/index.d.ts +3 -1
- package/lib/client/index.js +4 -0
- package/lib/client/intents.d.ts +3 -0
- package/lib/client/intents.js +9 -0
- package/lib/client/plugins/api.d.ts +4 -0
- package/lib/client/plugins/api.js +550 -0
- package/lib/client/plugins/errors.d.ts +25 -0
- package/lib/client/plugins/errors.js +79 -0
- package/lib/client/plugins/order.d.ts +10 -0
- package/lib/client/plugins/order.js +32 -0
- package/lib/client/plugins/registry.d.ts +273 -0
- package/lib/client/plugins/registry.js +868 -0
- package/lib/client/plugins/shared.d.ts +23 -0
- package/lib/client/plugins/shared.js +193 -0
- package/lib/client/plugins/types.d.ts +398 -0
- package/lib/client/plugins/types.js +8 -0
- package/lib/client/plugins.d.ts +78 -0
- package/lib/client/plugins.js +558 -0
- package/lib/client/transformers.d.ts +33 -33
- package/lib/client/workerclient.d.ts +10 -1
- package/lib/client/workerclient.js +27 -17
- package/lib/collection.d.ts +10 -8
- package/lib/collection.js +19 -25
- package/lib/commands/applications/chat.d.ts +20 -18
- package/lib/commands/applications/chat.js +39 -14
- package/lib/commands/applications/chatcontext.d.ts +23 -15
- package/lib/commands/applications/chatcontext.js +23 -2
- package/lib/commands/applications/entryPoint.d.ts +4 -3
- package/lib/commands/applications/entryPoint.js +1 -1
- package/lib/commands/applications/entrycontext.d.ts +7 -9
- package/lib/commands/applications/entrycontext.js +3 -1
- package/lib/commands/applications/menu.d.ts +4 -3
- package/lib/commands/applications/menucontext.d.ts +7 -9
- package/lib/commands/applications/menucontext.js +3 -1
- package/lib/commands/applications/options.d.ts +23 -23
- package/lib/commands/applications/shared.d.ts +39 -17
- package/lib/commands/decorators.d.ts +50 -38
- package/lib/commands/decorators.js +15 -5
- package/lib/commands/handle.d.ts +19 -8
- package/lib/commands/handle.js +224 -143
- package/lib/commands/handler.d.ts +21 -8
- package/lib/commands/handler.js +157 -69
- package/lib/commands/index.d.ts +1 -0
- package/lib/commands/optionresolver.d.ts +2 -2
- package/lib/common/it/colors.js +12 -2
- package/lib/common/it/error.d.ts +9 -0
- package/lib/common/it/error.js +8 -0
- package/lib/common/it/fake-promise.d.ts +4 -0
- package/lib/common/it/fake-promise.js +10 -0
- package/lib/common/it/formatter.d.ts +14 -11
- package/lib/common/it/formatter.js +4 -3
- package/lib/common/it/logger.d.ts +7 -1
- package/lib/common/it/logger.js +24 -6
- package/lib/common/it/utils.d.ts +6 -8
- package/lib/common/it/utils.js +44 -42
- package/lib/common/shorters/application.d.ts +3 -3
- package/lib/common/shorters/application.js +3 -2
- package/lib/common/shorters/bans.d.ts +8 -4
- package/lib/common/shorters/bans.js +13 -5
- package/lib/common/shorters/channels.d.ts +4 -4
- package/lib/common/shorters/channels.js +4 -4
- package/lib/common/shorters/emojis.js +1 -0
- package/lib/common/shorters/guilds.d.ts +8 -8
- package/lib/common/shorters/guilds.js +14 -31
- package/lib/common/shorters/interaction.d.ts +1 -1
- package/lib/common/shorters/invites.d.ts +201 -201
- package/lib/common/shorters/members.d.ts +7 -7
- package/lib/common/shorters/members.js +13 -14
- package/lib/common/shorters/messages.d.ts +2 -2
- package/lib/common/shorters/soundboard.d.ts +5 -5
- package/lib/common/shorters/users.d.ts +1 -1
- package/lib/common/shorters/webhook.d.ts +3 -2
- package/lib/common/shorters/webhook.js +0 -7
- package/lib/common/types/options.d.ts +4 -0
- package/lib/common/types/util.d.ts +8 -0
- package/lib/common/types/write.d.ts +2 -1
- package/lib/components/BaseSelectMenuComponent.d.ts +1 -1
- package/lib/components/BaseSelectMenuComponent.js +1 -1
- package/lib/components/ButtonComponent.d.ts +3 -3
- package/lib/components/ChannelSelectMenuComponent.d.ts +2 -2
- package/lib/components/File.d.ts +1 -1
- package/lib/components/MediaGallery.d.ts +1 -1
- package/lib/components/MentionableSelectMenuComponent.d.ts +1 -1
- package/lib/components/RoleSelectMenuComponent.d.ts +1 -1
- package/lib/components/Separator.d.ts +1 -1
- package/lib/components/StringSelectMenuComponent.d.ts +1 -1
- package/lib/components/TextInputComponent.d.ts +1 -1
- package/lib/components/Thumbnail.d.ts +1 -1
- package/lib/components/UserSelectMenuComponent.d.ts +1 -1
- package/lib/components/componentcommand.d.ts +8 -7
- package/lib/components/componentcontext.d.ts +24 -36
- package/lib/components/componentcontext.js +7 -17
- package/lib/components/handler.d.ts +17 -7
- package/lib/components/handler.js +108 -49
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/interactioncontext.d.ts +45 -0
- package/lib/components/interactioncontext.js +93 -0
- package/lib/components/modalcommand.d.ts +5 -4
- package/lib/components/modalcontext.d.ts +39 -20
- package/lib/components/modalcontext.js +59 -6
- package/lib/events/event.d.ts +9 -3
- package/lib/events/handler.d.ts +51 -6
- package/lib/events/handler.js +165 -36
- package/lib/events/hooks/application_command.d.ts +1 -1
- package/lib/events/hooks/auto_moderation.d.ts +2 -2
- package/lib/events/hooks/guild.d.ts +150 -150
- package/lib/events/hooks/interactions.d.ts +1 -1
- package/lib/events/hooks/invite.d.ts +20 -20
- package/lib/events/hooks/message.d.ts +27 -27
- package/lib/events/hooks/presence.d.ts +11 -11
- package/lib/events/hooks/soundboard.d.ts +6 -6
- package/lib/events/hooks/stage.d.ts +2 -2
- package/lib/events/hooks/subscriptions.d.ts +3 -3
- package/lib/events/hooks/thread.d.ts +30 -30
- package/lib/events/hooks/voice.d.ts +3 -4
- package/lib/events/hooks/voice.js +2 -1
- package/lib/events/utils.d.ts +4 -0
- package/lib/events/utils.js +59 -0
- package/lib/index.d.ts +9 -4
- package/lib/index.js +13 -8
- package/lib/langs/handler.d.ts +14 -11
- package/lib/langs/handler.js +46 -9
- package/lib/langs/router.d.ts +10 -3
- package/lib/structures/Application.d.ts +1 -1
- package/lib/structures/Emoji.d.ts +3 -3
- package/lib/structures/Emoji.js +2 -2
- package/lib/structures/Guild.d.ts +154 -154
- package/lib/structures/GuildBan.d.ts +4 -4
- package/lib/structures/GuildBan.js +3 -3
- package/lib/structures/GuildMember.d.ts +7 -7
- package/lib/structures/GuildMember.js +28 -7
- package/lib/structures/GuildRole.d.ts +1 -1
- package/lib/structures/GuildRole.js +2 -2
- package/lib/structures/Interaction.d.ts +11 -9
- package/lib/structures/Interaction.js +33 -12
- package/lib/structures/Message.d.ts +21 -14
- package/lib/structures/Message.js +29 -14
- package/lib/structures/User.d.ts +1 -1
- package/lib/structures/VoiceState.d.ts +4 -0
- package/lib/structures/VoiceState.js +13 -1
- package/lib/structures/Webhook.d.ts +9 -1
- package/lib/structures/Webhook.js +4 -1
- package/lib/structures/channels.d.ts +148 -134
- package/lib/structures/channels.js +27 -26
- package/lib/structures/extra/BitField.d.ts +4 -4
- package/lib/structures/extra/BitField.js +20 -4
- package/lib/structures/extra/DiscordBase.js +1 -1
- package/lib/structures/extra/Permissions.d.ts +2 -4
- package/lib/structures/extra/Permissions.js +1 -17
- package/lib/types/payloads/_interactions/responses.d.ts +2 -2
- package/lib/types/payloads/components.d.ts +4 -4
- package/lib/websocket/SharedTypes.d.ts +4 -4
- package/lib/websocket/constants/index.d.ts +1 -1
- package/lib/websocket/constants/index.js +3 -2
- package/lib/websocket/discord/events/memberUpdate.js +2 -2
- package/lib/websocket/discord/heartbeater.d.ts +1 -0
- package/lib/websocket/discord/heartbeater.js +7 -0
- package/lib/websocket/discord/shard.d.ts +2 -2
- package/lib/websocket/discord/shard.js +15 -13
- package/lib/websocket/discord/sharder.d.ts +8 -7
- package/lib/websocket/discord/sharder.js +25 -5
- package/lib/websocket/discord/shared.d.ts +19 -6
- package/lib/websocket/discord/socket/custom.js +5 -0
- package/lib/websocket/discord/worker.d.ts +1 -0
- package/lib/websocket/discord/worker.js +2 -0
- package/lib/websocket/discord/workermanager.d.ts +25 -11
- package/lib/websocket/discord/workermanager.js +41 -10
- package/package.json +12 -16
|
@@ -19,16 +19,16 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
|
|
|
19
19
|
locale?: string | undefined;
|
|
20
20
|
verified?: boolean | undefined;
|
|
21
21
|
email?: string | null | undefined;
|
|
22
|
-
flags?: import("
|
|
23
|
-
premiumType?: import("
|
|
24
|
-
publicFlags?: import("
|
|
25
|
-
avatarDecorationData?: import("
|
|
26
|
-
collectibles?: import("
|
|
27
|
-
primaryGuild?: import("
|
|
22
|
+
flags?: import("../..").UserFlags | undefined;
|
|
23
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
24
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
25
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
26
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
27
|
+
primaryGuild?: import("../..").APIUserPrimaryGuild | null | undefined;
|
|
28
28
|
} | undefined;
|
|
29
29
|
maxAge: number;
|
|
30
30
|
maxUses: number;
|
|
31
|
-
targetType?: import("
|
|
31
|
+
targetType?: import("../..").InviteTargetType | undefined;
|
|
32
32
|
targetUser?: {
|
|
33
33
|
id: string;
|
|
34
34
|
username: string;
|
|
@@ -43,12 +43,12 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
|
|
|
43
43
|
locale?: string | undefined;
|
|
44
44
|
verified?: boolean | undefined;
|
|
45
45
|
email?: string | null | undefined;
|
|
46
|
-
flags?: import("
|
|
47
|
-
premiumType?: import("
|
|
48
|
-
publicFlags?: import("
|
|
49
|
-
avatarDecorationData?: import("
|
|
50
|
-
collectibles?: import("
|
|
51
|
-
primaryGuild?: import("
|
|
46
|
+
flags?: import("../..").UserFlags | undefined;
|
|
47
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
48
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
49
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
50
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
51
|
+
primaryGuild?: import("../..").APIUserPrimaryGuild | null | undefined;
|
|
52
52
|
} | undefined;
|
|
53
53
|
targetApplication?: {
|
|
54
54
|
id?: string | undefined;
|
|
@@ -58,26 +58,26 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
|
|
|
58
58
|
rpcOrigins?: string[] | undefined;
|
|
59
59
|
botPublic?: boolean | undefined;
|
|
60
60
|
botRequireCodeGrant?: boolean | undefined;
|
|
61
|
-
bot?: import("
|
|
61
|
+
bot?: import("../..").APIUser | undefined;
|
|
62
62
|
termsOfServiceUrl?: string | undefined;
|
|
63
63
|
privacyPolicyUrl?: string | undefined;
|
|
64
|
-
owner?: import("
|
|
64
|
+
owner?: import("../..").APIUser | undefined;
|
|
65
65
|
verifyKey?: string | undefined;
|
|
66
|
-
team?: import("
|
|
66
|
+
team?: import("../..").APITeam | null | undefined;
|
|
67
67
|
guildId?: string | undefined;
|
|
68
|
-
guild?: import("
|
|
68
|
+
guild?: import("../..").APIPartialGuild | undefined;
|
|
69
69
|
primarySkuId?: string | undefined;
|
|
70
70
|
slug?: string | undefined;
|
|
71
71
|
coverImage?: string | undefined;
|
|
72
|
-
flags?: import("
|
|
72
|
+
flags?: import("../..").ApplicationFlags | undefined;
|
|
73
73
|
approximateGuildCount?: number | undefined;
|
|
74
74
|
approximateUserInstallCount?: number | undefined;
|
|
75
75
|
redirectUris?: string[] | undefined;
|
|
76
76
|
interactionsEndpointUrl?: string | null | undefined;
|
|
77
77
|
roleConnectionsVerificationUrl?: string | null | undefined;
|
|
78
78
|
tags?: [string, (string | undefined)?, (string | undefined)?, (string | undefined)?, (string | undefined)?] | undefined;
|
|
79
|
-
installParams?: import("
|
|
80
|
-
integrationTypesConfig?: import("
|
|
79
|
+
installParams?: import("../..").APIApplicationInstallParams | undefined;
|
|
80
|
+
integrationTypesConfig?: import("../..").APIApplicationIntegrationTypesConfigMap | undefined;
|
|
81
81
|
customInstallUrl?: string | undefined;
|
|
82
82
|
} | undefined;
|
|
83
83
|
temporary: boolean;
|
|
@@ -9,7 +9,7 @@ export declare const MESSAGE_DELETE_BULK: (self: UsingClient, data: GatewayMessa
|
|
|
9
9
|
messages: (MessageStructure | string)[];
|
|
10
10
|
}>;
|
|
11
11
|
export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMessageReactionAddDispatchData) => {
|
|
12
|
-
type: import("
|
|
12
|
+
type: import("../..").ReactionType;
|
|
13
13
|
guildId?: string | undefined;
|
|
14
14
|
messageId: string;
|
|
15
15
|
channelId: string;
|
|
@@ -28,15 +28,15 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
|
|
|
28
28
|
locale?: string | undefined;
|
|
29
29
|
verified?: boolean | undefined;
|
|
30
30
|
email?: string | null | undefined;
|
|
31
|
-
flags?: import("
|
|
32
|
-
premiumType?: import("
|
|
33
|
-
publicFlags?: import("
|
|
31
|
+
flags?: import("../..").UserFlags | undefined;
|
|
32
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
33
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
34
34
|
avatarDecorationData?: {
|
|
35
35
|
asset: string;
|
|
36
36
|
skuId: string;
|
|
37
37
|
} | null | undefined;
|
|
38
38
|
collectibles?: {
|
|
39
|
-
nameplate?: import("
|
|
39
|
+
nameplate?: import("../..").APINameplateData | undefined;
|
|
40
40
|
} | null | undefined;
|
|
41
41
|
primaryGuild?: {
|
|
42
42
|
identityGuildId: string | null;
|
|
@@ -52,11 +52,11 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
|
|
|
52
52
|
premiumSince?: string | null | undefined;
|
|
53
53
|
deaf: boolean;
|
|
54
54
|
mute: boolean;
|
|
55
|
-
flags: import("
|
|
55
|
+
flags: import("../..").GuildMemberFlags;
|
|
56
56
|
pending?: boolean | undefined;
|
|
57
57
|
communicationDisabledUntil?: string | null | undefined;
|
|
58
|
-
avatarDecorationData?: import("
|
|
59
|
-
collectibles?: import("
|
|
58
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
59
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
60
60
|
banner?: string | null | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
emoji: {
|
|
@@ -75,12 +75,12 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
|
|
|
75
75
|
locale?: string | undefined;
|
|
76
76
|
verified?: boolean | undefined;
|
|
77
77
|
email?: string | null | undefined;
|
|
78
|
-
flags?: import("
|
|
79
|
-
premiumType?: import("
|
|
80
|
-
publicFlags?: import("
|
|
81
|
-
avatarDecorationData?: import("
|
|
82
|
-
collectibles?: import("
|
|
83
|
-
primaryGuild?: import("
|
|
78
|
+
flags?: import("../..").UserFlags | undefined;
|
|
79
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
80
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
81
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
82
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
83
|
+
primaryGuild?: import("../..").APIUserPrimaryGuild | null | undefined;
|
|
84
84
|
} | undefined;
|
|
85
85
|
requireColons?: boolean | undefined;
|
|
86
86
|
managed?: boolean | undefined;
|
|
@@ -95,7 +95,7 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
|
|
|
95
95
|
burst: boolean;
|
|
96
96
|
};
|
|
97
97
|
export declare const MESSAGE_REACTION_REMOVE: (_self: UsingClient, data: GatewayMessageReactionRemoveDispatchData) => {
|
|
98
|
-
type: import("
|
|
98
|
+
type: import("../..").ReactionType;
|
|
99
99
|
guildId?: string | undefined;
|
|
100
100
|
messageId: string;
|
|
101
101
|
channelId: string;
|
|
@@ -115,12 +115,12 @@ export declare const MESSAGE_REACTION_REMOVE: (_self: UsingClient, data: Gateway
|
|
|
115
115
|
locale?: string | undefined;
|
|
116
116
|
verified?: boolean | undefined;
|
|
117
117
|
email?: string | null | undefined;
|
|
118
|
-
flags?: import("
|
|
119
|
-
premiumType?: import("
|
|
120
|
-
publicFlags?: import("
|
|
121
|
-
avatarDecorationData?: import("
|
|
122
|
-
collectibles?: import("
|
|
123
|
-
primaryGuild?: import("
|
|
118
|
+
flags?: import("../..").UserFlags | undefined;
|
|
119
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
120
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
121
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
122
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
123
|
+
primaryGuild?: import("../..").APIUserPrimaryGuild | null | undefined;
|
|
124
124
|
} | undefined;
|
|
125
125
|
requireColons?: boolean | undefined;
|
|
126
126
|
managed?: boolean | undefined;
|
|
@@ -154,12 +154,12 @@ export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self: UsingClient, data: G
|
|
|
154
154
|
locale?: string | undefined;
|
|
155
155
|
verified?: boolean | undefined;
|
|
156
156
|
email?: string | null | undefined;
|
|
157
|
-
flags?: import("
|
|
158
|
-
premiumType?: import("
|
|
159
|
-
publicFlags?: import("
|
|
160
|
-
avatarDecorationData?: import("
|
|
161
|
-
collectibles?: import("
|
|
162
|
-
primaryGuild?: import("
|
|
157
|
+
flags?: import("../..").UserFlags | undefined;
|
|
158
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
159
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
160
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
161
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
162
|
+
primaryGuild?: import("../..").APIUserPrimaryGuild | null | undefined;
|
|
163
163
|
} | undefined;
|
|
164
164
|
requireColons?: boolean | undefined;
|
|
165
165
|
managed?: boolean | undefined;
|
|
@@ -15,15 +15,15 @@ export declare const PRESENCE_UPDATE: (self: UsingClient, data: GatewayPresenceU
|
|
|
15
15
|
locale?: string | undefined;
|
|
16
16
|
verified?: boolean | undefined;
|
|
17
17
|
email?: string | null | undefined;
|
|
18
|
-
flags?: import("
|
|
19
|
-
premiumType?: import("
|
|
20
|
-
publicFlags?: import("
|
|
18
|
+
flags?: import("../..").UserFlags | undefined;
|
|
19
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
20
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
21
21
|
avatarDecorationData?: {
|
|
22
22
|
asset: string;
|
|
23
23
|
skuId: string;
|
|
24
24
|
} | null | undefined;
|
|
25
25
|
collectibles?: {
|
|
26
|
-
nameplate?: import("
|
|
26
|
+
nameplate?: import("../..").APINameplateData | undefined;
|
|
27
27
|
} | null | undefined;
|
|
28
28
|
primaryGuild?: {
|
|
29
29
|
identityGuildId: string | null;
|
|
@@ -33,11 +33,11 @@ export declare const PRESENCE_UPDATE: (self: UsingClient, data: GatewayPresenceU
|
|
|
33
33
|
} | null | undefined;
|
|
34
34
|
};
|
|
35
35
|
guildId: string;
|
|
36
|
-
status?: import("
|
|
36
|
+
status?: import("../..").PresenceUpdateReceiveStatus | undefined;
|
|
37
37
|
activities?: {
|
|
38
38
|
id: string;
|
|
39
39
|
name: string;
|
|
40
|
-
type: import("
|
|
40
|
+
type: import("../..").ActivityType;
|
|
41
41
|
url?: string | null | undefined;
|
|
42
42
|
createdAt: number;
|
|
43
43
|
timestamps?: {
|
|
@@ -71,18 +71,18 @@ export declare const PRESENCE_UPDATE: (self: UsingClient, data: GatewayPresenceU
|
|
|
71
71
|
spectate?: string | undefined;
|
|
72
72
|
} | undefined;
|
|
73
73
|
instance?: boolean | undefined;
|
|
74
|
-
flags?: import("
|
|
74
|
+
flags?: import("../..").ActivityFlags | undefined;
|
|
75
75
|
buttons?: string[] | {
|
|
76
76
|
label: string;
|
|
77
77
|
url: string;
|
|
78
78
|
}[] | undefined;
|
|
79
79
|
}[] | undefined;
|
|
80
80
|
clientStatus?: {
|
|
81
|
-
desktop?: import("
|
|
82
|
-
mobile?: import("
|
|
83
|
-
web?: import("
|
|
81
|
+
desktop?: import("../..").PresenceUpdateReceiveStatus | undefined;
|
|
82
|
+
mobile?: import("../..").PresenceUpdateReceiveStatus | undefined;
|
|
83
|
+
web?: import("../..").PresenceUpdateReceiveStatus | undefined;
|
|
84
84
|
} | undefined;
|
|
85
|
-
}, import("../..").ReturnCache<(Omit<import("
|
|
85
|
+
}, import("../..").ReturnCache<(Omit<import("../..").GatewayPresenceUpdate, "user"> & {
|
|
86
86
|
id: string;
|
|
87
87
|
user_id: string;
|
|
88
88
|
} & {
|
|
@@ -41,12 +41,12 @@ export declare const SOUNDBOARD_SOUNDS: (_: UsingClient, data: GatewaySoundboard
|
|
|
41
41
|
locale?: string | undefined;
|
|
42
42
|
verified?: boolean | undefined;
|
|
43
43
|
email?: string | null | undefined;
|
|
44
|
-
flags?: import("
|
|
45
|
-
premiumType?: import("
|
|
46
|
-
publicFlags?: import("
|
|
47
|
-
avatarDecorationData?: import("
|
|
48
|
-
collectibles?: import("
|
|
49
|
-
primaryGuild?: import("
|
|
44
|
+
flags?: import("../..").UserFlags | undefined;
|
|
45
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
46
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
47
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
48
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
49
|
+
primaryGuild?: import("../..").APIUserPrimaryGuild | null | undefined;
|
|
50
50
|
} | undefined;
|
|
51
51
|
}[];
|
|
52
52
|
guildId: string;
|
|
@@ -7,7 +7,7 @@ export declare const STAGE_INSTANCE_CREATE: (_self: UsingClient, data: GatewaySt
|
|
|
7
7
|
guildId: string;
|
|
8
8
|
channelId: string;
|
|
9
9
|
topic: string;
|
|
10
|
-
privacyLevel: import("
|
|
10
|
+
privacyLevel: import("../..").StageInstancePrivacyLevel;
|
|
11
11
|
guildScheduledEventId?: string | undefined;
|
|
12
12
|
};
|
|
13
13
|
export declare const STAGE_INSTANCE_DELETE: (_self: UsingClient, data: GatewayStageInstanceDeleteDispatchData) => {
|
|
@@ -15,7 +15,7 @@ export declare const STAGE_INSTANCE_DELETE: (_self: UsingClient, data: GatewaySt
|
|
|
15
15
|
guildId: string;
|
|
16
16
|
channelId: string;
|
|
17
17
|
topic: string;
|
|
18
|
-
privacyLevel: import("
|
|
18
|
+
privacyLevel: import("../..").StageInstancePrivacyLevel;
|
|
19
19
|
guildScheduledEventId?: string | undefined;
|
|
20
20
|
};
|
|
21
21
|
export declare const STAGE_INSTANCE_UPDATE: (self: UsingClient, data: GatewayStageInstanceUpdateDispatchData) => Promise<[stage: ObjectToLower<GatewayStageInstanceUpdateDispatchData>, old?: ReturnType<StageInstances["get"]>]>;
|
|
@@ -8,7 +8,7 @@ export declare const SUBSCRIPTION_CREATE: (_: UsingClient, data: APISubscription
|
|
|
8
8
|
renewalSkuIds: string[] | null;
|
|
9
9
|
currentPeriodStart: string;
|
|
10
10
|
currentPeriodEnd: string;
|
|
11
|
-
status: import("
|
|
11
|
+
status: import("../..").SubscriptionStatus;
|
|
12
12
|
canceledAt: string | null;
|
|
13
13
|
country?: string | undefined;
|
|
14
14
|
};
|
|
@@ -20,7 +20,7 @@ export declare const SUBSCRIPTION_UPDATE: (_: UsingClient, data: APISubscription
|
|
|
20
20
|
renewalSkuIds: string[] | null;
|
|
21
21
|
currentPeriodStart: string;
|
|
22
22
|
currentPeriodEnd: string;
|
|
23
|
-
status: import("
|
|
23
|
+
status: import("../..").SubscriptionStatus;
|
|
24
24
|
canceledAt: string | null;
|
|
25
25
|
country?: string | undefined;
|
|
26
26
|
};
|
|
@@ -32,7 +32,7 @@ export declare const SUBSCRIPTION_DELETE: (_: UsingClient, data: APISubscription
|
|
|
32
32
|
renewalSkuIds: string[] | null;
|
|
33
33
|
currentPeriodStart: string;
|
|
34
34
|
currentPeriodEnd: string;
|
|
35
|
-
status: import("
|
|
35
|
+
status: import("../..").SubscriptionStatus;
|
|
36
36
|
canceledAt: string | null;
|
|
37
37
|
country?: string | undefined;
|
|
38
38
|
};
|
|
@@ -12,12 +12,12 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
|
|
|
12
12
|
id?: string | undefined;
|
|
13
13
|
userId?: string | undefined;
|
|
14
14
|
joinTimestamp: string;
|
|
15
|
-
flags: import("
|
|
16
|
-
member?: import("
|
|
15
|
+
flags: import("../..").ThreadMemberFlags;
|
|
16
|
+
member?: import("../..").APIGuildMember | undefined;
|
|
17
17
|
} | undefined;
|
|
18
18
|
threadMetadata?: {
|
|
19
19
|
archived: boolean;
|
|
20
|
-
autoArchiveDuration: import("
|
|
20
|
+
autoArchiveDuration: import("../..").ThreadAutoArchiveDuration;
|
|
21
21
|
archiveTimestamp: string;
|
|
22
22
|
locked: boolean;
|
|
23
23
|
invitable?: boolean | undefined;
|
|
@@ -29,8 +29,8 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
|
|
|
29
29
|
totalMessageSent?: number | undefined;
|
|
30
30
|
appliedTags: string[];
|
|
31
31
|
id: string;
|
|
32
|
-
type: import("
|
|
33
|
-
flags?: import("
|
|
32
|
+
type: import("../..").ThreadChannelType;
|
|
33
|
+
flags?: import("../..").ChannelFlags | undefined;
|
|
34
34
|
rateLimitPerUser?: number | undefined;
|
|
35
35
|
lastMessageId?: string | null | undefined;
|
|
36
36
|
lastPinTimestamp?: string | null | undefined;
|
|
@@ -39,7 +39,7 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
|
|
|
39
39
|
position: number;
|
|
40
40
|
permissionOverwrites?: {
|
|
41
41
|
id: string;
|
|
42
|
-
type: import("
|
|
42
|
+
type: import("../..").OverwriteType;
|
|
43
43
|
allow: string;
|
|
44
44
|
deny: string;
|
|
45
45
|
}[] | undefined;
|
|
@@ -50,7 +50,7 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
|
|
|
50
50
|
id?: string | undefined;
|
|
51
51
|
userId?: string | undefined;
|
|
52
52
|
joinTimestamp: string;
|
|
53
|
-
flags: import("
|
|
53
|
+
flags: import("../..").ThreadMemberFlags;
|
|
54
54
|
member?: {
|
|
55
55
|
user: {
|
|
56
56
|
id: string;
|
|
@@ -66,15 +66,15 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
|
|
|
66
66
|
locale?: string | undefined;
|
|
67
67
|
verified?: boolean | undefined;
|
|
68
68
|
email?: string | null | undefined;
|
|
69
|
-
flags?: import("
|
|
70
|
-
premiumType?: import("
|
|
71
|
-
publicFlags?: import("
|
|
69
|
+
flags?: import("../..").UserFlags | undefined;
|
|
70
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
71
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
72
72
|
avatarDecorationData?: {
|
|
73
73
|
asset: string;
|
|
74
74
|
skuId: string;
|
|
75
75
|
} | null | undefined;
|
|
76
76
|
collectibles?: {
|
|
77
|
-
nameplate?: import("
|
|
77
|
+
nameplate?: import("../..").APINameplateData | undefined;
|
|
78
78
|
} | null | undefined;
|
|
79
79
|
primaryGuild?: {
|
|
80
80
|
identityGuildId: string | null;
|
|
@@ -90,11 +90,11 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
|
|
|
90
90
|
premiumSince?: string | null | undefined;
|
|
91
91
|
deaf: boolean;
|
|
92
92
|
mute: boolean;
|
|
93
|
-
flags: import("
|
|
93
|
+
flags: import("../..").GuildMemberFlags;
|
|
94
94
|
pending?: boolean | undefined;
|
|
95
95
|
communicationDisabledUntil?: string | null | undefined;
|
|
96
|
-
avatarDecorationData?: import("
|
|
97
|
-
collectibles?: import("
|
|
96
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
97
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
98
98
|
banner?: string | null | undefined;
|
|
99
99
|
} | undefined;
|
|
100
100
|
}[];
|
|
@@ -103,7 +103,7 @@ export declare const THREAD_MEMBER_UPDATE: (_self: UsingClient, data: GatewayThr
|
|
|
103
103
|
id?: string | undefined;
|
|
104
104
|
userId?: string | undefined;
|
|
105
105
|
joinTimestamp: string;
|
|
106
|
-
flags: import("
|
|
106
|
+
flags: import("../..").ThreadMemberFlags;
|
|
107
107
|
member?: {
|
|
108
108
|
user: {
|
|
109
109
|
id: string;
|
|
@@ -119,15 +119,15 @@ export declare const THREAD_MEMBER_UPDATE: (_self: UsingClient, data: GatewayThr
|
|
|
119
119
|
locale?: string | undefined;
|
|
120
120
|
verified?: boolean | undefined;
|
|
121
121
|
email?: string | null | undefined;
|
|
122
|
-
flags?: import("
|
|
123
|
-
premiumType?: import("
|
|
124
|
-
publicFlags?: import("
|
|
122
|
+
flags?: import("../..").UserFlags | undefined;
|
|
123
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
124
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
125
125
|
avatarDecorationData?: {
|
|
126
126
|
asset: string;
|
|
127
127
|
skuId: string;
|
|
128
128
|
} | null | undefined;
|
|
129
129
|
collectibles?: {
|
|
130
|
-
nameplate?: import("
|
|
130
|
+
nameplate?: import("../..").APINameplateData | undefined;
|
|
131
131
|
} | null | undefined;
|
|
132
132
|
primaryGuild?: {
|
|
133
133
|
identityGuildId: string | null;
|
|
@@ -143,11 +143,11 @@ export declare const THREAD_MEMBER_UPDATE: (_self: UsingClient, data: GatewayThr
|
|
|
143
143
|
premiumSince?: string | null | undefined;
|
|
144
144
|
deaf: boolean;
|
|
145
145
|
mute: boolean;
|
|
146
|
-
flags: import("
|
|
146
|
+
flags: import("../..").GuildMemberFlags;
|
|
147
147
|
pending?: boolean | undefined;
|
|
148
148
|
communicationDisabledUntil?: string | null | undefined;
|
|
149
|
-
avatarDecorationData?: import("
|
|
150
|
-
collectibles?: import("
|
|
149
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
150
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
151
151
|
banner?: string | null | undefined;
|
|
152
152
|
} | undefined;
|
|
153
153
|
guildId: string;
|
|
@@ -160,7 +160,7 @@ export declare const THREAD_MEMBERS_UPDATE: (_self: UsingClient, data: GatewayTh
|
|
|
160
160
|
id?: string | undefined;
|
|
161
161
|
userId?: string | undefined;
|
|
162
162
|
joinTimestamp: string;
|
|
163
|
-
flags: import("
|
|
163
|
+
flags: import("../..").ThreadMemberFlags;
|
|
164
164
|
member?: {
|
|
165
165
|
user: {
|
|
166
166
|
id: string;
|
|
@@ -176,15 +176,15 @@ export declare const THREAD_MEMBERS_UPDATE: (_self: UsingClient, data: GatewayTh
|
|
|
176
176
|
locale?: string | undefined;
|
|
177
177
|
verified?: boolean | undefined;
|
|
178
178
|
email?: string | null | undefined;
|
|
179
|
-
flags?: import("
|
|
180
|
-
premiumType?: import("
|
|
181
|
-
publicFlags?: import("
|
|
179
|
+
flags?: import("../..").UserFlags | undefined;
|
|
180
|
+
premiumType?: import("../..").UserPremiumType | undefined;
|
|
181
|
+
publicFlags?: import("../..").UserFlags | undefined;
|
|
182
182
|
avatarDecorationData?: {
|
|
183
183
|
asset: string;
|
|
184
184
|
skuId: string;
|
|
185
185
|
} | null | undefined;
|
|
186
186
|
collectibles?: {
|
|
187
|
-
nameplate?: import("
|
|
187
|
+
nameplate?: import("../..").APINameplateData | undefined;
|
|
188
188
|
} | null | undefined;
|
|
189
189
|
primaryGuild?: {
|
|
190
190
|
identityGuildId: string | null;
|
|
@@ -200,11 +200,11 @@ export declare const THREAD_MEMBERS_UPDATE: (_self: UsingClient, data: GatewayTh
|
|
|
200
200
|
premiumSince?: string | null | undefined;
|
|
201
201
|
deaf: boolean;
|
|
202
202
|
mute: boolean;
|
|
203
|
-
flags: import("
|
|
203
|
+
flags: import("../..").GuildMemberFlags;
|
|
204
204
|
pending?: boolean | undefined;
|
|
205
205
|
communicationDisabledUntil?: string | null | undefined;
|
|
206
|
-
avatarDecorationData?: import("
|
|
207
|
-
collectibles?: import("
|
|
206
|
+
avatarDecorationData?: import("../..").APIAvatarDecorationData | null | undefined;
|
|
207
|
+
collectibles?: import("../..").APICollectibles | null | undefined;
|
|
208
208
|
banner?: string | null | undefined;
|
|
209
209
|
} | undefined;
|
|
210
210
|
}[] | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ReturnCache } from '../..';
|
|
2
1
|
import { type VoiceChannelStructure, type VoiceStateStructure } from '../../client/transformers';
|
|
3
2
|
import type { UsingClient } from '../../commands';
|
|
4
3
|
import { type ObjectToLower } from '../../common';
|
|
@@ -18,7 +17,7 @@ export declare const VOICE_CHANNEL_EFFECT_SEND: (_self: UsingClient, data: Gatew
|
|
|
18
17
|
name: string | null;
|
|
19
18
|
animated?: boolean | undefined;
|
|
20
19
|
} | null | undefined;
|
|
21
|
-
animationType?: import("
|
|
20
|
+
animationType?: import("../..").AnimationTypes | null | undefined;
|
|
22
21
|
animationId?: number | undefined;
|
|
23
22
|
soundId: string | number;
|
|
24
23
|
soundVolume?: number | undefined;
|
|
@@ -31,10 +30,10 @@ export declare const VOICE_CHANNEL_EFFECT_SEND: (_self: UsingClient, data: Gatew
|
|
|
31
30
|
animated?: boolean | undefined;
|
|
32
31
|
} | null | undefined;
|
|
33
32
|
userId: string;
|
|
34
|
-
animationType?: import("
|
|
33
|
+
animationType?: import("../..").AnimationTypes | null | undefined;
|
|
35
34
|
animationId?: number | undefined;
|
|
36
35
|
};
|
|
37
|
-
export declare const VOICE_CHANNEL_STATUS_UPDATE: (self: UsingClient, data: GatewayVoiceChannelStatusUpdateDispatchData) => Promise<[status: ObjectToLower<GatewayVoiceChannelStatusUpdateDispatchData
|
|
36
|
+
export declare const VOICE_CHANNEL_STATUS_UPDATE: (self: UsingClient, data: GatewayVoiceChannelStatusUpdateDispatchData) => Promise<[status: ObjectToLower<GatewayVoiceChannelStatusUpdateDispatchData>, channel: VoiceChannelStructure | undefined]>;
|
|
38
37
|
export declare const VOICE_CHANNEL_START_TIME_UPDATE: (_self: UsingClient, data: GatewayVoiceChannelStartTimeUpdateDispatchData) => {
|
|
39
38
|
id: string;
|
|
40
39
|
guildId: string;
|
|
@@ -18,7 +18,8 @@ const VOICE_CHANNEL_EFFECT_SEND = (_self, data) => {
|
|
|
18
18
|
};
|
|
19
19
|
exports.VOICE_CHANNEL_EFFECT_SEND = VOICE_CHANNEL_EFFECT_SEND;
|
|
20
20
|
const VOICE_CHANNEL_STATUS_UPDATE = async (self, data) => {
|
|
21
|
-
|
|
21
|
+
const channel = await self.cache.channels?.get(data.id);
|
|
22
|
+
return [(0, common_1.toCamelCase)(data), channel?.isVoice() ? channel : undefined];
|
|
22
23
|
};
|
|
23
24
|
exports.VOICE_CHANNEL_STATUS_UPDATE = VOICE_CHANNEL_STATUS_UPDATE;
|
|
24
25
|
const VOICE_CHANNEL_START_TIME_UPDATE = (_self, data) => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { UsingClient } from '../commands';
|
|
2
|
+
export declare function normalizeEventName(name: string): string;
|
|
3
|
+
export declare function isGatewayEventName(name: string): boolean;
|
|
4
|
+
export declare function resolveRawEventData(name: string, client: UsingClient, raw: unknown): Promise<unknown>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.normalizeEventName = normalizeEventName;
|
|
37
|
+
exports.isGatewayEventName = isGatewayEventName;
|
|
38
|
+
exports.resolveRawEventData = resolveRawEventData;
|
|
39
|
+
const common_1 = require("../common");
|
|
40
|
+
const RawEvents = __importStar(require("./hooks"));
|
|
41
|
+
const rawEventNames = Object.keys(RawEvents);
|
|
42
|
+
function normalizeEventName(name) {
|
|
43
|
+
if (isRawEventName(name))
|
|
44
|
+
return name;
|
|
45
|
+
const gatewayName = common_1.ReplaceRegex.snake(name).toUpperCase();
|
|
46
|
+
return isRawEventName(gatewayName) ? gatewayName : name;
|
|
47
|
+
}
|
|
48
|
+
function isGatewayEventName(name) {
|
|
49
|
+
return normalizeEventName(name) !== name || isRawEventName(name);
|
|
50
|
+
}
|
|
51
|
+
async function resolveRawEventData(name, client, raw) {
|
|
52
|
+
if (!isRawEventName(name))
|
|
53
|
+
return raw;
|
|
54
|
+
const rawEvent = RawEvents[name];
|
|
55
|
+
return rawEvent(client, raw);
|
|
56
|
+
}
|
|
57
|
+
function isRawEventName(name) {
|
|
58
|
+
return rawEventNames.includes(name);
|
|
59
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
export * from './client';
|
|
2
2
|
import { type BaseClientOptions, type InternalRuntimeConfig, type InternalRuntimeConfigHTTP, type RuntimeConfig, type RuntimeConfigHTTP } from './client/base';
|
|
3
|
+
import { type Awaitable } from './common';
|
|
3
4
|
import type { ClientNameEvents, CustomEventsKeys, ResolveEventParams } from './events';
|
|
4
5
|
export * from './api';
|
|
5
6
|
export * from './builders';
|
|
6
7
|
export * from './cache';
|
|
7
|
-
export { Collection, LimitedCollection } from './collection';
|
|
8
|
+
export { Collection, LimitedCollection, type LimitedCollectionData } from './collection';
|
|
8
9
|
export * from './commands';
|
|
9
|
-
export { type AssignFilenameCallback, type CustomizeLoggerCallback, Formatter, Logger, type LoggerOptions, LogLevels, PermissionStrings, } from './common';
|
|
10
|
+
export { type AssignFilenameCallback, type BanOptions, type ChannelLink, type CustomizeLoggerCallback, createValidationMetadata, EmbedColors, Formatter, HeadingLevel, Logger, type LoggerOptions, LogLevels, type MessageLink, type OAuth2URLOptions, PermissionStrings, type PropWhen, SeyfertError, type SeyfertErrorCode, SeyfertErrorMessages, type StructPropState, type StructStates, type Timestamp, TimestampStyle, } from './common';
|
|
10
11
|
export * from './components';
|
|
11
12
|
export * from './events';
|
|
12
13
|
export * from './langs';
|
|
13
14
|
export * from './structures';
|
|
15
|
+
export { GuildRole } from './structures/GuildRole';
|
|
16
|
+
export * from './types';
|
|
14
17
|
export { ShardManager, WorkerManager } from './websocket/discord';
|
|
18
|
+
export type { ShardData, ShardManagerOptions, WorkerData, WorkerManagerOptions } from './websocket/discord/shared';
|
|
19
|
+
export type { WorkerInfo, WorkerShardInfo } from './websocket/discord/worker';
|
|
15
20
|
/**
|
|
16
21
|
* Creates an event with the specified data and run function.
|
|
17
22
|
*
|
|
@@ -31,13 +36,13 @@ export declare function createEvent<E extends ClientNameEvents | CustomEventsKey
|
|
|
31
36
|
name: E;
|
|
32
37
|
once?: boolean;
|
|
33
38
|
};
|
|
34
|
-
run: (...args: ResolveEventParams<E>) =>
|
|
39
|
+
run: (...args: ResolveEventParams<E>) => Awaitable<unknown>;
|
|
35
40
|
}): {
|
|
36
41
|
data: {
|
|
37
42
|
name: E;
|
|
38
43
|
once?: boolean;
|
|
39
44
|
};
|
|
40
|
-
run: (...args: ResolveEventParams<E>) =>
|
|
45
|
+
run: (...args: ResolveEventParams<E>) => Awaitable<unknown>;
|
|
41
46
|
};
|
|
42
47
|
export declare const config: {
|
|
43
48
|
/**
|