Skip to main content
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

🎉 使用

🙏 感谢

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

Metadata

Release files for nonebot-plugin-segbuilder 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-segbuilder 0.2.0
File Size Uploaded
nonebot_plugin_segbuilder-0.2.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-segbuilder 0.2.0
File Interpreter ABI Platform
nonebot_plugin_segbuilder-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / nonebot_plugin_segbuilder-0.2.0.tar.gz

Download URL nonebot_plugin_segbuilder-0.2.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a780c13669880e2f5c6ff0a5722c6d69248e30eeeb9e6962dfc75c57a7680057
BLAKE2b-256 checksum
How to use checksums
01e25246736d5fe3580a5d5020b89ca969722a1e0e8a0c72b347ea4a2d91aabd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / nonebot_plugin_segbuilder-0.2.0-py3-none-any.whl

Download URL nonebot_plugin_segbuilder-0.2.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6e53b05f906f472c5813f23699e2b50e58a543300aa4ad1de25330327b0d9b1
BLAKE2b-256 checksum
How to use checksums
796319326536b4f753785a3e7e2a4ed0d0e42f98e03bd554678208d927206145
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page