node-karin 0.11.2 → 0.11.3

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.
@@ -24,7 +24,7 @@ export function AdapterConvertKarin(data) {
24
24
  elements.push(segment.video(i.data.url || i.data.file));
25
25
  break;
26
26
  case 'at':
27
- elements.push(segment.at(i.data.qq, i.data.qq));
27
+ elements.push(segment.at(i.data.qq, i.data.qq, i.data.name));
28
28
  break;
29
29
  case 'poke':
30
30
  elements.push(segment.poke(Number(i.data.id), Number(i.data.type)));
@@ -81,7 +81,7 @@ export function KarinConvertAdapter(data, bot) {
81
81
  elements.push({ type, data: { id: i.id } });
82
82
  break;
83
83
  case "at" /* OB11SegmentType.At */:
84
- elements.push({ type, data: { qq: String(i.uid || i.uin) } });
84
+ elements.push({ type, data: { qq: String(i.uid || i.uin), name: i.name } });
85
85
  break;
86
86
  case "reply" /* OB11SegmentType.Reply */:
87
87
  elements.push({ type, data: { id: i.message_id } });
@@ -192,7 +192,7 @@ class PluginLoader {
192
192
  const list = [];
193
193
  const info = await common.getNpmPlugins(true);
194
194
  for (const { plugin, path: _path, file, isMain } of info) {
195
- if (!isMain) {
195
+ if (isMain) {
196
196
  const root = path.join(process.cwd(), 'node_modules', plugin, _path);
197
197
  this.loadMain(root, file, true);
198
198
  continue;
@@ -95,6 +95,7 @@ export interface AtSegment extends Segment {
95
95
  type: OB11SegmentType.At;
96
96
  data: {
97
97
  qq: string | 'all';
98
+ name?: string;
98
99
  };
99
100
  }
100
101
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",