@zhin.js/adapter-onebot11 1.0.9 → 1.0.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/CHANGELOG.md +9 -0
- package/README.md +9 -6
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -20,20 +20,23 @@ npm install @zhin.js/adapter-onebot11
|
|
|
20
20
|
|
|
21
21
|
## 配置
|
|
22
22
|
|
|
23
|
-
```
|
|
23
|
+
```typescript
|
|
24
24
|
// zhin.config.ts
|
|
25
|
-
|
|
25
|
+
import { defineConfig } from 'zhin.js'
|
|
26
|
+
|
|
27
|
+
export default defineConfig({
|
|
26
28
|
bots: [
|
|
27
29
|
{
|
|
28
30
|
context: 'onebot11',
|
|
29
31
|
name: 'my-bot', // 机器人名称
|
|
30
|
-
url: 'ws://localhost:8080', // OneBot服务器地址
|
|
31
|
-
access_token:
|
|
32
|
+
url: process.env.ONEBOT_URL || 'ws://localhost:8080', // OneBot服务器地址
|
|
33
|
+
access_token: process.env.ONEBOT_TOKEN, // 访问令牌(可选)
|
|
32
34
|
reconnect_interval: 5000, // 重连间隔(毫秒)
|
|
33
35
|
heartbeat_interval: 30000, // 心跳间隔(毫秒)
|
|
34
36
|
}
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
+
],
|
|
38
|
+
plugins: ['adapter-onebot11']
|
|
39
|
+
})
|
|
37
40
|
```
|
|
38
41
|
|
|
39
42
|
## 支持的OneBot实现
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/adapter-onebot11",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "zhin adapter for onebot11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"typescript": "^5.3.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"zhin.js": "1.0.
|
|
24
|
-
"@zhin.js/http": "1.0.
|
|
25
|
-
"
|
|
23
|
+
"@zhin.js/types": "1.0.3",
|
|
24
|
+
"@zhin.js/http": "1.0.6",
|
|
25
|
+
"zhin.js": "1.0.9"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"@zhin.js/types": {
|