Skip to main content

更加现代化的 NoneBot2 每日人品插件,支持查询今日、本周、本月和历史平均人品,提供详细的运势评价,并支持数据持久化存储。

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-jrrp3

✨ 更加现代化的 NoneBot2 每日人品插件 ✨

license pypi python NoneBot2

📖 介绍

nonebot_plugin_jrrp2 的现代化 Fork。

一个功能完善的每日人品查询插件,支持查询今日、本周、本月和历史平均人品,提供详细的运势评价,并支持数据持久化存储。

与 nonebot-plugin-jrrp2 的区别

  • 完全使用 Alconna 指令解析器重写逻辑,减少误触,增加兼容性和反应速度
  • 支持多种适配器(测试通过的有 OneBot V11 和 Telegram 适配器)
  • 使用 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 的标准插件数据目录。

[!NOTE] 插件设计上兼容 nonebot_plugin_jrrp2 的数据库格式,您可以将原数据库文件直接复制到插件的数据目录中,实现数据迁移。

🎉 使用

指令表

指令 权限 需要@ 范围 说明
jrrp/今日人品/今日运势 群员 群聊/私聊 查询今日人品指数
weekjrrp/本周人品/本周运势/周运势 群员 群聊/私聊 查询本周平均人品
monthjrrp/本月人品/本月运势/月运势 群员 群聊/私聊 查询本月平均人品
alljrrp/总人品/平均人品/平均运势 群员 群聊/私聊 查询历史平均人品

功能说明

  1. 每日人品查询:每天获得一个1-100的随机数作为今日幸运指数
  2. 本周统计:显示本周使用次数和平均幸运指数
  3. 本月统计:显示本月使用次数和平均幸运指数
  4. 历史统计:显示全部历史使用次数和平均幸运指数

运势等级划分

当前运势等级与 nonebot-plugin-jrrp2 保持一致,且固定在代码中。后期会增加自定义运势范围和内容的功能。

分数 评级 描述
100 超吉 100!100诶!!你就是欧皇?
76-99 大吉 好耶!今天运气真不错呢
66-75 哦豁,今天运气还顺利哦
63-65 半吉 emm,今天运气一般般呢
59-62 小吉 还……还行吧,今天运气稍差一点点呢
54-58 末小吉 唔……今天运气有点差哦
10-53 末吉 呜哇,今天运气应该不太好
1-9 啊这……(没错……是百分制),今天还是吃点好的吧
0 大凶 啊这……(个位数可还行),今天还是吃点好的吧

📦 依赖

  • nonebot2 >= 2.3.0, < 3.0.0
  • nonebot-adapter-onebot >= 2.3.0
  • nonebot-plugin-alconna >= 0.50.0
  • nonebot-plugin-localstore >= 0.6.0
  • Python >= 3.9, < 4.0

📝 许可证

本项目使用 MIT 许可证,详见 LICENSE 文件。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_jrrp3-3.1.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_jrrp3-3.1.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_jrrp3-3.1.2.tar.gz.

File metadata

  • Download URL: nonebot_plugin_jrrp3-3.1.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.5 Linux/6.12.0-160000.5-default

File hashes

Hashes for nonebot_plugin_jrrp3-3.1.2.tar.gz
Algorithm Hash digest
SHA256 3d98288da0c537b6a2a137eb010733a4651b1efb63b13367bdd7f9553cc58444
MD5 f230a48f6f9ef0811a3026b2e0204dd0
BLAKE2b-256 c23f7e7b4ab1c27c4adaacd3943d73bc5afcdc26b0999cb5ae3e6cc8a886ce89

See more details on using hashes here.

File details

Details for the file nonebot_plugin_jrrp3-3.1.2-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_jrrp3-3.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.5 Linux/6.12.0-160000.5-default

File hashes

Hashes for nonebot_plugin_jrrp3-3.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e1ba4a862102d5f538291c9200ea5dfe37da7327bb73b514f0f2014beb8be912
MD5 ac67b4a36ae6ec08c8819d11a38a6f17
BLAKE2b-256 95618dcaabbb42eaa829c3626c634fb19c78a0408d30f43a4852ed0610b726ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page