A Genshin GachaLogs analysis plugin for Nonebot2
Project description
Nonebot Plugin GachaLogs
🤖 用于统计及导出原神祈愿记录的 Nonebot2 插件
安装方法
使用以下命令安装插件本体 (插件暂未发布于 PyPI):
# 从 Git 安装
git clone https://github.com/monsterxcn/nonebot-plugin-gachalogs.git
cd nonebot_plugin_gachalogs
cp -r nonebot_plugin_gachalogs /path/to/nonebot/plugins/
cp -r resources/gachalogs /path/to/resources/
然后检查一下,别忘了安装依赖 matplotlib
Pillow
xlsxwriter
!
python3 -m pip install matplotlib Pillow xlsxwriter
从 PyPI 安装
# 从 PyPI 安装
python3 -m pip install nonebot-plugin-gachalogs
从 PyPI 安装后需要手动将 resources/gachalogs
文件夹内资源下载到服务端。
打开 Nonebot2 正在使用的 .env
文件,参考 .env.example 添加以下配置:
resources_dir
包含gachalogs
文件夹的上级目录路径gacha_expire_sec
祈愿历史记录本地缓存过期秒数,不设置默认 1 小时cos_bucket_name
腾讯云 COS 存储桶名称cos_bucket_region
腾讯云 COS 存储桶地域cos_secret_id
腾讯云 COS 存储桶 SecretIdcos_secret_key
腾讯云 COS 存储桶 SecretKey
* 关于腾讯云 COS 的配置仅用于私聊导出文件
重启 Bot 即可体验此插件。
使用方法
插件支持以下命令:
-
抽卡记录
/ckjl
返回一张统计饼图,样式与 https://genshin.voderl.cn/ 一致。
初次使用要求输入一次祈愿历史记录链接,只要回复的内容中含有即可,不必手动截取准确的链接地址。
附带
-f
/--force
可要求强制获取最新祈愿记录,祈愿记录结果默认缓存 1 小时。 -
抽卡记录导出
/ckjldc
导出祈愿历史记录文件,可选格式包括
.xlsx
表格和.json
文件,均符合 统一可交换祈愿记录标准(UIGF)格式。附带
j
/json
/u
/uigf
可指定导出.json
文件,否则默认导出.xlsx
表格。管理员可使用
ckjldc [qq] [format]
格式命令导出指定 QQ 的祈愿历史记录。此功能需要配置腾讯云 COS 以实现私聊文件发送,创建的存储桶建议设为私有读写。
特别鸣谢
@nonebot/nonebot2 | @Mrs4s/go-cqhttp | @sunfkny/genshin-gacha-export | @voderl/genshin-gacha-analyzer
插件主要功能是从 @sunfkny/genshin-gacha-export 抄的,溜溜…
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
Hashes for nonebot-plugin-gachalogs-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f7e47e1418cb7013a806764b8e4c6a2073fee873589b409a269db9f24c48a9f |
|
MD5 | ff82498f9d82f917d54df6bfa1bd1953 |
|
BLAKE2b-256 | f5b0d731311537e19618e80a275293e951a78f85e0ff2f728b1be269f1476b5a |
Hashes for nonebot_plugin_gachalogs-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bef6ef17e56852c6beaaa19ef7e13281736bfe479566261ab3d1564fc4328b9 |
|
MD5 | 477d9cc66332bf1b57445bdb35709938 |
|
BLAKE2b-256 | 11a447b27e764f6d00d87111c7b126fff32a650d63b5c2049d0dda083de8e0b7 |