Cross-platform Python asynchronous robot framework
Documents · Quick Start · Can’t open the document?
NoneBot2 is a modern, cross-platform, and extensible Python chatbot framework. It is based on Python's type annotations and asynchronous features, and can provide convenient and flexible support for realizing your needs.
Asynchronous first: Based on Python’s asynchronous features, even Very Able to process a large amount of messages with ease
Easy to develop: With the NB-CLI scaffolding, code writing is simple and there is no excessive redundant code, allowing developers to focus on business logic
Born to be reliable: 100% type annotation coverage, combined with the editor's type inference function, can eliminate most bugs in the editor (editor support)
Rich community: There are many community users, more than 100,000 direct and indirect users, and a large number of active users (community resources) every day
Open to all rivers: a framework that supports multiple chat software platforms and can customize communication protocols
Protocol name | state | Comment |
---|---|---|
OneBot (warehouse, protocol) | ✅ | Support QQ, TG, WeChat public account, KOOK and other platforms |
Telegram (warehouse, protocol) | ✅ | |
Feishu (warehouse, agreement) | ✅ | |
GitHub (repository, protocol) | ✅ | GitHub APP & OAuth APP |
QQ (warehouse, protocol) | ✅ | QQ official interface has many adjustments |
Console (warehouse) | ✅ | Console interaction |
Red (warehouse, protocol) | ✅ | QQ protocol |
Satori (warehouse, protocol) | ✅ | Supports Onebot, TG, Feishu, WeChat public accounts, Koishi, etc. |
Discord (repository, protocol) | ✅ | Discord Bot Protocol |
DoDo (warehouse, protocol) | ✅ | DoDo Bot Protocol |
Kritor (warehouse, protocol) | ✅ | Kritor (OnebotX) protocol, QQ robot interface standard |
Mirai (warehouse, protocol) | ✅ | QQ protocol |
DingTalk (warehouse, agreement) | ? | Find Maintainer (not available yet) |
It’s black (warehouse, agreement) | Contributed by the community | |
Ntchat (warehouse) | WeChat protocol, contributed by the community | |
MineCraft (warehouse) | Contributed by the community | |
BiliBili Live (warehouse) | Contributed by the community | |
Walle-Q (warehouse) | QQ protocol, contributed by the community | |
Villa (warehouse) | Miyoushe Dabieye Bot protocol has officially been offline | |
Rocket.Chat(warehouse, protocol) | Rocket.Chat Bot protocol, contributed by the community | |
Tailchat (warehouse, protocol) | Tailchat open platform Bot protocol, contributed by the community | |
Mail (warehouse) | Email sending and receiving protocol, contributed by the community |
Solid backing: supports multiple web frameworks and can be customized for replacement and combination
driver framework | type |
---|---|
FastAPI | Server |
Quart (Asynchronous Flask) | Server |
aiohttp | client |
httpx | client |
websockets | client |
More: Overview
NoneBot2 is not a specific implementation of a certain platform or protocol. It is only responsible for communicating with existing protocol adapters and processing received events. Therefore, the question "Does NoneBot have the blabla function of the blabla platform?" has nothing to do with NoneBot2. Please confirm in the functional documentation of the corresponding platform, or contact the protocol adaptation developer of the corresponding platform.
NoneBot2 is not a replacement for NoneBot1. In fact, they are actively maintained. However, if you want to try some new features, or want to support more platforms, consider using NoneBot2.
The difference between NoneBot2 and NoneBot1 is like the difference between VisualStudio Code and VisualStudio
whole Documentation can be viewed here.
Too lazy to read the documentation? Here is a quick installation guide:
Install pipx
python -m pip install --user pipx
python -m pipx ensurepath
Install scaffolding
pipx install nb-cli
Create a project using scaffolding
nb create
Run the project
nb run
In addition, NoneBot2 also has a wealth of official and third-party ready-made plug-ins for everyone to use:
NoneBot-Plugin-Docs: Offline documents can be used in local projects (stop saying that the document cannot be opened!)
Execute in the project directory:
nb plugin install nonebot_plugin_docs
Or try the following images:
For other plugins please check the store
NoneBot
is open source under MIT
license
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please refer to the contribution guidelines
Thanks to the following products for sponsoring the NoneBot project:
Thanks to the following sponsors for their financial support of the NoneBot project:
Thanks to the following developers for their contributions to NoneBot2: