{"id":47082028,"url":"https://github.com/tencent-connect/openclaw-qqbot","last_synced_at":"2026-03-16T11:00:43.823Z","repository":{"id":343244446,"uuid":"1176869005","full_name":"tencent-connect/openclaw-qqbot","owner":"tencent-connect","description":"QQ Bot Channel Plugin for OpenClaw ","archived":false,"fork":false,"pushed_at":"2026-03-12T05:39:05.000Z","size":11390,"stargazers_count":105,"open_issues_count":7,"forks_count":29,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-03-12T11:31:56.648Z","etag":null,"topics":["bot-plugin","openclaw","openclaw-qqbot","qqbot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tencent-connect.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-09T13:12:58.000Z","updated_at":"2026-03-12T09:57:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5e11913-85b8-409c-9fa7-4126ccb85962","html_url":"https://github.com/tencent-connect/openclaw-qqbot","commit_stats":null,"previous_names":["tencent-connect/openclaw-qqbot"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tencent-connect/openclaw-qqbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencent-connect%2Fopenclaw-qqbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencent-connect%2Fopenclaw-qqbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencent-connect%2Fopenclaw-qqbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencent-connect%2Fopenclaw-qqbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tencent-connect","download_url":"https://codeload.github.com/tencent-connect/openclaw-qqbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencent-connect%2Fopenclaw-qqbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30462031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T06:34:02.089Z","status":"ssl_error","status_checked_at":"2026-03-13T06:33:49.182Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot-plugin","openclaw","openclaw-qqbot","qqbot"],"created_at":"2026-03-12T07:03:20.805Z","updated_at":"2026-03-13T08:00:58.329Z","avatar_url":"https://github.com/tencent-connect.png","language":"TypeScript","funding_links":[],"categories":["Configuration","🔌 Plugins \u0026 Channel Integrations","国内平台集成"],"sub_categories":["Messaging Channels","QQ"],"readme":"\u003cdiv align=\"center\"\u003e\n\n\n\n\u003cimg width=\"120\" src=\"https://img.shields.io/badge/🤖-QQ_Bot-blue?style=for-the-badge\" alt=\"QQ Bot\" /\u003e\n\n# QQ Bot Channel Plugin for OpenClaw\n\n\n\n**Connect your AI assistant to QQ — private chat, group chat, and rich media, all in one plugin.**\n\n### 🚀 Current Version: `v1.5.7`\n\n[![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)\n[![QQ Bot](https://img.shields.io/badge/QQ_Bot-API_v2-red)](https://bot.q.qq.com/wiki/)\n[![Platform](https://img.shields.io/badge/platform-OpenClaw-orange)](https://github.com/tencent-connect/openclaw-qqbot)\n[![Node.js](https://img.shields.io/badge/Node.js-\u003e=18-339933?logo=node.js\u0026logoColor=white)](https://nodejs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178C6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n\n\n\u003cbr/\u003e\n\n**[简体中文](README.zh.md) | English**\n\nScan to join the QQ group chat\n\n\u003cimg width=\"300\" height=\"540\" alt=\"Clipboard_Screenshot_1773047715\" src=\"https://github.com/user-attachments/assets/4d2d2337-229a-42ad-97ab-8a6d0607f296\" /\u003e\n\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n| Feature | Description |\n|---------|-------------|\n| 🔒 **Multi-Scene** | C2C private chat, group @messages, channel messages, channel DMs |\n| 🖼️ **Rich Media** | Send \u0026 receive images, voice, video, and files |\n| 🎙️ **Voice (STT/TTS)** | Speech-to-text transcription \u0026 text-to-speech replies |\n| ⏰ **Scheduled Push** | Proactive message delivery via scheduled tasks |\n| 🔗 **URL Support** | Direct URL sending in private chat (no restrictions) |\n| ⌨️ **Typing Indicator** | \"Bot is typing...\" status shown in real-time |\n| 🔄 **Hot Reload** | Install via npm with seamless hot updates |\n| 📝 **Markdown** | Full Markdown formatting support |\n| 🛠️ **Commands** | Native OpenClaw command integration |\n| 💬 **Quoted Context** | Resolve QQ `REFIDX_*` quoted messages and inject quote body into AI context |\n\n---\n\n## 📸 Feature Showcase\n\n\u003e **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.\n\n### 💬 Quoted Message Context (REFIDX)\n\nQQ quote events carry index keys (e.g. `REFIDX_xxx`) instead of full original message body. The plugin now resolves these indices from a local persistent store and injects quote context into AI input, so replies better understand “which message is being quoted”.\n\n- Inbound and outbound messages with `ref_idx` are automatically indexed.\n- Store path: `~/.openclaw/qqbot/data/ref-index.jsonl` (survives gateway restart).\n- Quote body may include text + media summary (image/voice/video/file).\n\n\u003cimg width=\"360\" src=\"docs/images/ref_msg.png\" alt=\"Quoted Message Context Demo\" /\u003e\n\n### 🎙️ Voice Messages (STT)\n\nWith 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.\n\n\u003e **You**: *(send a voice message)* \"What's the weather like tomorrow in Shenzhen?\"\n\u003e\n\u003e **QQBot**: Tomorrow (March 7, Saturday) Shenzhen weather forecast 🌤️ ...\n\n\u003cimg width=\"360\" src=\"docs/images/fc7b2236896cfba3a37c94be5d59ce3e_720.jpg\" alt=\"Voice STT Demo\" /\u003e\n\n### 📄 File Understanding\n\nSend any file to the bot — novels, reports, spreadsheets — AI automatically recognizes the content and gives an intelligent reply.\n\n\u003e **You**: *(send a TXT file of \"War and Peace\")*\n\u003e\n\u003e **QQBot**: Got it! You uploaded the Chinese version of \"War and Peace\" by Leo Tolstoy. This appears to be the opening of Chapter 1...\n\n\u003cimg width=\"360\" src=\"docs/images/07bff56ab68e03173d2af586eeb3bcee_720.jpg\" alt=\"File Understanding Demo\" /\u003e\n\n### 🖼️ Image Understanding\n\nIf 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.\n\n\u003e **You**: *(send an image)*\n\u003e\n\u003e **QQBot**: Haha, so cute! Is that a QQ penguin in a lobster costume? 🦞🐧 ...\n\n\u003cimg width=\"360\" src=\"docs/images/59d421891f813b0d3c0cbe12574b6a72_720.jpg\" alt=\"Image Understanding Demo\" /\u003e\n\n### 🎨 Image Sending\n\n\u003e **You**: Draw me a cat\n\u003e\n\u003e **QQBot**: Here you go! 🐱\n\nAI sends images via `\u003cqqimg\u003epath\u003c/qqimg\u003e`. Supports local paths and URLs. Formats: jpg/png/gif/webp/bmp.\n\n\u003cimg width=\"360\" src=\"docs/images/4645f2b3a20822b7f8d6664a708529eb_720.jpg\" alt=\"Image Generation Demo\" /\u003e\n\n### 🔊 Voice Sending\n\n\u003e **You**: Tell me a joke in voice\n\u003e\n\u003e **QQBot**: *(sends a voice message)*\n\nAI sends voice via `\u003cqqvoice\u003epath\u003c/qqvoice\u003e`. Formats: mp3/wav/silk/ogg. No ffmpeg required.\n\n\u003cimg width=\"360\" src=\"docs/images/21dce8bfc553ce23d1bd1b270e9c516c.jpg\" alt=\"TTS Voice Demo\" /\u003e\n\n### ⏰ Scheduled Reminder (Proactive Message)\n\n\u003e **You**: Remind me to eat in 5 minutes\n\u003e\n\u003e **QQBot**: confirms the reminder first, then proactively sends a voice + text reminder when time is up\n\nThis capability depends on OpenClaw cron scheduling and proactive messaging. If no reminder arrives, a common reason is QQ-side interception of bot proactive messages.\n\n\u003cimg width=\"360\" src=\"docs/images/reminder.jpg\" alt=\"Scheduled Reminder Demo\" /\u003e\n\n### 📎 File Sending\n\n\u003e **You**: Extract chapter 1 of War and Peace and send it as a file\n\u003e\n\u003e **QQBot**: *(sends a .txt file)*\n\nAI sends files via `\u003cqqfile\u003epath\u003c/qqfile\u003e`. Any format, up to 20MB.\n\n\u003cimg width=\"360\" src=\"docs/images/17cada70df90185d45a2d6dd36e92f2f_720.jpg\" alt=\"File Sending Demo\" /\u003e\n\n### 🎬 Video Sending\n\n\u003e **You**: Send me a demo video\n\u003e\n\u003e **QQBot**: *(sends a video)*\n\nAI sends videos via `\u003cqqvideo\u003epath\u003c/qqvideo\u003e`. Supports local files and URLs. Large files (\u003e5MB) auto-show upload progress.\n\n\u003cimg width=\"360\" src=\"docs/images/85d03b8a216f267ab7b2aee248a18a41_720.jpg\" alt=\"Video Sending Demo\" /\u003e\n\n### Rich Media Tag Reference\n\n| Tag | Direction | Notes |\n|-----|-----------|-------|\n| `\u003cqqimg\u003epath\u003c/qqimg\u003e` | Send | jpg/png/gif/webp/bmp, local path or URL |\n| `\u003cqqvoice\u003epath\u003c/qqvoice\u003e` | Send | mp3/wav/silk/ogg, no ffmpeg required |\n| `\u003cqqfile\u003epath\u003c/qqfile\u003e` | Send | Any format, up to 20MB |\n| `\u003cqqvideo\u003epath\u003c/qqvideo\u003e` | Send | Local path or URL |\n| Voice / File / Image | Receive | Auto-transcribe (STT), auto-download, or vision analysis |\n\n\u003e **Under the hood:** 30+ tag variant auto-correction, upload dedup caching, ordered queue delivery, and multi-layer audio format fallback.\n\n---\n\n## 🚀 Getting Started\n\n### Step 1 — Create a QQ Bot on the QQ Open Platform\n\n1. Go to the [QQ Open Platform](https://q.qq.com/) 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.\n\n\u003cimg width=\"3246\" height=\"1886\" alt=\"Clipboard_Screenshot_1772980354\" src=\"https://github.com/user-attachments/assets/d8491859-57e8-47e4-9d39-b21138be54d0\" /\u003e\n\n2. After scanning, tap **Agree** on your phone — you'll land on the bot configuration page.\n3. Click **Create Bot** to create a new QQ bot.\n\n\u003cimg width=\"720\" alt=\"Create Bot\" src=\"docs/images/create_robot.png\" /\u003e\n\n\u003e ⚠️ 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.\n\n\u003cimg width=\"400\" alt=\"Bot Say Hello\" src=\"docs/images/bot_say_hello.jpg\" /\u003e\n\n4. 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.**\n\n\u003cimg width=\"720\" alt=\"Find AppID and AppSecret\" src=\"docs/images/find_appid_secret.png\" /\u003e\n\n\u003e For a step-by-step walkthrough with screenshots, see the [official guide](https://cloud.tencent.com/developer/article/2626045).\n\n### Step 2 — Install / Upgrade the Plugin\n\n**Option A: Remote One-Liner (Easiest, no clone required)**\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh \\\n  | bash -s -- --appid YOUR_APPID --secret YOUR_SECRET\n```\n\nOne command does it all: download script → cleanup old plugins → install → configure channel → restart service. Once done, open QQ and start chatting!\n\n\u003e `--appid` and `--secret` are **required for first-time install**. For subsequent upgrades:\n\u003e ```bash\n\u003e curl -fsSL https://raw.githubusercontent.com/tencent-connect/openclaw-qqbot/main/scripts/upgrade-via-npm.sh | bash\n\u003e ```\n\n**Option B: Local Script (if you've cloned the repo)**\n\n```bash\n# Via npm\nbash ./scripts/upgrade-via-npm.sh --appid YOUR_APPID --secret YOUR_SECRET\n\n# Or via source\nbash ./scripts/upgrade-via-source.sh --appid YOUR_APPID --secret YOUR_SECRET\n```\n\n**Common flags:**\n\n| Flag | Description |\n|------|-------------|\n| `--appid \u003cid\u003e --secret \u003csecret\u003e` | Configure channel (required for first install, or to change credentials) |\n| `--version \u003cversion\u003e` | Install a specific version (npm script only) |\n| `--self-version` | Install the version from local `package.json` (npm script only) |\n| `-h` / `--help` | Show full usage |\n\n\u003e Environment variables `QQBOT_APPID` / `QQBOT_SECRET` are also supported.\n\n**Option C: Manual Install / Upgrade**\n\n```bash\n# Uninstall old plugins (skip if first install)\nopenclaw plugins uninstall qqbot\nopenclaw plugins uninstall openclaw-qqbot\n\n# Install latest\nopenclaw plugins install @tencent-connect/openclaw-qqbot@latest\n\n# Configure channel (first install only)\nopenclaw channels add --channel qqbot --token \"AppID:AppSecret\"\n\n# Start / restart\nopenclaw gateway restart\n```\n\n### Step 3 — Test\n\nOpen QQ, find your bot, and send a message!\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"500\" alt=\"Chat Demo\" src=\"https://github.com/user-attachments/assets/b2776c8b-de72-4e37-b34d-e8287ce45de1\" /\u003e\n\u003c/div\u003e\n\n---\n\n## ⚙️ Advanced Configuration\n\n### Multi-Account Setup (Multi-Bot)\n\nRun multiple QQ bots under a single OpenClaw instance.\n\n#### Configuration\n\nEdit `~/.openclaw/openclaw.json` and add an `accounts` field under `channels.qqbot`:\n\n```json\n{\n  \"channels\": {\n    \"qqbot\": {\n      \"enabled\": true,\n      \"appId\": \"111111111\",\n      \"clientSecret\": \"secret-of-bot-1\",\n\n      \"accounts\": {\n        \"bot2\": {\n          \"enabled\": true,\n          \"appId\": \"222222222\",\n          \"clientSecret\": \"secret-of-bot-2\"\n        },\n        \"bot3\": {\n          \"enabled\": true,\n          \"appId\": \"333333333\",\n          \"clientSecret\": \"secret-of-bot-3\"\n        }\n      }\n    }\n  }\n}\n```\n\n**Notes:**\n\n- The top-level `appId` / `clientSecret` is the **default account** (accountId = `\"default\"`)\n- Each key under `accounts` (e.g. `bot2`, `bot3`) is the `accountId` for that bot\n- Each account can independently configure `enabled`, `name`, `allowFrom`, `systemPrompt`, etc.\n- You may also skip the top-level default account and only configure bots inside `accounts`\n\nAdd a second bot via CLI (if the framework supports the `--account` parameter):\n\n```bash\nopenclaw channels add --channel qqbot --account bot2 --token \"222222222:secret-of-bot-2\"\n```\n\n#### Sending Messages to a Specific Account's Users\n\nWhen using `openclaw message send`, specify which bot to use with the `--account` parameter:\n\n```bash\n# Send with the default bot (no --account = uses \"default\")\nopenclaw message send --channel \"qqbot\" \\\n  --target \"qqbot:c2c:OPENID\" \\\n  --message \"hello from default bot\"\n\n# Send with bot2\nopenclaw message send --channel \"qqbot\" \\\n  --account bot2 \\\n  --target \"qqbot:c2c:OPENID\" \\\n  --message \"hello from bot2\"\n```\n\n**Target Formats:**\n\n| Format | Description |\n|--------|-------------|\n| `qqbot:c2c:OPENID` | Private chat (C2C) |\n| `qqbot:group:GROUP_OPENID` | Group chat |\n| `qqbot:channel:CHANNEL_ID` | Guild channel |\n\n\u003e ⚠️ **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.\n\n#### How It Works\n\n- When `openclaw gateway` starts, all accounts with `enabled: true` launch their own WebSocket connections\n- Each account maintains an independent Token cache (isolated by `appId`), preventing cross-contamination\n- Incoming message logs are prefixed with `[qqbot:accountId]` for easy debugging\n\n---\n\n### Voice Configuration (STT / TTS)\n\n#### STT (Speech-to-Text) — Transcribe Incoming Voice Messages\n\nSTT supports two-level configuration with priority fallback:\n\n| Priority | Config Path | Scope |\n|----------|------------|-------|\n| 1 (highest) | `channels.qqbot.stt` | Plugin-specific |\n| 2 (fallback) | `tools.media.audio.models[0]` | Framework-level |\n\n```json\n{\n  \"channels\": {\n    \"qqbot\": {\n      \"stt\": {\n        \"provider\": \"your-provider\",\n        \"model\": \"your-stt-model\"\n      }\n    }\n  }\n}\n```\n\n- `provider` — references a key in `models.providers` to inherit `baseUrl` and `apiKey`\n- Set `enabled: false` to disable\n- When configured, incoming voice messages are automatically converted (SILK→WAV) and transcribed\n\n#### TTS (Text-to-Speech) — Send Voice Messages\n\n| Priority | Config Path | Scope |\n|----------|------------|-------|\n| 1 (highest) | `channels.qqbot.tts` | Plugin-specific |\n| 2 (fallback) | `messages.tts` | Framework-level |\n\n```json\n{\n  \"channels\": {\n    \"qqbot\": {\n      \"tts\": {\n        \"provider\": \"your-provider\",\n        \"model\": \"your-tts-model\",\n        \"voice\": \"your-voice\"\n      }\n    }\n  }\n}\n```\n\n- `provider` — references a key in `models.providers` to inherit `baseUrl` and `apiKey`\n- `voice` — voice variant\n- Set `enabled: false` to disable (default: `true`)\n- When configured, AI can use `\u003cqqvoice\u003e` tags to generate and send voice messages\n\n---\n\n## 📚 Documentation \u0026 Links\n\n- [Upgrade Guide](docs/UPGRADE_GUIDE.md) — full upgrade paths and migration notes\n- [Command Reference](docs/commands.md) — OpenClaw CLI commands\n- [Changelog](CHANGELOG.md) — release notes\n\n## ⭐ Star History\n\n\u003cdiv align=\"center\"\u003e\n\n[![Star History Chart](https://api.star-history.com/svg?repos=tencent-connect/openclaw-qqbot\u0026type=date\u0026legend=top-left)](https://www.star-history.com/#tencent-connect/openclaw-qqbot\u0026type=date\u0026legend=top-left)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencent-connect%2Fopenclaw-qqbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftencent-connect%2Fopenclaw-qqbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencent-connect%2Fopenclaw-qqbot/lists"}