Adapters
About 722 wordsAbout 2 min
An Adapter is the bridge between UniBot and each chat platform, responsible for connecting the bot account to the corresponding platform. It is the channel through which the bot connects to external platforms.
UniBot is built on the NoneBot2 framework and connects to different platforms by installing different NoneBot adapters. Each platform corresponds to an independent adapter, with its own connection fields configured in .env.
Supported Platforms
| Platform | Adapter | Description |
|---|---|---|
| OneBot V11 | Requires a protocol client such as Lagrange.OneBot / NapCat / LLOneBot | |
| QQ Official | QQ Official Bot | Connect via the QQ Open Platform |
| Telegram | Telegram | Official Bot API |
| Discord | Discord | Official Bot |
| DoDo | DoDo | Open Platform connection |
| KOOK (Kaiheila) | KOOK | Developer Platform connection |
| Satori | Satori | Universal protocol, can connect to Chronocat, etc. |
| Minecraft | Minecraft | Interconnects with servers via the QueQiao protocol |
Supported Platforms
Installation and Automatic Dependency Sync
When installing a platform adapter through WebUI → Adapters, UniBot automatically does three things:
Register the adapter
Registers the adapter in
tool.nonebot.adaptersofpyproject.toml.Append drivers
Appends the drivers required by the adapter (e.g.
~httpx,~websockets) toDRIVERin.env.Install dependencies
The Task Center installs the adapter package and the underlying drivers (e.g.
websockets) viauv add, ensuring the driver works properly after a restart.
The whole process runs as a background task (watch the progress in the Task Center at the top right), dependency writes go only through uv add / uv remove, so there is no need to edit pyproject.toml by hand, and you will be asked whether to restart once it finishes. When uninstalling an adapter, only the registration and the redundant drivers in DRIVER are removed; dependency declarations are not deleted, avoiding accidental removal of packages referenced by other dependencies.
Quick Navigation
Configuration fields and connection methods for each platform adapter.
Configuration, connection modes, and server-side integration for the MC protocol adapter.
Minecraft Adapter
NoneBot-Adapter-Minecraft is NoneBot's Minecraft protocol adapter, providing UniBot with the ability to communicate with Minecraft servers. It is the bridge between UniBot and servers.
It interconnects with the server-side plugin / Mod through the QueQiao protocol.
QueQiao Protocol
"QueQiao" is a third-party communication protocol developed by 17TheWord / QueQiao, responsible for bridging Minecraft servers with external chat systems (such as UniBot). The server side must install a QueQiao implementation to connect to the bot. Depending on the server type, the implementation falls into two categories:
| Server Type | Implementation | Description |
|---|---|---|
| MCDReforged (Java Edition) | MCDR Plugin | Runs on top of MCDReforged |
| MCDReforged (Bedrock BDS) | MCDR Plugin | Works with the Bedrock Liteloader Handler |
| Spigot / Paper / Folia / Forge / Fabric / NeoForge / Velocity / Vanilla | Official QueQiao Implementation | Official QueQiao implementation |
Connection Methods
The QueQiao protocol itself is not developed by this project; it also supports Spigot, Paper, Fabric, Forge, NeoForge and many other server types. Bedrock servers can connect through the MCDR Bedrock Liteloader Handler handler; see MCDR Plugin · Bedrock Support for details.
Protocol Overview
The QueQiao V2 protocol is based on WebSocket, authenticated via the Authorization header, with bidirectional real-time communication. The server forwards game events (player join/leave, chat, death, advancements, etc.) to the external client, and also receives API commands sent by the external client (broadcast, private message, Title, ActionBar, RCON, etc.).
Related Projects
| Project | Description |
|---|---|
| MCDR Plugin | The QueQiao implementation for MCDReforged |
| Official QueQiao Implementation | The official QueQiao implementation for other server types |
| nonebot-plugin-mcqq | A more complete MC communication plugin |
| nonebot-plugin-mcping | Fetches the MC server MOTD and returns it as an image |
Related Projects
Open-Source License
This project is licensed under the MIT license.
