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,236 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import { AxiosRequestConfig } from 'axios';
|
|
3
|
-
import { Readable } from 'stream';
|
|
4
|
-
import { ButtonElement, ButtonType, dirName, KarinElement, NodeElement, KeyBoardElement } from '../../types/index.js';
|
|
5
|
-
export interface NpmInfo {
|
|
6
|
-
plugin: string;
|
|
7
|
-
path: string;
|
|
8
|
-
file: string;
|
|
9
|
-
isMain: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 常用方法
|
|
13
|
-
*/
|
|
14
|
-
export declare class Common {
|
|
15
|
-
streamPipeline: (stream1: Readable, stream2: fs.WriteStream) => Promise<void>;
|
|
16
|
-
constructor();
|
|
17
|
-
/**
|
|
18
|
-
* 休眠函数
|
|
19
|
-
* @param ms 毫秒
|
|
20
|
-
*/
|
|
21
|
-
sleep(ms: number): Promise<unknown>;
|
|
22
|
-
/**
|
|
23
|
-
* 下载保存文件
|
|
24
|
-
* @param fileUrl 下载地址
|
|
25
|
-
* @param savePath 保存路径
|
|
26
|
-
* @param param axios参数
|
|
27
|
-
*/
|
|
28
|
-
downFile(fileUrl: string, savePath: string, param?: AxiosRequestConfig): Promise<boolean>;
|
|
29
|
-
/**
|
|
30
|
-
* 对axios进行简单封装,超时、错误后返回null,不会抛出异常
|
|
31
|
-
* @param url 请求地址
|
|
32
|
-
* @param type 请求类型
|
|
33
|
-
* @param param axios参数
|
|
34
|
-
*/
|
|
35
|
-
axios(url: string, type?: 'get' | 'post', param?: AxiosRequestConfig): Promise<any | null>;
|
|
36
|
-
/**
|
|
37
|
-
* 递归创建目录
|
|
38
|
-
* @param dirname - 要创建的文件夹路径
|
|
39
|
-
*/
|
|
40
|
-
mkdir(dirname: string): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* 标准化文件路径
|
|
43
|
-
* @param file - 相对路径
|
|
44
|
-
* @param isDir - 返回绝对路径
|
|
45
|
-
* @param isFile - 添加file://前缀
|
|
46
|
-
* @returns 标准化后的路径
|
|
47
|
-
*/
|
|
48
|
-
absPath(file: string, isDir?: boolean, isFile?: boolean): string;
|
|
49
|
-
/**
|
|
50
|
-
* 判断是否为文件夹
|
|
51
|
-
* @param path - 路径
|
|
52
|
-
* @returns 返回true为文件夹
|
|
53
|
-
*/
|
|
54
|
-
isDir(path: string): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* 判断是否为插件包
|
|
57
|
-
* @param path - 路径
|
|
58
|
-
* @returns 返回true为插件包
|
|
59
|
-
*/
|
|
60
|
-
isPlugin(path: string): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* 去掉相对路径的前缀和后缀
|
|
63
|
-
* @param root - 相对路径路径
|
|
64
|
-
*/
|
|
65
|
-
getRelPath(root: string): string;
|
|
66
|
-
/**
|
|
67
|
-
* 判断路径是否存在
|
|
68
|
-
* @param path - 路径
|
|
69
|
-
* @returns 返回true为存在
|
|
70
|
-
*/
|
|
71
|
-
exists(path: string): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* - 解析json文件
|
|
74
|
-
* @param file - 文件路径
|
|
75
|
-
* @param isThrow - 解析失败是否抛出错误
|
|
76
|
-
*/
|
|
77
|
-
readJson(file: string, isThrow?: boolean): any;
|
|
78
|
-
/**
|
|
79
|
-
* - 写入json文件
|
|
80
|
-
* @param file - 文件路径
|
|
81
|
-
* @param data - 要写入的数据
|
|
82
|
-
*/
|
|
83
|
-
writeJson(file: string, data: any): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* - 解析yaml文件
|
|
86
|
-
* @param file - 文件路径
|
|
87
|
-
*/
|
|
88
|
-
readYaml(file: string): any;
|
|
89
|
-
/**
|
|
90
|
-
* - 写入yaml文件
|
|
91
|
-
* @param file - 文件路径
|
|
92
|
-
* @param data - 要写入的数据
|
|
93
|
-
*/
|
|
94
|
-
writeYaml(file: string, data: any): boolean;
|
|
95
|
-
/**
|
|
96
|
-
* 传入插件名称 返回解析后的package.json的内容
|
|
97
|
-
* @param name - 插件名称
|
|
98
|
-
*/
|
|
99
|
-
pkgJson(name: string): {
|
|
100
|
-
name: string;
|
|
101
|
-
version: string;
|
|
102
|
-
[key: string]: any;
|
|
103
|
-
} | null;
|
|
104
|
-
/**
|
|
105
|
-
* 输入包名 返回包根目录的绝对路径 仅简单查找
|
|
106
|
-
* @param name - 包名
|
|
107
|
-
* @param _path - 导入包的路径 此项适用于在插件中读取插件的依赖包
|
|
108
|
-
* @returns - 包根目录的绝对路径
|
|
109
|
-
* @example
|
|
110
|
-
* common.pkgroot('axios')
|
|
111
|
-
* common.pkgroot('axios', import.meta.url)
|
|
112
|
-
*/
|
|
113
|
-
pkgroot(name: string, _path?: string): string;
|
|
114
|
-
/**
|
|
115
|
-
* 根据文件后缀名从指定路径下读取符合要求的文件
|
|
116
|
-
* @param path - 路径
|
|
117
|
-
* @param ext - 后缀名、或后缀名列表
|
|
118
|
-
* @example common.readDir('./plugins', '.js')
|
|
119
|
-
* @example common.readDir('./plugins', ['.js', '.ts'])
|
|
120
|
-
*/
|
|
121
|
-
readDir(_path: string, ext: string | string[]): string[] | null;
|
|
122
|
-
/**
|
|
123
|
-
* 根据传入的 import.meta.url 计算相对于项目根目录的路径,返回需要的 '../' 层级。
|
|
124
|
-
* @param url - import.meta.url
|
|
125
|
-
* @returns 相对路径的层级数量,用 '../' 表示
|
|
126
|
-
* @example
|
|
127
|
-
* // 在 plugins/karin-plugin-example/index.ts 中使用
|
|
128
|
-
* common.urlToPath(import.meta.url) // 返回 '../../'
|
|
129
|
-
*/
|
|
130
|
-
urlToPath(url: string): string;
|
|
131
|
-
/**
|
|
132
|
-
* 传入相对路径 分割为两部分 1为文件夹路径 2为文件名 文件夹路径无前缀开头
|
|
133
|
-
* @param _path - 路径
|
|
134
|
-
*/
|
|
135
|
-
splitPath(_path: string): {
|
|
136
|
-
dir: string;
|
|
137
|
-
pop: string;
|
|
138
|
-
};
|
|
139
|
-
/**
|
|
140
|
-
* 将文件转换为不带前缀的base64字符串
|
|
141
|
-
* @param file - 文件路径或Buffer对象、可读流对象、http地址、base64://字符串
|
|
142
|
-
* @param options - 选项 http为true时返回http地址
|
|
143
|
-
* @returns 返回base64字符串
|
|
144
|
-
*/
|
|
145
|
-
base64(file: string | Buffer | Readable, options?: {
|
|
146
|
-
http: boolean;
|
|
147
|
-
}): Promise<string>;
|
|
148
|
-
/**
|
|
149
|
-
* 将文件转换为Buffer对象 仅支持标准格式
|
|
150
|
-
* @param file - 文件路径或Buffer对象、可读流对象、http地址、base64://字符串
|
|
151
|
-
* @param options - 选项 http为true时返回http地址
|
|
152
|
-
* @returns - 返回Buffer对象
|
|
153
|
-
*/
|
|
154
|
-
buffer<T extends {
|
|
155
|
-
http: boolean;
|
|
156
|
-
}>(file: string | Buffer | Readable, options?: T): Promise<T extends {
|
|
157
|
-
http: true;
|
|
158
|
-
} ? string : Buffer>;
|
|
159
|
-
/**
|
|
160
|
-
* 将数据流对象转换为Buffer对象
|
|
161
|
-
* @param {stream.Readable} stream - 要转换的数据流对象
|
|
162
|
-
* @returns {Promise<Buffer>} - 返回Buffer
|
|
163
|
-
*/
|
|
164
|
-
stream(stream: Readable): Promise<Buffer>;
|
|
165
|
-
/**
|
|
166
|
-
* 标准化发送的消息内容
|
|
167
|
-
* @param elements - 消息内容
|
|
168
|
-
*/
|
|
169
|
-
makeMessage(elements: string | KarinElement | (string | KarinElement)[]): Array<KarinElement>;
|
|
170
|
-
/**
|
|
171
|
-
* 制作简单转发,返回segment.node[]。仅简单包装node,也可以自己组装
|
|
172
|
-
* @param elements
|
|
173
|
-
* @param fakeUin 转发用户的QQ号 必填
|
|
174
|
-
* @param fakeNick 转发用户显示的昵称 必填
|
|
175
|
-
*/
|
|
176
|
-
makeForward(elements: KarinElement | KarinElement[], fakeUin: string, fakeNick: string): Array<NodeElement>;
|
|
177
|
-
/**
|
|
178
|
-
* 获取git插件列表
|
|
179
|
-
* @param isPack - 是否屏蔽不带package.json的插件,默认为false
|
|
180
|
-
*/
|
|
181
|
-
getPlugins(isPack?: boolean): Array<dirName>;
|
|
182
|
-
/**
|
|
183
|
-
* 获取git插件列表
|
|
184
|
-
* @param isPack - 是否屏蔽不带package.json的插件,默认为false
|
|
185
|
-
*/
|
|
186
|
-
getGitPlugins(isPack?: boolean): Array<dirName>;
|
|
187
|
-
/**
|
|
188
|
-
* 获取npm插件列表
|
|
189
|
-
* @param showDetails - 是否返回详细信息
|
|
190
|
-
* 默认只返回插件npm包名,为true时返回详细的{dir, name}[]
|
|
191
|
-
*/
|
|
192
|
-
getNpmPlugins<T extends boolean>(showDetails: T): Promise<T extends true ? NpmInfo[] : string[]>;
|
|
193
|
-
/**
|
|
194
|
-
* 获取运行时间
|
|
195
|
-
*/
|
|
196
|
-
uptime(): string;
|
|
197
|
-
/**
|
|
198
|
-
* 传入一个时间戳
|
|
199
|
-
* 返回距今已过去的时间
|
|
200
|
-
* @param time - 时间戳
|
|
201
|
-
*
|
|
202
|
-
* @example
|
|
203
|
-
* common.formatTime(1620000000)
|
|
204
|
-
* // -> '18天'
|
|
205
|
-
*/
|
|
206
|
-
formatTime(time: number): string;
|
|
207
|
-
/**
|
|
208
|
-
* 构建消息体日志
|
|
209
|
-
* @param - 消息体
|
|
210
|
-
*/
|
|
211
|
-
makeMessageLog(message: Array<KarinElement>): string;
|
|
212
|
-
/**
|
|
213
|
-
* 更新yaml文件
|
|
214
|
-
* @param filePath - 文件路径
|
|
215
|
-
* @param settings - 设置项
|
|
216
|
-
*/
|
|
217
|
-
updateYaml(filePath: string, settings: {
|
|
218
|
-
/** 键路径 */
|
|
219
|
-
key: string;
|
|
220
|
-
/** 要写入的 */
|
|
221
|
-
val: any;
|
|
222
|
-
/** 需要写入的注释 */
|
|
223
|
-
comment: string;
|
|
224
|
-
}[]): void;
|
|
225
|
-
/**
|
|
226
|
-
* karin按钮转换为QQBot官方按钮 返回官方按钮结构
|
|
227
|
-
* @param button - 按钮
|
|
228
|
-
*/
|
|
229
|
-
buttonToQQBot(button: ButtonElement | KeyBoardElement): Array<{
|
|
230
|
-
buttons: Array<ButtonType>;
|
|
231
|
-
}>;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* 常用方法
|
|
235
|
-
*/
|
|
236
|
-
export declare const common: Common;
|