OpenClaw

OpenClaw QQ Bot Channel

Messaging
Medium

Connect OpenClaw to QQ — China's most popular consumer messaging platform by Tencent — using the community plugin @openclaw-china/qqbot (QQ is not an officially built-in OpenClaw channel). Developed by BytePioneer-AI with 3.2k stars on GitHub, this is the most popular and actively maintained QQ plugin for OpenClaw. It supports direct messages, group chats (@mention trigger), QQ channel messages, channel DMs, rich media (images, audio, video, files), voice-to-text (via Tencent Cloud ASR), Markdown delivery modes, and quote message context. Install the plugin, create a bot on the QQ Open Platform, run the setup wizard, and start chatting.

Quick Info
DifficultyMedium
CategoryMessaging
Features Supported4 / 6

QQ Supported Features

Text Messages

Supported

Media & Files

Supported

Reactions

Not Supported

Threads

Not Supported

Voice Messages

Supported

Group Chat

Supported

QQ Prerequisites

  • A registered QQ account with developer access
  • QQ plugin installed: openclaw plugins install @openclaw-china/qqbot
  • OpenClaw Gateway running and configured
  • Node.js 18+ installed on your server

QQ Quick Setup

1

Install the QQ Bot plugin

Run 'openclaw plugins install @openclaw-china/qqbot' in your terminal. This plugin by BytePioneer-AI has 3.2k stars and is the most popular QQ integration for OpenClaw. Alternatively, you can install the bundled China channels package with 'openclaw plugins install @openclaw-china/channels', which includes QQ, Feishu, DingTalk, WeCom, and personal WeChat support in a single package. A lighter alternative is @sliverp/qqbot (186 stars), a dedicated QQ-only plugin.

2

Create a QQ Bot on the Open Platform

Go to q.qq.com (QQ Open Platform) and log in with your QQ account. Developer identity verification is required and may take 1-2 business days. Click 'Create Bot Application', fill in the bot name, description, and avatar. Once created, navigate to 'Development Settings' to copy your AppID and ClientSecret. These credentials are required for OpenClaw to authenticate with QQ's servers.

3

Configure with setup wizard or manually

Recommended: Run 'openclaw china setup' to launch the interactive setup wizard, which walks you through QQ configuration step by step. For quick setup, use: openclaw channels add --channel qqbot --token "AppID:ClientSecret". For manual configuration, add the qqbot channel block to ~/.openclaw/openclaw.json with your appId and clientSecret. Note the config key is 'qqbot' (not 'qq').

4

Test and go live

Run 'openclaw gateway restart' to restart the Gateway, then send a message to your bot in QQ to verify the connection works. Once testing is complete, submit your bot for review on the QQ Open Platform. After Tencent approval, your bot will be publicly available.

QQ Configuration Example

config.json
{
  "channels": {
    "qqbot": {
      "enabled": true,
      "appId": "your-app-id",
      "clientSecret": "your-client-secret",
      "markdownSupport": true,
      "c2cMarkdownDeliveryMode": "proactive-all",
      "c2cMarkdownChunkStrategy": "markdown-block",
      "autoSendLocalPathMedia": false
    }
  }
}

QQ Integration Guide

OpenClaw QQ Architecture Overview

OpenClaw connects to QQ through the QQ Open Platform's WebSocket-based event gateway. The Gateway establishes an outbound WebSocket connection to QQ's servers and receives real-time event pushes including messages, reactions, and member updates. The message flow is: User sends a message in QQ → QQ Open Platform → WebSocket push to your Gateway → OpenClaw processes with AI → reply via QQ Bot API → message delivered in QQ. QQ's bot architecture distinguishes between three messaging contexts: direct messages (C2C, one-on-one), group chats (standard QQ groups), and channels (QQ Guild/channel system similar to Discord). Each context has its own set of intents and permissions, and can be enabled or disabled independently in OpenClaw. The @openclaw-china/qqbot plugin uses QQ's official Bot SDK and handles connection lifecycle, heartbeats, reconnection, and session resumption automatically.
No public IP or domain is required — the Gateway initiates an outbound WebSocket connection to QQ's servers.
QQ is a community-maintained channel, not an officially built-in OpenClaw channel. The plugin is installed and maintained separately from the OpenClaw core — after an OpenClaw upgrade, you may need to wait for a plugin compatibility update.

