feat(init): 添加自动清理无效插件和群组数据功能#2116
Merged
HibiKier merged 3 commits intozhenxun-org:mainfrom Apr 11, 2026
Merged
Conversation
Contributor
molanp
commented
Apr 5, 2026
- 添加nonebot_plugin_apscheduler依赖用于定时任务
- 导入ChatHistory模型用于清理聊天记录
- 移除CacheException相关异常处理代码
- 重写群组同步逻辑,支持创建新群组记录和删除已退出群组
- 添加定时清理已退出群组聊天记录的功能
- 优化日志输出格式和信息内容
- 添加nonebot_plugin_apscheduler依赖用于定时任务 - 导入ChatHistory模型用于清理聊天记录 - 移除CacheException相关异常处理代码 - 重写群组同步逻辑,支持创建新群组记录和删除已退出群组 - 添加定时清理已退出群组聊天记录的功能 - 优化日志输出格式和信息内容
在Manager类的方法中添加noqa: E501注释,解决docstring行长超过限制的代码检查警告
Collaborator
|
添加插件配置控制是否需要删除 |
- 引入Config配置模块 - 新增auto_clean.CLEAN_CHAT_HISTORY配置项,控制是否自动清理已退出群聊的聊天记录 - 根据配置决定是否添加定时清理任务,实现可配置的聊天历史清理功能
Contributor
Author
已添加 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.