Skip to main content

通过森空岛查询游戏数据

Project description

NoneBotPluginLogo

nonebot-plugin-skland

✨ 通过森空岛查询游戏数据 ✨

license pypi python
pre-commit.ci status NoneBot Registry uv ruff CodeFactor
📸 演示与预览   |   📦️ 下载插件   |   💬 加入交流群

📖 介绍

通过森空岛查询游戏数据

[!NOTE] 本插件存在大量未经验证的数据结构以及 💩 山

如在使用过程中遇到问题,欢迎提 issue 帮助改进项目

starify
Star History Star History Chart

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-skland
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-skland
pdm
pdm add nonebot-plugin-skland
poetry
poetry add nonebot-plugin-skland
conda
conda install nonebot-plugin-skland

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_skland"]

⚙️ 配置

配置表

在 nonebot2 项目的.env文件中修改配置项

配置项 必填 默认值 说明
skland__github_proxy_url "" GitHub 代理 URL
skland__github_token "" GitHub Token
skland__check_res_update True 是否检查资源更新
skland__background_source "default" 背景图片来源

[!TIP] 以上配置项均没什么用按需填写,GitHub Token 用于解决 fetch_file_list 接口到达免费调用上限,但不会有那么频繁的更新频率,99.98%的概率是用不上的。只是因为我开发测试的时候上限了,所以有了这项

background_source

skland__background_source 为背景图来源,可选值为字面量 default / Lolicon / random 或者结构 CustomSourceLolicon 为网络请求获取随机带arknightstag 的背景图,random为从默认背景目录中随机, CustomSource 用于自定义背景图。 默认为 default

以下是 CustomSource 用法

在配置文件中设置 xxx_background_sourceCustomSource结构的字典

CustomSource配置示例
  • 网络链接

    • uri 可为网络图片 API,只要返回的是图片即可
    • uri 也可以为 base64 编码的图片,如 data:image/png;base64,xxxxxx (一般也没人这么干)
sign_background_source = '{"uri": "https://example.com/image.jpg"}'
  • 本地图片

[!TIP]

  • uri 也可以为本地图片路径,如 imgs/image.jpg/path/to/image.jpg
  • 如果本地图片路径是相对路径,会使用 nonebot-plugin-localstore 指定的 data 目录作为根目录
  • 如果本地图片路径是目录,会随机选择目录下的一张图片作为背景图
sign_background_source = '{"uri": "/imgs/image.jpg"}'

🎉 使用

[!NOTE] 记得使用命令前缀

🪧 指令表

指令 权限 参数 说明
skland 所有 无 or @ 角色信息卡片
skland bind 所有 token or cred 绑定森空岛账号
skland bind -u 所有 token or cred 更新绑定的 token 或 cred
skland qrcode 所有 扫码绑定森空岛账号
skland arksign 所有 明日方舟签到
skland arksign -u <uid> 所有 uid 指定绑定角色 UID 进行签到
skland arksign --all 所有 签到所有绑定角色
skland char update 所有 更新森空岛绑定角色信息
skland rogue 所有 @ | topic 肉鸽战绩查询(暂未完成)

[!NOTE] Token 获取相关文档还没写才不是懒得写

可以参考token获取获取

本插件支持 cred 和 token 两种方式手动绑定,使用二维码绑定时会提供 token,请勿将 token 提供给不信任的 Bot 所有者

🎯 快捷指令

触发词 执行指令
森空岛绑定 skland bind
扫码绑定 skland qrcode
明日方舟签到 skland arksign
萨卡兹肉鸽 skland rogue --topic 萨卡兹
萨米肉鸽 skland rogue --topic 萨米
角色更新 skland char update

📸 效果图

示例图1

💖 鸣谢

📢 声明

本插件仅供学习交流使用,数据由 森空岛 提供,请勿用于商业用途。

使用过程中,任何涉及个人账号隐私信息(如账号 token、cred 等)的数据,请勿提供给不信任的 Bot 所有者(尤其是 token)。

📋 TODO

  • 完善用户接口返回数据解析
  • 使用nonebot-plugin-htmlrender渲染信息卡片
  • yuanyan3060/ArknightsGameResource下载游戏数据、检查数据更新
  • 绘制渲染粥游信息卡片
  • 粥游签到自动化
  • 细化粥游信息卡片的部分信息展示
  • 其余接口获取且有明确 ID 可命名的图片,优先调用本地图片,请求后缓存到本地(例如肉鸽物品获取
  • 完善肉鸽战绩返回信息解析
  • 绘制渲染肉鸽战绩卡片
  • 扬了不必要的 💩
  • 待补充

Project details


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_skland-0.1.7.tar.gz (4.3 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_skland-0.1.7-py3-none-any.whl (4.3 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_skland-0.1.7.tar.gz.

File metadata

  • Download URL: nonebot_plugin_skland-0.1.7.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nonebot_plugin_skland-0.1.7.tar.gz
Algorithm Hash digest
SHA256 c25c3c8ee603c3bf14082763182fbc8ce2b18af045ddb885e83a593c258e1cbb
MD5 e6356fee409b1b29c1a64545aa8188bf
BLAKE2b-256 cae6944548a6f0d191ecce734c017a3ff4c322156f4c17c4b547ebf06d97ec29

See more details on using hashes here.

File details

Details for the file nonebot_plugin_skland-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_skland-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 301f3c3b0d3d528324288771377115be45cfb43189985d05425c8955eda4b9a6
MD5 bef88b4b58110751ab5e56479ec23aaa
BLAKE2b-256 c3f5080fad5817c83559a30fe70d44110f24ac79bdf45e88554519cdf9551622

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page