node-karin 0.6.23 → 0.6.24

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 CHANGED
@@ -4,7 +4,9 @@
4
4
 
5
5
  基于 [Kritor](https://github.com/KarinJS/kritor-kotlin) 标准进行开发的 [nodejs](https://nodejs.org/en) 机器人框架
6
6
 
7
- > 本项目正在开发中,不建议用于生产环境
7
+ > 本项目正在开发中,现阶段我并不能为你解决任何问题,谨慎使用。
8
+ > 此项目不想成为、代替任何项目,也没有这个能力,请别造谣。
9
+ > ~~不欢迎某些人,勿扰谢谢(ps: )~~
8
10
 
9
11
  ---
10
12
 
@@ -19,21 +21,18 @@
19
21
  - [x] 支持被动ws
20
22
  - [ ] 支持onebot HTTP
21
23
  - [x] 支持[onebots](https://github.com/lc-cn/onebots)
22
- - [x] ~~puppeteer渲染图片~~
23
24
  - [x] 外置[puppeteer](https://github.com/KarinJS/karin-plugin-puppeteer)
24
- - [ ] 降低对`redis`的依赖
25
- - [ ] 支持 package.karin
26
- - [ ] 支持db通用接口
27
- - [ ] 支持动态加载插件
25
+ - [x] 降低对`redis`的依赖,开始逐渐抛弃redis
26
+ - [x] 支持 package.karin
27
+ - [ ] ~~支持db通用接口~~
28
+ - [ ] ~~支持动态加载插件~~
28
29
  - [x] 支持`redis`集群
29
30
 
30
- > 关于`puppeteer`,由于内置的chrome过于臃肿,将会移除内置的pupppeteer,分开搭建或使用远程、作为插件等方式使用puppeteer。
31
- > [karin-puppeteer](https://github.com/KarinJS/karin-puppeteer)
32
-
33
31
  ### 感谢
34
32
 
35
33
  Karin的开发离不开以下项目的帮助:
36
34
 
35
+ - [icqqjs](https://github.com/icqqjs)
37
36
  - [Kritor](https://github.com/KarinJS/kritor) Kritor标准
38
37
  - [OpenShamrock](https://github.com/whitechi73/OpenShamrock) Kritor标准Kotlin的实现
39
38
  - [onebots](https://github.com/lc-cn/onebots) onebots适配器
@@ -47,7 +46,6 @@ QQGroup: 967068507
47
46
 
48
47
  Discord: [☘Karin的喵趴~](https://discord.com/channels/1251552521957408878/1251552521957408881)
49
48
 
50
-
51
49
  ### 贡献者
52
50
 
53
51
  > 🌟星光闪烁,你们的智慧如同璀璨的夜空。感谢所有为**Karin**做出贡献的人!
@@ -353,6 +353,11 @@ export class OB11Event {
353
353
  return this.adapter.logger('error', '未知通知事件:', JSON.stringify(data));
354
354
  }
355
355
  }
356
+ notice.bot = this.adapter;
357
+ /**
358
+ * 快速回复 开发者不应该使用这个方法,应该使用由karin封装过后的reply方法
359
+ */
360
+ notice.replyCallback = async (elements) => await this.adapter.SendMessage(notice.contact, elements);
356
361
  listener.emit('notice', notice);
357
362
  }
358
363
  /** 请求事件 */
@@ -383,6 +388,11 @@ export class OB11Event {
383
388
  message: data.comment,
384
389
  },
385
390
  });
391
+ request.bot = this.adapter;
392
+ /**
393
+ * 快速回复 开发者不应该使用这个方法,应该使用由karin封装过后的reply方法
394
+ */
395
+ request.replyCallback = async (elements) => await this.adapter.SendMessage(request.contact, elements);
386
396
  listener.emit('request', request);
387
397
  return;
388
398
  }
@@ -414,6 +424,11 @@ export class OB11Event {
414
424
  message: data.comment,
415
425
  },
416
426
  });
427
+ request.bot = this.adapter;
428
+ /**
429
+ * 快速回复 开发者不应该使用这个方法,应该使用由karin封装过后的reply方法
430
+ */
431
+ request.replyCallback = async (elements) => await this.adapter.SendMessage(request.contact, elements);
417
432
  listener.emit('request', request);
418
433
  return;
419
434
  }
@@ -131,8 +131,8 @@ export declare const common: {
131
131
  /**
132
132
  * 制作简单转发,返回segment.node[]。仅简单包装node,也可以自己组装
133
133
  * @param elements
134
- * @param fakeUin 用户id
135
- * @param fakeNick 用户昵称
134
+ * @param fakeUin 转发用户的QQ号 必填
135
+ * @param fakeNick 转发用户显示的昵称 必填
136
136
  */
137
137
  makeForward(elements: KarinElement | KarinElement[], fakeUin: string, fakeNick: string): Array<NodeElement>;
138
138
  /**
@@ -352,8 +352,8 @@ export const common = new (class Common {
352
352
  /**
353
353
  * 制作简单转发,返回segment.node[]。仅简单包装node,也可以自己组装
354
354
  * @param elements
355
- * @param fakeUin 用户id
356
- * @param fakeNick 用户昵称
355
+ * @param fakeUin 转发用户的QQ号 必填
356
+ * @param fakeNick 转发用户显示的昵称 必填
357
357
  */
358
358
  makeForward (elements, fakeUin, fakeNick) {
359
359
  if (!Array.isArray(elements)) { elements = [elements] }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.6.23",
3
+ "version": "0.6.24",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",