From a633187fff1eebf607651a7b005310338c2086e0 Mon Sep 17 00:00:00 2001 From: sliverp Date: Thu, 29 Jan 2026 12:27:35 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A0=BC=E5=BC=8F=E4=B8=BA=20JSON=20?= =?UTF-8?q?=E5=B9=B6=E7=A7=BB=E9=99=A4=E5=A4=9A=E8=B4=A6=E6=88=B7=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 46 ++++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index b8124d5..c5076d0 100644 --- a/README.md +++ b/README.md @@ -24,19 +24,21 @@ moltbot plugins install /path/to/qqbot --force 2. 创建机器人应用 3. 获取 `AppID` 和 `AppSecret`(ClientSecret) -### 2. 配置 moltbot.yaml +### 2. 配置 clawdbot.json -```yaml -channels: - qqbot: - enabled: true - appId: "你的AppID" - clientSecret: "你的AppSecret" - - # 可选:自定义系统提示词 - systemPrompt: | - 你是一个友好的助手。 - 请用简洁的语言回答问题。 +编辑 `~/.clawdbot/clawdbot.json`: + +```json +{ + "channels": { + "qqbot": { + "enabled": true, + "appId": "你的AppID", + "clientSecret": "你的AppSecret", + "systemPrompt": "你是一个友好的助手" + } + } +} ``` ### 3. 环境变量配置(可选) @@ -48,24 +50,6 @@ export QQBOT_APP_ID="你的AppID" export QQBOT_CLIENT_SECRET="你的AppSecret" ``` -### 4. 多账户配置 - -```yaml -channels: - qqbot: - enabled: true - # 默认账户 - appId: "默认AppID" - clientSecret: "默认AppSecret" - - # 多账户 - accounts: - bot2: - appId: "第二个机器人AppID" - clientSecret: "第二个机器人AppSecret" - systemPrompt: "你是第二个机器人" -``` - ## 配置项说明 | 配置项 | 类型 | 必填 | 说明 | @@ -76,8 +60,6 @@ channels: | `enabled` | boolean | 否 | 是否启用,默认 `true` | | `name` | string | 否 | 账户显示名称 | | `systemPrompt` | string | 否 | 自定义系统提示词 | -| `dmPolicy` | string | 否 | 私信策略:`open`/`pairing`/`allowlist` | -| `allowFrom` | string[] | 否 | 允许的发送者列表(配合 `allowlist` 策略) | ## 支持的消息类型