Skip to content

sliverp/qqbot

Repository files navigation

QQ

QQ is a widely-used instant messaging platform that provides various communication capabilities such as text, voice, images, and files. It supports collaborative scenarios like group chats and channels, making it suitable for both personal communication and team collaboration.

This integration method connects OpenClaw with a QQ Bot. It utilizes the platform's long-connection event subscription mechanism to receive message and event callbacks, enabling stable and secure message exchange and automation capability integration without exposing a public webhook address.

Step 1: Install the QQ Bot Plugin

Install via the OpenClaw plugins command.

openclaw plugins install @sliverp/qqbot@latest

Install from source code:

git clone https://github.com/sliverp/qqbot.git && cd qqbot
openclaw plugins install .

Step 2: Create a QQ Bot

1. Register on the QQ Open Platform

Go to the official website of the Tencent QQ Open Platform. You cannot log in directly with your personal QQ account by default; you need to register a new QQ Open Platform account. 1

After the initial registration, follow the platform's instructions to set up a super administrator.

2 After successfully scanning the QR code with your mobile QQ, proceed to the next step to fill in the relevant entity information.

Using "Individual" as an example here, follow the prompts to enter your name, ID number, phone number, and verification code, then click continue to proceed to the facial recognition step. 3

Use your mobile QQ to scan the QR code for facial recognition. 4

Once the facial recognition review is approved, you can log in to the QQ Open Platform. 5

2. Create a QQ Bot

On the QQ Open Platform's QQ Bot page, you can create a bot. 6 7

After the QQ Bot is created, you can select it and click to enter the management page. 8

On the QQ Bot management page, obtain the current bot's AppID and AppSecret, copy them, and save them to your personal notepad or memo (please ensure data security and do not leak them). They will be needed later in "Step 3: Configuring OpenClaw".

Note: For security reasons, the QQ Bot's AppSecret is not stored in plain text. If you view it for the first time or forget it, you need to regenerate it. 9 10

3. Sandbox Configuration

On the QQ Bot's "Development Management" page, in the "Sandbox Configuration" section, set up private chat (select "Configure in Message List").

You can configure this according to your own usage scenario, or you can complete the subsequent steps and then return to this step to operate.

⚠️ Note: The QQ Bot created here does not need to be published and made available to all QQ users. It can be used for personal (sandbox) debugging and experience. The QQ Open Platform does not support "Configuration in QQ Groups" for bots; it only supports private chat with the QQ Bot. 11

Note: When selecting "Configure in Message List", you need to first add members, and then use the QQ scan code of that member to add the bot. 12 Note here that after successfully adding a member, you still need to use QQ scan code to add the bot.

13 At this point, after adding the bot to your QQ account, you still cannot have a normal conversation with it. You will receive a prompt saying "The bot has gone to Mars, please try again later." This is because the QQ bot has not yet been connected to the OpenClaw application.

You need to proceed with the following steps to configure the QQ bot's AppID and AppSecret for the OpenClaw application.

14

(Optional) You can also add more members by referring to the previous steps: First, add a new member in the member management page, then add the member in the sandbox configuration page. After that, the new member can add this QQ bot by scanning the QR code with QQ. 15 16 17

Step 3: Configure OpenClaw

Method 1: Configure via Wizard (Recommended)

Add the qqbot channel and input the AppID and AppSecret obtained in Step 2.

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

Method 2: Configure via Configuration File

Edit ~/.openclaw/openclaw.json:

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

Step 4: Start and Test

1. Start the gateway

openclaw gateway

2. Chat with the QQbot in QQ

18

Upgrade

Using openclaw/npm(Recommendation)

only for installed byopenclaw plugins install

openclaw plugins upgrade @sliverp/qqbot@latest

Using npx

npx -y @sliverp/qqbot@latest upgrade

Using resource code

git clone https://github.com/sliverp/qqbot.git && cd qqbot 

# run upgrade script
bash ./scripts/upgrade.sh

# re-install
clawdbot plugins install .

# re-config
clawdbot channels add --channel qqbot --token "AppID:AppSecret"

# restart gateway
clawdbot gateway restart

Other Language README

简体中文

About

qqbot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •