喵呜~ 如果本喵帮到了指挥官,记得点个 ⭐ Star 支持一下喵~
喵呜~ 欢迎指挥官!这里是 nonebot-plugin-azurlane,一只专属于您的碧蓝航线查询小助手喵。在 QQ 里喊本喵一声,就能查到指挥官信息、建造记录,绑定后随时一键查询,所有结果都会渲染成漂漂亮亮的图片面板送给指挥官喵~
🎉 功能 / 指令
喵,统一入口是 /blhx,后面跟上子命令就阔以啦喵:
| 指令 | 功能 |
|---|---|
/blhx 信息(info) |
查询指挥官信息(等级、资源、收集率、待办副本等),图片面板展示 |
/blhx 建造记录 [数量](记录/建造) |
查询最近建造记录(默认 10 条,上限 500),图片面板展示 |
/blhx 绑定(登录/登陆/login) |
发送一次性绑定二维码,扫码在 Web 登录页填写 UID 并选择区服完成绑定 |
📦 安装
从 PyPI 安装(推荐)
pip install nonebot-plugin-azurlane
# 或 uv
uv add nonebot-plugin-azurlane
在 pyproject.toml 中注册插件:
[tool.nonebot]
plugins = ["nonebot_plugin_azurlane"]
从源码运行
git clone https://github.com/wess09/nonebot-plugin-azurlane.git
cd nonebot-plugin-azurlane
uv sync # 安装依赖
python bot.py # 启动
🔌 适配器(多协议支持)
消息处理已按 NoneBot 泛型基类解耦,指令(/blhx 信息、/blhx 建造记录、/blhx 绑定)可挂到不同协议喵。已适配并测试:
| 协议 | 发图方式 | 绑定撤回/通知 |
|---|---|---|
| OneBot V11 | 图片字节直接进消息段(base64) | ✅ 完整 |
| OneBot V12 | 先 upload_file 拿 file_id 再引用 |
✅ delete_message / send_message |
想接入别的协议,三步搞定:
- 安装对应适配器包,例如
uv add nonebot-adapter-telegram; - 在
.env用ADAPTERS列出协议名(逗号分隔),例如ADAPTERS = onebot.v11,telegram; - 按该适配器要求补上它的连接配置(Token / URL 等),重启即可。
支持的协议名:onebot.v11、onebot.v12、qq、qqguild、satori、red、telegram、discord、kaiheila、feishu、ding、dodo、minecraft、console、matrix、slack、whatsapp、villa、milky。
⚙️ 配置(.env)
核心配置
DRIVER = ~fastapi+~httpx+~websockets
HOST = 0.0.0.0
PORT = 8081
# OneBot 11 正向 WS(OneBot 实现方地址)
ONEBOT_WS_URLS = ["ws://127.0.0.1:6700"]
# 绑定链接公开地址(Web 登录页;CDN 部署时改为 CDN 页面地址)
AZURLANE_BIND_BASE_URL = http://127.0.0.1:8081
# bot 服务公网地址(绑定回调跳转目标;CDN 部署时改为 bot 公网地址)
AZURLANE_API_BASE_URL = http://127.0.0.1:8081
# 可选 Cookie(部分接口不带可能拿不到数据)
AZURLANE_COOKIE =
# htmlrender 渲染配置:本机 Chromium/Edge 可执行文件路径
RENDER__PROVIDER = playwright
RENDER__STARTUP = warmup
RENDER__PROVIDER_CONFIG__EXECUTABLE_PATH = C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
RENDER__PROVIDER_CONFIG__SKIP_BROWSER_INSTALL = true
# 部署者管理员 QQ(可选,接收绑定通知)
AZURLANE_ADMIN_QQ =
渲染字体(重要)
图片面板需要用到下面这些系统字体,渲染前记得安装到系统哦(Windows: C:\Windows\Fonts)喵:
| 字体 | 用途 |
|---|---|
Source Han Sans CN / 思源黑体 |
正文 |
MStiffHei PRC |
标题 |
Agency FB |
数字 / 英文标语 |
登录页部署到 CDN
- 将包内
static/login/目录(index.html + login_avatar.webp + login_bg.mp4)上传至 CDN AZURLANE_BIND_BASE_URL设为 CDN 页面地址(/绑定二维码指向它)AZURLANE_API_BASE_URL设为 bot 公网地址- 若页面与 bot 不同源,把
index.html顶部的const API_BASE = ''改为 bot 公网地址
已知局限
- 渠道服(华为/小米/应用宝等)本喵暂时查不了,绑定渠道服会提示失败,抱歉喵。
- 请勿高频调用喵,小心触发风控;也别拿本喵去商用喵。
Metadata
Release files for nonebot-plugin-azurlane 0.1.4
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_azurlane-0.1.4.tar.gz | 49.5 MB | Without provenance | Details for nonebot_plugin_azurlane-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_azurlane-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_azurlane-0.1.4-py3-none-any.whl |
Total release size: 98.9 MB
Release files / nonebot_plugin_azurlane-0.1.4.tar.gz
| Download URL | nonebot_plugin_azurlane-0.1.4.tar.gz |
|---|---|
| Size | 49.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1ca67fc3994a6d36fbea5f24f60dc91acbb0f497ba54a4ed9c1ae9ade8ffde4
|
|
BLAKE2b-256 checksum How to use checksums |
7c40c8e7ed3b916ee5cad8051b42c352c99c21f10d31203f75e5954df880efbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nonebot_plugin_azurlane-0.1.4-py3-none-any.whl
| Download URL | nonebot_plugin_azurlane-0.1.4-py3-none-any.whl |
|---|---|
| Size | 49.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0844f3680a314b8f1c8d6e899dad01adb1cb76564eb622130e8d14227a8e4dcc
|
|
BLAKE2b-256 checksum How to use checksums |
2f68550c9ccfa2a3647e45729e5b620460bb0386d3935023e2293c1e068ce706
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for nonebot-plugin-azurlane 0.1.4
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.