zhenxun_bot/zhenxun/utils
Rumio b993450a23
feat(limit, message): 引入声明式限流系统并增强消息格式化功能 (#1978)
- 新增 Cooldown、RateLimit、ConcurrencyLimit 三种限流依赖
- MessageUtils 支持动态格式化字符串 (format_args 参数)
- 插件CD限制消息显示精确剩余时间

- 重构限流逻辑至 utils/limiters.py,新增时间工具模块
- 整合时间工具函数并优化时区处理
- 新增 limiter_hook 自动释放资源,CooldownError 优化异常处理

- 冷却提示从固定文本改为动态显示剩余时间
- 示例:总结功能冷却中,请等待 1分30秒 后再试~

Co-authored-by: webjoin111 <455457521@qq.com>
Co-authored-by: HibiKier <45528451+HibiKier@users.noreply.github.com>
2025-07-15 17:13:33 +08:00
..
decorator feat(http_utils): 重构网络请求工具链,增强稳定性与易用性 (#1951) 2025-07-03 17:39:13 +08:00
depends feat(limit, message): 引入声明式限流系统并增强消息格式化功能 (#1978) 2025-07-15 17:13:33 +08:00
echart_utils Compatible with pydantic 2.0 using the pydantic compatibility layer provided by nonebot 2025-01-10 12:19:11 +08:00
github_utils 重构插件商店,支持Gitee插件管理,更新相关逻辑和配置 (#1931) 2025-06-20 19:08:06 +08:00
html_template 重构插件商店,支持Gitee插件管理,更新相关逻辑和配置 (#1931) 2025-06-20 19:08:06 +08:00
manager 引入缓存机制 (#1889) 2025-07-14 22:35:29 +08:00
plugin_models 提供新webui api (#1673) 2024-10-03 23:56:17 +08:00
_build_image.py 🚨 Add specific ignore items in pyright ignore 2025-01-10 12:19:11 +08:00
_build_mat.py 首次启动时提供使用web ui方式完全配置 (#1870) 2025-06-16 09:11:41 +08:00
_image_template.py 引入缓存机制 (#1889) 2025-07-14 22:35:29 +08:00
browser.py feat(http_utils): 重构网络请求工具链,增强稳定性与易用性 (#1951) 2025-07-03 17:39:13 +08:00
common_utils.py 引入缓存机制 (#1889) 2025-07-14 22:35:29 +08:00
enum.py 引入缓存机制 (#1889) 2025-07-14 22:35:29 +08:00
exception.py feat(limit, message): 引入声明式限流系统并增强消息格式化功能 (#1978) 2025-07-15 17:13:33 +08:00
http_utils.py feat(http_utils): 优化AsyncHttpx类,解决并发下载问题 (#1968) 2025-07-11 10:13:02 +08:00
image_utils.py chore/cleanup-dependencies (#1763) 2024-12-13 15:00:56 +08:00
limiters.py feat(limit, message): 引入声明式限流系统并增强消息格式化功能 (#1978) 2025-07-15 17:13:33 +08:00
message.py feat(limit, message): 引入声明式限流系统并增强消息格式化功能 (#1978) 2025-07-15 17:13:33 +08:00
platform.py 🐛 修复sqlite下的日统计查询和0权限功能调用 (#1943) 2025-07-11 10:07:23 +08:00
rules.py 🐛 修复群欢迎消息删除问题 (#1864) 2025-03-03 22:19:34 +08:00
time_utils.py feat(limit, message): 引入声明式限流系统并增强消息格式化功能 (#1978) 2025-07-15 17:13:33 +08:00
user_agent.py Develop: 完全使用 ruff 替代 isort 与 black (#1757) 2024-12-10 19:49:11 +08:00
utils.py feat(limit, message): 引入声明式限流系统并增强消息格式化功能 (#1978) 2025-07-15 17:13:33 +08:00
withdraw_manage.py Develop: 完全使用 ruff 替代 isort 与 black (#1757) 2024-12-10 19:49:11 +08:00