docs: 更新配置文件格式为 JSON 并移除多账户支持
This commit is contained in:
46
README.md
46
README.md
@@ -24,19 +24,21 @@ moltbot plugins install /path/to/qqbot --force
|
|||||||
2. 创建机器人应用
|
2. 创建机器人应用
|
||||||
3. 获取 `AppID` 和 `AppSecret`(ClientSecret)
|
3. 获取 `AppID` 和 `AppSecret`(ClientSecret)
|
||||||
|
|
||||||
### 2. 配置 moltbot.yaml
|
### 2. 配置 clawdbot.json
|
||||||
|
|
||||||
```yaml
|
编辑 `~/.clawdbot/clawdbot.json`:
|
||||||
channels:
|
|
||||||
qqbot:
|
```json
|
||||||
enabled: true
|
{
|
||||||
appId: "你的AppID"
|
"channels": {
|
||||||
clientSecret: "你的AppSecret"
|
"qqbot": {
|
||||||
|
"enabled": true,
|
||||||
# 可选:自定义系统提示词
|
"appId": "你的AppID",
|
||||||
systemPrompt: |
|
"clientSecret": "你的AppSecret",
|
||||||
你是一个友好的助手。
|
"systemPrompt": "你是一个友好的助手"
|
||||||
请用简洁的语言回答问题。
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. 环境变量配置(可选)
|
### 3. 环境变量配置(可选)
|
||||||
@@ -48,24 +50,6 @@ export QQBOT_APP_ID="你的AppID"
|
|||||||
export QQBOT_CLIENT_SECRET="你的AppSecret"
|
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` |
|
| `enabled` | boolean | 否 | 是否启用,默认 `true` |
|
||||||
| `name` | string | 否 | 账户显示名称 |
|
| `name` | string | 否 | 账户显示名称 |
|
||||||
| `systemPrompt` | string | 否 | 自定义系统提示词 |
|
| `systemPrompt` | string | 否 | 自定义系统提示词 |
|
||||||
| `dmPolicy` | string | 否 | 私信策略:`open`/`pairing`/`allowlist` |
|
|
||||||
| `allowFrom` | string[] | 否 | 允许的发送者列表(配合 `allowlist` 策略) |
|
|
||||||
|
|
||||||
## 支持的消息类型
|
## 支持的消息类型
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user