From 0e7d6db7b30a049dcc92954c0925af5038f426c7 Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Wed, 5 May 2021 13:28:46 +0800 Subject: =?UTF-8?q?=F0=9F=90=9B=20=E4=B8=8D=E8=83=BD=E9=A2=85=E5=86=85?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复:今天吃什么 中 正则表达错误 --- ATRI/plugins/funny.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ATRI/plugins/funny.py b/ATRI/plugins/funny.py index 574aaa1..11e6f39 100644 --- a/ATRI/plugins/funny.py +++ b/ATRI/plugins/funny.py @@ -97,8 +97,8 @@ async def _eat(bot: Bot, event: MessageEvent) -> None: msg = str(event.message).strip() user = event.user_id user_n = event.sender.nickname - arg = re.findall(r"[今|明|后|大后]天(.*?)吃什么", msg)[0] - nd = re.match(r"[今|明|后|大后][天]", msg)[0] + arg = re.findall(r"(今|明|后|大后)天(.*?)吃什么", msg)[0] + nd = re.match(r"(今|明|后|大后)天", msg)[0] if arg == "中午": a = f"LdS4K6/{randint(0, 999999)}" -- cgit v1.2.3