From 6931810cca15a3ec4acf10e4252546086e0eb5ca Mon Sep 17 00:00:00 2001 From: meetwq Date: Fri, 6 Sep 2024 20:55:30 +0800 Subject: [PATCH] add _is_fake --- nonebot_plugin_alias/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nonebot_plugin_alias/__init__.py b/nonebot_plugin_alias/__init__.py index 3e39439..134e83e 100644 --- a/nonebot_plugin_alias/__init__.py +++ b/nonebot_plugin_alias/__init__.py @@ -119,8 +119,12 @@ def get_message(): msg.insert(0, new_segment) return msg + def _is_fake() -> bool: + return True + fake_event = deepcopy(event) fake_event.get_message = get_message + setattr(fake_event, "_is_fake", _is_fake) await handle_event(bot, fake_event) return _matcher