Coder Social home page Coder Social logo

NoneBot

License PyPI Python Version OneBot Version QQ 群 Telegram 频道 Discord Server

简介

NoneBot 是一个基于 OneBot 标准(原 CQHTTP) 的 Python 异步 QQ 机器人框架,它会对 QQ 机器人收到的消息进行解析和处理,并以插件化的形式,分发给消息所对应的命令处理器和自然语言处理器,来完成具体的功能。

除了起到解析消息的作用,NoneBot 还为插件提供了大量实用的预设操作和权限控制机制,尤其对于命令处理器,它更是提供了完善且易用的会话机制和内部调用机制,以分别适应命令的连续交互和插件内部功能复用等需求。

NoneBot 在其底层与 OneBot 实现交互的部分使用 aiocqhttp 库,后者在 Quart 的基础上封装了与 OneBot 实现的网络交互。

得益于 Python 的 asyncio 机制,NoneBot 处理消息的吞吐量有了很大的保障,再配合 OneBot 标准的 WebSocket 通信方式(也是最建议的通信方式),NoneBot 的性能可以达到 HTTP 通信方式的两倍以上,相较于传统同步 I/O 的 HTTP 通信,更是有质的飞跃。

需要注意的是,NoneBot 仅支持 Python 3.7+。

文档

文档目前「指南」和「API」部分已经完成,「进阶」部分尚未完成,你可以在 这里 查看。

贡献

如果你在使用过程中发现任何问题,可以 提交 issue 或自行 fork 修改后提交 pull request。

如果你要提交 pull request,请确保你的代码风格和项目已有的代码保持一致,遵循 PEP 8,变量命名清晰,有适当的注释。

NoneBot

Description

NoneBot is an asynchronous and OneBot-compliant QQ robot framework written in Python. When NoneBot receives new messages, it parses the messages then pass them to user-defined command handlers or natural language processors accordingly using a plugin system to accomplish various tasks.

Beside message processing, NoneBot presents an amount of useful built-in actions and permission handling features. The command processors provide simple but comprehensive session-ing and calling mechanisms to handle continuous interactions and the reusing of functionalities inside plugins, respectively.

NoneBot communicates with OneBot implementations using aiocqhttp, a wrapper based on Quart for lower-level protocol work.

Thanks to asyncio and WebSocket messaging method (which is recommended), NoneBot ensures maximum possible message throughput to be twice as fast as HTTP messaging, and have great performance leap compared to traditional synchronous IO.

NoneBot only supports Python 3.7+.

Documentation

For Guide and API manuals, check out this page.

Contributing

If you encounter any problems in using the project, you can submit an issue or fork this project to submit an pull request.

For pull requests, please be sure to have consistent style to existing modules, follow PEP 8, have clear identifier naming, and have proper comments.

NoneBot's Projects

adapter-feishu icon adapter-feishu

NoneBot2 飞书适配器 / FeiShu (LarkSuite) adapter for nonebot2

adapter-kritor icon adapter-kritor

NoneBot2 Kritor 协议适配器 / Kritor Protocol adapter for nonebot2

adapter-qq icon adapter-qq

NoneBot2 QQ 适配器 / QQ adapter for nonebot2

adapter-satori icon adapter-satori

NoneBot2 Satori 适配器 / Satori Protocol adapter for nonebot2

aiocqhttp icon aiocqhttp

A Python SDK with async I/O for CQHTTP (OneBot).

nb-autodoc icon nb-autodoc

Python API documentation tool supporting the modern PEPs and typing features.

nb-cli icon nb-cli

NoneBot2 脚手架 / CLI for NoneBot2

noneblockly icon noneblockly

Craft NoneBot plugins with ease: Embrace low-code development through Blockly.

nonebot icon nonebot

基于 OneBot 标准的 Python 异步 QQ 机器人框架 / Asynchronous QQ robot framework based on OneBot for Python

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.