From ed1f1c27e2487ff3142b7a4f7f86640ac7dd5389 Mon Sep 17 00:00:00 2001 From: ishkong Date: Sun, 29 Aug 2021 19:18:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20endswith=20match=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot/rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot/rule.py b/nonebot/rule.py index 7dbff611..ea4ddadb 100644 --- a/nonebot/rule.py +++ b/nonebot/rule.py @@ -224,7 +224,7 @@ def endswith(msg: Union[str, Tuple[str, ...]], if event.get_type() != "message": return False text = event.get_plaintext() - return bool(pattern.match(text)) + return bool(pattern.search(text)) return Rule(_endswith)