From 15a6264f0d54d98a41c4ebe7b2d4d1c34a627d40 Mon Sep 17 00:00:00 2001 From: "Mr.yang" <1928658864@qq.com> Date: Sun, 8 Oct 2023 22:41:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=E4=BF=A1=E6=81=AF=E8=A3=85=E9=A5=B0=E5=99=A8,=20?= =?UTF-8?q?=E5=B9=B6=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E6=8E=A5=E5=8F=97=E4=BF=A1=E6=81=AF=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?,=20=E5=A2=9E=E5=8A=A0=E9=98=B2=E6=92=A4=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clients/pyauto/README.MD | 1 + clients/pyauto/demo.py | 1 + clients/pyauto/wcfauto/auto_res/bot.py | 2 -- clients/pyauto/wcfauto/auto_res/core.py | 12 +++++++----- clients/pyauto/wcfauto/msg_list.py | 2 +- clients/pyauto/wcfauto/wcf.py | 2 ++ 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/clients/pyauto/README.MD b/clients/pyauto/README.MD index cf129c3..eb50dcc 100644 --- a/clients/pyauto/README.MD +++ b/clients/pyauto/README.MD @@ -98,6 +98,7 @@ def main(): 撤回消息函数装饰器 """ print(msg) + print(msg.get_revoke_msg()) def judge(msg: WxMsg): """ diff --git a/clients/pyauto/demo.py b/clients/pyauto/demo.py index 2470cbf..7b0bccd 100644 --- a/clients/pyauto/demo.py +++ b/clients/pyauto/demo.py @@ -83,6 +83,7 @@ def main(): 撤回消息函数装饰器 """ print(msg) + print(msg.get_revoke_msg()) def judge(msg: WxMsg): """ diff --git a/clients/pyauto/wcfauto/auto_res/bot.py b/clients/pyauto/wcfauto/auto_res/bot.py index ee8d9d0..a06c83a 100644 --- a/clients/pyauto/wcfauto/auto_res/bot.py +++ b/clients/pyauto/wcfauto/auto_res/bot.py @@ -144,8 +144,6 @@ class Register(Event): raise NotImplementedError def group_changed_register(self, - isGroup: bool = False, - isDivision: bool = False, isPyq: bool = False, allow_other_receive: bool = True): """ diff --git a/clients/pyauto/wcfauto/auto_res/core.py b/clients/pyauto/wcfauto/auto_res/core.py index 63eb71a..9f971ee 100644 --- a/clients/pyauto/wcfauto/auto_res/core.py +++ b/clients/pyauto/wcfauto/auto_res/core.py @@ -79,7 +79,9 @@ def _processing_async_func(self, return await func(bot, message) except: traceback.print_exc() + return __async_func + return _async_func @@ -109,7 +111,9 @@ def _processing_universal_func(self, return func(bot, message) except: traceback.print_exc() + return universal_func + return _universal_func @@ -144,8 +148,6 @@ def revoke_message_register(self, def group_changed_register(self, - isGroup: bool = False, - isDivision: bool = False, isPyq: bool = False, allow_other_receive: bool = True): def judge_msg(msg): @@ -154,9 +156,9 @@ def group_changed_register(self, return True return False - return self._processing_async_func(isGroup, - isDivision, - isPyq, + return self._processing_async_func(isPyq=isPyq, + isGroup=True, + isDivision=True, register_name='groupChanged', allow_other_receive=allow_other_receive, judge_msg=judge_msg) diff --git a/clients/pyauto/wcfauto/msg_list.py b/clients/pyauto/wcfauto/msg_list.py index dc9257f..dbe21de 100644 --- a/clients/pyauto/wcfauto/msg_list.py +++ b/clients/pyauto/wcfauto/msg_list.py @@ -9,7 +9,7 @@ class messageList(list): super(messageList, self).__init__(*args, **kwargs) self.__isRunning = True self.__th = None - self.__time_step = 2*60 + self.__time_step = 3*60 self.__msg_queen = queue.Queue() self.start() diff --git a/clients/pyauto/wcfauto/wcf.py b/clients/pyauto/wcfauto/wcf.py index 5ec1dc5..aac36ab 100644 --- a/clients/pyauto/wcfauto/wcf.py +++ b/clients/pyauto/wcfauto/wcf.py @@ -40,6 +40,8 @@ class WxMsgV2(WxMsg): """ def __init__(self, msg: WxMsg) -> None: + self._is_group = msg._is_group + self._is_self = msg._is_self self._type = msg.type self._id = msg.id self._ts = msg.ts