seyfert 1.3.2 → 1.4.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/api.js +13 -7
- package/lib/builders/Attachment.d.ts +1 -4
- package/lib/builders/Attachment.js +4 -4
- package/lib/cache/adapters/workeradapter.js +7 -3
- package/lib/cache/resources/default/base.d.ts +1 -2
- package/lib/cache/resources/default/guild-based.d.ts +1 -2
- package/lib/client/base.d.ts +26 -4
- package/lib/client/base.js +42 -2
- package/lib/client/client.d.ts +3 -3
- package/lib/client/client.js +18 -6
- package/lib/client/httpclient.d.ts +7 -8
- package/lib/client/httpclient.js +92 -13
- package/lib/client/oninteractioncreate.d.ts +2 -2
- package/lib/client/oninteractioncreate.js +15 -7
- package/lib/client/onmessagecreate.js +74 -66
- package/lib/client/workerclient.d.ts +1 -1
- package/lib/client/workerclient.js +18 -7
- package/lib/commands/applications/chat.d.ts +1 -1
- package/lib/commands/applications/chat.js +2 -1
- package/lib/commands/applications/chatcontext.d.ts +1 -1
- package/lib/commands/applications/chatcontext.js +2 -2
- package/lib/commands/applications/menu.js +0 -48
- package/lib/commands/applications/menucontext.d.ts +1 -1
- package/lib/commands/applications/menucontext.js +3 -3
- package/lib/commands/applications/options.d.ts +3 -1
- package/lib/commands/basecontext.d.ts +26 -0
- package/lib/commands/{basecontex.js → basecontext.js} +24 -0
- package/lib/commands/handler.d.ts +6 -1
- package/lib/commands/handler.js +125 -3
- package/lib/common/bot/watcher.d.ts +1 -2
- package/lib/common/bot/watcher.js +9 -4
- package/lib/common/it/logger.d.ts +1 -1
- package/lib/common/it/logger.js +9 -8
- package/lib/common/it/utils.d.ts +2 -0
- package/lib/common/it/utils.js +19 -5
- package/lib/common/shorters/interaction.js +6 -4
- package/lib/common/shorters/messages.js +2 -2
- package/lib/common/shorters/webhook.js +2 -2
- package/lib/components/componentcommand.d.ts +21 -0
- package/lib/components/{command.js → componentcommand.js} +2 -5
- package/lib/components/componentcontext.d.ts +20 -16
- package/lib/components/componentcontext.js +27 -9
- package/lib/components/handler.d.ts +10 -5
- package/lib/components/handler.js +94 -17
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +3 -1
- package/lib/components/modalcommand.d.ts +15 -0
- package/lib/components/modalcommand.js +9 -0
- package/lib/components/modalcontext.d.ts +104 -0
- package/lib/components/modalcontext.js +132 -0
- package/lib/events/handler.d.ts +4 -1
- package/lib/events/handler.js +2 -7
- package/lib/events/hooks/application_command.d.ts +2 -2
- package/lib/events/hooks/auto_moderation.d.ts +5 -5
- package/lib/events/hooks/channel.d.ts +5 -5
- package/lib/events/hooks/custom.d.ts +3 -3
- package/lib/events/hooks/dispatch.d.ts +4 -4
- package/lib/events/hooks/entitlement.d.ts +7 -4
- package/lib/events/hooks/guild.d.ts +57 -23
- package/lib/events/hooks/guild.js +6 -6
- package/lib/events/hooks/integration.d.ts +4 -4
- package/lib/events/hooks/interactions.d.ts +2 -2
- package/lib/events/hooks/invite.d.ts +3 -3
- package/lib/events/hooks/message.d.ts +13 -13
- package/lib/events/hooks/message.js +1 -1
- package/lib/events/hooks/presence.d.ts +7 -3
- package/lib/events/hooks/presence.js +2 -2
- package/lib/events/hooks/stage.d.ts +7 -13
- package/lib/events/hooks/stage.js +2 -2
- package/lib/events/hooks/thread.d.ts +7 -7
- package/lib/events/hooks/thread.js +2 -2
- package/lib/events/hooks/typing.d.ts +2 -2
- package/lib/events/hooks/user.d.ts +2 -2
- package/lib/events/hooks/user.js +2 -2
- package/lib/events/hooks/voice.d.ts +5 -45
- package/lib/events/hooks/voice.js +4 -7
- package/lib/events/hooks/webhook.d.ts +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +9 -4
- package/lib/langs/handler.d.ts +4 -1
- package/lib/langs/handler.js +3 -3
- package/lib/structures/Interaction.d.ts +3 -3
- package/lib/structures/Interaction.js +14 -7
- package/lib/structures/Message.d.ts +2 -2
- package/lib/structures/Message.js +11 -2
- package/lib/structures/VoiceState.d.ts +6 -5
- package/lib/structures/VoiceState.js +6 -3
- package/lib/structures/channels.d.ts +1 -1
- package/lib/structures/channels.js +2 -1
- package/lib/websocket/discord/sharder.js +10 -3
- package/lib/websocket/discord/shared.d.ts +1 -0
- package/lib/websocket/discord/workermanager.d.ts +2 -3
- package/lib/websocket/discord/workermanager.js +4 -2
- package/package.json +3 -3
- package/lib/commands/basecontex.d.ts +0 -15
- package/lib/components/command.d.ts +0 -24
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GatewayGuildAuditLogEntryCreateDispatchData, GatewayGuildBanAddDispatchData, GatewayGuildBanRemoveDispatchData, GatewayGuildCreateDispatchData, GatewayGuildDeleteDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type { BaseClient } from '../../client/base';
|
|
3
2
|
import { Guild, GuildEmoji, GuildMember, GuildRole, Sticker, UnavailableMember, User, type GatewayGuildMemberAddDispatchDataFixed } from '../../structures';
|
|
4
|
-
|
|
3
|
+
import type { UsingClient } from '../../commands';
|
|
4
|
+
export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: UsingClient, data: GatewayGuildAuditLogEntryCreateDispatchData) => {
|
|
5
5
|
guildId: string;
|
|
6
6
|
targetId: string | null;
|
|
7
7
|
changes?: ({
|
|
@@ -142,6 +142,22 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: BaseClient, data: Gat
|
|
|
142
142
|
key: "available";
|
|
143
143
|
newValue?: boolean | undefined;
|
|
144
144
|
oldValue?: boolean | undefined;
|
|
145
|
+
} | {
|
|
146
|
+
key: "available_tags";
|
|
147
|
+
newValue?: {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
moderated: boolean;
|
|
151
|
+
emojiId: string | null;
|
|
152
|
+
emojiName: string | null;
|
|
153
|
+
}[] | undefined;
|
|
154
|
+
oldValue?: {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
moderated: boolean;
|
|
158
|
+
emojiId: string | null;
|
|
159
|
+
emojiName: string | null;
|
|
160
|
+
}[] | undefined;
|
|
145
161
|
} | {
|
|
146
162
|
key: "avatar_hash";
|
|
147
163
|
newValue?: string | undefined;
|
|
@@ -182,6 +198,20 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: BaseClient, data: Gat
|
|
|
182
198
|
key: "default_message_notifications";
|
|
183
199
|
newValue?: import("discord-api-types/v10").GuildDefaultMessageNotifications | undefined;
|
|
184
200
|
oldValue?: import("discord-api-types/v10").GuildDefaultMessageNotifications | undefined;
|
|
201
|
+
} | {
|
|
202
|
+
key: "default_reaction_emoji";
|
|
203
|
+
newValue?: {
|
|
204
|
+
emojiId: string | null;
|
|
205
|
+
emojiName: string | null;
|
|
206
|
+
} | undefined;
|
|
207
|
+
oldValue?: {
|
|
208
|
+
emojiId: string | null;
|
|
209
|
+
emojiName: string | null;
|
|
210
|
+
} | undefined;
|
|
211
|
+
} | {
|
|
212
|
+
key: "default_thread_rate_limit_per_user";
|
|
213
|
+
newValue?: number | undefined;
|
|
214
|
+
oldValue?: number | undefined;
|
|
185
215
|
} | {
|
|
186
216
|
key: "deny";
|
|
187
217
|
newValue?: string | undefined;
|
|
@@ -230,6 +260,10 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: BaseClient, data: Gat
|
|
|
230
260
|
key: "explicit_content_filter";
|
|
231
261
|
newValue?: import("discord-api-types/v10").GuildExplicitContentFilter | undefined;
|
|
232
262
|
oldValue?: import("discord-api-types/v10").GuildExplicitContentFilter | undefined;
|
|
263
|
+
} | {
|
|
264
|
+
key: "flags";
|
|
265
|
+
newValue?: number | undefined;
|
|
266
|
+
oldValue?: number | undefined;
|
|
233
267
|
} | {
|
|
234
268
|
key: "format_type";
|
|
235
269
|
newValue?: import("discord-api-types/v10").StickerFormatType | undefined;
|
|
@@ -449,29 +483,29 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: BaseClient, data: Gat
|
|
|
449
483
|
} | undefined;
|
|
450
484
|
reason?: string | undefined;
|
|
451
485
|
};
|
|
452
|
-
export declare const GUILD_BAN_ADD: (self:
|
|
486
|
+
export declare const GUILD_BAN_ADD: (self: UsingClient, data: GatewayGuildBanAddDispatchData) => {
|
|
453
487
|
user: User;
|
|
454
488
|
guildId: string;
|
|
455
489
|
};
|
|
456
|
-
export declare const GUILD_BAN_REMOVE: (self:
|
|
490
|
+
export declare const GUILD_BAN_REMOVE: (self: UsingClient, data: GatewayGuildBanRemoveDispatchData) => {
|
|
457
491
|
user: User;
|
|
458
492
|
guildId: string;
|
|
459
493
|
};
|
|
460
|
-
export declare const GUILD_CREATE: (self:
|
|
461
|
-
export declare const GUILD_DELETE: (self:
|
|
462
|
-
export declare const GUILD_EMOJIS_UPDATE: (self:
|
|
494
|
+
export declare const GUILD_CREATE: (self: UsingClient, data: GatewayGuildCreateDispatchData) => Guild<"create">;
|
|
495
|
+
export declare const GUILD_DELETE: (self: UsingClient, data: GatewayGuildDeleteDispatchData) => Promise<import("discord-api-types/v10").APIUnavailableGuild | Guild<"cached">>;
|
|
496
|
+
export declare const GUILD_EMOJIS_UPDATE: (self: UsingClient, data: GatewayGuildEmojisUpdateDispatchData) => {
|
|
463
497
|
emojis: GuildEmoji[];
|
|
464
498
|
guildId: string;
|
|
465
499
|
};
|
|
466
|
-
export declare const GUILD_INTEGRATIONS_UPDATE: (_self:
|
|
500
|
+
export declare const GUILD_INTEGRATIONS_UPDATE: (_self: UsingClient, data: GatewayGuildIntegrationsUpdateDispatchData) => {
|
|
467
501
|
guildId: string;
|
|
468
502
|
};
|
|
469
|
-
export declare const GUILD_MEMBER_ADD: (self:
|
|
470
|
-
export declare const GUILD_MEMBER_REMOVE: (self:
|
|
503
|
+
export declare const GUILD_MEMBER_ADD: (self: UsingClient, data: GatewayGuildMemberAddDispatchDataFixed<boolean>) => GuildMember | UnavailableMember;
|
|
504
|
+
export declare const GUILD_MEMBER_REMOVE: (self: UsingClient, data: GatewayGuildMemberRemoveDispatchData) => {
|
|
471
505
|
user: User;
|
|
472
506
|
guildId: string;
|
|
473
507
|
};
|
|
474
|
-
export declare const GUILD_MEMBERS_CHUNK: (self:
|
|
508
|
+
export declare const GUILD_MEMBERS_CHUNK: (self: UsingClient, data: GatewayGuildMembersChunkDispatchData) => {
|
|
475
509
|
members: GuildMember[];
|
|
476
510
|
guildId: string;
|
|
477
511
|
chunkIndex: number;
|
|
@@ -549,8 +583,8 @@ export declare const GUILD_MEMBERS_CHUNK: (self: BaseClient, data: GatewayGuildM
|
|
|
549
583
|
}[] | undefined;
|
|
550
584
|
nonce?: string | undefined;
|
|
551
585
|
};
|
|
552
|
-
export declare const GUILD_MEMBER_UPDATE: (self:
|
|
553
|
-
export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self:
|
|
586
|
+
export declare const GUILD_MEMBER_UPDATE: (self: UsingClient, data: GatewayGuildMemberUpdateDispatchData) => Promise<[member: GuildMember, old?: GuildMember]>;
|
|
587
|
+
export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: UsingClient, data: GatewayGuildScheduledEventCreateDispatchData) => {
|
|
554
588
|
channelId: string;
|
|
555
589
|
entityMetadata: undefined;
|
|
556
590
|
id: string;
|
|
@@ -658,7 +692,7 @@ export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: BaseClient, data: Gat
|
|
|
658
692
|
userCount?: number | undefined;
|
|
659
693
|
image?: string | null | undefined;
|
|
660
694
|
};
|
|
661
|
-
export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self:
|
|
695
|
+
export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: UsingClient, data: GatewayGuildScheduledEventUpdateDispatchData) => {
|
|
662
696
|
channelId: string;
|
|
663
697
|
entityMetadata: undefined;
|
|
664
698
|
id: string;
|
|
@@ -766,7 +800,7 @@ export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: BaseClient, data: Gat
|
|
|
766
800
|
userCount?: number | undefined;
|
|
767
801
|
image?: string | null | undefined;
|
|
768
802
|
};
|
|
769
|
-
export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self:
|
|
803
|
+
export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: UsingClient, data: GatewayGuildScheduledEventDeleteDispatchData) => {
|
|
770
804
|
channelId: string;
|
|
771
805
|
entityMetadata: undefined;
|
|
772
806
|
id: string;
|
|
@@ -874,24 +908,24 @@ export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: BaseClient, data: Gat
|
|
|
874
908
|
userCount?: number | undefined;
|
|
875
909
|
image?: string | null | undefined;
|
|
876
910
|
};
|
|
877
|
-
export declare const GUILD_SCHEDULED_EVENT_USER_ADD: (_self:
|
|
911
|
+
export declare const GUILD_SCHEDULED_EVENT_USER_ADD: (_self: UsingClient, data: GatewayGuildScheduledEventUserAddDispatchData) => {
|
|
878
912
|
guildScheduledEventId: string;
|
|
879
913
|
userId: string;
|
|
880
914
|
guildId: string;
|
|
881
915
|
};
|
|
882
|
-
export declare const GUILD_SCHEDULED_EVENT_USER_REMOVE: (_self:
|
|
916
|
+
export declare const GUILD_SCHEDULED_EVENT_USER_REMOVE: (_self: UsingClient, data: GatewayGuildScheduledEventUserRemoveDispatchData) => {
|
|
883
917
|
guildScheduledEventId: string;
|
|
884
918
|
userId: string;
|
|
885
919
|
guildId: string;
|
|
886
920
|
};
|
|
887
|
-
export declare const GUILD_ROLE_CREATE: (self:
|
|
888
|
-
export declare const GUILD_ROLE_DELETE: (
|
|
921
|
+
export declare const GUILD_ROLE_CREATE: (self: UsingClient, data: GatewayGuildRoleCreateDispatchData) => GuildRole;
|
|
922
|
+
export declare const GUILD_ROLE_DELETE: (self: UsingClient, data: GatewayGuildRoleDeleteDispatchData) => Promise<GuildRole | {
|
|
889
923
|
guildId: string;
|
|
890
924
|
roleId: string;
|
|
891
|
-
}
|
|
892
|
-
export declare const GUILD_ROLE_UPDATE: (self:
|
|
893
|
-
export declare const GUILD_STICKERS_UPDATE: (self:
|
|
925
|
+
}>;
|
|
926
|
+
export declare const GUILD_ROLE_UPDATE: (self: UsingClient, data: GatewayGuildRoleUpdateDispatchData) => Promise<[role: GuildRole, old?: GuildRole]>;
|
|
927
|
+
export declare const GUILD_STICKERS_UPDATE: (self: UsingClient, data: GatewayGuildStickersUpdateDispatchData) => {
|
|
894
928
|
stickers: Sticker[];
|
|
895
929
|
guildId: string;
|
|
896
930
|
};
|
|
897
|
-
export declare const GUILD_UPDATE: (self:
|
|
931
|
+
export declare const GUILD_UPDATE: (self: UsingClient, data: GatewayGuildUpdateDispatchData) => Promise<[guild: Guild, old?: Guild<'cached'>]>;
|
|
@@ -80,12 +80,12 @@ const GUILD_ROLE_CREATE = (self, data) => {
|
|
|
80
80
|
return new structures_1.GuildRole(self, data.role, data.guild_id);
|
|
81
81
|
};
|
|
82
82
|
exports.GUILD_ROLE_CREATE = GUILD_ROLE_CREATE;
|
|
83
|
-
const GUILD_ROLE_DELETE = (
|
|
84
|
-
return (0, common_1.toCamelCase)(data);
|
|
83
|
+
const GUILD_ROLE_DELETE = async (self, data) => {
|
|
84
|
+
return (await self.cache.roles?.get(data.role_id)) || (0, common_1.toCamelCase)(data);
|
|
85
85
|
};
|
|
86
86
|
exports.GUILD_ROLE_DELETE = GUILD_ROLE_DELETE;
|
|
87
|
-
const GUILD_ROLE_UPDATE = (self, data) => {
|
|
88
|
-
return new structures_1.GuildRole(self, data.role, data.guild_id);
|
|
87
|
+
const GUILD_ROLE_UPDATE = async (self, data) => {
|
|
88
|
+
return [new structures_1.GuildRole(self, data.role, data.guild_id), await self.cache.roles?.get(data.role.id)];
|
|
89
89
|
};
|
|
90
90
|
exports.GUILD_ROLE_UPDATE = GUILD_ROLE_UPDATE;
|
|
91
91
|
const GUILD_STICKERS_UPDATE = (self, data) => {
|
|
@@ -95,7 +95,7 @@ const GUILD_STICKERS_UPDATE = (self, data) => {
|
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
97
|
exports.GUILD_STICKERS_UPDATE = GUILD_STICKERS_UPDATE;
|
|
98
|
-
const GUILD_UPDATE = (self, data) => {
|
|
99
|
-
return new structures_1.Guild(self, data);
|
|
98
|
+
const GUILD_UPDATE = async (self, data) => {
|
|
99
|
+
return [new structures_1.Guild(self, data), await self.cache.guilds?.get(data.id)];
|
|
100
100
|
};
|
|
101
101
|
exports.GUILD_UPDATE = GUILD_UPDATE;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GatewayIntegrationCreateDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntegrationUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const INTEGRATION_CREATE: (self:
|
|
2
|
+
import type { UsingClient } from '../../commands';
|
|
3
|
+
export declare const INTEGRATION_CREATE: (self: UsingClient, data: GatewayIntegrationCreateDispatchData) => {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
type: import("discord-api-types/v10").APIGuildIntegrationType;
|
|
@@ -46,7 +46,7 @@ export declare const INTEGRATION_CREATE: (self: BaseClient, data: GatewayIntegra
|
|
|
46
46
|
scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
|
|
47
47
|
guildId: string;
|
|
48
48
|
};
|
|
49
|
-
export declare const INTEGRATION_UPDATE: (self:
|
|
49
|
+
export declare const INTEGRATION_UPDATE: (self: UsingClient, data: GatewayIntegrationUpdateDispatchData) => {
|
|
50
50
|
id: string;
|
|
51
51
|
name: string;
|
|
52
52
|
type: import("discord-api-types/v10").APIGuildIntegrationType;
|
|
@@ -92,7 +92,7 @@ export declare const INTEGRATION_UPDATE: (self: BaseClient, data: GatewayIntegra
|
|
|
92
92
|
scopes?: import("discord-api-types/v10").OAuth2Scopes[] | undefined;
|
|
93
93
|
guildId: string;
|
|
94
94
|
};
|
|
95
|
-
export declare const INTEGRATION_DELETE: (_self:
|
|
95
|
+
export declare const INTEGRATION_DELETE: (_self: UsingClient, data: GatewayIntegrationDeleteDispatchData) => {
|
|
96
96
|
id: string;
|
|
97
97
|
guildId: string;
|
|
98
98
|
applicationId?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GatewayInteractionCreateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type { BaseClient } from '../../client/base';
|
|
3
2
|
import { BaseInteraction } from '../../structures';
|
|
4
|
-
|
|
3
|
+
import type { UsingClient } from '../../commands';
|
|
4
|
+
export declare const INTERACTION_CREATE: (self: UsingClient, data: GatewayInteractionCreateDispatchData) => import("../../structures").RoleSelectMenuInteraction | import("../../structures").UserSelectMenuInteraction | import("../../structures").MentionableSelectMenuInteraction | import("../../structures").ChannelSelectMenuInteraction | import("../../structures").StringSelectMenuInteraction<string[]> | import("../../structures").AutocompleteInteraction<boolean> | import("../../structures").ChatInputCommandInteraction<boolean> | import("../../structures").UserCommandInteraction<boolean> | import("../../structures").MessageCommandInteraction<boolean> | import("../../structures").ButtonInteraction | import("../../structures").ModalSubmitInteraction<boolean> | BaseInteraction<boolean, import("discord-api-types/v10").APIPingInteraction>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const INVITE_CREATE: (_self:
|
|
2
|
+
import type { UsingClient } from '../../commands';
|
|
3
|
+
export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCreateDispatchData) => {
|
|
4
4
|
channelId: string;
|
|
5
5
|
code: string;
|
|
6
6
|
createdAt: number;
|
|
@@ -78,7 +78,7 @@ export declare const INVITE_CREATE: (_self: BaseClient, data: GatewayInviteCreat
|
|
|
78
78
|
temporary: boolean;
|
|
79
79
|
uses: 0;
|
|
80
80
|
};
|
|
81
|
-
export declare const INVITE_DELETE: (_self:
|
|
81
|
+
export declare const INVITE_DELETE: (_self: UsingClient, data: GatewayInviteDeleteDispatchData) => {
|
|
82
82
|
channelId: string;
|
|
83
83
|
guildId?: string | undefined;
|
|
84
84
|
code: string;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { GatewayMessageCreateDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessageDeleteDispatchData, GatewayMessagePollVoteDispatchData, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayMessageUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type { BaseClient } from '../../client/base';
|
|
3
2
|
import { type MakeRequired, type PartialClass } from '../../common';
|
|
4
3
|
import { Message } from '../../structures';
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
4
|
+
import type { UsingClient } from '../../commands';
|
|
5
|
+
export declare const MESSAGE_CREATE: (self: UsingClient, data: GatewayMessageCreateDispatchData) => Message;
|
|
6
|
+
export declare const MESSAGE_DELETE: (self: UsingClient, data: GatewayMessageDeleteDispatchData) => Promise<{
|
|
7
7
|
id: string;
|
|
8
8
|
channelId: string;
|
|
9
9
|
guildId?: string | undefined;
|
|
10
10
|
}>;
|
|
11
|
-
export declare const MESSAGE_DELETE_BULK: (self:
|
|
11
|
+
export declare const MESSAGE_DELETE_BULK: (self: UsingClient, data: GatewayMessageDeleteBulkDispatchData) => Promise<{
|
|
12
12
|
messages: import("../..").ReturnCache<Message | undefined>[];
|
|
13
13
|
ids: string[];
|
|
14
14
|
channel_id: string;
|
|
15
15
|
guild_id?: string | undefined;
|
|
16
16
|
}>;
|
|
17
|
-
export declare const MESSAGE_REACTION_ADD: (_self:
|
|
17
|
+
export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMessageReactionAddDispatchData) => {
|
|
18
18
|
emoji: {
|
|
19
19
|
roles?: string[] | undefined;
|
|
20
20
|
user?: {
|
|
@@ -62,7 +62,7 @@ export declare const MESSAGE_REACTION_ADD: (_self: BaseClient, data: GatewayMess
|
|
|
62
62
|
userId: string;
|
|
63
63
|
messageAuthorId?: string | undefined;
|
|
64
64
|
};
|
|
65
|
-
export declare const MESSAGE_REACTION_REMOVE: (_self:
|
|
65
|
+
export declare const MESSAGE_REACTION_REMOVE: (_self: UsingClient, data: GatewayMessageReactionRemoveDispatchData) => {
|
|
66
66
|
emoji: {
|
|
67
67
|
roles?: string[] | undefined;
|
|
68
68
|
user?: {
|
|
@@ -96,12 +96,12 @@ export declare const MESSAGE_REACTION_REMOVE: (_self: BaseClient, data: GatewayM
|
|
|
96
96
|
messageId: string;
|
|
97
97
|
userId: string;
|
|
98
98
|
};
|
|
99
|
-
export declare const MESSAGE_REACTION_REMOVE_ALL: (_self:
|
|
99
|
+
export declare const MESSAGE_REACTION_REMOVE_ALL: (_self: UsingClient, data: GatewayMessageReactionRemoveAllDispatchData) => {
|
|
100
100
|
channelId: string;
|
|
101
101
|
messageId: string;
|
|
102
102
|
guildId?: string | undefined;
|
|
103
103
|
};
|
|
104
|
-
export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self:
|
|
104
|
+
export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self: UsingClient, data: GatewayMessageReactionRemoveEmojiDispatchData) => {
|
|
105
105
|
emoji: {
|
|
106
106
|
roles?: string[] | undefined;
|
|
107
107
|
user?: {
|
|
@@ -134,18 +134,18 @@ export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self: BaseClient, data: Ga
|
|
|
134
134
|
messageId: string;
|
|
135
135
|
guildId?: string | undefined;
|
|
136
136
|
};
|
|
137
|
-
export declare const MESSAGE_UPDATE: (self:
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
export declare const MESSAGE_UPDATE: (self: UsingClient, data: GatewayMessageUpdateDispatchData) => Promise<[
|
|
138
|
+
message: MakeRequired<PartialClass<Message>, 'id' | 'channelId' | 'createdAt' | 'createdTimestamp' | 'rest' | 'cache' | 'api' | 'client' | 'mentions' | 'url' | 'user' | 'author'>,
|
|
139
|
+
old: undefined | Message
|
|
140
140
|
]>;
|
|
141
|
-
export declare const MESSAGE_POLL_VOTE_ADD: (_:
|
|
141
|
+
export declare const MESSAGE_POLL_VOTE_ADD: (_: UsingClient, data: GatewayMessagePollVoteDispatchData) => {
|
|
142
142
|
userId: string;
|
|
143
143
|
channelId: string;
|
|
144
144
|
messageId: string;
|
|
145
145
|
guildId?: string | undefined;
|
|
146
146
|
answerId: number;
|
|
147
147
|
};
|
|
148
|
-
export declare const MESSAGE_POLL_VOTE_REMOVE: (_:
|
|
148
|
+
export declare const MESSAGE_POLL_VOTE_REMOVE: (_: UsingClient, data: GatewayMessagePollVoteDispatchData) => {
|
|
149
149
|
userId: string;
|
|
150
150
|
channelId: string;
|
|
151
151
|
messageId: string;
|
|
@@ -35,7 +35,7 @@ const MESSAGE_REACTION_REMOVE_EMOJI = (_self, data) => {
|
|
|
35
35
|
};
|
|
36
36
|
exports.MESSAGE_REACTION_REMOVE_EMOJI = MESSAGE_REACTION_REMOVE_EMOJI;
|
|
37
37
|
const MESSAGE_UPDATE = async (self, data) => {
|
|
38
|
-
return [await self.cache.messages?.get(data.id)
|
|
38
|
+
return [new structures_1.Message(self, data), await self.cache.messages?.get(data.id)];
|
|
39
39
|
};
|
|
40
40
|
exports.MESSAGE_UPDATE = MESSAGE_UPDATE;
|
|
41
41
|
const MESSAGE_POLL_VOTE_ADD = (_, data) => {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { GatewayPresenceUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const PRESENCE_UPDATE: (
|
|
2
|
+
import type { UsingClient } from '../../commands';
|
|
3
|
+
export declare const PRESENCE_UPDATE: (self: UsingClient, data: GatewayPresenceUpdateDispatchData) => Promise<(import("../..").ReturnCache<(Omit<import("discord-api-types/v10").GatewayPresenceUpdate, "user"> & {
|
|
4
|
+
id: string;
|
|
5
|
+
} & {
|
|
6
|
+
guild_id: string;
|
|
7
|
+
}) | undefined> | {
|
|
4
8
|
user: {
|
|
5
9
|
id: string;
|
|
6
10
|
username?: string | undefined;
|
|
@@ -70,4 +74,4 @@ export declare const PRESENCE_UPDATE: (_self: BaseClient, data: GatewayPresenceU
|
|
|
70
74
|
mobile?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
|
|
71
75
|
web?: import("discord-api-types/v10").PresenceUpdateReceiveStatus | undefined;
|
|
72
76
|
} | undefined;
|
|
73
|
-
}
|
|
77
|
+
})[]>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PRESENCE_UPDATE = void 0;
|
|
4
4
|
const common_1 = require("../../common");
|
|
5
|
-
const PRESENCE_UPDATE = (
|
|
6
|
-
return (0, common_1.toCamelCase)(data);
|
|
5
|
+
const PRESENCE_UPDATE = async (self, data) => {
|
|
6
|
+
return [(0, common_1.toCamelCase)(data), await self.cache.presences?.get(data.user.id)];
|
|
7
7
|
};
|
|
8
8
|
exports.PRESENCE_UPDATE = PRESENCE_UPDATE;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
1
|
+
import type { GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData, GatewayStageInstanceUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
+
import type { UsingClient } from '../../commands';
|
|
3
|
+
import { type ObjectToLower } from '../../common';
|
|
4
|
+
import type { StageInstances } from '../../cache/resources/stage-instances';
|
|
5
|
+
export declare const STAGE_INSTANCE_CREATE: (_self: UsingClient, data: GatewayStageInstanceCreateDispatchData) => {
|
|
4
6
|
id: string;
|
|
5
7
|
guildId: string;
|
|
6
8
|
channelId: string;
|
|
@@ -9,16 +11,7 @@ export declare const STAGE_INSTANCE_CREATE: (_self: BaseClient, data: GatewaySta
|
|
|
9
11
|
discoverableDisabled: boolean;
|
|
10
12
|
guildScheduledEventId?: string | undefined;
|
|
11
13
|
};
|
|
12
|
-
export declare const STAGE_INSTANCE_DELETE: (_self:
|
|
13
|
-
id: string;
|
|
14
|
-
guildId: string;
|
|
15
|
-
channelId: string;
|
|
16
|
-
topic: string;
|
|
17
|
-
privacyLevel: import("discord-api-types/v10").StageInstancePrivacyLevel;
|
|
18
|
-
discoverableDisabled: boolean;
|
|
19
|
-
guildScheduledEventId?: string | undefined;
|
|
20
|
-
};
|
|
21
|
-
export declare const STAGE_INSTANCE_UPDATE: (_self: BaseClient, data: GatewayStageInstanceDeleteDispatchData) => {
|
|
14
|
+
export declare const STAGE_INSTANCE_DELETE: (_self: UsingClient, data: GatewayStageInstanceDeleteDispatchData) => {
|
|
22
15
|
id: string;
|
|
23
16
|
guildId: string;
|
|
24
17
|
channelId: string;
|
|
@@ -27,3 +20,4 @@ export declare const STAGE_INSTANCE_UPDATE: (_self: BaseClient, data: GatewaySta
|
|
|
27
20
|
discoverableDisabled: boolean;
|
|
28
21
|
guildScheduledEventId?: string | undefined;
|
|
29
22
|
};
|
|
23
|
+
export declare const STAGE_INSTANCE_UPDATE: (self: UsingClient, data: GatewayStageInstanceUpdateDispatchData) => Promise<[stage: ObjectToLower<GatewayStageInstanceUpdateDispatchData>, old?: ReturnType<StageInstances['get']>]>;
|
|
@@ -10,7 +10,7 @@ const STAGE_INSTANCE_DELETE = (_self, data) => {
|
|
|
10
10
|
return (0, common_1.toCamelCase)(data);
|
|
11
11
|
};
|
|
12
12
|
exports.STAGE_INSTANCE_DELETE = STAGE_INSTANCE_DELETE;
|
|
13
|
-
const STAGE_INSTANCE_UPDATE = (
|
|
14
|
-
return (0, common_1.toCamelCase)(data);
|
|
13
|
+
const STAGE_INSTANCE_UPDATE = async (self, data) => {
|
|
14
|
+
return [(0, common_1.toCamelCase)(data), await self.cache.stageInstances?.get(data.id)];
|
|
15
15
|
};
|
|
16
16
|
exports.STAGE_INSTANCE_UPDATE = STAGE_INSTANCE_UPDATE;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type { BaseClient } from '../../client/base';
|
|
3
2
|
import { ThreadChannel } from '../../structures';
|
|
4
|
-
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
3
|
+
import type { UsingClient } from '../../commands';
|
|
4
|
+
export declare const THREAD_CREATE: (self: UsingClient, data: GatewayThreadCreateDispatchData) => ThreadChannel;
|
|
5
|
+
export declare const THREAD_DELETE: (self: UsingClient, data: GatewayThreadDeleteDispatchData) => ThreadChannel;
|
|
6
|
+
export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadListSyncDispatchData) => {
|
|
7
7
|
guildId: string;
|
|
8
8
|
channelIds?: string[] | undefined;
|
|
9
9
|
threads: ({
|
|
@@ -287,7 +287,7 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
287
287
|
} | undefined;
|
|
288
288
|
}[];
|
|
289
289
|
};
|
|
290
|
-
export declare const THREAD_MEMBER_UPDATE: (_self:
|
|
290
|
+
export declare const THREAD_MEMBER_UPDATE: (_self: UsingClient, data: GatewayThreadMemberUpdateDispatchData) => {
|
|
291
291
|
id?: string | undefined;
|
|
292
292
|
userId?: string | undefined;
|
|
293
293
|
joinTimestamp: string;
|
|
@@ -307,7 +307,7 @@ export declare const THREAD_MEMBER_UPDATE: (_self: BaseClient, data: GatewayThre
|
|
|
307
307
|
} | undefined;
|
|
308
308
|
guildId: string;
|
|
309
309
|
};
|
|
310
|
-
export declare const THREAD_MEMBERS_UPDATE: (_self:
|
|
310
|
+
export declare const THREAD_MEMBERS_UPDATE: (_self: UsingClient, data: GatewayThreadMembersUpdateDispatchData) => {
|
|
311
311
|
id: string;
|
|
312
312
|
guildId: string;
|
|
313
313
|
memberCount: number;
|
|
@@ -332,4 +332,4 @@ export declare const THREAD_MEMBERS_UPDATE: (_self: BaseClient, data: GatewayThr
|
|
|
332
332
|
}[] | undefined;
|
|
333
333
|
removedMemberIds?: string[] | undefined;
|
|
334
334
|
};
|
|
335
|
-
export declare const THREAD_UPDATE: (self:
|
|
335
|
+
export declare const THREAD_UPDATE: (self: UsingClient, data: GatewayThreadUpdateDispatchData) => Promise<[thread: ThreadChannel, old?: ThreadChannel]>;
|
|
@@ -23,7 +23,7 @@ const THREAD_MEMBERS_UPDATE = (_self, data) => {
|
|
|
23
23
|
return (0, common_1.toCamelCase)(data);
|
|
24
24
|
};
|
|
25
25
|
exports.THREAD_MEMBERS_UPDATE = THREAD_MEMBERS_UPDATE;
|
|
26
|
-
const THREAD_UPDATE = (self, data) => {
|
|
27
|
-
return new structures_1.ThreadChannel(self, data);
|
|
26
|
+
const THREAD_UPDATE = async (self, data) => {
|
|
27
|
+
return [new structures_1.ThreadChannel(self, data), await self.cache.threads?.get(data.id)];
|
|
28
28
|
};
|
|
29
29
|
exports.THREAD_UPDATE = THREAD_UPDATE;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GatewayTypingStartDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type { BaseClient } from '../../client/base';
|
|
3
2
|
import { GuildMember } from '../../structures';
|
|
4
|
-
|
|
3
|
+
import type { UsingClient } from '../../commands';
|
|
4
|
+
export declare const TYPING_START: (self: UsingClient, data: GatewayTypingStartDispatchData) => {
|
|
5
5
|
channelId: string;
|
|
6
6
|
guildId?: string | undefined;
|
|
7
7
|
userId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GatewayUserUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type { BaseClient } from '../../client/base';
|
|
3
2
|
import { User } from '../../structures';
|
|
4
|
-
|
|
3
|
+
import type { UsingClient } from '../../commands';
|
|
4
|
+
export declare const USER_UPDATE: (self: UsingClient, data: GatewayUserUpdateDispatchData) => Promise<[user: User, old?: User]>;
|
package/lib/events/hooks/user.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.USER_UPDATE = void 0;
|
|
4
4
|
const structures_1 = require("../../structures");
|
|
5
|
-
const USER_UPDATE = (self, data) => {
|
|
6
|
-
return new structures_1.User(self, data);
|
|
5
|
+
const USER_UPDATE = async (self, data) => {
|
|
6
|
+
return [new structures_1.User(self, data), await self.cache.users?.get(data.id)];
|
|
7
7
|
};
|
|
8
8
|
exports.USER_UPDATE = USER_UPDATE;
|
|
@@ -1,49 +1,9 @@
|
|
|
1
|
-
import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from '
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
export declare const VOICE_SERVER_UPDATE: (_self:
|
|
1
|
+
import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from '../../types';
|
|
2
|
+
import { VoiceState } from '../../structures';
|
|
3
|
+
import type { UsingClient } from '../../commands';
|
|
4
|
+
export declare const VOICE_SERVER_UPDATE: (_self: UsingClient, data: GatewayVoiceServerUpdateDispatchData) => {
|
|
5
5
|
token: string;
|
|
6
6
|
guildId: string;
|
|
7
7
|
endpoint: string | null;
|
|
8
8
|
};
|
|
9
|
-
export declare const VOICE_STATE_UPDATE: (self:
|
|
10
|
-
guildId?: string | undefined;
|
|
11
|
-
channelId: string | null;
|
|
12
|
-
userId: string;
|
|
13
|
-
member?: {
|
|
14
|
-
user?: import("discord-api-types/v10").APIUser | undefined;
|
|
15
|
-
nick?: string | null | undefined;
|
|
16
|
-
avatar?: string | null | undefined;
|
|
17
|
-
roles: string[];
|
|
18
|
-
joinedAt: string;
|
|
19
|
-
premiumSince?: string | null | undefined;
|
|
20
|
-
deaf: boolean;
|
|
21
|
-
mute: boolean;
|
|
22
|
-
flags: import("discord-api-types/v10").GuildMemberFlags;
|
|
23
|
-
pending?: boolean | undefined;
|
|
24
|
-
communicationDisabledUntil?: string | null | undefined;
|
|
25
|
-
} | undefined;
|
|
26
|
-
sessionId: string;
|
|
27
|
-
deaf: boolean;
|
|
28
|
-
mute: boolean;
|
|
29
|
-
selfDeaf: boolean;
|
|
30
|
-
selfMute: boolean;
|
|
31
|
-
selfStream?: boolean | undefined;
|
|
32
|
-
selfVideo: boolean;
|
|
33
|
-
suppress: boolean;
|
|
34
|
-
requestToSpeakTimestamp: string | null;
|
|
35
|
-
} | {
|
|
36
|
-
member: GuildMember;
|
|
37
|
-
guildId?: string | undefined;
|
|
38
|
-
channelId: string | null;
|
|
39
|
-
userId: string;
|
|
40
|
-
sessionId: string;
|
|
41
|
-
deaf: boolean;
|
|
42
|
-
mute: boolean;
|
|
43
|
-
selfDeaf: boolean;
|
|
44
|
-
selfMute: boolean;
|
|
45
|
-
selfStream?: boolean | undefined;
|
|
46
|
-
selfVideo: boolean;
|
|
47
|
-
suppress: boolean;
|
|
48
|
-
requestToSpeakTimestamp: string | null;
|
|
49
|
-
};
|
|
9
|
+
export declare const VOICE_STATE_UPDATE: (self: UsingClient, data: GatewayVoiceStateUpdateDispatchData) => Promise<[VoiceState] | [state: VoiceState, old?: VoiceState]>;
|
|
@@ -7,12 +7,9 @@ const VOICE_SERVER_UPDATE = (_self, data) => {
|
|
|
7
7
|
return (0, common_1.toCamelCase)(data);
|
|
8
8
|
};
|
|
9
9
|
exports.VOICE_SERVER_UPDATE = VOICE_SERVER_UPDATE;
|
|
10
|
-
const VOICE_STATE_UPDATE = (self, data) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
member: new structures_1.GuildMember(self, data.member, data.member?.user, data.guild_id),
|
|
15
|
-
}
|
|
16
|
-
: (0, common_1.toCamelCase)(data);
|
|
10
|
+
const VOICE_STATE_UPDATE = async (self, data) => {
|
|
11
|
+
if (!data.guild_id)
|
|
12
|
+
return [new structures_1.VoiceState(self, data)];
|
|
13
|
+
return [new structures_1.VoiceState(self, data), await self.cache.voiceStates?.get(data.user_id, data.guild_id)];
|
|
17
14
|
};
|
|
18
15
|
exports.VOICE_STATE_UPDATE = VOICE_STATE_UPDATE;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GatewayWebhooksUpdateDispatchData } from 'discord-api-types/v10';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const WEBHOOKS_UPDATE: (_self:
|
|
2
|
+
import type { UsingClient } from '../../commands';
|
|
3
|
+
export declare const WEBHOOKS_UPDATE: (_self: UsingClient, data: GatewayWebhooksUpdateDispatchData) => {
|
|
4
4
|
guildId: string;
|
|
5
5
|
channelId: string;
|
|
6
6
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BaseClientOptions, type InternalRuntimeConfig, type InternalRuntimeConfigHTTP, type RuntimeConfig, type RuntimeConfigHTTP } from './client/base';
|
|
2
2
|
import type { ClientNameEvents, EventContext } from './events';
|
|
3
3
|
export { Logger, PermissionStrings, Watcher } from './common';
|
|
4
4
|
export { Collection, LimitedCollection } from './collection';
|
package/lib/index.js
CHANGED
|
@@ -16,9 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.extendContext = exports.config = exports.createEvent = exports.throwError = exports.WorkerManager = exports.ShardManager = exports.LimitedCollection = exports.Collection = exports.Watcher = exports.Logger = void 0;
|
|
18
18
|
const v10_1 = require("discord-api-types/gateway/v10");
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const base_1 = require("./client/base");
|
|
20
|
+
const common_1 = require("./common");
|
|
21
|
+
var common_2 = require("./common");
|
|
22
|
+
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return common_2.Logger; } });
|
|
23
|
+
Object.defineProperty(exports, "Watcher", { enumerable: true, get: function () { return common_2.Watcher; } });
|
|
22
24
|
//
|
|
23
25
|
var collection_1 = require("./collection");
|
|
24
26
|
Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return collection_1.Collection; } });
|
|
@@ -87,10 +89,13 @@ exports.config = {
|
|
|
87
89
|
* @returns The internal runtime configuration for HTTP.
|
|
88
90
|
*/
|
|
89
91
|
http(data) {
|
|
90
|
-
|
|
92
|
+
const obj = {
|
|
91
93
|
port: 8080,
|
|
92
94
|
...data,
|
|
93
95
|
};
|
|
96
|
+
if ((0, common_1.isCloudfareWorker)())
|
|
97
|
+
base_1.BaseClient._seyferHttpConfig = obj;
|
|
98
|
+
return obj;
|
|
94
99
|
},
|
|
95
100
|
};
|
|
96
101
|
/**
|
package/lib/langs/handler.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ export declare class LangsHandler extends BaseHandler {
|
|
|
10
10
|
get(userLocale: string): import("./router").__InternalParseLocale<import("..").DefaultLocale> & {
|
|
11
11
|
get(locale?: string | undefined): import("..").DefaultLocale;
|
|
12
12
|
};
|
|
13
|
-
load(dir: string
|
|
13
|
+
load(dir: string, instances?: {
|
|
14
|
+
name: string;
|
|
15
|
+
file: Record<string, any>;
|
|
16
|
+
}[]): Promise<void>;
|
|
14
17
|
setHandlers({ callback }: {
|
|
15
18
|
callback: LangsHandler['callback'];
|
|
16
19
|
}): void;
|