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/
# 从 PyPI 安装
python3 -m pip install nonebot-plugin-gachalogs
然后检查一下,别忘了安装依赖 matplotlib
Pillow
xlsxwriter
!
python3 -m pip install matplotlib Pillow xlsxwriter
打开 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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78a7847741f101d8e489b0148d1dcb5785a168aa1be2e3edff5be10919910d96 |
|
MD5 | bbb50678d88980b6a85cfc12fecaf381 |
|
BLAKE2b-256 | dc20094ed3789e680d83b0600fa8cc9dee7fc773ad8d8b77a93ade3794d0b86e |
Hashes for nonebot_plugin_gachalogs-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbd8b3594c2ac3e7865dedd0f20d79ceaa3447191a0ce49d68146835412b4778 |
|
MD5 | 9bac6d93b60f4d25e0aab28b12bdc4c3 |
|
BLAKE2b-256 | c874421f1282edb412ff6a4a5346748004c580c117665efa34611a3de6e28e69 |