diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 7769c9010..fe0bc6bfb 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -128,6 +128,7 @@ class SimpleGewechatClient(): if abm.group_id not in self.userrealnames: self.userrealnames[abm.group_id] = {} member_list = await self.get_chatroom_member_list(abm.group_id) + logger.debug(f"获取到 {abm.group_id} 的群成员列表。") if member_list and 'memberList' in member_list: for member in member_list['memberList']: self.userrealnames[abm.group_id][member['wxid']] = member['nickName'] diff --git a/astrbot/core/star/filter/command.py b/astrbot/core/star/filter/command.py index e700878f7..6e0374564 100644 --- a/astrbot/core/star/filter/command.py +++ b/astrbot/core/star/filter/command.py @@ -102,11 +102,17 @@ class CommandFilter(HandlerFilter): ok = False for candidate in candidates: for parent_command_name in self.parent_command_names: - _full = f"{parent_command_name} {candidate}" - if message_str.startswith(f"{_full} ") or message_str == _full.strip(): + if parent_command_name: + _full = f"{parent_command_name} {candidate}" + else: + _full = candidate + if message_str.startswith(f"{_full} ") or message_str == _full: message_str = message_str[len(_full):].strip() ok = True break + + print(message_str, self.command_name, self.alias, self.parent_command_names, ok) + if not ok: return False diff --git a/packages/astrbot/long_term_memory.py b/packages/astrbot/long_term_memory.py index 69c474bbb..6d5e0f63f 100644 --- a/packages/astrbot/long_term_memory.py +++ b/packages/astrbot/long_term_memory.py @@ -125,10 +125,6 @@ class LongTermMemory: else: req.system_prompt += "You are now in a chatroom. The chat history is as follows: \n" req.system_prompt += chats_str - if self.image_caption: - req.system_prompt += ( - "The images sent by the members are displayed in text form above." - ) async def after_req_llm(self, event: AstrMessageEvent): if event.unified_msg_origin not in self.session_chats: