📖 介绍
使用 Bot 指令来直接调用 Bot 的 API 吧!
💿 安装
以下提到的方法 任选其一 即可
[推荐] 使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-callapi
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-callapi
pdm
pdm add nonebot-plugin-callapi
poetry
poetry add nonebot-plugin-callapi
conda
conda install nonebot-plugin-callapi
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分的 plugins 项里追加写入
[tool.nonebot]
plugins = [
# ...
"nonebot_plugin_callapi"
]
⚙️ 配置
在 nonebot2 项目的 .env 文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
CALLAPI_PIC |
否 | True |
API 调用结果是否生成为图片(如所在平台不支持图片,将会回退到文本) |
🎉 使用
指令
插件指令仅限 SUPERUSER 调用
效果图
📞 联系
QQ:3076823485
Telegram:@lgc2333
吹水群:1105946125
邮箱:lgc2333@126.com
💡 鸣谢
ITCraftDevelopmentTeam/XDbot2
功能启发
MeetWq/pil-utils
超好用的 Pillow 辅助库
felinae98/nonebot-plugin-send-anything-anywhere
多适配器消息发送支持(本插件用来发送图片)
💰 赞助
感谢大家的赞助!你们的赞助将是我继续创作的动力!
📝 更新日志
0.3.0
- 适配 pil-utils 0.2
0.2.0
- 适配 Pydantic V1 & V2
- 换用 alconna
0.1.3
- 删除插件自身对 Telegram 消息发送的兼容,现在发送 Telegram 消息使用 SAA 接管
0.1.2
- 🎉 NoneBot 2.0 🚀
0.1.1
- 修复文本类 Segment 未做转义处理的问题
Metadata
Release files for nonebot-plugin-callapi 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_callapi-0.3.0.tar.gz | 6.6 kB | Without provenance | Details for nonebot_plugin_callapi-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_callapi-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_callapi-0.3.0-py3-none-any.whl |
Total release size: 14.6 kB
Release files / nonebot_plugin_callapi-0.3.0.tar.gz
| Download URL | nonebot_plugin_callapi-0.3.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a56e8ca3aa2abfe5a74214f981ad441cc4cb6dc2dea80df9cb9521bc2c441e81
|
|
BLAKE2b-256 checksum How to use checksums |
b67e66374b036813fb993e726a1c618a1735c426e4670f6c40a729cff0e1d311
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure
|
Release files / nonebot_plugin_callapi-0.3.0-py3-none-any.whl
| Download URL | nonebot_plugin_callapi-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c8fb2629e6e2d177b20338cc66646b8330295b57caf36cc56011da53ca01924
|
|
BLAKE2b-256 checksum How to use checksums |
22414480cad523bc70614d2b4fb31520216a0c0a90f6826c014a9c21477d438f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure
|
Security for nonebot-plugin-callapi 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.