合并Dev:重构QQRichText的cq和array格式的解析器,修改日志格式,添加Rule重载运算符的功能,修复一些bug#69
Merged
xiaosuyyds merged 19 commits intomasterfrom May 30, 2025
Merged
合并Dev:重构QQRichText的cq和array格式的解析器,修改日志格式,添加Rule重载运算符的功能,修复一些bug#69xiaosuyyds merged 19 commits intomasterfrom
xiaosuyyds merged 19 commits intomasterfrom
Conversation
- 重命名全局变量 logger_instance 以区分 Logger 模块 - 更新日志格式,使用模块名替代文件名 - 在 Logger 中添加框架日志记录器名称常量 - 优化异常日志记录,使用 exc_info 参数替代 traceback.format_exc() - 移除多处冗余的 traceback导入
- 将插件日志命名格式从 FRAMEWORK_LOGGER_NAME + module_name 改为 FRAMEWORK_LOGGER_NAME + "." + module_name - 这样可以保持日志命名的一致性,与其他模块的日志命名格式对齐
- 移除了对配置调试模式的判断,简化了代码结构 - 优化了错误处理,统一了错误日志的输出格式 - 用中文替换了英文异常,提高了代码的可读性 - 新增了 unregister_listener 函数,实现了监听器的注销功能
- 将判断消息类型的逻辑改为检查 event_data.message_type 属性 - 修复群消息中 at 我的检测逻辑,使用正确的用户 ID 进行比较
- 修复了 array_2_cq 函数中对非字符串类型的处理 - 优化了错误提示信息,增加了更多的错误上下文 - 统一了错误提示的格式,增加了 "cq_2_array:" 前缀 - 修复了 CQ 码类型和参数键值对中的非法字符检查
- 实现了 Rule 类的 __and__ 方法,支持使用 & 运算符组合规则 - 实现了 Rule 类的 __or__ 方法,支持使用 | 运算符组合规则 - 这些改动使得规则的组合更加直观和便捷
- 将整数类型的QQ号转换为字符串类型进行比较 - 修复了在某些情况下可能导致QQ号比较不正确的问题
- 新增代码以扫描并归档非当前日期的 exc_dump 文件 - 修改时间格式以使用连字符分隔年月日
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.
这次是真没活了……