From 55691a16118ed2148604a3c1e809102d2b50a202 Mon Sep 17 00:00:00 2001 From: Bakadax Date: Mon, 12 May 2025 18:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E5=85=B4=E8=B6=A3?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=97=B6=20HFC=20=E7=88=86=E7=82=B8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/heartFC_chat/normal_chat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/heartFC_chat/normal_chat.py b/src/plugins/heartFC_chat/normal_chat.py index 349bd540..ebf9b57e 100644 --- a/src/plugins/heartFC_chat/normal_chat.py +++ b/src/plugins/heartFC_chat/normal_chat.py @@ -354,6 +354,8 @@ class NormalChat: # --- 新增:处理初始高兴趣消息的私有方法 --- async def _process_initial_interest_messages(self): """处理启动时存在于 interest_dict 中的高兴趣消息。""" + if not self.interest_dict: + return # 当 self.interset_dict 的值为 None 时,直接返回,防止进入 Chat 状态错误 items_to_process = list(self.interest_dict.items()) if not items_to_process: return # 没有初始消息,直接返回