From d28db6370799c1abbb31906adf9f7de60f724bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Tue, 24 Jan 2023 14:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Update=20Input=20Message=20Conte?= =?UTF-8?q?nt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 部分查询输入的消息修改为命令而不是文本 --- plugins/system/inline.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/system/inline.py b/plugins/system/inline.py index cd280a67..5a9aae31 100644 --- a/plugins/system/inline.py +++ b/plugins/system/inline.py @@ -74,7 +74,7 @@ class Inline(Plugin): @handler(InlineQueryHandler, block=False) @error_callable - async def inline_query(self, update: Update, _: CallbackContext) -> None: + async def inline_query(self, update: Update, context: CallbackContext) -> None: user = update.effective_user ilq = cast(InlineQuery, update.inline_query) query = ilq.query @@ -111,7 +111,7 @@ class Inline(Plugin): description=f"查看武器列表并查询 {name}", thumb_url=icon, input_message_content=InputTextMessageContent( - f"武器查询{name}", parse_mode=ParseMode.MARKDOWN_V2 + f"/weapon@{context.bot.username} {name}", parse_mode=ParseMode.MARKDOWN_V2 ), ) ) @@ -126,7 +126,7 @@ class Inline(Plugin): description=f"查看角色攻略列表并查询 {name}", thumb_url=icon, input_message_content=InputTextMessageContent( - f"角色攻略查询{name}", parse_mode=ParseMode.MARKDOWN_V2 + f"/strategy@{context.bot.username} {name}", parse_mode=ParseMode.MARKDOWN_V2 ), ) ) @@ -139,7 +139,7 @@ class Inline(Plugin): title=role_name, description=f"查看角色培养素材列表并查询 {role_name}", input_message_content=InputTextMessageContent( - f"角色培养素材查询{role_name}", parse_mode=ParseMode.MARKDOWN_V2 + f"/material@{context.bot.username} {role_name}", parse_mode=ParseMode.MARKDOWN_V2 ), ) )