💿 安装
通过pip或nb安装:
- 通过 pip 安装
pip install nonebot-plugin-dialectlist
- 通过 nb-cli 安装
nb plugin install nonebot-plugin-dialectlist
✅ 插件依赖于
- nonebot-plugin-datastore ————本地化储存
- nonebot-plugin-userinfo ————获取用户信息
- nonebot-plugin-apscheduler ————定时发送排行榜信息
- nonebot-plugin-alconna ————实现命令解析
- nonebot-plugin-chatrecorder ————实现消息储存
- nonebot-plugin-cesaa ————实现多平台
⚠ 注意 若先前没有安装过nonebot-plugin-chatrecorder或者nonebot-plugin-orm,则会在启动时报错,请按报错的提示安装数据库!
⚙ 配置
需要提前配置本插件所依赖的插件!
在 .env 中,可以添加以下配置项
dialectlist__get_num: int = 5 # 获取人数数量
dialectlist__font: str = "SimHei" # 字体格式
dialectlist__suffix: bool = True # 是否显示后缀
dialectlist__excluded_self: bool = True # 是否排除自己
dialectlist__visualization: bool = True # 是否可视化
dialectlist__show_text_rank: bool = True # 是否显示文本排名
dialectlist__excluded_people: List[str] = [] # 排除的人的 QQ 号
dialectlist__use_user_info_cache: bool = False # 是否使用用户信息缓存
dialectlist__aggregate_transmission: bool = False # 是否聚合转发消息
dialectlist__timezone: Optional[str] = "Asia/Shanghai" # 时区,影响统计时间
dialectlist__string_suffix: str = "统计花费时间:{timecost}秒" # 消息格式后缀
dialectlist__template_path: str = "./template/rank_template.j2" # 模板路径
dialectlist__string_format: str = "第{index}名:\n{nickname},{chatdatanum}条消息、n" # 消息格式
💭 也可以不进行配置,这将会使插件按照默认配置运行
⚠ 注意!!
在旧版插件(2.0.0 以下)中,dialectlist 与后面的配置项只隔了一个下划线,若更新到新版本以后需要俩个下划线。
由于插件依赖 chatrecord 多次引入爆炸性修改,建议在遇到问题后优先尝试降级 chatrecord 插件
🗨 命令
!!注意!!
新版本指令调用方式改变,改为更易理解也更好打的 B 话榜。
同时也可以用类似 /今日废话榜 的方式(只要改前面的就好了)(算是给 盘古之白 风格爱好者的福利吧?)
🎨 一般用法
B 话榜
-/B 话榜 ————看看有史以来(机器人存在以来)群友们发了多少消息! (好像没写)
-/今日 B 话榜 ————看看今天的群友发了多少消息!
-/昨日 B 话榜 ————看看昨天的群友发了多少消息!
-/前日 B 话榜 ————看看前天的群友发了多少消息!
-/本周 B 话榜 ————看看本周的群友发了多少消息!
-/上周 B 话榜 ————看看上周的群友发了多少消息!
-/本月 B 话榜 ————看看这个月的群友发了多少消息!
-/年度 B 话榜 ————看看今年的群友发了多少消息!
-/历史 B 话榜 ————看看历史上(机器人存在以来)的群友发了多少消息!
看看 B 话(kkb)
-/看看 B 话 [@某人|QQ 号] ————看看这个 b 人在这个 b 群发了多少 b 话!
🚀 进阶用法
B 话榜
/{时间类型(今日|年度)?}{B 话榜|废话榜} {时间类型?} {ISO8601 格式时间 ?} {群号} {关键词}
如:/B 话榜 历史 2024-01-01~2024-01-02 12345678 女装
也可以 /{时间类型(今日|年度)?}{B 话榜|废话榜} {时间类型?} {ISO8601 格式时间 ?} -g {群号} -k {关键词}
以下调用方法均合法:
/今日 B 话榜 -g 12345678 -k 女装
/昨日 B 话榜 -k 女装
/本周 B 话榜 -g 12345678
看看 B 话
/看看 B 话 {@|QQ 号} {群号?} {关键词?}
以下调用方法均合法:
/kkb 114514 1919810 ♂
/kkb @man -k ♂
💪 目前支持的平台
| 平台 | 是否经过测试 | 是否能够正常工作 | 测试环境 |
|---|---|---|---|
| Onebot | ✅ | ✅ | NapCat + Window11 |
| 飞书 | ❌ | ❓ | 🤔 |
| Red | ❌ | ❓ | 🤔 |
| DoDo | ❌ | ❓ | 🤔 |
| Mirai | ❌ | ❓ | 🤔 |
| 开黑啦 | ❌ | ❓ | 🤔 |
| Kritor | ❌ | ❓ | 🤔 |
| Ntchat | ❌ | ❓ | 🤔 |
| Satori | ❌ | ❓ | 🤔 |
| Telegram | ❌ | ❓ | 🤔 |
| Discord | ❌ | ❓ | 🤔 |
| Tailchat | ❌ | ❓ | 🤔 |
| QQ 官方接口 | ❌ | ❓ | 🤔 |
| Rocket.Chat | ❌ | ❓ | 🤔 |
- 如果你测试过能够使用,请在 Issue 中指出
📦 另外
😳 加入作者的 BUG 反馈群 (🥵 女装粉丝群)
群二维码 点我展开
💕 感谢
本插件的init.py 中的处理函数参考了词云中的方法 (其实大部分都是 Ctrl+C Ctr+V)
感谢以下开发者作出的贡献:
🎀TODO
-
适配全平台
-
更好看的图片渲染
-
添加一些全新的可配置项
-
尝试利用 jinja2 模板引擎制作可视化图片
-
私聊的查询(超级用户可以任意查询群聊的信息)一半完成
-
特殊的储存方案优化消息统计
-
查询带某关键词的消息量
-
合并转发
待补充。.....
👾 题外话
整个项目快被我写成屎山了
Metadata
Release files for nonebot-plugin-dialectlist 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nonebot_plugin_dialectlist-3.0.1.tar.gz | 26.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_dialectlist-3.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.1 kB
Release files / nonebot_plugin_dialectlist-3.0.1.tar.gz
| Download URL | nonebot_plugin_dialectlist-3.0.1.tar.gz |
|---|---|
| Size | 26.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72423c5324f602844ec04efdf9ae0b154e2aaa2ddf77745df79557b0481c6b12
|
|
BLAKE2b-256 checksum How to use checksums |
655f4e20715e7da19c8b5146acf8b41dc529538116b8626670c78ae00a145a81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Release files / nonebot_plugin_dialectlist-3.0.1-py3-none-any.whl
| Download URL | nonebot_plugin_dialectlist-3.0.1-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0d13b11a0cb364ec6466ce77b44d4accf20ccd9d21e33fa291e7e94a12ed36b
|
|
BLAKE2b-256 checksum How to use checksums |
1ff8d207f6b62987cd636b2dad505025025fcb3a5de08983a15a7e43b3dbace9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Security for nonebot-plugin-dialectlist 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.