A PHP SDK for building Telegram bots on the Telegram Bot API, with built-in Laravel support.
nonebot/nonebot2
An asynchronous Python framework for building chatbots that connect to multiple chat platforms through pluggable protocol adapters.
- Stars
- 7,781
- Forks
- 660
- Open issues
- 51
- Last commit
- yesterday
What is it?
NoneBot2 is a Python framework for writing chatbots. It handles incoming events and dispatches them to your handlers, while protocol adapters take care of talking to each chat platform. The framework itself does not implement any platform; it relies on adapters for OneBot, Telegram, Feishu, Discord, GitHub, QQ and several others, and community adapters extend the list further.
The framework is built on Python type annotations and async I/O, so a single process can handle a large volume of messages concurrently. Its driver layer lets you run on web frameworks such as FastAPI or Quart, or use aiohttp, httpx or websockets as clients, and you can swap or combine them as needed.
The project ships with the nb-cli scaffolding tool for creating and running projects, and it supports a plugin ecosystem that adds functionality on top of the core.
Key features
- 01Asynchronous message handling built on Python async I/O.
- 02Protocol adapters for OneBot, Telegram, Feishu, Discord, QQ and more.
- 03Full type annotations that support editor type checking.
- 04Pluggable drivers for FastAPI, Quart, aiohttp, httpx and websockets.
- 05nb-cli scaffolding for creating, running and managing projects.
- 06Plugin system for adding features on top of the core.
Use cases
- Building a QQ or OneBot-based group bot with custom commands.
- Creating a Telegram or Discord bot that responds to chat events.
- Integrating a bot with Feishu or GitHub webhooks and events.
- Writing a chat-driven automation service that runs multiple platforms from one codebase.
Quick start
- 1
Read the official quick start guide linked in the README
Things to know
- Some chat platform adapters are unavailable or community-maintained, such as DingTalk, which is seeking a maintainer.
- Adapter support varies by platform, and the QQ official interface changes often.
In collections
Topics
FAQ
- What is nonebot2?
- An asynchronous Python framework for building chatbots that connect to multiple chat platforms through pluggable protocol adapters. NoneBot2 is a Python framework for writing chatbots. It handles incoming events and dispatches them to your handlers, while protocol adapters take care of talking to each chat platform. The framework itself does not implement any platform; it relies on adapters for OneBot, Telegram, Feishu, Discord, GitHub, QQ and several others, and community adapters extend the list further.
- Is nonebot2 free to use? What license does it have?
- nonebot2 is open source under the MIT license. Check the license terms before using it in commercial products.
- Is nonebot2 still maintained?
- Actively maintained. The last commit to nonebot2 was on Nov 6, 2026.
- What can I use nonebot2 for?
- Building a QQ or OneBot-based group bot with custom commands. Creating a Telegram or Discord bot that responds to chat events. Integrating a bot with Feishu or GitHub webhooks and events. Writing a chat-driven automation service that runs multiple platforms from one codebase.
- How do I install nonebot2?
- Read the official quick start guide linked in the README
- Where can I get nonebot2?
- The source code and installation instructions are on GitHub: https://github.com/nonebot/nonebot2
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A pure Python, asynchronous wrapper for the Telegram Bot API, with high-level classes in telegram.ext for building bots.
A PHP framework for building Telegram bots, with handlers, middleware, conversations, and support for the full Telegram Bot API.
A cross-platform chatbot framework in TypeScript with a web console and plugin ecosystem for building bots across chat platforms.
A ChatGPT-style AI chat plugin for the Yunzai QQ bot framework, with multi-model channels, memory, RAG and a web admin panel.
Open-source agent chatbot platform that connects LLMs, plugins and agent tools to IM apps like QQ, Telegram, Slack and Discord.