onebots 0.0.25 → 0.0.26

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.
Files changed (2) hide show
  1. package/lib/db.js +3 -4
  2. package/package.json +1 -1
package/lib/db.js CHANGED
@@ -41,16 +41,15 @@ class Db extends events_1.EventEmitter {
41
41
  return Reflect.get(target, p, receiver);
42
42
  },
43
43
  set(target, p, value, receiver) {
44
- const result = Reflect.set(target, p, value, receiver);
45
- _this.set(`${key}`, target);
46
- return result;
44
+ const res = Reflect.set(target, p, value, receiver);
45
+ _this.set(key, result);
46
+ return res;
47
47
  }
48
48
  }) : result;
49
49
  }
50
50
  set(key, value, escape = true) {
51
51
  const func = new Function('value', `return this.data.${key}=value`);
52
52
  let result = escape ? func.apply(this, [value]) : this.data[key] = value;
53
- this.raw_data = JSON.stringify(this.data, null, 2);
54
53
  this.write();
55
54
  return result;
56
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onebots",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "基于oicq的多例oneBot实现",
5
5
  "engines": {
6
6
  "node": ">=16"