Skip to main content

nonebot-plugin-miao

原神 / 崩坏:星穹铁道的 NoneBot2 抽卡记录、模拟抽卡与角色面板插件,并提供原神、星铁、绝区零角色攻略图。移植自 miao-plugin(MIT),支持 OneBot V11。

功能

  • Authkey 抽卡记录更新、分析、按版本统计、UIGF / SRGF 导入导出
  • 原神与星铁模拟抽卡、保底、武器定轨和每日次数限制
  • Enka(原神)、Mihomo(星铁)、米游社 Cookie 面板更新
  • 属性计算、圣遗物 / 遗器评分、面板列表 / 详情 / 伤害图片
  • 原神角色与武器图鉴、名称索引(无需绑定 UID)
  • 原神、星铁与绝区零角色攻略图(分游戏来源、本地缓存、强制刷新与默认来源设置)

安装

nb plugin install nonebot-plugin-miao-genshin
pip install nonebot-plugin-miao-genshin
poetry add nonebot-plugin-miao-genshin

注意:PyPI 上的 nonebot-plugin-miao 是他人发布的无关项目,请勿安装;本插件的 PyPI 包名为 nonebot-plugin-miao-genshin(导入模块名仍为 nonebot_plugin_miao)。

配置

均有默认值;在 NoneBot .env 中按需覆盖。

配置项 默认值 说明
MIAO_RES_MIRROR jsDelivr miao-plugin resources 角色图片与静态资源镜像
MIAO_PROFILE_INTERVAL 3 面板更新冷却(分钟)
MIAO_MYS_COOKIE 全局米游社 Cookie(可选)
MIAO_GACHA_DAILY_LIMIT 1 每日模拟十连次数
MIAO_RES_AUTO_UPDATE True 每日自动更新面板资源(凌晨 4:20,需 nonebot-plugin-apscheduler)
MIAO_STRATEGY_DEFAULT_SOURCE 1 原神角色攻略图默认来源(1-7,可被设置指令覆盖)
MIAO_SR_STRATEGY_DEFAULT_SOURCE 1 星铁角色攻略图默认来源(1-3,可被设置指令覆盖)
MIAO_ZZZ_STRATEGY_DEFAULT_SOURCE 1 绝区零角色攻略图默认来源(1-4,可被设置指令覆盖)

指令

指令 范围 说明
/绑定uid <UID> / /星铁绑定uid <UID> 群聊、私聊 绑定游戏 UID
/绑定cookie <cookie> 仅私聊 绑定米游社 Cookie
/更新抽卡记录 / /抽卡分析 / /全部池统计 群聊、私聊 抽卡记录与统计;星铁命令前加“星铁”
十连 / 武器十连 / 单抽 群聊、私聊 模拟抽卡;唯一无需 / 前缀的功能
/定轨 群聊、私聊 模拟武器池定轨
/导入记录 / /导出记录 群聊、私聊 UIGF / SRGF 记录交换
/更新面板 / /米游社更新面板 群聊、私聊 更新角色面板
/面板列表 / /角色名面板 / /角色名伤害2 群聊、私聊 查看面板与指定伤害条目
/角色图鉴 / /武器图鉴 群聊、私聊 查看原神角色或武器名称索引
/芙宁娜图鉴 / /雾切图鉴 群聊、私聊 查看角色或武器的详细图鉴;也支持 # 前缀
/心海攻略[1-7] 群聊、私聊 查看原神角色攻略图;末尾数字选择攻略来源
/更新心海攻略[1-7] 群聊、私聊 忽略本地缓存并重新获取攻略图
/星铁流萤攻略[1-3] 群聊、私聊 查看星铁角色攻略图,支持现有星铁角色别名
/绝区零星见雅攻略[1-4] 群聊、私聊 查看绝区零角色攻略图,请使用角色正式名称
/攻略帮助 / /星铁攻略帮助 / /绝区零攻略帮助 群聊、私聊 查看全部或指定游戏的攻略来源
/设置默认攻略2 / /设置星铁默认攻略2 / /设置绝区零默认攻略2 群聊、私聊 分游戏持久化设置默认来源
/圣遗物列表 / /面板帮助 / /抽卡帮助 群聊、私聊 列表与帮助

除模拟抽卡外,所有功能均要求以 / 开头;图鉴和攻略指令额外兼容 Yunzai 常用的 # 前缀。发送 Authkey 抽卡链接时,也需要在完整链接前添加 /

攻略来源编号按游戏分别计算:

  • 原神:1 西风驿站、2 原神观测枢、3 派蒙喵喵屋、4 OH是姜姜呀、5 曉K、6 坤易、7 婧枫赛赛。
  • 星铁:1 列车广播、2 牧牧Muu、3 丶ATRI丶。
  • 绝区零:1 绳么东西BROADCAST、2 烟雨如诗、3 丶ATRI丶、4 小橙子阿。

攻略数据来自米游社公开合集,新域名不可用时会自动尝试旧域名;接口不可用或对应来源未收录角色时,插件会返回中文提示。绝区零目前没有随包角色元数据,指令直接按正式角色名匹配,因此新角色无需等待插件更新,但不保证识别简称。

移植对照

miao-plugin 功能 本插件位置 状态
抽卡记录、分析、模拟 gacha/datasource/gacha_log.py 已实现
Enka / Mihomo / 米游社面板 datasource/ 已实现
属性、评分与伤害规则 core/dmg/ 已实现
面板和抽卡卡片 render/ 已实现
原神角色与武器图鉴 commands/encyclopedia.pyrender/encyclopedia.py 已实现
原神、星铁、绝区零角色攻略图 commands/strategy.pydatasource/strategy.py 已实现(分游戏来源、缓存、刷新、默认来源)

未移植:群内排名、练度统计、面板图上传、私有 API、备选面板源与 Yunzai 按钮交互。

开发

poetry install
poetry run python -m compileall nonebot_plugin_miao
poetry run pytest -v
poetry run ruff check .

致谢与许可

本项目使用 MIT License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_miao_genshin-0.1.12.tar.gz (7.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_miao_genshin-0.1.12-py3-none-any.whl (8.2 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_miao_genshin-0.1.12.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_miao_genshin-0.1.12.tar.gz
Algorithm Hash digest
SHA256 5fd8970cd7b614b2c5b533b8735c0564d3c860a1932d60e10a0b6918bd804f72
MD5 15f59cda21279b0c3b57acc150692d8b
BLAKE2b-256 cb670b95936fc97ef8aa71a3bf1bfbc39a3882c26ff3ef63f666ea4d3e6521a8

See more details on using hashes here.

File details

Details for the file nonebot_plugin_miao_genshin-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_miao_genshin-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 be6df00e277b28d38b212cffbb4a27fecb65caaa6ca604f6d4a78f9cb5f106bf
MD5 bc13fa67a6b5711a267dd2ea5b6b4c55
BLAKE2b-256 2318ddfa647379e05b7255cb50be4de81a92a06c13cb5571e32e9513299cd4d0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

This release

0.1.12 This release

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page