OpenClaw QQ Plugin Options

There are two plugin options for QQ integration: **@openclaw-china/qqbot** (3.2k stars) — The primary recommended plugin by BytePioneer-AI with the largest community. Supports QQ along with other Chinese platforms (Feishu, DingTalk, WeCom, personal WeChat) in a bundled package. Includes the 'openclaw china setup' wizard for guided configuration. Install with 'openclaw plugins install @openclaw-china/qqbot' or install the full bundle with 'openclaw plugins install @openclaw-china/channels'. **@sliverp/qqbot** (186 stars) — A lighter, dedicated QQ-only plugin. A good choice if you only need QQ support and prefer a minimal installation. Recommendation: use @openclaw-china/qqbot for most deployments — it has the larger community, more features, and the convenient setup wizard.
terminal
# Install primary recommended plugin
openclaw plugins install @openclaw-china/qqbot

# Or install bundled China channels package
openclaw plugins install @openclaw-china/channels

# Alternative: dedicated QQ-only plugin
openclaw plugins install @sliverp/qqbot

QQ Open Platform Setup for OpenClaw

Setting up QQ bot integration requires creating a bot application on the QQ Open Platform: 1. Visit q.qq.com and log in with your QQ account. Developer identity verification is required and may take 1-2 business days. 2. In the Bot Management console, click 'Create Bot' and fill in the required information: bot name, avatar, description, and category. 3. After creation, go to 'Development Settings' → 'Credentials' to find your **AppID** (numeric identifier) and **ClientSecret** (secret key). Copy both. 4. Under 'Development Settings' → 'Intents', configure which events your bot subscribes to: - **GUILDS** — Guild (server) join/leave events - **GUILD_MESSAGES** — Messages in guild channels - **DIRECT_MESSAGE** — Direct messages within guilds - **GROUP_AND_C2C_EVENT** — Group chat and private chat messages (requires approval) - **INTERACTION** — Button click interactions 5. Some intents (especially GROUP_AND_C2C_EVENT) require submitting a request to Tencent for approval. This typically takes 1-3 business days. 6. Use the setup wizard 'openclaw china setup' for guided configuration, or manually add credentials to your config.
terminal
# Recommended: interactive setup wizard
openclaw china setup

# Or quick setup via CLI
openclaw channels add --channel qqbot --token "AppID:ClientSecret"

# Or via environment variables
export QQ_APP_ID="your_app_id"
export QQ_CLIENT_SECRET="your_client_secret"
Keep your ClientSecret secure. Never commit it to version control. Use environment variables for production deployments. If compromised, regenerate it immediately in the QQ Open Platform console.

OpenClaw QQ Messaging Contexts: DM, Group & Channel

QQ's bot platform supports three distinct messaging contexts, each independently configurable: **Direct Messages (C2C):** One-on-one conversations between a user and the bot. Users can find and message your bot directly through QQ search or the bot's profile page. **Group Chats:** Standard QQ groups where the bot is added as a member. In groups, the bot responds only when @mentioned to avoid noise. Group chat access requires the GROUP_AND_C2C_EVENT intent, which needs Tencent approval. **Channel Messages (QQ Guilds):** QQ Guilds are similar to Discord servers with text and voice channels. The bot can participate in guild text channels and guild direct messages. Channel access uses the GUILD_MESSAGES and DIRECT_MESSAGE intents. Each context maintains its own conversation history. Context resets automatically after a configurable inactivity period.
openclaw.json
{
  "channels": {
    "qqbot": {
      "enabled": true,
      "appId": "your-app-id",
      "clientSecret": "your-client-secret"
    }
  }
}
In group chats, users must @mention the bot to trigger a response. This prevents the bot from replying to every message.
QQ Guild channels support both text messages and slash commands for bot interaction.
Each messaging context can be independently enabled or disabled based on your needs.

OpenClaw QQ Markdown Delivery Modes

