@kotori-bot/core 1.5.1 → 1.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/README.md +10 -4
- package/lib/app/config.d.ts +32 -0
- package/lib/app/config.js +65 -0
- package/lib/app/core.d.ts +138 -0
- package/lib/{components → app}/core.js +24 -10
- package/lib/app/index.d.ts +1 -0
- package/lib/{service → app}/index.js +7 -13
- package/lib/{components → app}/message.d.ts +11 -10
- package/lib/app/message.js +253 -0
- package/lib/components/adapter.d.ts +122 -0
- package/lib/components/adapter.js +75 -0
- package/lib/components/api.d.ts +417 -0
- package/lib/components/api.js +546 -0
- package/lib/components/cache.d.ts +37 -0
- package/lib/{service → components}/cache.js +27 -6
- package/lib/components/command.d.ts +153 -0
- package/lib/{utils → components}/command.js +154 -48
- package/lib/components/elements.d.ts +144 -0
- package/lib/components/elements.js +179 -0
- package/lib/components/filter.d.ts +22 -0
- package/lib/components/filter.js +130 -0
- package/lib/components/index.d.ts +8 -2
- package/lib/components/index.js +19 -7
- package/lib/components/messages.d.ts +186 -0
- package/lib/components/messages.js +218 -0
- package/lib/components/session.d.ts +177 -0
- package/lib/components/session.js +275 -0
- package/lib/decorators/index.d.ts +7 -0
- package/lib/{components/config.js → decorators/index.js} +23 -39
- package/lib/decorators/plugin.d.ts +7 -0
- package/lib/{utils/commandError.js → decorators/plugin.js} +16 -16
- package/lib/decorators/utils.d.ts +59 -0
- package/lib/decorators/utils.js +189 -0
- package/lib/global/constants.d.ts +1 -8
- package/lib/global/constants.js +6 -25
- package/lib/global/index.js +3 -3
- package/lib/global/symbols.d.ts +13 -8
- package/lib/global/symbols.js +18 -12
- package/lib/index.d.ts +4 -4
- package/lib/index.js +10 -11
- package/lib/types/adapter.d.ts +1 -1
- package/lib/types/adapter.js +3 -3
- package/lib/types/api.d.ts +72 -0
- package/lib/{utils/jsxFactory.js → types/api.js} +5 -5
- package/lib/types/command.d.ts +78 -0
- package/lib/types/command.js +50 -0
- package/lib/types/config.d.ts +4 -6
- package/lib/types/config.js +3 -3
- package/lib/types/filter.d.ts +51 -0
- package/lib/types/filter.js +87 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/index.js +12 -4
- package/lib/types/message.d.ts +128 -193
- package/lib/types/message.js +12 -31
- package/lib/types/session.d.ts +349 -0
- package/lib/types/session.js +27 -0
- package/lib/utils/container.d.ts +6 -6
- package/lib/utils/container.js +12 -16
- package/lib/utils/error.d.ts +46 -22
- package/lib/utils/error.js +38 -21
- package/lib/utils/factory.d.ts +10 -16
- package/lib/utils/factory.js +41 -101
- package/lib/utils/internal.d.ts +46 -0
- package/lib/utils/internal.js +102 -0
- package/package.json +10 -7
- package/lib/components/config.d.ts +0 -16
- package/lib/components/core.d.ts +0 -34
- package/lib/components/message.js +0 -195
- package/lib/service/adapter.d.ts +0 -41
- package/lib/service/adapter.js +0 -131
- package/lib/service/api.d.ts +0 -32
- package/lib/service/api.js +0 -80
- package/lib/service/cache.d.ts +0 -13
- package/lib/service/elements.d.ts +0 -12
- package/lib/service/elements.js +0 -73
- package/lib/service/index.d.ts +0 -4
- package/lib/utils/command.d.ts +0 -51
- package/lib/utils/commandError.d.ts +0 -7
- package/lib/utils/jsxFactory.d.ts +0 -6
package/lib/types/message.d.ts
CHANGED
|
@@ -1,241 +1,176 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
4
|
-
import type
|
|
5
|
-
import type { Api, Elements } from '../service';
|
|
6
|
-
import { Command } from '../utils/command';
|
|
1
|
+
import type { Context } from 'fluoro';
|
|
2
|
+
import type { CommandError } from '../utils/error';
|
|
3
|
+
import type { Api, Command, MessageList, MessageSingle, SessionMsg } from '../components';
|
|
4
|
+
import type { CommandAction, CommandArgType } from './command';
|
|
7
5
|
declare module 'fluoro' {
|
|
8
6
|
interface EventsMapping {
|
|
9
|
-
midwares(data: EventDataMidwares): void;
|
|
10
|
-
before_parse(data: EventDataBeforeParse): void;
|
|
11
|
-
parse(data: EventDataParse): void;
|
|
12
7
|
before_command(data: EventDataBeforeCommand): void;
|
|
8
|
+
/**
|
|
9
|
+
* Event after command running.
|
|
10
|
+
*
|
|
11
|
+
* @param data - Event data
|
|
12
|
+
*/
|
|
13
13
|
command(data: EventDataCommand): void;
|
|
14
|
+
/**
|
|
15
|
+
* Event before regexp.
|
|
16
|
+
*
|
|
17
|
+
* @param data - Event data
|
|
18
|
+
*/
|
|
19
|
+
before_regexp(data: EventDataBeforeRegexp): void;
|
|
20
|
+
/**
|
|
21
|
+
* Event after regexp.
|
|
22
|
+
*
|
|
23
|
+
* @param data - Event data
|
|
24
|
+
*/
|
|
14
25
|
regexp(data: EventDataRegexp): void;
|
|
26
|
+
/**
|
|
27
|
+
* Event before message send.
|
|
28
|
+
*
|
|
29
|
+
* @param data - Event data
|
|
30
|
+
*/
|
|
15
31
|
before_send(data: EventDataBeforeSend): void;
|
|
32
|
+
/**
|
|
33
|
+
* Event after message send.
|
|
34
|
+
*
|
|
35
|
+
* @param data - Event data
|
|
36
|
+
*/
|
|
16
37
|
send(data: EventDataSend): void;
|
|
17
|
-
on_message(session: EventDataPrivateMsg | EventDataGroupMsg): void;
|
|
18
|
-
on_recall(session: EventDataPrivateRecall | EventDataGroupRecall): void;
|
|
19
|
-
on_request(session: EventDataPrivateRequest | EventDataGroupRequest): void;
|
|
20
|
-
on_private_add(session: EventDataPrivateAdd): void;
|
|
21
|
-
on_group_increase(session: EventDataGroupIncrease): void;
|
|
22
|
-
on_group_decrease(session: EventDataGroupDecrease): void;
|
|
23
|
-
on_group_admin(session: EventDataGroupAdmin): void;
|
|
24
|
-
on_group_ban(session: EventDataGroupBan): void;
|
|
25
38
|
}
|
|
26
39
|
}
|
|
27
|
-
|
|
40
|
+
/** User access */
|
|
41
|
+
export declare enum UserAccess {
|
|
42
|
+
/** Normal member */
|
|
28
43
|
MEMBER = 0,
|
|
44
|
+
/** Manager (group owner and group mangers) */
|
|
29
45
|
MANGER = 1,
|
|
46
|
+
/** Admin (master of bot instance) */
|
|
30
47
|
ADMIN = 2
|
|
31
48
|
}
|
|
32
|
-
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export interface
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
access?: CommandAccess;
|
|
45
|
-
help?: string;
|
|
46
|
-
action?: CommandAction;
|
|
47
|
-
}
|
|
48
|
-
interface CommandParseResult {
|
|
49
|
-
option_error: {
|
|
50
|
-
expected: CommandArgTypeSign;
|
|
51
|
-
reality: CommandArgTypeSign;
|
|
52
|
-
target: string;
|
|
49
|
+
/** Message scope (session type) */
|
|
50
|
+
export declare enum MessageScope {
|
|
51
|
+
/** Private message */
|
|
52
|
+
PRIVATE = 0,
|
|
53
|
+
/** Group message */
|
|
54
|
+
GROUP = 1,
|
|
55
|
+
/** Channel message */
|
|
56
|
+
CHANNEL = 2
|
|
57
|
+
}
|
|
58
|
+
export interface MessageMapping {
|
|
59
|
+
text: {
|
|
60
|
+
text: string;
|
|
53
61
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
reality: CommandArgTypeSign;
|
|
57
|
-
index: number;
|
|
62
|
+
mention: {
|
|
63
|
+
userId: string;
|
|
58
64
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
mentionAll: {};
|
|
66
|
+
image: {
|
|
67
|
+
content: string;
|
|
62
68
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
index: number;
|
|
66
|
-
char: string;
|
|
69
|
+
voice: {
|
|
70
|
+
content: string;
|
|
67
71
|
};
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
audio: {
|
|
73
|
+
content: string;
|
|
70
74
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
error: {
|
|
74
|
-
error: unknown;
|
|
75
|
+
video: {
|
|
76
|
+
content: string;
|
|
75
77
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
file: {
|
|
79
|
+
content: string;
|
|
78
80
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
location: {
|
|
82
|
+
latitude: number;
|
|
83
|
+
longitude: number;
|
|
84
|
+
title: string;
|
|
85
|
+
content: string;
|
|
81
86
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
no_access_admin: null;
|
|
85
|
-
disable: null;
|
|
86
|
-
exists: {
|
|
87
|
-
target: string;
|
|
87
|
+
reply: {
|
|
88
|
+
messageId: string;
|
|
88
89
|
};
|
|
89
|
-
no_exists: CommandResult['exists'];
|
|
90
90
|
}
|
|
91
|
-
type
|
|
92
|
-
export type
|
|
93
|
-
[K in keyof CommandResult]: {
|
|
94
|
-
type: K;
|
|
95
|
-
} & (K extends CommandResultNoArgs ? object : CommandResult[K]);
|
|
96
|
-
};
|
|
97
|
-
export type SessionData = EventsList['on_message'];
|
|
98
|
-
export declare enum MessageScope {
|
|
99
|
-
PRIVATE = 0,
|
|
100
|
-
GROUP = 1
|
|
101
|
-
}
|
|
102
|
-
export type MessageRaw = string;
|
|
103
|
-
export type MessageQuickReal = [string, (CommandArgType | undefined)[] | Record<string, CommandArgType | undefined>] | MessageRaw | CommandError | void;
|
|
91
|
+
export type Message<T extends keyof MessageMapping = keyof MessageMapping> = MessageSingle<T | 'text'> | MessageList<T | 'text'> | string;
|
|
92
|
+
export type MessageQuickReal = [string, (Message | CommandArgType | undefined)[] | Record<string, CommandArgType | undefined>] | Message | void;
|
|
104
93
|
export type MessageQuick = MessageQuickReal | Promise<MessageQuickReal>;
|
|
105
|
-
export type MidwareCallback = (next: () => void
|
|
106
|
-
export type RegexpCallback = (match: RegExpMatchArray, session:
|
|
94
|
+
export type MidwareCallback = (next: () => void | Promise<void>, session: SessionMsg) => MessageQuick;
|
|
95
|
+
export type RegexpCallback = (match: RegExpMatchArray, session: SessionMsg) => MessageQuick;
|
|
107
96
|
export type TaskCallback = (ctx: Context) => void;
|
|
108
|
-
export type
|
|
109
|
-
|
|
97
|
+
export type TaskOptions = string | {
|
|
98
|
+
cron: string;
|
|
99
|
+
start?: boolean;
|
|
100
|
+
timeZone?: string;
|
|
110
101
|
};
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
interface EventDataBeforeParse {
|
|
118
|
-
session: SessionData;
|
|
119
|
-
raw: string;
|
|
120
|
-
}
|
|
121
|
-
interface EventDataParse {
|
|
122
|
-
session: SessionData;
|
|
102
|
+
/** Event data before command running */
|
|
103
|
+
interface EventDataBeforeCommand {
|
|
104
|
+
/** Session instance */
|
|
105
|
+
session: SessionMsg;
|
|
106
|
+
/** Target command instance */
|
|
123
107
|
command: Command;
|
|
108
|
+
/** Raw text message */
|
|
124
109
|
raw: string;
|
|
110
|
+
/** Parsed result, command error or command data (args and options) */
|
|
125
111
|
result: CommandError | Parameters<CommandAction>[0];
|
|
112
|
+
/** Cancel the command running */
|
|
126
113
|
cancel(): void;
|
|
127
114
|
}
|
|
128
|
-
|
|
129
|
-
session: SessionData;
|
|
130
|
-
raw: string;
|
|
131
|
-
cancel(): void;
|
|
132
|
-
}
|
|
115
|
+
/** Event data after command running */
|
|
133
116
|
interface EventDataCommand {
|
|
134
|
-
|
|
117
|
+
/** Session instance */
|
|
118
|
+
session: SessionMsg;
|
|
119
|
+
/** Raw text message */
|
|
135
120
|
raw: string;
|
|
121
|
+
/** Target command instance */
|
|
136
122
|
command: Command;
|
|
137
|
-
|
|
123
|
+
/** Command running result, running error or back message */
|
|
124
|
+
result: EventDataBeforeCommand['result'] | MessageQuick;
|
|
125
|
+
}
|
|
126
|
+
/** Event data before regexp running */
|
|
127
|
+
interface EventDataBeforeRegexp {
|
|
128
|
+
/** Session instance */
|
|
129
|
+
session: SessionMsg;
|
|
130
|
+
/** Raw text message */
|
|
131
|
+
raw: string;
|
|
132
|
+
/** Target regexp instance */
|
|
133
|
+
regexp: RegExp;
|
|
134
|
+
/** Cancel the regexp running */
|
|
135
|
+
cancel(): void;
|
|
138
136
|
}
|
|
137
|
+
/** Event data after regexp running */
|
|
139
138
|
interface EventDataRegexp {
|
|
140
|
-
|
|
139
|
+
/** Session instance */
|
|
140
|
+
session: SessionMsg;
|
|
141
|
+
/** Raw text message */
|
|
141
142
|
raw: string;
|
|
143
|
+
/** Target regexp instance */
|
|
142
144
|
regexp: RegExp;
|
|
145
|
+
/** Match result */
|
|
143
146
|
result: RegExpMatchArray;
|
|
144
147
|
}
|
|
148
|
+
/** Event data before message sending */
|
|
145
149
|
interface EventDataBeforeSend {
|
|
150
|
+
/** Api instance */
|
|
146
151
|
api: Api;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
/** Message to send */
|
|
153
|
+
message: Message;
|
|
154
|
+
/** Target user or group or channel */
|
|
155
|
+
target: {
|
|
156
|
+
type: MessageScope.PRIVATE;
|
|
157
|
+
userId: string;
|
|
158
|
+
} | {
|
|
159
|
+
type: MessageScope.GROUP;
|
|
160
|
+
groupId: string;
|
|
161
|
+
} | {
|
|
162
|
+
type: MessageScope.CHANNEL;
|
|
163
|
+
channelId: string;
|
|
164
|
+
guildId: string;
|
|
165
|
+
};
|
|
166
|
+
/** Cancel the message sending */
|
|
150
167
|
cancel(): void;
|
|
151
168
|
}
|
|
169
|
+
/** Event data after message sending */
|
|
152
170
|
interface EventDataSend {
|
|
171
|
+
/** Api instance */
|
|
153
172
|
api: Api;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
interface SessionDataSender {
|
|
157
|
-
nickname: string;
|
|
158
|
-
sex: 'male' | 'female' | 'unknown';
|
|
159
|
-
age: number;
|
|
160
|
-
}
|
|
161
|
-
export interface EventDataApiBase {
|
|
162
|
-
type?: MessageScope;
|
|
163
|
-
api: Api;
|
|
164
|
-
el: Elements;
|
|
165
|
-
userId: EventDataTargetId;
|
|
166
|
-
groupId?: EventDataTargetId;
|
|
167
|
-
operatorId?: EventDataTargetId;
|
|
168
|
-
i18n: I18n;
|
|
169
|
-
send(message: MessageRaw): void;
|
|
170
|
-
format(template: string, data: Record<string, CommandArgType | undefined> | (CommandArgType | undefined)[]): string;
|
|
171
|
-
quick(message: MessageQuick): void;
|
|
172
|
-
prompt(message?: MessageRaw): Promise<MessageRaw>;
|
|
173
|
-
confirm(options?: {
|
|
174
|
-
message: MessageRaw;
|
|
175
|
-
sure: MessageRaw;
|
|
176
|
-
}): Promise<boolean>;
|
|
177
|
-
error<T extends Exclude<keyof CommandResult, CommandResultNoArgs>>(type: T, data: CommandResult[T] extends object ? CommandResult[T] : never): CommandError;
|
|
178
|
-
error<T extends CommandResultNoArgs>(type: T): CommandError;
|
|
179
|
-
extra?: unknown;
|
|
180
|
-
}
|
|
181
|
-
interface EventDataPrivateMsg extends EventDataApiBase {
|
|
182
|
-
type: MessageScope.PRIVATE;
|
|
183
|
-
messageId: EventDataTargetId;
|
|
184
|
-
message: MessageRaw;
|
|
185
|
-
sender: SessionDataSender;
|
|
186
|
-
}
|
|
187
|
-
interface EventDataGroupMsg extends EventDataApiBase {
|
|
188
|
-
type: MessageScope.GROUP;
|
|
189
|
-
messageId: EventDataTargetId;
|
|
190
|
-
message: MessageRaw;
|
|
191
|
-
sender: SessionDataSender & {
|
|
192
|
-
level: string;
|
|
193
|
-
role: 'owner' | 'admin' | 'member';
|
|
194
|
-
title: string;
|
|
195
|
-
};
|
|
196
|
-
groupId: EventDataTargetId;
|
|
197
|
-
}
|
|
198
|
-
interface EventDataPrivateRecall extends EventDataApiBase {
|
|
199
|
-
type: MessageScope.PRIVATE;
|
|
200
|
-
messageId: EventDataTargetId;
|
|
201
|
-
}
|
|
202
|
-
interface EventDataGroupRecall extends EventDataApiBase {
|
|
203
|
-
messageId: EventDataTargetId;
|
|
204
|
-
operatorId: EventDataTargetId;
|
|
205
|
-
groupId: EventDataTargetId;
|
|
206
|
-
}
|
|
207
|
-
interface EventDataPrivateRequest extends EventDataApiBase {
|
|
208
|
-
type: MessageScope.PRIVATE;
|
|
209
|
-
userId: EventDataTargetId;
|
|
210
|
-
}
|
|
211
|
-
interface EventDataGroupRequest extends EventDataApiBase {
|
|
212
|
-
type: MessageScope.GROUP;
|
|
213
|
-
userId: EventDataTargetId;
|
|
214
|
-
operatorId: EventDataTargetId;
|
|
215
|
-
groupId: EventDataTargetId;
|
|
216
|
-
}
|
|
217
|
-
interface EventDataPrivateAdd extends EventDataApiBase {
|
|
218
|
-
userId: EventDataTargetId;
|
|
219
|
-
}
|
|
220
|
-
interface EventDataGroupIncrease extends EventDataApiBase {
|
|
221
|
-
userId: EventDataTargetId;
|
|
222
|
-
operatorId: EventDataTargetId;
|
|
223
|
-
groupId: EventDataTargetId;
|
|
224
|
-
}
|
|
225
|
-
interface EventDataGroupDecrease extends EventDataApiBase {
|
|
226
|
-
userId: EventDataTargetId;
|
|
227
|
-
operatorId: EventDataTargetId;
|
|
228
|
-
groupId: EventDataTargetId;
|
|
229
|
-
}
|
|
230
|
-
interface EventDataGroupAdmin extends EventDataApiBase {
|
|
231
|
-
userId: EventDataTargetId;
|
|
232
|
-
operation: 'set' | 'unset';
|
|
233
|
-
groupId: EventDataTargetId;
|
|
234
|
-
}
|
|
235
|
-
interface EventDataGroupBan extends EventDataApiBase {
|
|
236
|
-
userId: EventDataTargetId | 0;
|
|
237
|
-
operatorId: EventDataTargetId;
|
|
238
|
-
time: number | -1;
|
|
239
|
-
groupId: EventDataTargetId;
|
|
173
|
+
/** Message id */
|
|
174
|
+
messageId: string;
|
|
240
175
|
}
|
|
241
176
|
export {};
|
package/lib/types/message.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
* @Package @kotori-bot/core
|
|
4
|
-
* @Version 1.
|
|
5
|
-
* @Author
|
|
4
|
+
* @Version 1.6.0-rc.1
|
|
5
|
+
* @Author Arimura Sena <me@hotaru.icu>
|
|
6
6
|
* @Copyright 2024 Hotaru. All rights reserved.
|
|
7
7
|
* @License GPL-3.0
|
|
8
8
|
* @Link https://github.com/kotorijs/kotori
|
|
9
|
-
* @Date 2024/
|
|
9
|
+
* @Date 2024/8/9 17:33:05
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
"use strict";
|
|
13
|
-
var __create = Object.create;
|
|
14
13
|
var __defProp = Object.defineProperty;
|
|
15
14
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
15
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
17
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
18
16
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19
17
|
var __export = (target, all) => {
|
|
20
18
|
for (var name in all)
|
|
@@ -28,44 +26,27 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
28
26
|
}
|
|
29
27
|
return to;
|
|
30
28
|
};
|
|
31
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
32
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
33
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
34
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
35
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
36
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
37
|
-
mod
|
|
38
|
-
));
|
|
39
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
30
|
var message_exports = {};
|
|
41
31
|
__export(message_exports, {
|
|
42
|
-
CommandAccess: () => CommandAccess,
|
|
43
32
|
MessageScope: () => MessageScope,
|
|
44
|
-
|
|
45
|
-
eventDataTargetIdSchema: () => eventDataTargetIdSchema
|
|
33
|
+
UserAccess: () => UserAccess
|
|
46
34
|
});
|
|
47
35
|
module.exports = __toCommonJS(message_exports);
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
})(CommandAccess || {});
|
|
55
|
-
const commandArgTypeSignSchema = import_tsukiko.default.Union([
|
|
56
|
-
import_tsukiko.default.Union([import_tsukiko.default.Literal("string"), import_tsukiko.default.Literal("number")]),
|
|
57
|
-
import_tsukiko.default.Literal("boolean")
|
|
58
|
-
]);
|
|
36
|
+
var UserAccess = /* @__PURE__ */ ((UserAccess2) => {
|
|
37
|
+
UserAccess2[UserAccess2["MEMBER"] = 0] = "MEMBER";
|
|
38
|
+
UserAccess2[UserAccess2["MANGER"] = 1] = "MANGER";
|
|
39
|
+
UserAccess2[UserAccess2["ADMIN"] = 2] = "ADMIN";
|
|
40
|
+
return UserAccess2;
|
|
41
|
+
})(UserAccess || {});
|
|
59
42
|
var MessageScope = /* @__PURE__ */ ((MessageScope2) => {
|
|
60
43
|
MessageScope2[MessageScope2["PRIVATE"] = 0] = "PRIVATE";
|
|
61
44
|
MessageScope2[MessageScope2["GROUP"] = 1] = "GROUP";
|
|
45
|
+
MessageScope2[MessageScope2["CHANNEL"] = 2] = "CHANNEL";
|
|
62
46
|
return MessageScope2;
|
|
63
47
|
})(MessageScope || {});
|
|
64
|
-
const eventDataTargetIdSchema = import_tsukiko.default.Union([import_tsukiko.default.Number(), import_tsukiko.default.String()]);
|
|
65
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
49
|
0 && (module.exports = {
|
|
67
|
-
CommandAccess,
|
|
68
50
|
MessageScope,
|
|
69
|
-
|
|
70
|
-
eventDataTargetIdSchema
|
|
51
|
+
UserAccess
|
|
71
52
|
});
|