NapCat deep dive
NapCat-specific commands, Docker persistence, and version-gated features.
In this tutorial you will connect Lingchu Bot to a QQ group through NapCat (a OneBot V11 implementation) and send your first group management command. By the end, the bot will be live in a QQ group and respond to 菜单 / menu.
.env.This tutorial assumes you completed Getting started and the bot reaches Application startup complete.
NapCat is the recommended OneBot V11 implementation for QQ. Run it in Docker with the OneBot ports exposed:
docker run -d ` --name napcat ` --restart always ` -p 3000:3000 ` -p 3001:3001 ` -p 6099:6099 ` mlikiowa/napcat-docker:latestOpen http://localhost:6099/webui in a browser. Read the first-time token from docker logs napcat, log in, and complete the QQ login for the bot account.
In the WebUI, configure a OneBot V11 connection:
3000 with an access token.3001 with the same token.Edit .env to enable the OneBot V11 driver and set the access token to match NapCat:
DRIVER=~fastapi+~httpx+~websocketsLINGCHUAdapter=~onebot.v11ONEBOT_ACCESS_TOKEN=your-tokenThese three lines tell NoneBot to load the FastPI/HTTPX/WebSockets drivers, tell Lingchu Bot to use the OneBot V11 adapter, and set the shared access token NapCat expects.
Start the bot:
uvx --from nb-cli nb.exe runWhen the log shows Application startup complete., NapCat should also report a connection. If you see PlatformAdapterNotLoadedError, the OneBot V11 adapter was not loaded by NoneBot — check that nonebot-adapter-onebot is installed and DRIVER includes ~websockets.
In the QQ group where the bot is a member, send:
菜单Or, if LINGCHU_LOCALE=en_US:
menuIf the bot replies with a submenu list, the connection is live and the tutorial is complete.
LINGCHUAdapter and authenticates through ONEBOT_ACCESS_TOKEN.菜单 / menu command is the entry point that confirms the bot is live.NapCat deep dive
NapCat-specific commands, Docker persistence, and version-gated features.
Connect Telegram
Connect a Telegram bot as an alternative platform.
Command reference
Full QQ command syntax and options.