Skip to main content

Genshin player cards plugin for NoneBot2

Project description

NoneBot Plugin GsMaterial


🤖 用于展示原神游戏每日材料数据的 NoneBot2 插件


actions license pypi python


示例

安装方法

如果你正在使用 2.0.0.beta1 以上版本 NoneBot,推荐使用以下命令安装:

# 从 nb_cli 安装
python3 -m nb plugin install nonebot-plugin-gsmaterial

# 或从 PyPI 安装
python3 -m pip install nonebot-plugin-gsmaterial
在 NoneBot 2.0.0.alpha16 上使用此插件

在过时的 NoneBot 2.0.0.alpha16 上 可能 仍有机会体验此插件!不过,千万不要通过 NoneBot 脚手架或 PyPI 安装,仅支持通过 Git 手动安装此插件。

以下命令仅作参考:

# 进入 Bot 根目录
cd /path/to/bot
# 安装依赖
# source venv/bin/activate
python3 -m pip install pillow httpx
# 安装插件
git clone https://github.com/monsterxcn/nonebot-plugin-gsmaterial.git
cd nonebot-plugin-gsmaterial
# 将文件夹 nonebot_plugin_gsmaterial 复制到 NoneBot2 插件目录下
cp -r nonebot_plugin_gsmaterial /path/to/bot/plugins/
# 将文件夹 data 下内容复制到 /path/to/bot/data/ 目录下
mkdir /path/to/bot/data
cp -r data/gsmaterial /path/to/bot/data/

使用须知

  • 插件的数据来源为 @Project Amber,请保证 Bot 与此站点的连接质量。

  • 插件首次启用时,会自动从阿里云 OSS 下载绘图模板,并尝试从 @Project Amber 下载所有角色及武器图片,启动时间由 Bot 与 @Project Amber 的连接质量决定。图片下载至本地后将不再从远程下载,启动时间将大幅缩短。

    如果启动插件时下载图片的时间久到离谱,可以考虑自行克隆仓库内文件或从 此处 下载资源压缩包。

  • 一般来说,插件安装完成后无需设置环境变量,只需重启 Bot 即可开始使用。你也可以在 Nonebot2 当前使用的 .env 文件中添加下表给出的环境变量,对插件进行更多配置。环境变量修改后需要重启 Bot 才能生效。

    环境变量 必需 默认 说明
    gsmaterial_skip_three True 是否忽略三星物品
    resources_dir /path/to/bot/data/ 插件数据缓存目录的父文件夹,包含 gsmaterial 文件夹的上级文件夹路径

命令说明

插件响应以 今日 / 今天打什么 开头的消息。

附带参数 说明
返回今日天赋培养与武器突破材料总图
天赋 / 角色 返回今日天赋培养材料图片
武器 返回今日武器突破材料图片

特别鸣谢

@nonebot/nonebot2 | @Mrs4s/go-cqhttp | @Project Amber

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-gsmaterial-0.1.0.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_gsmaterial-0.1.0-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

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