onebots 0.4.5 → 0.4.6
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/lib/onebot.js
CHANGED
|
@@ -30,7 +30,7 @@ const app_1 = require("./server/app");
|
|
|
30
30
|
const utils_1 = require("./utils");
|
|
31
31
|
const path_1 = require("path");
|
|
32
32
|
const icqq_1 = require("icqq");
|
|
33
|
-
const
|
|
33
|
+
const icqq_2 = require("icqq");
|
|
34
34
|
const V11_1 = require("./service/V11");
|
|
35
35
|
const V12_1 = require("./service/V12");
|
|
36
36
|
const process = __importStar(require("process"));
|
|
@@ -48,6 +48,7 @@ class OneBot extends events_1.EventEmitter {
|
|
|
48
48
|
this.uin = uin;
|
|
49
49
|
config = [].concat(config);
|
|
50
50
|
let platform = this.app.config.platform;
|
|
51
|
+
let sign_api_addr = this.app.config.sign_api_addr;
|
|
51
52
|
this.config = config.map(c => {
|
|
52
53
|
if (c.platform)
|
|
53
54
|
platform = c.platform;
|
|
@@ -64,7 +65,7 @@ class OneBot extends events_1.EventEmitter {
|
|
|
64
65
|
throw new Error('不支持的oneBot版本:' + c.version);
|
|
65
66
|
}
|
|
66
67
|
});
|
|
67
|
-
this.client = new icqq_1.Client({ platform, data_dir: (0, path_1.join)(app_1.App.configDir, 'data') });
|
|
68
|
+
this.client = new icqq_1.Client({ platform, sign_api_addr, data_dir: (0, path_1.join)(app_1.App.configDir, 'data') });
|
|
68
69
|
this.instances = this.config.map(c => {
|
|
69
70
|
switch (c.version) {
|
|
70
71
|
case 'V11':
|
|
@@ -179,13 +180,13 @@ class OneBot extends events_1.EventEmitter {
|
|
|
179
180
|
case 'group':
|
|
180
181
|
data.message.unshift({
|
|
181
182
|
type: 'reply',
|
|
182
|
-
message_id: (0,
|
|
183
|
+
message_id: (0, icqq_2.genGroupMessageId)(data.group_id, data.source.user_id, data.source.seq, data.source.rand, data.source.time)
|
|
183
184
|
});
|
|
184
185
|
break;
|
|
185
186
|
case 'private':
|
|
186
187
|
data.message.unshift({
|
|
187
188
|
type: 'reply',
|
|
188
|
-
message_id: (0,
|
|
189
|
+
message_id: (0, icqq_2.genDmMessageId)(data.source.user_id, data.source.seq, data.source.rand, data.source.time)
|
|
189
190
|
});
|
|
190
191
|
break;
|
|
191
192
|
}
|
package/lib/server/app.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onebots",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "基于icqq的多例oneBot实现",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@koa/router": "^10.1.1",
|
|
57
57
|
"@zhinjs/shared": "^0.0.9",
|
|
58
|
-
"icqq": "^0.
|
|
58
|
+
"icqq": "^0.4.1",
|
|
59
59
|
"icqq-cq-enable": "^1.0.1",
|
|
60
60
|
"js-yaml": "^4.1.0",
|
|
61
61
|
"koa": "^2.13.4",
|