node-karin 0.12.0 → 0.12.2-5.pr.206.027f2f2
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 +1029 -0
- package/default/comment/config.json +34 -0
- package/default/comment/friendDirect.json +10 -0
- package/default/comment/groupGuild.json +11 -0
- package/default/comment/server.json +17 -0
- package/default/config/adapter.json +28 -0
- package/default/config/config.json +47 -0
- package/default/config/groups.json +47 -0
- package/default/config/groups.yaml +70 -0
- package/default/config/pm2.json +16 -0
- package/default/config/privates.json +23 -0
- package/default/config/privates.yaml +31 -0
- package/default/config/redis.json +10 -0
- package/default/config/render.json +19 -0
- package/default/view/group.yaml +73 -0
- package/dist/index.d.ts +9869 -0
- package/dist/index.js +12643 -0
- package/dist/module/art-template.cjs +11 -0
- package/dist/module/art-template.d.ts +1 -0
- package/dist/module/axios.cjs +22 -0
- package/dist/module/axios.d.ts +2 -0
- package/dist/module/chalk.cjs +22 -0
- package/dist/module/chalk.d.ts +2 -0
- package/dist/module/chokidar.cjs +22 -0
- package/dist/module/chokidar.d.ts +2 -0
- package/dist/module/commander.cjs +35 -0
- package/dist/module/commander.d.ts +3 -0
- package/dist/module/commander.js +3 -0
- package/dist/module/dotenv.cjs +22 -0
- package/dist/module/dotenv.d.ts +2 -0
- package/dist/module/dotenv.js +2 -0
- package/dist/module/express.cjs +112 -0
- package/dist/module/express.d.ts +1 -0
- package/dist/module/express.js +1 -0
- package/dist/module/level.cjs +22 -0
- package/dist/module/level.d.ts +2 -0
- package/dist/module/lodash.cjs +11 -0
- package/dist/module/lodash.d.ts +1 -0
- package/dist/module/log4js.cjs +22 -0
- package/dist/module/log4js.d.ts +2 -0
- package/dist/module/moment.cjs +11 -0
- package/dist/module/moment.d.ts +1 -0
- package/dist/module/node-schedule.cjs +22 -0
- package/dist/module/node-schedule.d.ts +2 -0
- package/dist/module/redis.cjs +22 -0
- package/dist/module/redis.d.ts +2 -0
- package/dist/module/ws.cjs +28 -0
- package/dist/module/ws.d.ts +1 -0
- package/dist/module/ws.js +1 -0
- package/dist/module/yaml.cjs +22 -0
- package/dist/module/yaml.d.ts +2 -0
- package/dist/root.d.ts +40 -0
- package/dist/root.js +44 -0
- package/package.json +142 -128
- package/LICENSE +0 -674
- package/README.md +0 -56
- package/config/defSet/App.yaml +0 -42
- package/config/defSet/config.yaml +0 -65
- package/config/defSet/group.yaml +0 -56
- package/config/defSet/pm2.yaml +0 -21
- package/config/defSet/redis.yaml +0 -18
- package/config/defSet/server.yaml +0 -42
- package/config/view/group.yaml +0 -92
- package/lib/adapter/index.d.ts +0 -2
- package/lib/adapter/index.js +0 -2
- package/lib/adapter/input/index.d.ts +0 -78
- package/lib/adapter/input/index.js +0 -205
- package/lib/adapter/onebot/11/convert.d.ts +0 -12
- package/lib/adapter/onebot/11/convert.js +0 -167
- package/lib/adapter/onebot/11/event.d.ts +0 -25
- package/lib/adapter/onebot/11/event.js +0 -442
- package/lib/adapter/onebot/11/index.d.ts +0 -508
- package/lib/adapter/onebot/11/index.js +0 -1047
- package/lib/cli/index.d.ts +0 -92
- package/lib/cli/index.js +0 -307
- package/lib/cli/init.d.ts +0 -2
- package/lib/cli/init.js +0 -22
- package/lib/cli/karin.d.ts +0 -2
- package/lib/cli/karin.js +0 -16
- package/lib/cli/pkg.d.ts +0 -4
- package/lib/cli/pkg.js +0 -14
- package/lib/cli/start.d.ts +0 -1
- package/lib/cli/start.js +0 -8
- package/lib/core/index.d.ts +0 -10
- package/lib/core/index.js +0 -10
- package/lib/core/init/config.d.ts +0 -43
- package/lib/core/init/config.js +0 -201
- package/lib/core/init/dir.d.ts +0 -4
- package/lib/core/init/dir.js +0 -7
- package/lib/core/init/init.d.ts +0 -1
- package/lib/core/init/init.js +0 -47
- package/lib/core/karin/karin.d.ts +0 -198
- package/lib/core/karin/karin.js +0 -226
- package/lib/core/listener/listener.d.ts +0 -145
- package/lib/core/listener/listener.js +0 -235
- package/lib/core/plugin/base.d.ts +0 -156
- package/lib/core/plugin/base.js +0 -131
- package/lib/core/plugin/loader.d.ts +0 -141
- package/lib/core/plugin/loader.js +0 -618
- package/lib/core/process/process.d.ts +0 -18
- package/lib/core/process/process.js +0 -96
- package/lib/core/server/server.d.ts +0 -25
- package/lib/core/server/server.js +0 -295
- package/lib/db/index.d.ts +0 -2
- package/lib/db/index.js +0 -2
- package/lib/db/level/level.d.ts +0 -19
- package/lib/db/level/level.js +0 -36
- package/lib/db/redis/redis.d.ts +0 -2
- package/lib/db/redis/redis.js +0 -135
- package/lib/db/redis/redis_level.d.ts +0 -112
- package/lib/db/redis/redis_level.js +0 -281
- package/lib/event/handler/base.d.ts +0 -42
- package/lib/event/handler/base.js +0 -200
- package/lib/event/handler/message.d.ts +0 -29
- package/lib/event/handler/message.js +0 -307
- package/lib/event/handler/notice.d.ts +0 -18
- package/lib/event/handler/notice.js +0 -214
- package/lib/event/handler/request.d.ts +0 -18
- package/lib/event/handler/request.js +0 -115
- package/lib/event/handler/review.d.ts +0 -55
- package/lib/event/handler/review.js +0 -386
- package/lib/event/index.d.ts +0 -5
- package/lib/event/index.js +0 -5
- package/lib/index.d.ts +0 -8
- package/lib/index.js +0 -8
- package/lib/modules/art-template.d.ts +0 -1
- package/lib/modules/axios.d.ts +0 -2
- package/lib/modules/chalk.d.ts +0 -2
- package/lib/modules/chokidar.d.ts +0 -2
- package/lib/modules/commander.d.ts +0 -2
- package/lib/modules/commander.js +0 -2
- package/lib/modules/express.d.ts +0 -3
- package/lib/modules/express.js +0 -3
- package/lib/modules/level.d.ts +0 -2
- package/lib/modules/lodash.d.ts +0 -1
- package/lib/modules/log4js.d.ts +0 -2
- package/lib/modules/moment.d.ts +0 -1
- package/lib/modules/node-schedule.d.ts +0 -2
- package/lib/modules/redis.d.ts +0 -2
- package/lib/modules/ws.d.ts +0 -3
- package/lib/modules/ws.js +0 -3
- package/lib/modules/yaml.d.ts +0 -2
- package/lib/modules.d.ts +0 -15
- package/lib/modules.js +0 -15
- package/lib/render/app.d.ts +0 -56
- package/lib/render/app.js +0 -120
- package/lib/render/base.d.ts +0 -30
- package/lib/render/base.js +0 -69
- package/lib/render/client.d.ts +0 -41
- package/lib/render/client.js +0 -238
- package/lib/render/http.d.ts +0 -19
- package/lib/render/http.js +0 -50
- package/lib/render/index.d.ts +0 -6
- package/lib/render/index.js +0 -6
- package/lib/render/server.d.ts +0 -25
- package/lib/render/server.js +0 -101
- package/lib/render/wormhole.d.ts +0 -1
- package/lib/render/wormhole.js +0 -156
- package/lib/types/adapter/api.d.ts +0 -399
- package/lib/types/adapter/api.js +0 -1
- package/lib/types/adapter/base.d.ts +0 -560
- package/lib/types/adapter/base.js +0 -1
- package/lib/types/config/config.d.ts +0 -379
- package/lib/types/config/config.js +0 -1
- package/lib/types/element/element.d.ts +0 -565
- package/lib/types/element/element.js +0 -1
- package/lib/types/element/qqbot.d.ts +0 -123
- package/lib/types/element/qqbot.js +0 -1
- package/lib/types/event/contact.d.ts +0 -28
- package/lib/types/event/contact.js +0 -1
- package/lib/types/event/event.d.ts +0 -305
- package/lib/types/event/event.js +0 -1
- package/lib/types/event/index.d.ts +0 -12
- package/lib/types/event/index.js +0 -7
- package/lib/types/event/message.d.ts +0 -109
- package/lib/types/event/message.js +0 -74
- package/lib/types/event/notice.d.ts +0 -513
- package/lib/types/event/notice.js +0 -52
- package/lib/types/event/reply.d.ts +0 -50
- package/lib/types/event/reply.js +0 -1
- package/lib/types/event/request.d.ts +0 -126
- package/lib/types/event/request.js +0 -52
- package/lib/types/event/sender.d.ts +0 -44
- package/lib/types/event/sender.js +0 -1
- package/lib/types/index.d.ts +0 -13
- package/lib/types/index.js +0 -13
- package/lib/types/logger/logger.d.ts +0 -110
- package/lib/types/logger/logger.js +0 -1
- package/lib/types/onebot11/api.d.ts +0 -53
- package/lib/types/onebot11/api.js +0 -1
- package/lib/types/onebot11/event.d.ts +0 -619
- package/lib/types/onebot11/event.js +0 -2
- package/lib/types/onebot11/index.d.ts +0 -6
- package/lib/types/onebot11/index.js +0 -6
- package/lib/types/onebot11/params.d.ts +0 -609
- package/lib/types/onebot11/params.js +0 -1
- package/lib/types/onebot11/response.d.ts +0 -516
- package/lib/types/onebot11/response.js +0 -1
- package/lib/types/onebot11/segment.d.ts +0 -269
- package/lib/types/onebot11/segment.js +0 -1
- package/lib/types/onebot11/sender.d.ts +0 -59
- package/lib/types/onebot11/sender.js +0 -1
- package/lib/types/plugin/app.d.ts +0 -71
- package/lib/types/plugin/app.js +0 -1
- package/lib/types/plugin/plugin.d.ts +0 -473
- package/lib/types/plugin/plugin.js +0 -1
- package/lib/types/render/render.d.ts +0 -118
- package/lib/types/render/render.js +0 -1
- package/lib/types/type/global.d.ts +0 -25
- package/lib/types/type/global.js +0 -1
- package/lib/utils/common/common.d.ts +0 -236
- package/lib/utils/common/common.js +0 -708
- package/lib/utils/config/config.d.ts +0 -193
- package/lib/utils/config/config.js +0 -328
- package/lib/utils/config/updateVersion.d.ts +0 -33
- package/lib/utils/config/updateVersion.js +0 -145
- package/lib/utils/config/yamlEditor.d.ts +0 -101
- package/lib/utils/config/yamlEditor.js +0 -330
- package/lib/utils/core/handler.d.ts +0 -18
- package/lib/utils/core/handler.js +0 -46
- package/lib/utils/core/logger.d.ts +0 -3
- package/lib/utils/core/logger.js +0 -105
- package/lib/utils/core/segment.d.ts +0 -279
- package/lib/utils/core/segment.js +0 -451
- package/lib/utils/index.d.ts +0 -13
- package/lib/utils/index.js +0 -13
- package/lib/utils/tools/button.d.ts +0 -2
- package/lib/utils/tools/button.js +0 -27
- package/lib/utils/tools/exec.d.ts +0 -20
- package/lib/utils/tools/exec.js +0 -54
- package/lib/utils/tools/ffmpeg.d.ts +0 -12
- package/lib/utils/tools/ffmpeg.js +0 -25
- package/lib/utils/tools/restart.d.ts +0 -15
- package/lib/utils/tools/restart.js +0 -39
- package/lib/utils/tools/stop.d.ts +0 -7
- package/lib/utils/tools/stop.js +0 -13
- package/lib/utils/tools/update.d.ts +0 -67
- package/lib/utils/tools/update.js +0 -151
- /package/{config → default}/view/App.yaml +0 -0
- /package/{config → default}/view/config.yaml +0 -0
- /package/{config → default}/view/pm2.yaml +0 -0
- /package/{config → default}/view/redis.yaml +0 -0
- /package/{config → default}/view/server.yaml +0 -0
- /package/{lib/modules → dist/module}/art-template.js +0 -0
- /package/{lib/modules → dist/module}/axios.js +0 -0
- /package/{lib/modules → dist/module}/chalk.js +0 -0
- /package/{lib/modules → dist/module}/chokidar.js +0 -0
- /package/{lib/modules → dist/module}/level.js +0 -0
- /package/{lib/modules → dist/module}/lodash.js +0 -0
- /package/{lib/modules → dist/module}/log4js.js +0 -0
- /package/{lib/modules → dist/module}/moment.js +0 -0
- /package/{lib/modules → dist/module}/node-schedule.js +0 -0
- /package/{lib/modules → dist/module}/redis.js +0 -0
- /package/{lib/modules → dist/module}/yaml.js +0 -0
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { KarinEventType, BaseEventDataType, EventType, RequestSubType } from './event.js';
|
|
2
|
-
/**
|
|
3
|
-
* - 好友申请
|
|
4
|
-
*/
|
|
5
|
-
export interface PrivateApplyType {
|
|
6
|
-
/**
|
|
7
|
-
* - 申请者uid
|
|
8
|
-
*/
|
|
9
|
-
applier_uid: string;
|
|
10
|
-
/**
|
|
11
|
-
* - 申请者uin
|
|
12
|
-
*/
|
|
13
|
-
applier_uin: string;
|
|
14
|
-
/**
|
|
15
|
-
* - 申请理由
|
|
16
|
-
*/
|
|
17
|
-
message: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* - 群申请
|
|
21
|
-
*/
|
|
22
|
-
export interface GroupApply {
|
|
23
|
-
/**
|
|
24
|
-
* - 群ID
|
|
25
|
-
*/
|
|
26
|
-
group_id: string;
|
|
27
|
-
/**
|
|
28
|
-
* - 申请者uid
|
|
29
|
-
*/
|
|
30
|
-
applier_uid: string;
|
|
31
|
-
/**
|
|
32
|
-
* - 申请者uin
|
|
33
|
-
*/
|
|
34
|
-
applier_uin: string;
|
|
35
|
-
/**
|
|
36
|
-
* - 邀请者uid
|
|
37
|
-
*/
|
|
38
|
-
inviter_uid: string;
|
|
39
|
-
/**
|
|
40
|
-
* - 邀请者uin
|
|
41
|
-
*/
|
|
42
|
-
inviter_uin: string;
|
|
43
|
-
/**
|
|
44
|
-
* - 申请理由
|
|
45
|
-
*/
|
|
46
|
-
reason: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* - 邀请入群
|
|
50
|
-
*/
|
|
51
|
-
export interface GroupInvite {
|
|
52
|
-
/**
|
|
53
|
-
* - 群ID
|
|
54
|
-
*/
|
|
55
|
-
group_id: string;
|
|
56
|
-
/**
|
|
57
|
-
* - 邀请者uid
|
|
58
|
-
*/
|
|
59
|
-
inviter_uid: string;
|
|
60
|
-
/**
|
|
61
|
-
* - 邀请者uin
|
|
62
|
-
*/
|
|
63
|
-
inviter_uin: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* - 通知事件子类型
|
|
67
|
-
*/
|
|
68
|
-
export interface RequestType {
|
|
69
|
-
[RequestSubType.PrivateApply]: PrivateApplyType;
|
|
70
|
-
[RequestSubType.GroupApply]: GroupApply;
|
|
71
|
-
[RequestSubType.InvitedGroup]: GroupInvite;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* - 请求事件基类
|
|
75
|
-
*/
|
|
76
|
-
export interface KarinRequestEventBase extends KarinEventType {
|
|
77
|
-
event: EventType.Request;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* - 辅助类型,用于生成 KarinRequestEvent 的联合类型来自动推导content的类型
|
|
81
|
-
*/
|
|
82
|
-
type RequestEvent<T extends RequestSubType> = KarinRequestEventBase & {
|
|
83
|
-
sub_event: T;
|
|
84
|
-
content: RequestType[T];
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* - 请求事件定义
|
|
88
|
-
*/
|
|
89
|
-
export type KarinRequestType = RequestEvent<RequestSubType.GroupApply> | RequestEvent<RequestSubType.InvitedGroup> | RequestEvent<RequestSubType.PrivateApply>;
|
|
90
|
-
/**
|
|
91
|
-
* - 创建一个请求事件
|
|
92
|
-
*/
|
|
93
|
-
export declare class KarinRequest implements KarinRequestEventBase {
|
|
94
|
-
self_id: KarinRequestType['self_id'];
|
|
95
|
-
user_id: KarinRequestType['user_id'];
|
|
96
|
-
group_id: KarinRequestType['group_id'];
|
|
97
|
-
event: KarinRequestType['event'];
|
|
98
|
-
sub_event: KarinRequestType['sub_event'];
|
|
99
|
-
event_id: KarinRequestType['event_id'];
|
|
100
|
-
time: KarinRequestType['time'];
|
|
101
|
-
contact: KarinRequestType['contact'];
|
|
102
|
-
sender: KarinRequestType['sender'];
|
|
103
|
-
isMaster: KarinRequestType['isMaster'];
|
|
104
|
-
isAdmin: KarinRequestType['isAdmin'];
|
|
105
|
-
isPrivate: KarinRequestType['isPrivate'];
|
|
106
|
-
isGroup: KarinRequestType['isGroup'];
|
|
107
|
-
isGuild: KarinRequestType['isGuild'];
|
|
108
|
-
isGroupTemp: KarinRequestType['isGroupTemp'];
|
|
109
|
-
logFnc: KarinRequestType['logFnc'];
|
|
110
|
-
logText: KarinRequestType['logText'];
|
|
111
|
-
store: KarinRequestType['store'];
|
|
112
|
-
raw_message: KarinRequestType['raw_message'];
|
|
113
|
-
reply: KarinRequestType['reply'];
|
|
114
|
-
replyCallback: KarinRequestType['replyCallback'];
|
|
115
|
-
bot: KarinRequestType['bot'];
|
|
116
|
-
content: RequestType[RequestSubType];
|
|
117
|
-
raw_event: KarinRequestType['raw_event'];
|
|
118
|
-
constructor({ self_id, user_id, group_id, time, contact, sender, sub_event, event_id, content, raw_event, }: BaseEventDataType & {
|
|
119
|
-
sub_event: KarinRequestType['sub_event'];
|
|
120
|
-
/**
|
|
121
|
-
* - 事件对应的内容参数
|
|
122
|
-
*/
|
|
123
|
-
content: KarinRequestType['content'];
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* - 创建一个请求事件
|
|
3
|
-
*/
|
|
4
|
-
export class KarinRequest {
|
|
5
|
-
self_id;
|
|
6
|
-
user_id;
|
|
7
|
-
group_id;
|
|
8
|
-
event;
|
|
9
|
-
sub_event;
|
|
10
|
-
event_id;
|
|
11
|
-
time;
|
|
12
|
-
contact;
|
|
13
|
-
sender;
|
|
14
|
-
isMaster;
|
|
15
|
-
isAdmin;
|
|
16
|
-
isPrivate;
|
|
17
|
-
isGroup;
|
|
18
|
-
isGuild;
|
|
19
|
-
isGroupTemp;
|
|
20
|
-
logFnc;
|
|
21
|
-
logText;
|
|
22
|
-
store;
|
|
23
|
-
raw_message;
|
|
24
|
-
reply;
|
|
25
|
-
replyCallback;
|
|
26
|
-
bot;
|
|
27
|
-
content;
|
|
28
|
-
raw_event;
|
|
29
|
-
constructor({ self_id, user_id, group_id = '', time, contact, sender, sub_event, event_id, content, raw_event, }) {
|
|
30
|
-
this.raw_event = raw_event;
|
|
31
|
-
this.self_id = self_id;
|
|
32
|
-
this.user_id = user_id;
|
|
33
|
-
this.group_id = contact.scene === 'group' ? (contact.peer || group_id) : group_id;
|
|
34
|
-
this.time = time;
|
|
35
|
-
this.event = "request" /* EventType.Request */;
|
|
36
|
-
this.event_id = event_id;
|
|
37
|
-
this.contact = contact;
|
|
38
|
-
this.sender = sender;
|
|
39
|
-
this.sub_event = sub_event;
|
|
40
|
-
this.content = content;
|
|
41
|
-
this.isMaster = false;
|
|
42
|
-
this.isAdmin = false;
|
|
43
|
-
this.isPrivate = false;
|
|
44
|
-
this.isGroup = false;
|
|
45
|
-
this.isGuild = false;
|
|
46
|
-
this.isGroupTemp = false;
|
|
47
|
-
this.logFnc = '';
|
|
48
|
-
this.logText = '';
|
|
49
|
-
this.store = new Map();
|
|
50
|
-
this.raw_message = '';
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* - 群身份枚举 值不存在时为unknown
|
|
3
|
-
*/
|
|
4
|
-
export declare const enum Role {
|
|
5
|
-
Owner = "owner",
|
|
6
|
-
Admin = "admin",
|
|
7
|
-
Member = "member",
|
|
8
|
-
Unknown = "unknown"
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* - 权限类型枚举
|
|
12
|
-
*/
|
|
13
|
-
export declare const enum Permission {
|
|
14
|
-
All = "all",
|
|
15
|
-
Master = "master",
|
|
16
|
-
Admin = "admin",
|
|
17
|
-
GroupOwner = "group.owner",
|
|
18
|
-
GroupAdmin = "group.admin"
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* - 权限类型 纯文本
|
|
22
|
-
*/
|
|
23
|
-
export type PermissionType = 'all' | 'master' | 'admin' | 'group.owner' | 'group.admin';
|
|
24
|
-
/**
|
|
25
|
-
* - 事件发送者信息
|
|
26
|
-
*/
|
|
27
|
-
export interface Sender {
|
|
28
|
-
/**
|
|
29
|
-
* - 发送者uid
|
|
30
|
-
*/
|
|
31
|
-
uid: string;
|
|
32
|
-
/**
|
|
33
|
-
* - 发送者uin
|
|
34
|
-
*/
|
|
35
|
-
uin: string;
|
|
36
|
-
/**
|
|
37
|
-
* - 发送者昵称
|
|
38
|
-
*/
|
|
39
|
-
nick: string | '';
|
|
40
|
-
/**
|
|
41
|
-
* - 发送者在群的角色身份
|
|
42
|
-
*/
|
|
43
|
-
role: Role;
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './adapter/base.js';
|
|
2
|
-
export * from './config/config.js';
|
|
3
|
-
export * from './element/element.js';
|
|
4
|
-
export * from './element/qqbot.js';
|
|
5
|
-
export * from './event/index.js';
|
|
6
|
-
export * from './logger/logger.js';
|
|
7
|
-
export * from './render/render.js';
|
|
8
|
-
export * from './plugin/app.js';
|
|
9
|
-
export * from './plugin/plugin.js';
|
|
10
|
-
export * from './event/reply.js';
|
|
11
|
-
export * from './adapter/api.js';
|
|
12
|
-
export * from './onebot11/index.js';
|
|
13
|
-
export * from './event/index.js';
|
package/lib/types/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './adapter/base.js';
|
|
2
|
-
export * from './config/config.js';
|
|
3
|
-
export * from './element/element.js';
|
|
4
|
-
export * from './element/qqbot.js';
|
|
5
|
-
export * from './event/index.js';
|
|
6
|
-
export * from './logger/logger.js';
|
|
7
|
-
export * from './render/render.js';
|
|
8
|
-
export * from './plugin/app.js';
|
|
9
|
-
export * from './plugin/plugin.js';
|
|
10
|
-
export * from './event/reply.js';
|
|
11
|
-
export * from './adapter/api.js';
|
|
12
|
-
export * from './onebot11/index.js';
|
|
13
|
-
export * from './event/index.js';
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
export type LoggerLevel = 'all' | 'trace' | 'debug' | 'mark' | 'info' | 'mark' | 'warn' | 'error' | 'fatal' | 'off';
|
|
3
|
-
export interface Logger {
|
|
4
|
-
/**
|
|
5
|
-
* 颜色模块
|
|
6
|
-
*/
|
|
7
|
-
chalk: typeof chalk;
|
|
8
|
-
/**
|
|
9
|
-
* 构建红色文本
|
|
10
|
-
*/
|
|
11
|
-
red: (text: string) => string;
|
|
12
|
-
/**
|
|
13
|
-
* 构建绿色文本
|
|
14
|
-
*/
|
|
15
|
-
green: (text: string) => string;
|
|
16
|
-
/**
|
|
17
|
-
* 构建黄色文本
|
|
18
|
-
*/
|
|
19
|
-
yellow: (text: string) => string;
|
|
20
|
-
/**
|
|
21
|
-
* 构建蓝色文本
|
|
22
|
-
*/
|
|
23
|
-
blue: (text: string) => string;
|
|
24
|
-
/**
|
|
25
|
-
* 构建品红色文本
|
|
26
|
-
*/
|
|
27
|
-
magenta: (text: string) => string;
|
|
28
|
-
/**
|
|
29
|
-
* 构建青色文本
|
|
30
|
-
*/
|
|
31
|
-
cyan: (text: string) => string;
|
|
32
|
-
/**
|
|
33
|
-
* 构建白色文本
|
|
34
|
-
*/
|
|
35
|
-
white: (text: string) => string;
|
|
36
|
-
/**
|
|
37
|
-
* 构建灰色文本
|
|
38
|
-
*/
|
|
39
|
-
gray: (text: string) => string;
|
|
40
|
-
/**
|
|
41
|
-
* 构建紫色文本
|
|
42
|
-
*/
|
|
43
|
-
violet: (text: string) => string;
|
|
44
|
-
/**
|
|
45
|
-
* 构建函数文本
|
|
46
|
-
*/
|
|
47
|
-
fnc: (text: string) => string;
|
|
48
|
-
/**
|
|
49
|
-
* 日志模块
|
|
50
|
-
* @param level 等级
|
|
51
|
-
* @param id 机器人ID
|
|
52
|
-
* @param args 参数
|
|
53
|
-
*/
|
|
54
|
-
bot: (level: LoggerLevel, id: string, ...args: string[]) => void;
|
|
55
|
-
}
|
|
56
|
-
declare module 'log4js' {
|
|
57
|
-
interface Logger {
|
|
58
|
-
/**
|
|
59
|
-
* 颜色模块
|
|
60
|
-
*/
|
|
61
|
-
chalk: typeof chalk;
|
|
62
|
-
/**
|
|
63
|
-
* 构建红色文本
|
|
64
|
-
*/
|
|
65
|
-
red: (text: string) => string;
|
|
66
|
-
/**
|
|
67
|
-
* 构建绿色文本
|
|
68
|
-
*/
|
|
69
|
-
green: (text: string) => string;
|
|
70
|
-
/**
|
|
71
|
-
* 构建黄色文本
|
|
72
|
-
*/
|
|
73
|
-
yellow: (text: string) => string;
|
|
74
|
-
/**
|
|
75
|
-
* 构建蓝色文本
|
|
76
|
-
*/
|
|
77
|
-
blue: (text: string) => string;
|
|
78
|
-
/**
|
|
79
|
-
* 构建品红色文本
|
|
80
|
-
*/
|
|
81
|
-
magenta: (text: string) => string;
|
|
82
|
-
/**
|
|
83
|
-
* 构建青色文本
|
|
84
|
-
*/
|
|
85
|
-
cyan: (text: string) => string;
|
|
86
|
-
/**
|
|
87
|
-
* 构建白色文本
|
|
88
|
-
*/
|
|
89
|
-
white: (text: string) => string;
|
|
90
|
-
/**
|
|
91
|
-
* 构建灰色文本
|
|
92
|
-
*/
|
|
93
|
-
gray: (text: string) => string;
|
|
94
|
-
/**
|
|
95
|
-
* 构建紫色文本
|
|
96
|
-
*/
|
|
97
|
-
violet: (text: string) => string;
|
|
98
|
-
/**
|
|
99
|
-
* 构建函数文本
|
|
100
|
-
*/
|
|
101
|
-
fnc: (text: string) => string;
|
|
102
|
-
/**
|
|
103
|
-
* 日志模块
|
|
104
|
-
* @param level 等级
|
|
105
|
-
* @param id 机器人ID
|
|
106
|
-
* @param args 参数
|
|
107
|
-
*/
|
|
108
|
-
bot: (level: LoggerLevel, id: string, ...args: string[]) => void;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* - OneBot11公开Api
|
|
3
|
-
*/
|
|
4
|
-
export declare const enum OB11Api {
|
|
5
|
-
'send_private_msg' = "send_private_msg",
|
|
6
|
-
'send_group_msg' = "send_group_msg",
|
|
7
|
-
'send_msg' = "send_msg",
|
|
8
|
-
'delete_msg' = "delete_msg",
|
|
9
|
-
'get_msg' = "get_msg",
|
|
10
|
-
'get_forward_msg' = "get_forward_msg",
|
|
11
|
-
'send_like' = "send_like",
|
|
12
|
-
'set_group_kick' = "set_group_kick",
|
|
13
|
-
'set_group_ban' = "set_group_ban",
|
|
14
|
-
'set_group_anonymous_ban' = "set_group_anonymous_ban",
|
|
15
|
-
'set_group_whole_ban' = "set_group_whole_ban",
|
|
16
|
-
'set_group_admin' = "set_group_admin",
|
|
17
|
-
'set_group_anonymous' = "set_group_anonymous",
|
|
18
|
-
'set_group_card' = "set_group_card",
|
|
19
|
-
'set_group_name' = "set_group_name",
|
|
20
|
-
'set_group_leave' = "set_group_leave",
|
|
21
|
-
'set_group_special_title' = "set_group_special_title",
|
|
22
|
-
'set_friend_add_request' = "set_friend_add_request",
|
|
23
|
-
'set_group_add_request' = "set_group_add_request",
|
|
24
|
-
'get_login_info' = "get_login_info",
|
|
25
|
-
'get_stranger_info' = "get_stranger_info",
|
|
26
|
-
'get_friend_list' = "get_friend_list",
|
|
27
|
-
'get_group_info' = "get_group_info",
|
|
28
|
-
'get_group_list' = "get_group_list",
|
|
29
|
-
'get_group_member_info' = "get_group_member_info",
|
|
30
|
-
'get_group_member_list' = "get_group_member_list",
|
|
31
|
-
'get_group_honor_info' = "get_group_honor_info",
|
|
32
|
-
'get_cookies' = "get_cookies",
|
|
33
|
-
'get_csrf_token' = "get_csrf_token",
|
|
34
|
-
'get_credentials' = "get_credentials",
|
|
35
|
-
'get_record' = "get_record",
|
|
36
|
-
'get_image' = "get_image",
|
|
37
|
-
'can_send_image' = "can_send_image",
|
|
38
|
-
'can_send_record' = "can_send_record",
|
|
39
|
-
'get_status' = "get_status",
|
|
40
|
-
'get_version_info' = "get_version_info",
|
|
41
|
-
'set_restart' = "set_restart",
|
|
42
|
-
'clean_cache' = "clean_cache",
|
|
43
|
-
'get_version' = "get_version",
|
|
44
|
-
'send_forward_msg' = "send_forward_msg",
|
|
45
|
-
'get_friend_msg_history' = "get_friend_msg_history",
|
|
46
|
-
'get_group_msg_history' = "get_group_msg_history",
|
|
47
|
-
'set_msg_emoji_like' = "set_msg_emoji_like",
|
|
48
|
-
'upload_group_file' = "upload_group_file",
|
|
49
|
-
'upload_private_file' = "upload_private_file",
|
|
50
|
-
'get_essence_msg_list' = "get_essence_msg_list",
|
|
51
|
-
'set_essence_msg' = "set_essence_msg",
|
|
52
|
-
'delete_essence_msg' = "delete_essence_msg"
|
|
53
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|