You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

openclaw-qqbot

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openclaw-qqbot

latest
Source
npmnpm
Version
1.5.5
Version published
Maintainers
2
Created
Source
QQ Bot

QQ Bot Channel Plugin for OpenClaw

Connect your AI assistant to QQ — private chat, group chat, and rich media, all in one plugin.

License QQ Bot Platform Node.js TypeScript


简体中文 | English

Scan to join the QQ group chat

Clipboard_Screenshot_1773047715

✨ Features

FeatureDescription
🔒 Multi-SceneC2C private chat, group @messages, channel messages, channel DMs
🖼️ Rich MediaSend & receive images, voice, video, and files
🎙️ Voice (STT/TTS)Speech-to-text transcription & text-to-speech replies
Scheduled PushProactive message delivery via scheduled tasks
🔗 URL SupportDirect URL sending in private chat (no restrictions)
⌨️ Typing Indicator"Bot is typing..." status shown in real-time
🔄 Hot ReloadInstall via npm with seamless hot updates
📝 MarkdownFull Markdown formatting support
🛠️ CommandsNative OpenClaw command integration

📸 Feature Showcase

Note: This plugin serves as a message channel only — it relays messages between QQ and OpenClaw. Capabilities like image understanding, voice transcription, drawing, etc. depend on the AI model you configure and the skills installed in OpenClaw, not on this plugin itself.

🎙️ Voice Messages (STT)

With STT configured, the plugin automatically transcribes voice messages to text before passing them to AI. The whole process is transparent to the user — sending voice feels as natural as sending text.

You: (send a voice message) "What's the weather like tomorrow in Shenzhen?"

QQBot: Tomorrow (March 7, Saturday) Shenzhen weather forecast 🌤️ ...

Voice STT Demo

📄 File Understanding

Send any file to the bot — novels, reports, spreadsheets — AI automatically recognizes the content and gives an intelligent reply.

You: (send a TXT file of "War and Peace")

QQBot: Got it! You uploaded the Chinese version of "War and Peace" by Leo Tolstoy. This appears to be the opening of Chapter 1...

File Understanding Demo

🖼️ Image Understanding

If your main model supports vision (e.g. Tencent Hunyuan hunyuan-vision), AI can understand images too. This is a general multimodal capability, not plugin-specific.

You: (send an image)

QQBot: Haha, so cute! Is that a QQ penguin in a lobster costume? 🦞🐧 ...

Image Understanding Demo

🎨 Image Generation

You: Draw me a cat

QQBot: Here you go! 🐱

AI sends images via <qqimg>path</qqimg>. Supports local paths and URLs. Formats: jpg/png/gif/webp/bmp.

Image Generation Demo

🔊 Voice Reply (TTS)

You: Tell me a joke in voice

QQBot: (sends a voice message)

AI sends voice via <qqvoice>path</qqvoice>. Formats: mp3/wav/silk/ogg. No ffmpeg required.

TTS Voice Demo

📎 File Sending

You: Extract chapter 1 of War and Peace and send it as a file

QQBot: (sends a .txt file)

AI sends files via <qqfile>path</qqfile>. Any format, up to 20MB.

File Sending Demo

🎬 Video Sending

You: Send me a demo video

QQBot: (sends a video)

AI sends videos via <qqvideo>path</qqvideo>. Supports local files and URLs. Large files (>5MB) auto-show upload progress.

Video Sending Demo

Rich Media Tag Reference

TagDirectionNotes
<qqimg>path</qqimg>Sendjpg/png/gif/webp/bmp, local path or URL
<qqvoice>path</qqvoice>Sendmp3/wav/silk/ogg, no ffmpeg required
<qqfile>path</qqfile>SendAny format, up to 20MB
<qqvideo>path</qqvideo>SendLocal path or URL
Voice / File / ImageReceiveAuto-transcribe (STT), auto-download, or vision analysis

Under the hood: 30+ tag variant auto-correction, upload dedup caching, ordered queue delivery, and multi-layer audio format fallback.

🚀 Getting Started

Step 1 — Create a QQ Bot on the QQ Open Platform

  • Go to the QQ Open Platform and scan the QR code with your phone QQ to register / log in. If you haven't registered before, scanning will automatically complete the registration and bind your QQ account.
Clipboard_Screenshot_1772980354
  • After scanning, tap Agree on your phone — you'll land on the bot configuration page.
  • Click Create Bot to create a new QQ bot.
Clipboard_Screenshot_1772980440
  • Find AppID and AppSecret on the bot's page, click Copy for each, and save them somewhere safe (e.g., a notepad). AppSecret is not stored in plaintext — if you leave the page without saving it, you'll have to regenerate a new one.
Clipboard_Screenshot_1772980413

For a step-by-step walkthrough with screenshots, see the official guide.

⚠️ The bot will automatically appear in your QQ message list and send a first message. However, it will reply "The bot has gone to Mars" until you complete the configuration steps below.

Step 2 — Install the Plugin