The @openclaw-china/qqbot plugin supports configurable Markdown delivery for C2C (direct) messages via the c2cMarkdownDeliveryMode setting: **passive** — Only sends Markdown in passive replies (within the response window). This is the safest mode and does not consume active message quota. **proactive-table-only** — Sends Markdown proactively only when the message contains tables. Regular text is sent as plain text. This balances formatting quality with active message quota usage. **proactive-all** — Always sends Markdown proactively for all messages. Provides the best formatting experience but consumes active message quota. The c2cMarkdownChunkStrategy setting controls how long Markdown messages are split: - **markdown-block** — Splits at Markdown block boundaries (paragraphs, code blocks, lists). Preserves formatting integrity. Set autoSendLocalPathMedia to true if you want the plugin to automatically upload and send local file paths referenced in AI responses.
openclaw.json
{
  "channels": {
    "qqbot": {
      "markdownSupport": true,
      "c2cMarkdownDeliveryMode": "proactive-all",
      "c2cMarkdownChunkStrategy": "markdown-block",
      "autoSendLocalPathMedia": false
    }
  }
}
Use 'passive' mode to avoid consuming active message quota while still supporting Markdown in replies.
The 'proactive-all' mode provides the best visual experience but uses active message quota — be mindful of the monthly limits.
Markdown support in QQ uses a subset of standard Markdown. Complex formatting may render differently than expected.

OpenClaw QQ Rich Media & Voice-to-Text (ASR)

The QQ bot plugin supports a wide range of media types and message features: **Inbound (receive):** - Text messages with full Unicode support - Images (PNG, JPG, GIF) - Audio messages (voice-to-text requires Tencent Cloud ASR configuration) - Video messages - File attachments - Quote/reply context (the plugin includes the quoted message for AI context) **Outbound (send):** - Plain text - Markdown formatted messages (with headings, lists, code blocks) - Images and files - Keyboard templates (interactive button menus) - Ark messages (rich card templates) **Voice-to-Text (ASR):** Audio message transcription is NOT automatic — it requires configuring Tencent Cloud ASR (Automatic Speech Recognition). You need a Tencent Cloud account with ASR service enabled, then add the ASR configuration block to your qqbot channel config with your Tencent Cloud appId, secretId, and secretKey. **Other Features:** - **Quote Context:** When a user replies to a previous message, the quoted content is included in the AI prompt. - **Scheduled Messages:** Messages can be scheduled for future delivery. - **Markdown Support:** Responses support QQ's Markdown subset for formatted replies.
openclaw.json
{
  "channels": {
    "qqbot": {
      "asr": {
        "enabled": true,
        "appId": "tencent-cloud-app-id",
        "secretId": "tencent-cloud-secret-id",
        "secretKey": "tencent-cloud-secret-key"
      }
    }
  }
}
Voice-to-text requires a separate Tencent Cloud ASR configuration — it does not work out of the box.
Markdown support in QQ uses a subset of standard Markdown. Complex formatting may render differently than expected.
File size limits are enforced by QQ's servers — check the latest QQ documentation for current limits.

OpenClaw QQ Active Messages & Rate Limits

QQ's bot platform has specific rules around active vs. passive messages: **Passive Messages:** Replies to user-initiated messages within a response window. The window length depends on the context: groups and channels have a 5-minute window, while C2C/DM has a 60-minute window with a maximum of 5 replies per message. **Active Messages:** Messages sent by the bot without a user trigger (proactive notifications, scheduled messages). These are subject to strict monthly/daily quotas: - **C2C/DM:** 4 active messages per user per month - **Group:** 4 active messages per group per month - **Channel:** 20 messages per sub-channel per day, limited to 2 sub-channels per day - **Guild DM:** 2 per user per day, 200 total per day QQ enforces rate limits on bot API calls. The default limits vary by bot tier: - Standard bots: ~20 messages per second - Verified bots: Higher limits based on usage To handle rate limiting gracefully, the plugin implements automatic retry with exponential backoff.
Active (proactive) messages are subject to strict quotas (e.g., 4 per user/group per month for C2C and group). For reliable message delivery, prefer responding to user-initiated messages within the response window. Note that 'proactive-all' Markdown delivery mode also consumes active message quota.

Useful OpenClaw Commands for QQ

