Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
QQ Bot connects to OpenClaw via the official QQ Bot API (WebSocket gateway). The plugin supports C2C private chat, group @messages, and guild channel messages with rich media (images, voice, video, files).
Status: bundled plugin. Direct messages, group chats, guild channels, and media are supported. Reactions and threads are not supported.
Current OpenClaw releases bundle QQ Bot, so normal packaged builds do not need a separate
openclaw plugins installAppSecret is not stored in plaintext — if you leave the page without saving it, you'll have to regenerate a new one.
bashopenclaw channels add --channel qqbot --token "AppID:AppSecret"
Interactive setup paths:
bashopenclaw channels add openclaw configure --section channels
Minimal config:
json5{ channels: { qqbot: { enabled: true, appId: "YOUR_APP_ID", clientSecret: "YOUR_APP_SECRET", }, }, }
Default-account env vars:
QQBOT_APP_IDQQBOT_CLIENT_SECRETFile-backed AppSecret:
json5{ channels: { qqbot: { enabled: true, appId: "YOUR_APP_ID", clientSecretFile: "/path/to/qqbot-secret.txt", }, }, }
Notes:
openclaw channels add --channel qqbot --token-file ...QQBOT_APP_IDclientSecretRun multiple QQ bots under a single OpenClaw instance:
json5{ channels: { qqbot: { enabled: true, appId: "111111111", clientSecret: "secret-of-bot-1", accounts: { bot2: { enabled: true, appId: "222222222", clientSecret: "secret-of-bot-2", }, }, }, }, }
Each account launches its own WebSocket connection and maintains an independent token cache (isolated by
appIdAdd a second bot via CLI:
bashopenclaw channels add --channel qqbot --account bot2 --token "222222222:secret-of-bot-2"
QQ Bot group chat support uses QQ group OpenIDs, not display names. Add the bot to a group, then mention it or configure the group to run without a mention.
json5{ channels: { qqbot: { groupPolicy: "allowlist", groupAllowFrom: ["member_openid"], groups: { "*": { requireMention: true, historyLimit: 50, toolPolicy: "restricted", }, GROUP_OPENID: { name: "Release room", requireMention: false, ignoreOtherMentions: true, historyLimit: 20, prompt: "Keep replies short and operational.", }, }, }, }, }
groups["*"]groups.GROUP_OPENIDrequireMentiontrueignoreOtherMentionshistoryLimit0toolPolicyfullrestrictednonenamepromptActivation modes are
mentionalwaysrequireMention: truementionrequireMention: falsealwaysThe inbound queue is per peer. Group peers get a larger queue cap, keep human messages ahead of bot-authored chatter when full, and merge bursts of normal group messages into one attributed turn. Slash commands still run one by one.
STT and TTS support two-level configuration with priority fallback:
| Setting | Plugin-specific | Framework fallback |
|---|---|---|
| STT | text channels.qqbot.stt | text tools.media.audio.models[0] |
| TTS | text channels.qqbot.ttstext channels.qqbot.accounts.<id>.tts | text messages.tts |
json5{ channels: { qqbot: { stt: { provider: "your-provider", model: "your-stt-model", }, tts: { provider: "your-provider", model: "your-tts-model", voice: "your-voice", }, accounts: { qq-main: { tts: { providers: { openai: { voice: "shimmer" }, }, }, }, }, }, }, }
Set
enabled: falsemessages.ttsInbound QQ voice attachments are exposed to agents as audio media metadata while keeping raw voice files out of generic
MediaPaths[[audio_as_voice]]Outbound audio upload/transcode behavior can also be tuned with
channels.qqbot.audioFormatPolicysttDirectFormatsuploadDirectFormatstranscodeEnabled| Format | Description |
|---|---|
text qqbot:c2c:OPENID | Private chat (C2C) |
text qqbot:group:GROUP_OPENID | Group chat |
text qqbot:channel:CHANNEL_ID | Guild channel |
Each bot has its own set of user OpenIDs. An OpenID received by Bot A cannot be used to send messages via Bot B.
Built-in commands intercepted before the AI queue:
| Command | Description |
|---|---|
text /bot-ping | Latency test |
text /bot-version | Show the OpenClaw framework version |
text /bot-help | List all commands |
text /bot-me | Show the sender's QQ user ID (openid) for text allowFromtext groupAllowFrom |
text /bot-upgrade | Show the QQBot upgrade guide link |
text /bot-logs | Export recent gateway logs as a file |
text /bot-approve | Approve a pending QQ Bot action (for example, confirming a C2C or group upload) through the native flow. |
Append
?/bot-upgrade ?Admin commands (
/bot-me/bot-upgrade/bot-logs/bot-clear-storage/bot-streaming/bot-approveallowFromallowFrom: ["*"]groupAllowFromallowFromQQ Bot ships as a self-contained engine inside the plugin:
appId~/.openclaw/mediasendMediaAs an alternative to pasting
AppID:AppSecretopenclaw channels add --channel qqbotcredentials/Approval prompts generated by the bot itself (for example, "allow this action?" flows exposed by the QQ Bot API) surface as native OpenClaw prompts that you can accept with
/bot-approveappIdclientSecretmsgIdx--token-file--token-fileappIdQQBOT_APP_ID© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine