nonebot-plugin-endfield
nonebot-plugin-endfield 是一个基于 NoneBot2 的《明日方舟:终末地》插件,支持扫码绑定、账号切换、信息卡、森空岛签到、公告获取与抽卡记录分析。
功能特性
- 扫码绑定终末地账号(自动轮询二维码状态)
- 单 QQ 多账号管理与快速切换
- 生成终末地信息卡图片
- 森空岛签到
- 获取最新终末地公告(图片化展示)
- 抽卡记录同步 / 分页查看 / 抽卡分析 / 全服抽卡统计
环境要求
- Python
>=3.9 - NoneBot2
>=2.0.0,<3.0.0 - 适配器:
nonebot-adapter-onebot
安装
使用 nb-cli
nb plugin install nonebot-plugin-endfield
使用包管理器
pip install nonebot-plugin-endfield
# 或
pdm add nonebot-plugin-endfield
# 或
poetry add nonebot-plugin-endfield
在 NoneBot 项目的 pyproject.toml 中启用插件:
[tool.nonebot]
plugins = ["nonebot_plugin_endfield"]
配置
https://end.shallow.ink/ 取得API Key后
在 .env 文件中配置:
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
endfield_api_key |
是 | 无 | 终末地 API 服务密钥,未配置时插件核心功能不可用 |
endfield_api_baseurl |
否 | https://end-api.shallow.ink/ |
API 服务基地址 |
示例:
endfield_api_key=your_api_key_here
endfield_api_baseurl=https://end-api.shallow.ink/
指令说明
账号与基础功能
| 指令 | 别名/说明 |
|---|---|
终末地帮助 |
别名:终末地;查看插件帮助与指令列表 |
终末地绑定 |
别名:endfield绑定、终末地扫码绑定 |
终末地切换账号 |
别名:endfield切换账号、终末地账号切换;可带序号或角色 ID |
终末地信息卡 |
别名:终末地名片、终末地卡片、endfield信息卡 |
签到 |
执行森空岛签到(需先绑定) |
终末地公告 |
获取最新公告并以图片发送 |
抽卡相关
| 指令 | 说明 |
|---|---|
抽卡记录 [页码] |
查看本地缓存抽卡记录;无记录时会先自动同步 |
抽卡分析 |
生成抽卡分析图;无记录时会先同步 |
全服抽卡统计 [卡池关键词] |
查看全服统计,支持关键词筛选卡池 |
同步全部抽卡 |
仅 Bot superusers 可用,批量触发已绑定账号同步 |
当出现多账号选择时,按提示发送数字序号(1-999)即可继续。
数据存储
插件使用 nonebot-plugin-localstore 管理数据目录,并在插件专属 data 目录下写入数据(可通过 localstore 配置项自定义):
endfield_bindings_v3.db:账号绑定与当前激活账号gacha/*.json:抽卡缓存数据gacha_pending_select.json:抽卡同步中的临时选择状态
注意事项
- 可通过环境变量覆盖字体路径:
ENDFIELD_FONT_BOLD_PATH、ENDFIELD_FONT_PATH、ENDFIELD_FONT_REGULAR_PATH。 - 若提示 API 请求失败,请优先检查
endfield_api_key与endfield_api_baseurl。 - 本插件依赖外部终末地 API 服务,服务可用性会直接影响功能。
其他框架插件
- 云崽:endfield-plugin
- Astrbot:astrbot_plugin_endfield
许可证
Metadata
Release files for nonebot-plugin-endfield 0.2.5
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_endfield-0.2.5.tar.gz | 28.0 MB | Without provenance | Details for nonebot_plugin_endfield-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_endfield-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_endfield-0.2.5-py3-none-any.whl |
Total release size: 56.0 MB
Release files / nonebot_plugin_endfield-0.2.5.tar.gz
| Download URL | nonebot_plugin_endfield-0.2.5.tar.gz |
|---|---|
| Size | 28.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f13e1766357fed4b3fa153ebd76a88a48e13427cbbd5fb91620aaa3b1b8574c
|
|
BLAKE2b-256 checksum How to use checksums |
739dca75e81a7cfd65a287680c1814a6049ef97f2ddf1cb92806b93411f07aac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / nonebot_plugin_endfield-0.2.5-py3-none-any.whl
| Download URL | nonebot_plugin_endfield-0.2.5-py3-none-any.whl |
|---|---|
| Size | 28.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a88b08863f1b3b136418e43dcf767a3036e492a509532ce84b050ef1a6d454d7
|
|
BLAKE2b-256 checksum How to use checksums |
98cc9005532c642a769c94caa3a6bdea8d5bcdad15a00b5857810498e073c5cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for nonebot-plugin-endfield 0.2.5
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.