Use bot command to call its API
Project description
📖 介绍
使用 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 调用结果是否生成为图片 Tip: 只有 SAA 支持的平台才能发送图片, 其他平台只能发送为纯文本 |
🎉 使用
指令
插件指令仅限 SUPERUSER
调用
效果图
📞 联系
QQ:3076823485
Telegram:@lgc2333
吹水群:1105946125
邮箱:lgc2333@126.com
💡 鸣谢
ITCraftDevelopmentTeam/XDbot2
功能启发
MeetWq/pil-utils
超好用的 Pillow 辅助库
felinae98/nonebot-plugin-send-anything-anywhere
多适配器消息发送支持(本插件用来发送图片)
💰 赞助
感谢大家的赞助!你们的赞助将是我继续创作的动力!
-
赞助二维码(点击展开)
📝 更新日志
0.1.3
- 删除插件自身对 Telegram 消息发送的兼容,现在发送 Telegram 消息使用 SAA 接管
0.1.2
- 🎉 NoneBot 2.0 🚀
0.1.1
- 修复文本类 Segment 未做转义处理的问题
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot_plugin_callapi-0.1.3.post2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f25acb12d60ea8f2439e437a8c2ce1f0df08cee74a8884238e6af7646893e3a |
|
MD5 | bd0195b8bbe7c4a473074e94580165b9 |
|
BLAKE2b-256 | b0b00b0a90d87193c2b72e9fb5d8db55f6381732f910ebca6da72d843b269697 |
Close
Hashes for nonebot_plugin_callapi-0.1.3.post2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5b300ecf84b47bd74cb965c912f37cb4da37ed96b9ffd22393fb135eb9f44cf |
|
MD5 | d42222a2aaa07549372abbadab64362c |
|
BLAKE2b-256 | e46b1c5c62bd85f0813ebc2d78d14226ca0f3433891178dbe8c376cc0dff19ff |