From c72159b357a06ab14dc934e0855459aedc696a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Wed, 27 Jul 2022 00:30:15 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20=E5=90=88=E5=B9=B6=E5=8F=AF?= =?UTF-8?q?=E6=8A=98=E5=8F=A0=20`if`=20=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/start.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/start.py b/plugins/start.py index d9f553d5..3cf376be 100644 --- a/plugins/start.py +++ b/plugins/start.py @@ -10,12 +10,10 @@ async def start(update: Update, context: CallbackContext) -> None: user = update.effective_user message = update.message args = context.args - if args is not None: - if len(args) >= 1: - if args[0] == "inline_message": - await message.reply_markdown_v2(f"你好 {user.mention_markdown_v2()} {escape_markdown('!我是派蒙 !')}\n" - f"{escape_markdown('发送 /help 命令即可查看命令帮助')}") - return + if args is not None and len(args) >= 1 and args[0] == "inline_message": + await message.reply_markdown_v2(f"你好 {user.mention_markdown_v2()} {escape_markdown('!我是派蒙 !')}\n" + f"{escape_markdown('发送 /help 命令即可查看命令帮助')}") + return await update.message.reply_markdown_v2(f"你好 {user.mention_markdown_v2()} {escape_markdown('!我是派蒙 !')}")