OpenClaw provides several commands for managing your QQ bot: - openclaw china setup — Interactive setup wizard for @openclaw-china/qqbot (recommended for first-time setup) - openclaw channels add --channel qqbot --token "AppID:ClientSecret" — Quick channel setup via CLI - openclaw gateway status — Check Gateway connection status and active sessions - openclaw gateway restart — Restart the Gateway service and reconnect to QQ - openclaw logs --follow — View real-time logs for debugging - openclaw plugins list — List installed plugins and versions - openclaw plugins update @openclaw-china/qqbot — Update the QQ plugin to the latest version - openclaw doctor — Run a comprehensive diagnostic check - openclaw channels test qqbot — Send a test message to verify QQ connectivity

QQ Configuration Reference

enabled
Type: booleanDefault: true

Enable or disable the QQ channel

appId
Type: stringDefault: ""

QQ bot AppID (numeric identifier), from the QQ Open Platform console

clientSecret
Type: stringDefault: ""

QQ bot ClientSecret (secret key), from the QQ Open Platform console

markdownSupport
Type: booleanDefault: true

Enable Markdown formatting support for bot replies

c2cMarkdownDeliveryMode
Type: stringDefault: "passive"

Markdown delivery mode for C2C messages. Options: passive (reply only), proactive-table-only (proactive for tables), proactive-all (always proactive)

c2cMarkdownChunkStrategy
Type: stringDefault: "markdown-block"

Strategy for splitting long Markdown messages. Options: markdown-block (split at block boundaries)

autoSendLocalPathMedia
Type: booleanDefault: false

Automatically upload and send local file paths referenced in AI responses

asr.enabled
Type: booleanDefault: false

Enable voice-to-text transcription using Tencent Cloud ASR

asr.appId
Type: stringDefault: ""

Tencent Cloud ASR application ID

asr.secretId
Type: stringDefault: ""

Tencent Cloud ASR secret ID

asr.secretKey
Type: stringDefault: ""

Tencent Cloud ASR secret key

QQ Frequently Asked Questions

QQ Troubleshooting

Bot is completely unresponsive

AppID or ClientSecret is incorrect, the bot hasn't been approved for production, intents are not configured, or the plugin is not installed properly.

Work through these checks: 1) Verify AppID and ClientSecret in the QQ Open Platform console; 2) If using production mode, confirm the bot passed review; 3) Check that required intents are enabled and approved; 4) Run 'openclaw plugins list' to confirm @openclaw-china/qqbot is installed; 5) Run 'openclaw gateway status' to check the WebSocket connection.
Bot works in DMs but not in groups

The GROUP_AND_C2C_EVENT intent has not been approved by Tencent.

Check the QQ Open Platform console to verify the GROUP_AND_C2C_EVENT intent status. If it shows 'Pending', wait for Tencent approval (1-3 business days). Also verify the bot has been added to the target group.
WebSocket connection drops or fails to establish

Network issues, firewall blocking outbound WebSocket connections, or invalid credentials causing authentication failures.

Check your server's internet connectivity. Ensure outbound WebSocket connections (wss://) are allowed by your firewall. Verify AppID and ClientSecret are correct. Check openclaw logs --follow for detailed connection logs. The plugin handles reconnection automatically with exponential backoff.
Messages are received but AI doesn't reply

The AI model API key is not configured, the response window has expired, or there's a plugin compatibility issue after an OpenClaw upgrade.

Verify your AI model's API key is correctly configured. Check that responses are sent within the passive message window (5 minutes for groups/channels, 60 minutes for C2C/DM). Try updating the plugin: openclaw plugins update @openclaw-china/qqbot. Check openclaw logs --follow for detailed error messages.
Rich media (images, files) not sending or receiving

Missing media-related permissions, file size exceeding QQ limits, or unsupported file format.

Verify media permissions are granted in the QQ Open Platform. Check file sizes against QQ's current limits (refer to the latest QQ documentation). Ensure the file format is supported. Check logs for specific API error codes from QQ's servers.
Voice messages not being transcribed

Tencent Cloud ASR is not configured. Voice-to-text is not automatic and requires ASR setup.

Add the asr configuration block to your qqbot channel config with enabled: true, plus your Tencent Cloud appId, secretId, and secretKey. Ensure your Tencent Cloud account has ASR service enabled and has sufficient quota.