更加现代化的 NoneBot2 每日人品插件,支持查询今日、本周、本月和历史平均人品,提供详细的运势评价,并支持数据持久化存储。
Project description
📖 介绍
nonebot_plugin_jrrp2 的现代化 Fork。
一个功能完善的每日人品查询插件,支持查询今日、本周、本月和历史平均人品,提供详细的运势评价,并支持数据持久化存储。
与 nonebot-plugin-jrrp2 的区别
- 完全使用 Alconna 指令解析器重写逻辑,减少误触,增加反应速度
- 使用 localstore 插件存储数据存储路径。
- 完善的错误处理和异常捕获
- 支持原jrrp2插件数据库迁移
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-jrrp3
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-jrrp3
pdm
pdm add nonebot-plugin-jrrp3
poetry
poetry add nonebot-plugin-jrrp3
conda
conda install nonebot-plugin-jrrp3
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot-plugin-jrrp3"]
⚙️ 配置
本插件使用 nonebot_plugin_localstore 自动管理数据存储路径,无需手动配置数据库路径。数据默认存储在 NoneBot 的标准插件数据目录下的 jrrp3 文件夹中。
[!NOTE] 插件设计上兼容 nonebot_plugin_jrrp2 的数据库格式,您可以将原数据库文件直接复制到插件的数据目录中,实现数据迁移。
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| jrrp/今日人品/今日运势 | 群员 | 否 | 群聊/私聊 | 查询今日人品指数 |
| 本周人品/本周运势/周运势 | 群员 | 否 | 群聊/私聊 | 查询本周平均人品 |
| 本月人品/本月运势/月运势 | 群员 | 否 | 群聊/私聊 | 查询本月平均人品 |
| 总人品/平均人品/平均运势 | 群员 | 否 | 群聊/私聊 | 查询历史平均人品 |
功能说明
- 每日人品查询:每天获得一个1-100的随机数作为今日幸运指数
- 本周统计:显示本周使用次数和平均幸运指数
- 本月统计:显示本月使用次数和平均幸运指数
- 历史统计:显示全部历史使用次数和平均幸运指数
运势等级划分
| 分数 | 评级 | 描述 |
|---|---|---|
| 100 | 超吉 | 100!100诶!!你就是欧皇? |
| 76-99 | 大吉 | 好耶!今天运气真不错呢 |
| 66-75 | 吉 | 哦豁,今天运气还顺利哦 |
| 63-65 | 半吉 | emm,今天运气一般般呢 |
| 59-62 | 小吉 | 还……还行吧,今天运气稍差一点点呢 |
| 54-58 | 末小吉 | 唔……今天运气有点差哦 |
| 10-53 | 末吉 | 呜哇,今天运气应该不太好 |
| 1-9 | 凶 | 啊这……(没错……是百分制),今天还是吃点好的吧 |
| 0 | 大凶 | 啊这……(个位数可还行),今天还是吃点好的吧 |
📦 依赖
- nonebot2 >= 2.1.0
- nonebot-plugin-alconna
- nonebot-plugin-localstore
- Python >= 3.9
📝 许可证
本项目使用 MIT 许可证,详见 LICENSE 文件。
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_jrrp3-3.0.1.tar.gz.
File metadata
- Download URL: nonebot_plugin_jrrp3-3.0.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d95c2bc04ca668e79e1d0f5c186178fdd97d5f5e672ba104abe2300fc756297f
|
|
| MD5 |
4631751a44e8a21c38cb8852bb84c582
|
|
| BLAKE2b-256 |
865095a608f8d2026b44337471de8b3ded6d2a9521dfbef6c37f10e89b5424ee
|
File details
Details for the file nonebot_plugin_jrrp3-3.0.1-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_jrrp3-3.0.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50b9308541f120cdfdd3457ba47f66454ac1818c03a6366a18cd7fc8c801e9da
|
|
| MD5 |
5a4c50618b7b082213b6873d96d69691
|
|
| BLAKE2b-256 |
f139956ead54b42dacd4c764c4e74117900b599bc7cf792cde893d7a46b44f19
|