Connect DotCraft to QQ
Connect a QQ account to DotCraft as a channel through NapCat or another OneBot v11 gateway.
CAUTION
Third-party QQ protocol frameworks can create account risk. Use a dedicated QQ account and review the risk before deployment.
Quick setup
Open the target workspace in DotCraft Desktop.
Open Channels, select QQ, then select Connect.

Set the OneBot listen address. The default is
127.0.0.1:6700.Enter an access token if NapCat should authenticate to the DotCraft endpoint.
Add at least one admin user, allowed user, or allowed group.

Save the channel and turn it on.
In NapCat WebUI, add a reverse WebSocket connection to
ws://127.0.0.1:6700/.Set the NapCat message format to
array.
Desktop should show the QQ channel as connected after NapCat reaches the DotCraft listener.
Platform setup details
In NapCat, configure the QQ account that will speak for DotCraft:
- Log in with the dedicated QQ account.
- Open the OneBot / WebSocket client settings.
- Set the reverse WebSocket URL to the DotCraft listen address.
- Set the Token to the same value you entered in Desktop.
- Set message format to
array.
If NapCat runs in Docker or on another machine, replace 127.0.0.1 with an address that can reach the machine running DotCraft Desktop.
Test the connection
- Send a private message to the QQ account from an allowed user.
- In a group, @mention the bot account.
- Confirm DotCraft replies in the same QQ conversation.
- Ask DotCraft to do something that needs approval, then reply with
同意,允许,yes, orapprove.
What works after setup
- Private chats keep a separate DotCraft conversation per QQ user.
- A QQ group shares one conversation.
- Group messages require an @mention by default.
- Empty admin and allowlist settings mean the bot ignores QQ messages.
- Approval replies accept
同意,允许,yes,approve,拒绝,no,reject, anddeny. Replying同意全部orapprove allallows the same kind of action for the rest of the session. - Voice, video, and file delivery are available through channel delivery tools.
- NapCat in Docker does not need access to the workspace files.
Standalone adapter
Run the QQ adapter yourself only when Desktop is not managing the channel process.
cd sdk/typescript
npm run build --workspace @dotcraft/channel-qq
npx dotcraft-channel-qq --workspace /path/to/workspaceUse --config /custom/qq.json when the adapter config is not stored at .craft/qq.json.
The standalone ExternalChannels registration is in the channel configuration reference.
Related docs
- Channel configuration reference — every field, default, and registration shape for the QQ config file.
- Channel adapters — the adapter base class, its message flow, and the handler contract.
- Channel Module integration — embed a TypeScript channel module in your own host process.