Filter qq buld message

This commit is contained in:
xtaodada 2022-03-07 22:26:29 +08:00
parent 2848a901dd
commit 54f8e5466e
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -206,12 +206,18 @@ class GoCQHttp(BaseClient):
chat: Chat
author: ChatMember
user = self.get_user_info(qq_uid)
try:
user = self.get_user_info(qq_uid)
except:
return
if context["message_type"] == "private":
context["alias"] = user["remark"]
chat: PrivateChat = self.chat_manager.build_efb_chat_as_private(context)
else:
chat = self.chat_manager.build_efb_chat_as_group(context)
try:
chat = self.chat_manager.build_efb_chat_as_group(context)
except:
return
is_discuss = False if context['message_type'] == 'group' else True
chat_uid = context['discuss_id'] if is_discuss else context['group_id']
if len(all_group_list) > 0 and chat_uid not in all_group_list: