每日水群排行榜图片生成插件,记录群聊消息并生成精美排行榜
Project description
📖 介绍
本插件基于 MsgRankCard 项目改写,是一个 NoneBot2 插件,用于记录群聊消息并生成精美的每日水群排行榜图片。
功能特点:
- 📝 自动记录群聊消息数量和在线时长
- 🎨 生成精美的排行榜图片,支持自定义背景、边框和字体
- 🖼️ 自动获取用户 QQ 头像
- 🏆 支持查看今日水群排行榜
- 🧹 支持自动清理过期数据
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行,输入以下指令即可安装
nb plugin install nonebot-plugin-msg-rank-card
使用包管理器安装
在 nonebot2 项目的插件目录下,打开命令行,根据你使用的包管理器,输入相应的安装命令
pip
pip install nonebot-plugin-msg-rank-card
poetry
poetry add nonebot-plugin-msg-rank-card
打开 nonebot2 项目根目录下的 pyproject.toml 文件,在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_msg_rank_card"]
⚙️ 配置
在 nonebot2 项目的 .env 文件中添加下表中的配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| msg_rank_data_path | 否 | data/msg_rank | 数据存储路径 |
| msg_rank_resource_path | 否 | 插件目录/resources | 资源文件路径(背景图、边框、字体) |
| msg_rank_max_count | 否 | 10 | 排行榜最大显示人数 |
| msg_rank_auto_clean | 否 | true | 是否自动清理过期数据 |
| msg_rank_title | 否 | 今日水群排行榜 | 排行榜标题 |
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| 水群榜 / msgrank | 群员 | 否 | 群聊 | 查看今日水群排行榜 |
| 清理水群数据 / clean_msgrank | 群主/管理员 | 否 | 群聊 | 清理过期数据 |
效果图
插件会自动记录群聊消息,发送 /水群榜 即可生成精美排行榜图片。
自定义资源
你可以替换插件目录下 resources 文件夹中的资源文件:
bg/- 背景图片(随机选择)frame/- 排名边框装饰ttf/- 自定义字体(第一个 ttf 文件会被使用)
📄 许可证
本项目基于 MsgRankCard 改写,采用 MIT 许可证。
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_msg_rank_card-0.1.2.tar.gz.
File metadata
- Download URL: nonebot_plugin_msg_rank_card-0.1.2.tar.gz
- Upload date:
- Size: 9.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb01316d7d7a65b2229384d6282941934698c2a327b319630878a18fa9ba59a9
|
|
| MD5 |
a98d759b48c6358bfd8605465bc14276
|
|
| BLAKE2b-256 |
59f88e8fb39464383e8b003e755359df42e50911888942c9bbfba86a0080a962
|
File details
Details for the file nonebot_plugin_msg_rank_card-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_msg_rank_card-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c1290c15fa92dd8e7256ae264a97102fe4eb796a45b76392d847bb26f6cf3ea
|
|
| MD5 |
dd29aadbfb37b9af358cc759a5400e07
|
|
| BLAKE2b-256 |
f336a96fb0da6c8804c44e36b77c649904e09b211756bc8d23d909421e1bcbc5
|