Option A: One-Click Install & Run (Recommended)

git clone https://github.com/tencent-connect/openclaw-qqbot.git && cd openclaw-qqbot
bash ./scripts/upgrade-and-run.sh --appid YOUR_APPID --secret YOUR_SECRET

The script handles everything: cleanup old plugins → install deps → register plugin → configure channel → start service. Once done, skip to Step 4.

Option B: Manual Step-by-Step

git clone https://github.com/tencent-connect/openclaw-qqbot.git && cd openclaw-qqbot
npm install --omit=dev
openclaw plugins install .

Step 3 — Configure OpenClaw

Option 1: CLI Wizard (Recommended)

openclaw channels add --channel qqbot --token "AppID:AppSecret"

Option 2: Edit Config File

Edit ~/.openclaw/openclaw.json:

{
  "channels": {
    "qqbot": {
      "enabled": true,
      "appId": "Your AppID",
      "clientSecret": "Your AppSecret"
    }
  }
}

Step 4 — Start & Test

openclaw gateway

Open QQ, find your bot, and send a message!

Chat Demo

⚙️ Advanced Configuration

Multi-Account Setup (Multi-Bot)

Run multiple QQ bots under a single OpenClaw instance.

Configuration

Edit ~/.openclaw/openclaw.json and add an accounts field under channels.qqbot:

{
  "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"
        }
      }
    }
  }
}

Notes:

  • The top-level appId / clientSecret is the default account (accountId = "default")
  • Each key under accounts (e.g. bot2, bot3) is the accountId for that bot
  • Each account can independently configure enabled, name, allowFrom, systemPrompt, etc.
  • You may also skip the top-level default account and only configure bots inside accounts

Add a second bot via CLI (if the framework supports the --account parameter):

openclaw channels add --channel qqbot --account bot2 --token "222222222:secret-of-bot-2"

Sending Messages to a Specific Account's Users

When using openclaw message send, specify which bot to use with the --account parameter:

# Send with the default bot (no --account = uses "default")
openclaw message send --channel "qqbot" \
  --target "qqbot:c2c:OPENID" \
  --message "hello from default bot"

# Send with bot2
openclaw message send --channel "qqbot" \
  --account bot2 \
  --target "qqbot:c2c:OPENID" \
  --message "hello from bot2"

Target Formats:

FormatDescription
qqbot:c2c:OPENIDPrivate chat (C2C)
qqbot:group:GROUP_OPENIDGroup chat
qqbot:channel:CHANNEL_IDGuild channel

⚠️ Important: Each bot has its own set of user OpenIDs. An OpenID received by Bot A cannot be used to send messages via Bot B — this will result in a 500 error. Always use the matching bot's accountId to send messages to its users.

How It Works

  • When openclaw gateway starts, all accounts with enabled: true launch their own WebSocket connections
  • Each account maintains an independent Token cache (isolated by appId), preventing cross-contamination
  • Incoming message logs are prefixed with [qqbot:accountId] for easy debugging

Voice Configuration (STT / TTS)

STT (Speech-to-Text) — Transcribe Incoming Voice Messages

STT supports two-level configuration with priority fallback:

PriorityConfig PathScope
1 (highest)channels.qqbot.sttPlugin-specific
2 (fallback)tools.media.audio.models[0]Framework-level
{
  "channels": {
    "qqbot": {
      "stt": {
        "provider": "your-provider",
        "model": "your-stt-model"
      }
    }
  }
}
  • provider — references a key in models.providers to inherit baseUrl and apiKey
  • Set enabled: false to disable
  • When configured, incoming voice messages are automatically converted (SILK→WAV) and transcribed

TTS (Text-to-Speech) — Send Voice Messages

PriorityConfig PathScope
1 (highest)channels.qqbot.ttsPlugin-specific
2 (fallback)messages.ttsFramework-level
{
  "channels": {
    "qqbot": {
      "tts": {
        "provider": "your-provider",
        "model": "your-tts-model",
        "voice": "your-voice"
      }
    }
  }
}
  • provider — references a key in models.providers to inherit baseUrl and apiKey
  • voice — voice variant
  • Set enabled: false to disable (default: true)
  • When configured, AI can use <qqvoice> tags to generate and send voice messages

🔄 Upgrade

Run the one-click script to upgrade and restart:

bash ./scripts/upgrade-and-run.sh

When no --appid / --secret is provided, the script reads existing config from ~/.openclaw/openclaw.json automatically.

# First-time or override credentials
bash ./scripts/upgrade-and-run.sh --appid YOUR_APPID --secret YOUR_SECRET
Full Options
OptionDescription
--appid <id>QQ Bot AppID
--secret <secret>QQ Bot AppSecret
--markdown <yes|no>Enable Markdown format (default: no)
-h, --helpShow help

Environment variables QQBOT_APPID, QQBOT_SECRET, QQBOT_TOKEN (AppID:Secret) are also supported.

⭐ Star History

Star History Chart

FAQs

Package last updated on 10 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts