From 5760412382bf072a6863393c0b5d5aab7360cf51 Mon Sep 17 00:00:00 2001 From: tcmofashi Date: Tue, 11 Mar 2025 16:32:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=8F=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/utils_image.py | 2 +- src/plugins/chat/willing_manager.py | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/chat/utils_image.py b/src/plugins/chat/utils_image.py index ac3ff5ac4..24687a8f5 100644 --- a/src/plugins/chat/utils_image.py +++ b/src/plugins/chat/utils_image.py @@ -345,7 +345,7 @@ class ImageManager: logger.error(f"保存图片文件失败: {str(e)}") # 保存描述到数据库 - await self._save_description_to_db(image_hash, description, 'image') + self._save_description_to_db(image_hash, description, 'image') return f"[图片:{description}]" except Exception as e: diff --git a/src/plugins/chat/willing_manager.py b/src/plugins/chat/willing_manager.py index 26353e74c..39083f0b8 100644 --- a/src/plugins/chat/willing_manager.py +++ b/src/plugins/chat/willing_manager.py @@ -78,11 +78,7 @@ class WillingManager: reply_probability = max((current_willing - 0.45) * 2, 0) # 检查群组权限(如果是群聊) - if chat_stream.group_info: - if chat_stream.group_info.group_id not in config.talk_allowed_groups: - current_willing = 0 - reply_probability = 0 - + if chat_stream.group_info: if chat_stream.group_info.group_id in config.talk_frequency_down_groups: reply_probability = reply_probability / global_config.down_frequency_rate @@ -90,7 +86,6 @@ class WillingManager: if reply_probability < 0: reply_probability = 0 - self.chat_reply_willing[chat_id] = min(current_willing, 3.0) self.chat_reply_willing[chat_id] = min(current_willing, 3.0) return reply_probability