From 736967ccc254ea47df0c092473ca6a691b02f583 Mon Sep 17 00:00:00 2001 From: grassblock Date: Thu, 28 Aug 2025 14:07:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20fallback=20support=20for=20users?= =?UTF-8?q?=20who=20forget=20the=20colon=20in=20=E5=B0=86=E5=86=9B?= =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/inline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/inline.py b/core/inline.py index 232fce6..29d1459 100644 --- a/core/inline.py +++ b/core/inline.py @@ -182,7 +182,10 @@ async def handle_inline_query(query: InlineQuery): ) ], cache_time=0) return - if query_text.startswith("将军:"): + if query_text.startswith("将军"): + # fallback support for users who forget the colon + if not query_text.startswith('将军:'): + query_text = query_text.replace('将军', '将军:',1) await query.answer(results=[ InlineQueryResultArticle( id="1",