Genshin daily material 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_scheduler
否 8:10
每日材料订阅推送时间 gsmaterial_skip_three
否 True
是否忽略三星物品 resources_dir
否 /path/to/bot/data/
插件数据缓存目录的父文件夹,包含 gsmaterial
文件夹的上级文件夹路径
命令说明
插件响应以 今日
/ 原神材料
开头的消息。
附带参数 | 说明 |
---|---|
空 | 返回今日天赋培养与武器突破材料总图 |
订阅 |
启用当前消息来源的每日材料订阅,群组内仅 Bot 管理员、群组创建者、群组管理员可操作 |
订阅删除 |
禁用当前消息来源的每日材料订阅,群组内仅 Bot 管理员、群组创建者、群组管理员可操作 |
天赋 / 角色 |
返回今日天赋培养材料图片 |
武器 |
返回今日武器突破材料图片 |
特别鸣谢
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 609b12289aeaadef086519b241ff670a93273f77e68f622384f9f289d437a402 |
|
MD5 | 291d6994dbffe330488cf5b3b1788702 |
|
BLAKE2b-256 | 1205755f6b8d2dbdf13da304ac3cfa816e883dfe0d0107468b73822e961bc4e0 |
Close
Hashes for nonebot_plugin_gsmaterial-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01b4c6057fcdebbece64f0020f0ab730d35f424652b62e52fddc0dee9c141727 |
|
MD5 | bfce1c7e2cb29155a74011fff38cd1a0 |
|
BLAKE2b-256 | fc7df9d914262eebb49d1318b3758322e356361b8bf608ff53ce416ebd43c097 |