Skip to content

[FEATURE] Add OpenClaw QQ Bot Integration Support #367

@fatinghenji

Description

@fatinghenji

Description

Feature Description

Request to add OpenClaw QQ Bot integration support for memU, enabling bidirectional communication with QQ platform using the OneBot v11 protocol.

Reference Implementation

Core Features

Feature Description
Message Exchange Support sending/receiving messages in QQ private chats and groups
Multi-modal Support Support sending/receiving images, voice messages, and files
QQ Guilds Support message interaction in QQ Guilds (channels)
Context Management Support historical message backtracking and session isolation

Security & Risk Control

  • Permission Management: Admin whitelist, user blacklist
  • Group Whitelist: Only respond in specified groups
  • Rate Limiting: Prevent triggering QQ risk control due to excessive message sending
  • Keyword Triggers: Support configuring wake words to trigger conversations

Interaction Experience

  • @bot Trigger: Trigger replies by @bot in group chats
  • Nudge Response: Perceive and respond to QQ nudges
  • Humanized Replies: Auto @ original sender, nickname resolution
  • Temporary Sessions: Support temporary session slots for same-group sub-topics

Technical Architecture

┌─────────────┐     WebSocket      ┌─────────────┐
│   NapCat    │ ◄────────────────► │   memU      │
│ (OneBot v11)│   OneBot Protocol  │  QQ Adapter │
└─────────────┘                    └──────┬──────┘
                                          │
                                    ┌─────┴─────┐
                                    │  memU     │
                                    │  Core     │
                                    └───────────┘

Configuration Example

{
  "channels": {
    "qq": {
      "enabled": true,
      "wsUrl": "ws://127.0.0.1:3001",
      "accessToken": "your-token",
      "admins": "12345678,87654321",
      "allowedGroups": "10001,10002",
      "keywordTriggers": "assistant,memU",
      "requireMention": true,
      "enableGuilds": true,
      "rateLimitMs": 1000
    }
  }
}

Use Cases

  1. AI Assistant: Provide intelligent Q&A services in QQ groups
  2. Group Management: Auto-handle join requests, mutes, kicks
  3. Notifications: Push memU notifications to QQ groups
  4. Multi-platform Sync: Message interoperability with Telegram, Discord, etc.

Reference Resources

Motivation

Why We Need This Feature

1. Large User Base
QQ has a massive user base in China, especially among younger demographics and gaming communities. Adding QQ support would significantly expand memU's reach.

2. Group Ecosystem
QQ groups are a crucial platform for Chinese community communication. Many communities, gaming clans, and interest groups rely heavily on QQ for coordination.

3. Complete Feature Set
The OneBot v11 protocol provides comprehensive QQ API support, including:

  • Rich message types (text, images, voice, files)
  • Group management features
  • QQ Guilds (channels) support
  • Friend and group member management

4. Proven Solution
The openclaw_qq project has already demonstrated the feasibility of this approach, providing a production-ready reference implementation.

5. Multi-Platform Strategy
memU already supports Telegram and Discord. Adding QQ would complete the major messaging platform coverage, making memU a truly universal AI assistant.

Problem Solved

Currently, users who want to deploy memU in QQ groups have no official support. They must either:

  • Use unofficial forks or hacks
  • Build their own adapters from scratch
  • Miss out on the QQ ecosystem entirely

This feature would provide first-class QQ support, making memU accessible to millions of QQ users.

Platform

Platform Independent

Priority

Major

Additional Information

Additional Context

Technical Details:

  • OneBot v11 is a unified chat bot API standard
  • NapCat is a popular OneBot v11 implementation for QQ
  • WebSocket connection for real-time bidirectional communication
  • Supports both HTTP and WebSocket event reporting

Potential Challenges:

  • QQ's anti-spam mechanisms may require careful rate limiting
  • Image/file handling may need special encoding
  • QQ Guild API differs slightly from regular group chats

Related Projects:

  • go-cqhttp - Another popular OneBot implementation
  • LLOneBot - OneBot plugin for QQ NT

Willing to Contribute:

  • I can implement this feature
  • I can help with testing
  • I can provide financial support

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions