From bdb1191f9ec1ef2cb94efe8278794bee387dde2e Mon Sep 17 00:00:00 2001 From: snowy Date: Sun, 2 Jun 2024 02:32:54 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=99=BA=E9=9A=9C=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=88=86=E8=AF=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki/plugins/liteyuki_smart_reply/matchers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liteyuki/plugins/liteyuki_smart_reply/matchers.py b/liteyuki/plugins/liteyuki_smart_reply/matchers.py index ad50b20..7425e9c 100644 --- a/liteyuki/plugins/liteyuki_smart_reply/matchers.py +++ b/liteyuki/plugins/liteyuki_smart_reply/matchers.py @@ -81,8 +81,8 @@ async def _(event: T_MessageEvent, bot: Bot, state: T_State, matcher: Matcher): if random.random() < p: if reply := get_reply(kws): - reply = reply.replace("。", "||").replace(",", "||").replace("!", "||").replace("?", "||") if random.random() < cut_probability: + reply = reply.replace("。", "||").replace(",", "||").replace("!", "||").replace("?", "||") replies = reply.split("||") for r in replies: await asyncio.sleep(random.random() * 2)