From ccc651ca1b9e5cf726e1109bbe0bddb7e199a408 Mon Sep 17 00:00:00 2001 From: theinspired Date: Sun, 5 Apr 2026 19:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BF=AE=E6=94=B9=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E8=A1=A8=E8=BE=BE=E5=BC=8F=E4=BD=BF=E4=B9=8B=E5=8F=AF=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E6=B6=88=E6=81=AF=E6=96=87=E5=AD=97=E5=90=8E=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 有些人的输入法会在打完英文单词之后会自动添加空格导致无法匹配,这个更改使之能匹配空格,优化使用体验 --- nonebot_plugin_wordle/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot_plugin_wordle/__init__.py b/nonebot_plugin_wordle/__init__.py index 25d01e7..31457e8 100644 --- a/nonebot_plugin_wordle/__init__.py +++ b/nonebot_plugin_wordle/__init__.py @@ -168,7 +168,7 @@ async def _( games[user_id] = game set_timeout(matcher, user_id) matcher_word = on_regex( - rf"^(?P[a-zA-Z]{{{length.result}}})$", + rf"^(?P[a-zA-Z]{{{length.result}}})\s*$", rule=same_user(user_id), block=True, priority=14,