feat: add fallback support for users who forget the colon in 将军:
This commit is contained in:
parent
e2dcdce9ed
commit
736967ccc2
1 changed files with 4 additions and 1 deletions
|
@ -182,7 +182,10 @@ async def handle_inline_query(query: InlineQuery):
|
||||||
)
|
)
|
||||||
], cache_time=0)
|
], cache_time=0)
|
||||||
return
|
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=[
|
await query.answer(results=[
|
||||||
InlineQueryResultArticle(
|
InlineQueryResultArticle(
|
||||||
id="1",
|
id="1",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue