@helyx/bot 0.4.9 → 0.4.13
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/CHANGELOG.md +66 -0
- package/dist/cloud-control-dispatcher.js +2 -1
- package/dist/control-server.d.ts +43 -3
- package/dist/control-server.js +228 -18
- package/dist/events.d.ts +92 -1
- package/dist/events.js +1483 -5
- package/dist/guilds.d.ts +20 -1
- package/dist/guilds.js +149 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +89 -23
- package/dist/interactions.js +101 -22
- package/dist/management-module.d.ts +1 -1
- package/dist/management-module.js +42 -10
- package/dist/message-classification.d.ts +5 -0
- package/dist/message-classification.js +75 -0
- package/dist/modules.js +9 -0
- package/dist/numeric-write-behind-proxy.d.ts +62 -0
- package/dist/numeric-write-behind-proxy.js +313 -0
- package/dist/numeric-write-behind-redis.d.ts +123 -0
- package/dist/numeric-write-behind-redis.js +1281 -0
- package/dist/numeric-write-behind.d.ts +5 -0
- package/dist/numeric-write-behind.js +37 -0
- package/dist/shard-contracts.d.ts +810 -0
- package/dist/shard-contracts.js +292 -3
- package/dist/shard-router.d.ts +3 -0
- package/dist/shard-router.js +42 -0
- package/dist/shard-supervisor.d.ts +4 -1
- package/dist/shard-supervisor.js +262 -7
- package/dist/shard-worker.d.ts +7 -0
- package/dist/shard-worker.js +64 -10
- package/dist/verification-service.d.ts +50 -0
- package/dist/verification-service.js +166 -0
- package/package.json +10 -9
package/dist/events.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DiscordChannelInspection, DiscordEmojiInspection, DiscordResourceInspectionService, DiscordRoleInspection, MemberRoleService, ModuleDefinition, ServiceAccess } from "@helyx/sdk";
|
|
1
|
+
import type { DiscordChannelAudienceInspection, DiscordChannelInspection, DiscordEmojiInspection, DiscordMessageInspection, DiscordGuildCapabilityInspection, DiscordGuildChannelAudienceInspection, DiscordResourceInspectionService, DiscordRoleInspection, DiscordMessageService, MemberEnforcementService, MemberRoleService, ModuleDefinition, ServiceAccess, VerificationMemberService, VerificationSetupGuildInspection, VerificationSetupPreview, VerificationSetupRequest, VerificationSetupService } from "@helyx/sdk";
|
|
2
|
+
import type { VerificationSetupRepository } from "@helyx/database";
|
|
2
3
|
import { type Client, type MessageReaction, type PartialMessageReaction } from "discord.js";
|
|
3
4
|
import { type InteractionLogger } from "./interactions.js";
|
|
4
5
|
export declare function installModuleEvents(client: Client, modules: readonly ModuleDefinition[], logger: InteractionLogger, services: ServiceAccess): ModuleEventHandle;
|
|
@@ -15,9 +16,57 @@ interface ApprovedRoleMutation {
|
|
|
15
16
|
moduleId: string;
|
|
16
17
|
reason: string;
|
|
17
18
|
}
|
|
19
|
+
export declare class DiscordMessageDeliveryService implements DiscordMessageService {
|
|
20
|
+
private readonly client;
|
|
21
|
+
constructor(client: Client);
|
|
22
|
+
send(input: Parameters<DiscordMessageService["send"]>[0]): ReturnType<DiscordMessageService["send"]>;
|
|
23
|
+
sendDirect(input: Parameters<DiscordMessageService["sendDirect"]>[0]): ReturnType<DiscordMessageService["sendDirect"]>;
|
|
24
|
+
}
|
|
25
|
+
export declare class DiscordMemberEnforcementService implements MemberEnforcementService {
|
|
26
|
+
#private;
|
|
27
|
+
private readonly client;
|
|
28
|
+
constructor(client: Client);
|
|
29
|
+
kick(input: Parameters<MemberEnforcementService["kick"]>[0]): ReturnType<MemberEnforcementService["kick"]>;
|
|
30
|
+
ban(input: Parameters<MemberEnforcementService["ban"]>[0]): ReturnType<MemberEnforcementService["ban"]>;
|
|
31
|
+
}
|
|
32
|
+
export declare class DiscordVerificationMemberService implements VerificationMemberService {
|
|
33
|
+
private readonly client;
|
|
34
|
+
constructor(client: Client);
|
|
35
|
+
captureSnapshot(input: Parameters<VerificationMemberService["captureSnapshot"]>[0]): ReturnType<VerificationMemberService["captureSnapshot"]>;
|
|
36
|
+
isCurrentlyBanned(input: Parameters<VerificationMemberService["isCurrentlyBanned"]>[0]): ReturnType<VerificationMemberService["isCurrentlyBanned"]>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The single Discord mutation boundary for Verification setup. It deliberately
|
|
40
|
+
* exposes a preview/apply protocol rather than raw role or overwrite writes.
|
|
41
|
+
*/
|
|
42
|
+
export declare class DiscordVerificationSetupService implements VerificationSetupService {
|
|
43
|
+
#private;
|
|
44
|
+
private readonly client;
|
|
45
|
+
private readonly persistence;
|
|
46
|
+
constructor(client: Client, persistence: VerificationSetupPersistence);
|
|
47
|
+
inspect(input: {
|
|
48
|
+
guildId: string;
|
|
49
|
+
}): Promise<VerificationSetupGuildInspection>;
|
|
50
|
+
preview(input: VerificationSetupRequest): Promise<VerificationSetupPreview>;
|
|
51
|
+
apply(input: VerificationSetupRequest & {
|
|
52
|
+
previewFingerprint: string;
|
|
53
|
+
confirmed: true;
|
|
54
|
+
}): Promise<Awaited<ReturnType<VerificationSetupService["apply"]>>>;
|
|
55
|
+
hideVerificationChannelForVerifiedMember(input: Parameters<VerificationSetupService["hideVerificationChannelForVerifiedMember"]>[0]): ReturnType<VerificationSetupService["hideVerificationChannelForVerifiedMember"]>;
|
|
56
|
+
}
|
|
57
|
+
export type VerificationSetupPersistence = Pick<VerificationSetupRepository, "begin" | "checkpointResources" | "checkpointOverwrites" | "complete" | "abort">;
|
|
18
58
|
export declare class DiscordMemberRoleService implements MemberRoleService {
|
|
19
59
|
private readonly client;
|
|
20
60
|
constructor(client: Client);
|
|
61
|
+
createApprovedRole(input: {
|
|
62
|
+
guildId: string;
|
|
63
|
+
name: string;
|
|
64
|
+
moduleId: string;
|
|
65
|
+
reason: string;
|
|
66
|
+
}): Promise<{
|
|
67
|
+
roleId: string;
|
|
68
|
+
name: string;
|
|
69
|
+
}>;
|
|
21
70
|
getCurrentRoleIds(input: {
|
|
22
71
|
guildId: string;
|
|
23
72
|
memberUserId: string;
|
|
@@ -45,6 +94,15 @@ export declare class DiscordResourceInspection implements DiscordResourceInspect
|
|
|
45
94
|
#private;
|
|
46
95
|
private readonly client;
|
|
47
96
|
constructor(client: Client);
|
|
97
|
+
inspectGuildCapabilities(input: {
|
|
98
|
+
guildId: string;
|
|
99
|
+
}): Promise<DiscordGuildCapabilityInspection>;
|
|
100
|
+
inspectRuntimeCapabilities(): Promise<{
|
|
101
|
+
guildMembers: boolean;
|
|
102
|
+
guildMessages: boolean;
|
|
103
|
+
guildMessageReactions: boolean;
|
|
104
|
+
messageContent: boolean;
|
|
105
|
+
}>;
|
|
48
106
|
resolveMemberSnapshots(input: {
|
|
49
107
|
guildId: string;
|
|
50
108
|
userIds: readonly string[];
|
|
@@ -61,6 +119,17 @@ export declare class DiscordResourceInspection implements DiscordResourceInspect
|
|
|
61
119
|
}): Promise<readonly {
|
|
62
120
|
userId: string;
|
|
63
121
|
displayName: string | null;
|
|
122
|
+
avatarUrl?: string;
|
|
123
|
+
}[]>;
|
|
124
|
+
searchMembers(input: {
|
|
125
|
+
guildId: string;
|
|
126
|
+
query: string;
|
|
127
|
+
limit: number;
|
|
128
|
+
}): Promise<readonly {
|
|
129
|
+
userId: string;
|
|
130
|
+
displayName: string;
|
|
131
|
+
avatarUrl?: string;
|
|
132
|
+
isBot: boolean;
|
|
64
133
|
}[]>;
|
|
65
134
|
inspectRole(input: {
|
|
66
135
|
guildId: string;
|
|
@@ -75,6 +144,28 @@ export declare class DiscordResourceInspection implements DiscordResourceInspect
|
|
|
75
144
|
guildId: string;
|
|
76
145
|
channelId: string;
|
|
77
146
|
}): Promise<DiscordChannelInspection>;
|
|
147
|
+
inspectMessage(input: {
|
|
148
|
+
guildId: string;
|
|
149
|
+
channelId: string;
|
|
150
|
+
messageId: string;
|
|
151
|
+
}): Promise<DiscordMessageInspection>;
|
|
152
|
+
inspectChannelAudience(input: {
|
|
153
|
+
guildId: string;
|
|
154
|
+
channelId: string;
|
|
155
|
+
roleIds: readonly string[];
|
|
156
|
+
}): Promise<DiscordChannelAudienceInspection>;
|
|
157
|
+
inspectGuildChannelAudience(input: {
|
|
158
|
+
guildId: string;
|
|
159
|
+
roleIds: readonly string[];
|
|
160
|
+
}): Promise<DiscordGuildChannelAudienceInspection>;
|
|
161
|
+
seedMessageReaction(input: {
|
|
162
|
+
guildId: string;
|
|
163
|
+
channelId: string;
|
|
164
|
+
messageId: string;
|
|
165
|
+
emojiIdentifier: string;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
added: boolean;
|
|
168
|
+
}>;
|
|
78
169
|
}
|
|
79
170
|
export {};
|
|
80
171
|
//# sourceMappingURL=events.d.ts.map
|