node-karin 0.11.8 → 0.11.10
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 +5 -6
- package/lib/adapter/input/index.js +1 -1
- package/lib/event/handler/base.js +3 -3
- package/package.json +2 -19
package/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/neostandard/neostandard)
|
|
4
4
|
|
|
5
|
-
[文档](https://karinjs.github.io/Karin/)
|
|
5
|
+
[文档](https://karinjs.github.io/Karin/)
|
|
6
|
+
[文档`(瑜笙提供)`](https://karin.fun)
|
|
6
7
|
|
|
7
8
|
基于 [Kritor](https://github.com/KarinJS/kritor-kotlin) 标准进行开发的 [nodejs](https://nodejs.org/en) 机器人框架
|
|
8
9
|
|
|
@@ -14,11 +15,11 @@
|
|
|
14
15
|
|
|
15
16
|
### 目前计划
|
|
16
17
|
|
|
17
|
-
- [x] [kritor标准](https://github.com/KarinJS/kritor)
|
|
18
|
+
- [x] [kritor标准](https://github.com/KarinJS/kritor) **暂时去除**
|
|
18
19
|
- [x] [onebot11](https://github.com/botuniverse/onebot-11)
|
|
19
20
|
- [ ] [onebot12](https://onebot.dev/)
|
|
20
21
|
- [ ] 支持主动[grpc](https://grpc.io/)
|
|
21
|
-
- [x] 支持被动[grpc](https://grpc.io/)
|
|
22
|
+
- [x] 支持被动[grpc](https://grpc.io/) **暂时去除**
|
|
22
23
|
- [x] 支持主动ws 12暂未支持
|
|
23
24
|
- [x] 支持被动ws
|
|
24
25
|
- [ ] 支持onebot HTTP
|
|
@@ -26,8 +27,6 @@
|
|
|
26
27
|
- [x] 外置[puppeteer](https://github.com/KarinJS/karin-plugin-puppeteer)
|
|
27
28
|
- [x] 降低对`redis`的依赖,开始逐渐抛弃redis
|
|
28
29
|
- [x] 支持 package.karin
|
|
29
|
-
- [ ] ~~支持db通用接口~~
|
|
30
|
-
- [ ] ~~支持动态加载插件~~
|
|
31
30
|
- [x] 支持`redis`集群
|
|
32
31
|
|
|
33
32
|
### 感谢
|
|
@@ -44,7 +43,7 @@ Karin的开发离不开以下项目的帮助:
|
|
|
44
43
|
|
|
45
44
|
### 来加入我们吧~
|
|
46
45
|
|
|
47
|
-
QQGroup: 967068507
|
|
46
|
+
QQGroup: 967068507
|
|
48
47
|
|
|
49
48
|
Discord: [☘Karin的喵趴~](https://discord.com/channels/1251552521957408878/1251552521957408881)
|
|
50
49
|
|
|
@@ -142,7 +142,7 @@ export class AdapterInput {
|
|
|
142
142
|
text.push(`[未知消息类型:${JSON.stringify(v)}]`);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
this.logger('info', `${logger.green('Send private input: ')}${text.join('')}`);
|
|
145
|
+
this.logger('info', `${logger.green('Send private input: ')}${text.join('').replace(/\n/g, '\\n')}`);
|
|
146
146
|
return { message_id: 'input' };
|
|
147
147
|
}
|
|
148
148
|
getAvatarUrl() {
|
|
@@ -171,10 +171,10 @@ export class EventBaseHandler {
|
|
|
171
171
|
const result = this.e.replyCallback(message, retry_count);
|
|
172
172
|
const ReplyLog = common.makeMessageLog(message);
|
|
173
173
|
if (this.e.isGroup) {
|
|
174
|
-
review.GroupMsgPrint(this.e) && logger.bot('info', this.e.self_id, `${logger.green(`Send Group ${this.e.group_id}: `)}${ReplyLog}`);
|
|
174
|
+
review.GroupMsgPrint(this.e) && logger.bot('info', this.e.self_id, `${logger.green(`Send Group ${this.e.group_id}: `)}${ReplyLog.replace(/\n/g, '\\n')}`);
|
|
175
175
|
}
|
|
176
176
|
else {
|
|
177
|
-
this.e.self_id !== 'input' && logger.bot('info', this.e.self_id, `${logger.green(`Send private ${this.e.user_id}: `)}${ReplyLog}`);
|
|
177
|
+
this.e.self_id !== 'input' && logger.bot('info', this.e.self_id, `${logger.green(`Send private ${this.e.user_id}: `)}${ReplyLog.replace(/\n/g, '\\n')}`);
|
|
178
178
|
}
|
|
179
179
|
try {
|
|
180
180
|
listener.emit('karin:count:send', 1);
|
|
@@ -186,7 +186,7 @@ export class EventBaseHandler {
|
|
|
186
186
|
logger.bot('debug', this.e.self_id, `回复消息结果:${JSON.stringify(request)}`);
|
|
187
187
|
}
|
|
188
188
|
catch (error) {
|
|
189
|
-
logger.bot('error', this.e.self_id, `回复消息失败:${ReplyLog}`);
|
|
189
|
+
logger.bot('error', this.e.self_id, `回复消息失败:${ReplyLog.replace(/\n/g, '\\n')}`);
|
|
190
190
|
logger.bot('error', this.e.self_id, error.stack || error.message || JSON.stringify(error));
|
|
191
191
|
}
|
|
192
192
|
/** 快速撤回 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-karin",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "基于 Kritor 进行开发的nodejs机器人框架",
|
|
6
6
|
"homepage": "https://github.com/KarinJS/Karin",
|
|
@@ -139,9 +139,6 @@
|
|
|
139
139
|
"sort": "npx sort-package-json && sort-json tsconfig.json",
|
|
140
140
|
"dev": "node lib/cli/dev.js"
|
|
141
141
|
},
|
|
142
|
-
"peerDependencies": {
|
|
143
|
-
"node-karin": "link:./lib"
|
|
144
|
-
},
|
|
145
142
|
"dependencies": {
|
|
146
143
|
"art-template": "4.13.2",
|
|
147
144
|
"axios": "1.7.3",
|
|
@@ -158,20 +155,6 @@
|
|
|
158
155
|
"ws": "8.18.0",
|
|
159
156
|
"yaml": "2.5.0"
|
|
160
157
|
},
|
|
161
|
-
"devDependencies": {
|
|
162
|
-
"@types/express": "^4.17.21",
|
|
163
|
-
"@types/lodash": "^4.17.7",
|
|
164
|
-
"@types/node": "^20.14.11",
|
|
165
|
-
"@types/node-schedule": "^2.1.7",
|
|
166
|
-
"@types/ws": "^8.5.11",
|
|
167
|
-
"eslint": "^9.7.0",
|
|
168
|
-
"neostandard": "^0.11.1",
|
|
169
|
-
"sort-json": "^2.0.1",
|
|
170
|
-
"sort-package-json": "^2.10.0",
|
|
171
|
-
"tsc-alias": "^1.8.10",
|
|
172
|
-
"tsx": "^4.16.2",
|
|
173
|
-
"typescript": "^5.5.3"
|
|
174
|
-
},
|
|
175
158
|
"engines": {
|
|
176
159
|
"node": ">=18"
|
|
177
160
|
},
|
|
@@ -179,4 +162,4 @@
|
|
|
179
162
|
"access": "public",
|
|
180
163
|
"registry": "https://registry.npmjs.org"
|
|
181
164
|
}
|
|
182
|
-
}
|
|
165
|
+
}
|