From e744de21786647089968c4a5f6f75fdde77ced91 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 14 Jun 2025 11:21:15 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=E8=87=AA=E5=8A=A8=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/database/database_model.py | 2 +- src/plugin_system/apis/message_api.py | 4 +++- src/plugin_system/base/base_command.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/database/database_model.py b/src/common/database/database_model.py index be023e954..6e22ee0fa 100644 --- a/src/common/database/database_model.py +++ b/src/common/database/database_model.py @@ -404,7 +404,7 @@ def initialize_database(): missing_fields = model_fields - existing_columns if missing_fields: logger.warning(f"表 '{table_name}' 缺失字段: {missing_fields}") - + for field_name, field_obj in model._meta.fields.items(): if field_name not in existing_columns: logger.info(f"表 '{table_name}' 缺失字段 '{field_name}',正在添加...") diff --git a/src/plugin_system/apis/message_api.py b/src/plugin_system/apis/message_api.py index 4c3e61694..ab72915cb 100644 --- a/src/plugin_system/apis/message_api.py +++ b/src/plugin_system/apis/message_api.py @@ -114,7 +114,9 @@ class MessageAPI: ) # 发送消息 - sent_msg = await heart_fc_sender.send_message(bot_message, has_thinking=False, typing=typing, set_reply=False) + sent_msg = await heart_fc_sender.send_message( + bot_message, has_thinking=False, typing=typing, set_reply=False + ) if sent_msg: logger.info(f"{getattr(self, 'log_prefix', '')} 成功发送消息到 {platform}:{target_id}") diff --git a/src/plugin_system/base/base_command.py b/src/plugin_system/base/base_command.py index 82aaa0f57..3ee342922 100644 --- a/src/plugin_system/base/base_command.py +++ b/src/plugin_system/base/base_command.py @@ -80,7 +80,9 @@ class BaseCommand(ABC): text=content, user_id=str(chat_stream.user_info.user_id), platform=chat_stream.platform ) - async def send_type(self, message_type: str, content: str, display_message: str = None, typing: bool = False) -> bool: + async def send_type( + self, message_type: str, content: str, display_message: str = None, typing: bool = False + ) -> bool: """发送指定类型的回复消息到当前聊天环境 Args: