https://github.com/well2333/nonebot-plugin-segbuilder
为不同的适配器提供更通用且简易的消息段构建方式
https://github.com/well2333/nonebot-plugin-segbuilder
Last synced: 2 months ago
JSON representation
为不同的适配器提供更通用且简易的消息段构建方式
- Host: GitHub
- URL: https://github.com/well2333/nonebot-plugin-segbuilder
- Owner: Well2333
- License: mit
- Created: 2023-05-09T06:40:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-13T06:53:13.000Z (about 2 years ago)
- Last Synced: 2024-10-30T00:38:50.667Z (8 months ago)
- Language: Python
- Size: 92.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
跨平台太复杂?不同的适配器区别太大?saa 太难不会用?
别担心,`nonebot-plugin-segbuilder` 将是你的不二之选!
## 📖 介绍
`nonebot-plugin-segbuilder` 是帮助**开发者**快速构建跨平台消息段的应用的工具。相较于 saa ([nonebot-plugin-send-anything-anywhere](https://github.com/felinae98/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
## 🎉 使用
- [基础使用](./docs/basic_usage.md)
- [兼容性](./docs/compatibility.md)## 🙏 感谢
在此感谢以下开发者(项目)对本项目做出的贡献:
- [nonebot-plugin-send-anything-anywhere](https://github.com/felinae98/nonebot-plugin-send-anything-anywhere): 项目的灵感来源以及部分实现的参考
- [nonebot-plugin-template](https://github.com/A-kirami/nonebot-plugin-template): 项目的 README 模板