test-mirror-qqbot 1.5.5
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 +165 -0
- package/CHANGELOG.zh.md +165 -0
- package/LICENSE +22 -0
- package/README.md +470 -0
- package/README.zh.md +465 -0
- package/bin/qqbot-cli.js +243 -0
- package/clawdbot.plugin.json +16 -0
- package/docs/UPGRADE_GUIDE.md +93 -0
- package/docs/UPGRADE_GUIDE.zh.md +93 -0
- package/docs/commands.md +247 -0
- package/docs/images/07bff56ab68e03173d2af586eeb3bcee_720.jpg +0 -0
- package/docs/images/17cada70df90185d45a2d6dd36e92f2f_720.jpg +0 -0
- package/docs/images/21dce8bfc553ce23d1bd1b270e9c516c copy.jpg +0 -0
- package/docs/images/21dce8bfc553ce23d1bd1b270e9c516c.jpg +0 -0
- package/docs/images/4645f2b3a20822b7f8d6664a708529eb_720.jpg +0 -0
- package/docs/images/59d421891f813b0d3c0cbe12574b6a72_720.jpg +0 -0
- package/docs/images/85d03b8a216f267ab7b2aee248a18a41_720.jpg +0 -0
- package/docs/images/bot_say_hello.jpg +0 -0
- package/docs/images/create_robot.png +0 -0
- package/docs/images/developer_group.png +0 -0
- package/docs/images/fc7b2236896cfba3a37c94be5d59ce3e_720.jpg +0 -0
- package/docs/images/find_appid_secret.png +0 -0
- package/docs/images/hot-update.jpg +0 -0
- package/docs/images/lighthouse_head.png +0 -0
- package/docs/images/ref_msg.png +0 -0
- package/docs/images/reminder.jpg +0 -0
- package/docs/images/slash-help.jpg +0 -0
- package/docs/images/slash-logs.jpg +0 -0
- package/docs/images/slash-ping.jpg +0 -0
- package/docs/images/slash-upgrade.jpg +0 -0
- package/docs/images/slash-version.jpg +0 -0
- package/index.ts +31 -0
- package/moltbot.plugin.json +16 -0
- package/openclaw.plugin.json +16 -0
- package/package.json +25 -0
- package/scripts/cleanup-legacy-plugins.sh +124 -0
- package/scripts/proactive-api-server.ts +369 -0
- package/scripts/send-proactive.ts +293 -0
- package/scripts/set-markdown.sh +156 -0
- package/scripts/test-sendmedia.ts +116 -0
- package/scripts/upgrade-via-alt-pkg.sh +307 -0
- package/scripts/upgrade-via-npm.ps1 +296 -0
- package/scripts/upgrade-via-npm.sh +301 -0
- package/scripts/upgrade-via-source.sh +774 -0
- package/skills/qqbot-channel/SKILL.md +263 -0
- package/skills/qqbot-channel/references/api_references.md +521 -0
- package/skills/qqbot-media/SKILL.md +56 -0
- package/skills/qqbot-remind/SKILL.md +149 -0
- package/src/admin-resolver.ts +140 -0
- package/src/api.ts +819 -0
- package/src/channel.ts +381 -0
- package/src/config.ts +187 -0
- package/src/credential-backup.ts +72 -0
- package/src/gateway.ts +1404 -0
- package/src/image-server.ts +539 -0
- package/src/inbound-attachments.ts +304 -0
- package/src/known-users.ts +353 -0
- package/src/message-queue.ts +169 -0
- package/src/onboarding.ts +274 -0
- package/src/openclaw-plugin-sdk.d.ts +522 -0
- package/src/outbound-deliver.ts +552 -0
- package/src/outbound.ts +1266 -0
- package/src/proactive.ts +530 -0
- package/src/ref-index-store.ts +357 -0
- package/src/reply-dispatcher.ts +334 -0
- package/src/runtime.ts +14 -0
- package/src/session-store.ts +303 -0
- package/src/slash-commands.ts +1305 -0
- package/src/startup-greeting.ts +98 -0
- package/src/stt.ts +86 -0
- package/src/tools/channel.ts +281 -0
- package/src/tools/remind.ts +296 -0
- package/src/types.ts +183 -0
- package/src/typing-keepalive.ts +59 -0
- package/src/update-checker.ts +179 -0
- package/src/user-messages.ts +7 -0
- package/src/utils/audio-convert.ts +803 -0
- package/src/utils/file-utils.ts +167 -0
- package/src/utils/image-size.ts +266 -0
- package/src/utils/media-tags.ts +182 -0
- package/src/utils/payload.ts +265 -0
- package/src/utils/platform.ts +435 -0
- package/src/utils/text-parsing.ts +82 -0
- package/src/utils/upload-cache.ts +128 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openclaw-qqbot",
|
|
3
|
+
"name": "OpenClaw QQ Bot",
|
|
4
|
+
"description": "QQ Bot channel plugin with message support, cron jobs, and proactive messaging",
|
|
5
|
+
"channels": ["qqbot"],
|
|
6
|
+
"skills": ["skills/qqbot-channel", "skills/qqbot-remind", "skills/qqbot-media"],
|
|
7
|
+
"capabilities": {
|
|
8
|
+
"proactiveMessaging": true,
|
|
9
|
+
"cronJobs": true
|
|
10
|
+
},
|
|
11
|
+
"configSchema": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# qqbot Plugin Upgrade Guide
|
|
2
|
+
|
|
3
|
+
If you previously installed qqbot but are not familiar with `openclaw plugins` commands or npm operations, use the built-in scripts first.
|
|
4
|
+
|
|
5
|
+
## Option 1: Recommended (Script-based upgrade)
|
|
6
|
+
|
|
7
|
+
### 1) Upgrade via npm package (easiest, choose either way)
|
|
8
|
+
|
|
9
|
+
**Way A — direct download and run (no clone required):**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh -o /tmp/upgrade-via-npm.sh
|
|
13
|
+
bash /tmp/upgrade-via-npm.sh
|
|
14
|
+
# or: bash /tmp/upgrade-via-npm.sh --version <version>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Way B — run from local repository:**
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Upgrade to latest
|
|
21
|
+
bash ./scripts/upgrade-via-npm.sh
|
|
22
|
+
|
|
23
|
+
# Upgrade to a specific version
|
|
24
|
+
bash ./scripts/upgrade-via-npm.sh --version <version>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
> If `--version` is omitted, `latest` is used by default.
|
|
28
|
+
|
|
29
|
+
### 2) One-click upgrade from local source and restart
|
|
30
|
+
|
|
31
|
+
> Note: this script must be run inside this repository (it installs via `openclaw plugins install .`).
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Run directly if you already have config
|
|
35
|
+
bash ./scripts/upgrade-via-source.sh
|
|
36
|
+
|
|
37
|
+
# First install / first-time config (appid and secret are required)
|
|
38
|
+
bash ./scripts/upgrade-via-source.sh --appid your_appid --secret your_secret
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> Note: For first-time installation, you must provide `appid` and `secret` (or set `QQBOT_APPID` / `QQBOT_SECRET`); for subsequent upgrades with existing config, run `bash ./scripts/upgrade-via-source.sh` directly.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Option 2: Manual upgrade (for users familiar with openclaw / npm)
|
|
46
|
+
|
|
47
|
+
### A. Install latest from npm directly
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Optional: uninstall old plugins first (based on your actual installation)
|
|
51
|
+
# Run `openclaw plugins list` to check installed plugin IDs
|
|
52
|
+
# Common legacy plugin IDs: qqbot / openclaw-qqbot
|
|
53
|
+
# Corresponding npm packages: @sliverp/qqbot / @tencent-connect/openclaw-qqbot
|
|
54
|
+
openclaw plugins uninstall qqbot
|
|
55
|
+
openclaw plugins uninstall openclaw-qqbot
|
|
56
|
+
|
|
57
|
+
# If you installed other qqbot-related plugins, uninstall them as well
|
|
58
|
+
# openclaw plugins uninstall <other-plugin-id>
|
|
59
|
+
|
|
60
|
+
# Install latest
|
|
61
|
+
openclaw plugins install @tencent-connect/openclaw-qqbot@latest
|
|
62
|
+
|
|
63
|
+
# Or install a specific version
|
|
64
|
+
openclaw plugins install @tencent-connect/openclaw-qqbot@<version>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### B. Install from source directory
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cd /path/to/openclaw-qqbot
|
|
71
|
+
npm install --omit=dev
|
|
72
|
+
openclaw plugins install .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### C. Configure channel (required for first install)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
openclaw channels add --channel qqbot --token "appid:appsecret"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### D. Restart gateway
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
openclaw gateway restart
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### E. Verify
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
openclaw plugins list
|
|
91
|
+
openclaw channels list
|
|
92
|
+
openclaw logs --follow
|
|
93
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# qqbot 插件升级指南
|
|
2
|
+
|
|
3
|
+
如果你之前安装过 qqbot 插件,但不熟悉 `openclaw plugins` 升级命令或 `npm` 操作,建议优先使用项目内置脚本。
|
|
4
|
+
|
|
5
|
+
## 方式一:推荐(脚本升级)
|
|
6
|
+
|
|
7
|
+
### 1) 通过 npm 包升级(最省事,二选一)
|
|
8
|
+
|
|
9
|
+
**方式 A:直连下载后执行(无需 clone 仓库)**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh -o /tmp/upgrade-via-npm.sh
|
|
13
|
+
bash /tmp/upgrade-via-npm.sh
|
|
14
|
+
# 或:bash /tmp/upgrade-via-npm.sh --version <version>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**方式 B:在本地仓库内执行脚本**
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# 升级到 latest
|
|
21
|
+
bash ./scripts/upgrade-via-npm.sh
|
|
22
|
+
|
|
23
|
+
# 指定版本
|
|
24
|
+
bash ./scripts/upgrade-via-npm.sh --version <version>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
> 不传 `--version` 时,默认使用 `latest`。
|
|
28
|
+
|
|
29
|
+
### 2) 通过源码一键升级并重启
|
|
30
|
+
|
|
31
|
+
> 注意:该脚本必须在当前仓库内执行(通过 `openclaw plugins install .` 安装本地源码)。
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# 已有配置时可直接执行
|
|
35
|
+
bash ./scripts/upgrade-via-source.sh
|
|
36
|
+
|
|
37
|
+
# 首次安装/首次配置(必须提供 appid 和 secret)
|
|
38
|
+
bash ./scripts/upgrade-via-source.sh --appid your_appid --secret your_secret
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> 注意:首次安装必须设置 `appid` 和 `secret`(或设置环境变量 `QQBOT_APPID` / `QQBOT_SECRET`);后续升级如已有配置可直接执行 `bash ./scripts/upgrade-via-source.sh`。
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 方式二:手动升级(适合熟悉 openclaw / npm 的用户)
|
|
46
|
+
|
|
47
|
+
### A. 直接从 npm 安装最新版本
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# 可选:先卸载旧插件(按实际安装情况执行)
|
|
51
|
+
# 可先执行 `openclaw plugins list` 查看已安装插件 ID
|
|
52
|
+
# 常见历史插件 ID:qqbot / openclaw-qqbot
|
|
53
|
+
# 对应 npm 包:@sliverp/qqbot / @tencent-connect/openclaw-qqbot
|
|
54
|
+
openclaw plugins uninstall qqbot
|
|
55
|
+
openclaw plugins uninstall openclaw-qqbot
|
|
56
|
+
|
|
57
|
+
# 如果你还安装过其它 qqbot 相关插件,也请一并 uninstall
|
|
58
|
+
# openclaw plugins uninstall <其它插件ID>
|
|
59
|
+
|
|
60
|
+
# 安装最新版本
|
|
61
|
+
openclaw plugins install @tencent-connect/openclaw-qqbot@latest
|
|
62
|
+
|
|
63
|
+
# 或安装指定版本
|
|
64
|
+
openclaw plugins install @tencent-connect/openclaw-qqbot@<version>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### B. 从源码目录安装
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cd /path/to/openclaw-qqbot
|
|
71
|
+
npm install --omit=dev
|
|
72
|
+
openclaw plugins install .
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### C. 配置通道(首次安装必做)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
openclaw channels add --channel qqbot --token "appid:appsecret"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### D. 重启网关
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
openclaw gateway restart
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### E. 验证
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
openclaw plugins list
|
|
91
|
+
openclaw channels list
|
|
92
|
+
openclaw logs --follow
|
|
93
|
+
```
|
package/docs/commands.md
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# openclaw 常用指令手册
|
|
2
|
+
|
|
3
|
+
本文档整理了 `openclaw` 的常用命令,方便日常使用和维护。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📦 插件管理
|
|
8
|
+
|
|
9
|
+
### 安装插件
|
|
10
|
+
```bash
|
|
11
|
+
# 从当前目录安装插件
|
|
12
|
+
openclaw plugins install .
|
|
13
|
+
|
|
14
|
+
# 从指定路径安装
|
|
15
|
+
openclaw plugins install /path/to/plugin
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### 禁用/启用插件
|
|
19
|
+
```bash
|
|
20
|
+
# 禁用指定插件
|
|
21
|
+
openclaw plugins disable qqbot
|
|
22
|
+
|
|
23
|
+
# 启用指定插件
|
|
24
|
+
openclaw plugins enable qqbot
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 查看已安装插件
|
|
28
|
+
```bash
|
|
29
|
+
openclaw plugins list
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 📺 通道管理
|
|
35
|
+
|
|
36
|
+
### 配置 qqbot 通道
|
|
37
|
+
```bash
|
|
38
|
+
# qqbot 是自定义插件,通过 config set 配置(不是 channels add)
|
|
39
|
+
openclaw config set channels.qqbot.appId "你的appid"
|
|
40
|
+
openclaw config set channels.qqbot.clientSecret "你的appsecret"
|
|
41
|
+
openclaw config set channels.qqbot.enabled true
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> **注意**:`openclaw channels add --channel` 仅支持内置通道(telegram、discord 等)。
|
|
45
|
+
> qqbot 作为自定义插件,需通过 `config set` 或直接编辑 `~/.openclaw/openclaw.json` 配置。
|
|
46
|
+
|
|
47
|
+
### 禁用通道
|
|
48
|
+
```bash
|
|
49
|
+
openclaw config set channels.qqbot.enabled false
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 查看通道列表
|
|
53
|
+
```bash
|
|
54
|
+
openclaw channels list
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🚀 网关控制
|
|
60
|
+
|
|
61
|
+
### 启动网关
|
|
62
|
+
```bash
|
|
63
|
+
# 普通启动
|
|
64
|
+
openclaw gateway
|
|
65
|
+
|
|
66
|
+
# 详细模式启动(显示更多日志)
|
|
67
|
+
openclaw gateway --verbose
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 重启网关
|
|
71
|
+
```bash
|
|
72
|
+
openclaw gateway restart
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 停止网关
|
|
76
|
+
```bash
|
|
77
|
+
openclaw gateway stop
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 📋 日志查看
|
|
83
|
+
|
|
84
|
+
### 查看实时日志
|
|
85
|
+
```bash
|
|
86
|
+
# 跟踪模式(实时刷新)
|
|
87
|
+
openclaw logs --follow
|
|
88
|
+
|
|
89
|
+
# 普通查看
|
|
90
|
+
openclaw logs
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 查看指定行数
|
|
94
|
+
```bash
|
|
95
|
+
# 查看最近 100 行日志
|
|
96
|
+
openclaw logs --limit 100
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 其他日志选项
|
|
100
|
+
```bash
|
|
101
|
+
# JSON 格式输出
|
|
102
|
+
openclaw logs --json
|
|
103
|
+
|
|
104
|
+
# 纯文本输出(无颜色)
|
|
105
|
+
openclaw logs --plain
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## ⚙️ 配置管理
|
|
111
|
+
|
|
112
|
+
### 设置配置项
|
|
113
|
+
```bash
|
|
114
|
+
# 启用 markdown 消息格式
|
|
115
|
+
openclaw config set channels.qqbot.markdownSupport true
|
|
116
|
+
|
|
117
|
+
# 禁用 markdown 消息格式
|
|
118
|
+
openclaw config set channels.qqbot.markdownSupport false
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 获取配置项
|
|
122
|
+
```bash
|
|
123
|
+
# 查看某个配置项的值
|
|
124
|
+
openclaw config get channels.qqbot.markdownSupport
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 查看所有配置
|
|
128
|
+
```bash
|
|
129
|
+
openclaw config
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 🛠️ 项目脚本
|
|
135
|
+
|
|
136
|
+
项目中提供了一些便捷脚本,简化日常操作:
|
|
137
|
+
|
|
138
|
+
### 一键升级并启动
|
|
139
|
+
```bash
|
|
140
|
+
# 基本用法
|
|
141
|
+
./scripts/upgrade-via-source.sh
|
|
142
|
+
|
|
143
|
+
# 指定 appid 和 secret
|
|
144
|
+
./scripts/upgrade-via-source.sh --appid 123456789 --secret your_secret
|
|
145
|
+
|
|
146
|
+
# 同时启用 markdown
|
|
147
|
+
./scripts/upgrade-via-source.sh --appid 123456789 --secret your_secret --markdown yes
|
|
148
|
+
|
|
149
|
+
# 查看帮助
|
|
150
|
+
./scripts/upgrade-via-source.sh --help
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**环境变量方式:**
|
|
154
|
+
```bash
|
|
155
|
+
export QQBOT_APPID="123456789"
|
|
156
|
+
export QQBOT_SECRET="your_secret"
|
|
157
|
+
export QQBOT_MARKDOWN="no"
|
|
158
|
+
./scripts/upgrade-via-source.sh
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### markdown 设置脚本
|
|
162
|
+
```bash
|
|
163
|
+
# 启用 markdown
|
|
164
|
+
./scripts/set-markdown.sh enable
|
|
165
|
+
|
|
166
|
+
# 禁用 markdown
|
|
167
|
+
./scripts/set-markdown.sh disable
|
|
168
|
+
|
|
169
|
+
# 查看当前状态
|
|
170
|
+
./scripts/set-markdown.sh status
|
|
171
|
+
|
|
172
|
+
# 交互式选择
|
|
173
|
+
./scripts/set-markdown.sh
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### 升级脚本(清理旧版本)
|
|
177
|
+
```bash
|
|
178
|
+
# 清理旧版本插件和配置
|
|
179
|
+
bash ./scripts/cleanup-legacy-plugins.sh
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 📁 常用路径
|
|
185
|
+
|
|
186
|
+
| 路径 | 说明 |
|
|
187
|
+
|------|------|
|
|
188
|
+
| `~/.openclaw/` | openclaw 主目录 |
|
|
189
|
+
| `~/.openclaw/openclaw.json` | 全局配置文件 |
|
|
190
|
+
| `~/.openclaw/extensions/` | 插件安装目录 |
|
|
191
|
+
| `~/.openclaw/extensions/qqbot/` | qqbot 插件目录 |
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 🔧 故障排查
|
|
196
|
+
|
|
197
|
+
### 查看详细日志
|
|
198
|
+
```bash
|
|
199
|
+
openclaw logs --follow
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### 检查插件状态
|
|
203
|
+
```bash
|
|
204
|
+
openclaw plugins list
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### 检查通道配置
|
|
208
|
+
```bash
|
|
209
|
+
openclaw channels list
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### 重新安装插件
|
|
213
|
+
```bash
|
|
214
|
+
# 1. 清理旧版本
|
|
215
|
+
bash ./scripts/cleanup-legacy-plugins.sh
|
|
216
|
+
|
|
217
|
+
# 2. 重新安装
|
|
218
|
+
openclaw plugins install .
|
|
219
|
+
|
|
220
|
+
# 3. 重新配置通道
|
|
221
|
+
openclaw config set channels.qqbot.appId "你的appid"
|
|
222
|
+
openclaw config set channels.qqbot.clientSecret "你的appsecret"
|
|
223
|
+
openclaw config set channels.qqbot.enabled true
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## ⚠️ 注意事项
|
|
229
|
+
|
|
230
|
+
1. **不要使用 sudo 运行脚本**:会导致配置文件权限问题
|
|
231
|
+
2. **markdown 功能需要权限**:启用前需在 QQ 开放平台申请 markdown 消息权限
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 📚 更多帮助
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# 查看 openclaw 帮助
|
|
239
|
+
openclaw --help
|
|
240
|
+
|
|
241
|
+
# 查看子命令帮助
|
|
242
|
+
openclaw plugins --help
|
|
243
|
+
openclaw channels --help
|
|
244
|
+
openclaw gateway --help
|
|
245
|
+
openclaw config --help
|
|
246
|
+
openclaw logs --help
|
|
247
|
+
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
2
|
+
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
|
|
3
|
+
|
|
4
|
+
import { qqbotPlugin } from "./src/channel.js";
|
|
5
|
+
import { setQQBotRuntime } from "./src/runtime.js";
|
|
6
|
+
import { registerChannelTool } from "./src/tools/channel.js";
|
|
7
|
+
import { registerRemindTool } from "./src/tools/remind.js";
|
|
8
|
+
|
|
9
|
+
const plugin = {
|
|
10
|
+
id: "openclaw-qqbot",
|
|
11
|
+
name: "QQ Bot",
|
|
12
|
+
description: "QQ Bot channel plugin",
|
|
13
|
+
configSchema: emptyPluginConfigSchema(),
|
|
14
|
+
register(api: OpenClawPluginApi) {
|
|
15
|
+
setQQBotRuntime(api.runtime);
|
|
16
|
+
api.registerChannel({ plugin: qqbotPlugin });
|
|
17
|
+
registerChannelTool(api);
|
|
18
|
+
registerRemindTool(api);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default plugin;
|
|
23
|
+
|
|
24
|
+
export { qqbotPlugin } from "./src/channel.js";
|
|
25
|
+
export { setQQBotRuntime, getQQBotRuntime } from "./src/runtime.js";
|
|
26
|
+
export { qqbotOnboardingAdapter } from "./src/onboarding.js";
|
|
27
|
+
export * from "./src/types.js";
|
|
28
|
+
export * from "./src/api.js";
|
|
29
|
+
export * from "./src/config.js";
|
|
30
|
+
export * from "./src/gateway.js";
|
|
31
|
+
export * from "./src/outbound.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openclaw-qqbot",
|
|
3
|
+
"name": "OpenClaw QQ Bot",
|
|
4
|
+
"description": "QQ Bot channel plugin with message support, cron jobs, and proactive messaging",
|
|
5
|
+
"channels": ["qqbot"],
|
|
6
|
+
"skills": ["skills/qqbot-channel", "skills/qqbot-remind", "skills/qqbot-media"],
|
|
7
|
+
"capabilities": {
|
|
8
|
+
"proactiveMessaging": true,
|
|
9
|
+
"cronJobs": true
|
|
10
|
+
},
|
|
11
|
+
"configSchema": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openclaw-qqbot",
|
|
3
|
+
"name": "OpenClaw QQ Bot",
|
|
4
|
+
"description": "QQ Bot channel plugin with message support, cron jobs, and proactive messaging",
|
|
5
|
+
"channels": ["qqbot"],
|
|
6
|
+
"skills": ["skills/qqbot-channel", "skills/qqbot-remind", "skills/qqbot-media"],
|
|
7
|
+
"capabilities": {
|
|
8
|
+
"proactiveMessaging": true,
|
|
9
|
+
"cronJobs": true
|
|
10
|
+
},
|
|
11
|
+
"configSchema": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "test-mirror-qqbot",
|
|
3
|
+
"version": "1.5.5",
|
|
4
|
+
"description": "<div align=\"center\">",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"test-qqbot": "bin/qqbot-cli.js"
|
|
8
|
+
},
|
|
9
|
+
"directories": {
|
|
10
|
+
"doc": "docs"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/Hangout7461/openclaw-qqbot.git"
|
|
18
|
+
},
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/Hangout7461/openclaw-qqbot/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/Hangout7461/openclaw-qqbot#readme"
|
|
25
|
+
}
|