bot 机器配置前文
},
"qqbot": {
"enabled": true,
"accounts": {
"default": {
"enabled": true,
"appId": "1903207629",
"clientSecret": "N2iO5mUDwgQBwiUH4shWMC3umeXQKFA6"
},
"bot2": {
"enabled": true,
"appId": "1903226226",
"clientSecret": "dN7sdPCznbQF5vmdVNG93xsnjfcZXVUU"
}
}
}
},
让龙虾学习
🤖 多账户配置(Multi-Bot)
支持在同一个 OpenClaw 实例下同时运行多个 QQ 机器人。
### 配置方式
编辑 `~/.openclaw/openclaw.json`,在 `channels.qqbot` 下增加 `accounts` 字段:
“`json
{
“channels”: {
“qqbot”: {
“enabled”: true,
“appId”: “111111111”,
“clientSecret”: “secret-of-bot-1”,
“accounts”: {
“bot2”: {
“enabled”: true,
“appId”: “222222222”,
“clientSecret”: “secret-of-bot-2”
},
“bot3”: {
“enabled”: true,
“appId”: “333333333”,
“clientSecret”: “secret-of-bot-3”
}
}
}
}
}
“`
**说明:**
– 顶层的 `appId` / `clientSecret` 是**默认账户**(accountId = `”default”`)
– `accounts` 下的每个 key(如 `bot2`、`bot3`)就是该账户的 `accountId`
– 每个账户都可以独立配置 `enabled`、`name`、`allowFrom`、`systemPrompt` 等字段
– 也可以不配顶层默认账户,只在 `accounts` 里配置所有机器人
通过 CLI 添加第二个机器人(如果框架支持 `–account` 参数):