@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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @zhin.js/adapter-onebot11
2
2
 
3
+ ## 1.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - c490260: fix: 更新脚手架结构,优化包依赖
8
+ - Updated dependencies [c490260]
9
+ - @zhin.js/http@1.0.6
10
+ - zhin.js@1.0.9
11
+
3
12
  ## 1.0.9
4
13
 
5
14
  ### Patch Changes
package/README.md CHANGED
@@ -20,20 +20,23 @@ npm install @zhin.js/adapter-onebot11
20
20
 
21
21
  ## 配置
22
22
 
23
- ```javascript
23
+ ```typescript
24
24
  // zhin.config.ts
25
- export default {
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: 'your-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.9",
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.8",
24
- "@zhin.js/http": "1.0.5",
25
- "@zhin.js/types": "1.0.3"
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": {