Skip to main content

为不同的适配器提供更通用且简易的消息段构建方式

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-segbuilder

✨ 为不同的适配器提供更通用且简易的消息段构建方式 ✨

license PyPI - Downloads pypi python pdm-managed Code style: black onebot onebot QQ Chat Group QQ Chat Group

跨平台太复杂?不同的适配器区别太大?saa 太难不会用?

别担心,nonebot-plugin-segbuilder 将是你的不二之选!

📖 介绍

nonebot-plugin-segbuilder 是帮助开发者快速构建跨平台消息段的应用的工具。相较于 saa (nonebot-plugin-send-anything-anywhere) 包办了消息构建与发送,本插件仅实现了消息段构建,更加符合 NoneBot2 原生的编写流程,同时也更易拓展与理解。

但与之相对的,面对与 QQ 消息类型相差越大的平台,这种发送方式的兼容性也会越差,而本插件由于仅负责了消息段构建而不少问题是发送时才会抛出,因此本插件的使用体验下限将远低于 saa。但如果你能接受一定程度的平台相关处理或仅在类 qq 的平台(如 OB11 和 OB12),本插件的上限也将高于 saa。

🥳 适配器支持状态

屑屑 msgbuf 的 README(https://github.com/NCBM/nonebot-plugin-msgbuf)

  • ✅: 完全支持
  • 🟨: 部分支持,由于平台限制需要用户额外分平台处理
  • 🚧: 临时不支持,但后续可能会修复
  • ❌: 永久不支持,通常是平台不支持此功能或实现过于复杂
  • 🔧: 预期支持
Adapters Text image at(@) reply(quote) face voice video file share location
OneBot V11 🔧 🔧 🔧 🔧 🔧 🔧
OneBot V12 🔧 🔧 🔧 🔧 🔧 🔧
mirai2 🚧 🔧 🔧 🔧 🔧 🔧 🔧
qqguild 🚧 🔧

对于不支持的适配器,将会统一转为文字回复

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-segbuilder

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分去掉本插件, 否则小概率可能造成加载失败

使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-segbuilder
pdm
pdm add nonebot-plugin-segbuilder
poetry
poetry add nonebot-plugin-segbuilder
conda
conda install nonebot-plugin-segbuilder

🎉 使用

🙏 感谢

在此感谢以下开发者(项目)对本项目做出的贡献:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_segbuilder-0.2.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_segbuilder-0.2.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_segbuilder-0.2.0.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_segbuilder-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a780c13669880e2f5c6ff0a5722c6d69248e30eeeb9e6962dfc75c57a7680057
MD5 04af991c69311e86fe2fe8cdd2991cab
BLAKE2b-256 01e25246736d5fe3580a5d5020b89ca969722a1e0e8a0c72b347ea4a2d91aabd

See more details on using hashes here.

File details

Details for the file nonebot_plugin_segbuilder-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_segbuilder-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6e53b05f906f472c5813f23699e2b50e58a543300aa4ad1de25330327b0d9b1
MD5 ca19f54b667871bd214b921a73a0499c
BLAKE2b-256 796319326536b4f753785a3e7e2a4ed0d0e42f98e03bd554678208d927206145

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page