Genshin player cards plugin for NoneBot2
Project description
NoneBot Plugin GsMaterial
🤖 用于展示原神游戏每日材料数据的 NoneBot2 插件
安装方法
如果你正在使用 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
文件夹的上级文件夹路径
命令说明
插件响应以 今日
/ 今天打什么
开头的消息。
附带参数 | 说明 |
---|---|
空 | 返回今日天赋培养与武器突破材料总图 |
天赋 / 角色 |
返回今日天赋培养材料图片 |
武器 |
返回今日武器突破材料图片 |
特别鸣谢
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot-plugin-gsmaterial-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f52563d321abf96743e63e6896455a118329dbd65b34f46dc4d3a2f2e830801f |
|
MD5 | 3da02b83c7d6794a6124367f3174dbb4 |
|
BLAKE2b-256 | 0fd91d992225a144832f2b5f728059e5a306b94f9ff1fb581f044bf0376ad933 |
Close
Hashes for nonebot_plugin_gsmaterial-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9743d2edae017e543e5aca91641277684c81d109b6e9ce7583b36ed43b577fa9 |
|
MD5 | 596c20ed665ac638681565d5611d352a |
|
BLAKE2b-256 | d91aae8231d118126ac111d8613b731613f55b2320f0072a30633e89236cb97f |