From a7fe31f28bebc4b9c946d8c2b541d1ac09855442 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 9 Feb 2025 22:35:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E4=B8=8D=E7=BB=8F=E8=BF=87=E5=94=A4=E9=86=92=E5=89=8D=E7=BC=80?= =?UTF-8?q?=E4=B9=9F=E8=83=BD=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82=E5=9C=A8=E5=BC=95=E7=94=A8=E6=B6=88=E6=81=AF=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E5=94=A4=E9=86=92=E6=9C=BA=E5=99=A8=E4=BA=BA=20#444?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/pipeline/process_stage/method/star_request.py | 2 +- astrbot/core/pipeline/waking_check/stage.py | 2 +- astrbot/core/star/filter/command.py | 2 +- astrbot/core/star/filter/command_group.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/astrbot/core/pipeline/process_stage/method/star_request.py b/astrbot/core/pipeline/process_stage/method/star_request.py index 109e1ea81..d2a4c8382 100644 --- a/astrbot/core/pipeline/process_stage/method/star_request.py +++ b/astrbot/core/pipeline/process_stage/method/star_request.py @@ -31,7 +31,7 @@ class StarRequestSubStage(Stage): # 孤立无援的 star handler continue - logger.debug(f"执行 Star Handler {handler.handler_full_name}") + logger.debug(f"执行插件 handler {handler.handler_full_name}") wrapper = self._call_handler(self.ctx, event, handler.handler, **params) async for ret in wrapper: yield ret diff --git a/astrbot/core/pipeline/waking_check/stage.py b/astrbot/core/pipeline/waking_check/stage.py index c26761655..b48637c14 100644 --- a/astrbot/core/pipeline/waking_check/stage.py +++ b/astrbot/core/pipeline/waking_check/stage.py @@ -43,7 +43,7 @@ class WakingCheckStage(Stage): if event.message_str.startswith(wake_prefix): if ( not event.is_private_chat() - and (isinstance(messages[0], At) or isinstance(messages[0], Reply)) + and isinstance(messages[0], At) and str(messages[0].qq) != str(event.get_self_id()) and str(messages[0].qq) != "all" ): diff --git a/astrbot/core/star/filter/command.py b/astrbot/core/star/filter/command.py index 03466bb73..3e1394f38 100644 --- a/astrbot/core/star/filter/command.py +++ b/astrbot/core/star/filter/command.py @@ -43,7 +43,7 @@ class CommandFilter(HandlerFilter, ParameterValidationMixin): return self.handler_md def filter(self, event: AstrMessageEvent, cfg: AstrBotConfig) -> bool: - if not event.is_wake_up(): + if not event.is_at_or_wake_command: return False if event.get_extra("parsing_command"): diff --git a/astrbot/core/star/filter/command_group.py b/astrbot/core/star/filter/command_group.py index b3a66d22e..0dca9916f 100644 --- a/astrbot/core/star/filter/command_group.py +++ b/astrbot/core/star/filter/command_group.py @@ -37,7 +37,7 @@ class CommandGroupFilter(HandlerFilter): return result def filter(self, event: AstrMessageEvent, cfg: AstrBotConfig) -> Tuple[bool, StarHandlerMetadata]: - if not event.is_wake_up(): + if not event.is_at_or_wake_command: return False, None if event.get_extra("parsing_command"):