🙏 致谢
📖 前言及介绍
PS: 这是我第一次写(划掉,是借鉴去ctrlcv!详见最下方致谢)插件,没有多少经验,写的也不规范,如果介意可以不用,望多多关照~(如果可以,给个star)
不要喷我~这个插件大佬5分钟就能搓出来……我是为了那些想写插件但是不会写的人群而写的这个插件,你可以随便借鉴,没什么精髓,只要标明致谢就好了~(╥╯^╰╥)
这个插件主要功能是调用WEBAPI链接获取数据处理后发到QQ里面的,目前统一使用json调用并解析,有问题记得issues!
🔧 开发环境
Nonebot2:2.0.0rc4
python:3.11.3
操作系统:Linux(Windows兼容性问题不大)
编辑器:VS Code
💿 安装
1. nb-cli安装(推荐)
在你bot工程的文件夹下,运行cmd/shell(运行路径要对啊),执行nb命令安装插件,插件配置会自动添加至配置文件
nb plugin install nonebot_plugin_smallapi
2. pip安装
pip install nonebot_plugin_smallapi
如果是默认nb-cli创建的nonebot2的话,在bot路径pyproject.toml的[tool.nonebot.plugins]中添加一行即可
pyproject.toml配置例如:
[tool.nonebot.plugins]
......
nonebot-plugin-smallapi = ["nonebot_plugin_smallapi"]
3. 本地安装(不推荐)
访问项目Pypi主页下载.tar.gz文件
也可以直接下载压缩包到插件目录解压,然后同样提取nonebot_plugin_smallapi至上一级目录。
目录结构: 你的bot/src/plugins/nonebot_plugin_smallapi/__init__.py
不再提供github仓库资源版本(懒)
更新版本
nb plugin update nonebot_plugin_smallapi
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| smallapi_token | 是 | 无 | 故梦API的调用KEY |
例如.env.prod :
...
smallapi_token="qwer1234114514"
#不可以填纯数字哈,不可以没有""哈,除非你闲的没事a.e
#密钥获取网址: https://www.gmya.net/api
#没有你就填
smallapi_token=""
#这是必填配置项!!!
不填写也能用,但是有调用限制哈!
🎉 功能
- 超级多看下面的吧
👉 命令
PS: 请查看你env中起始符的配置(默认/)
- 小小图片
- 小小文本
- 小小网站
小小图片
命令结构:(/)小小图片
例如:小小图片
小小文本
命令结构:(/)小小文本
例如:小小文本
小小网站
命令结构:(/)小小网站
例如:小小网站
⚙ 拓展
还没有呢~
📝 更新日志
展开/收起
2.0.1
- 修依赖xN
2.0.0
- 大版本更新
1.1.6/1.1.7
- None
1.1.5
- 调用地址更新
- 增加故梦的appkey调用方法
- 此版本未修复部分功能的兼容性问题,如需使用请提交Issus!
1.1.0
- 站点代码重写更新
1.0.7
- 优化更新
1.0.6
- 维护更新,蟒蛇(Python)版本要求最低改为3.10
1.0.5
- 修复ip查询中的致命语法错误
1.0.4
- 更换稳定API, 修复部分Bug
1.0.3
- 梅开三度,终于修好了依赖
1.0.2
- 梅开二度.
1.0.1
- 修复依赖问题
1.0.0
- 插件初次发布
致谢
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_smallapi-2.0.1.tar.gz.
File metadata
- Download URL: nonebot_plugin_smallapi-2.0.1.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8531f5eae12a3e2c06678498c77333e707defdfa124141480af8b3299d8858bc
|
|
| MD5 |
a59045fd2f2de096378a1df9149389be
|
|
| BLAKE2b-256 |
130989e8ea1a6fe20fe58e08563b059f4d5c7056cd86fed77cf8d9ee135fed4b
|
File details
Details for the file nonebot_plugin_smallapi-2.0.1-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_smallapi-2.0.1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abed85439ed8649ea078616fd69afabb2346133b605657cc9bcc4214a7d4a952
|
|
| MD5 |
fbba8a30ac8dbdc962ea42f627737346
|
|
| BLAKE2b-256 |
3e360d79ccd9357d27e6e981b2215814c1a3d7b4619040b3e8e91a1ab0d230ff
|