From e1536139ffb6828f33513057592e7e65c8c0e724 Mon Sep 17 00:00:00 2001 From: yym68686 Date: Thu, 7 Dec 2023 23:25:45 +0800 Subject: [PATCH] Fix the bug that the robot responds to all commands --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index fe574c4f..0c5d5527 100644 --- a/bot.py +++ b/bot.py @@ -575,7 +575,8 @@ async def error(update, context): @decorators.GroupAuthorization @decorators.Authorization async def unknown(update, context): # 当用户输入未知命令时,返回文本 - await context.bot.send_message(chat_id=update.effective_chat.id, text="Sorry, I didn't understand that command.") + return + # await context.bot.send_message(chat_id=update.effective_chat.id, text="Sorry, I didn't understand that command.") async def post_init(application: Application) -> None: await application.bot.set_my_commands([