Skip to content

Commit

Permalink
Fix the bug that the robot responds to all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Dec 7, 2023
1 parent 6598fed commit e153613
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down

0 comments on commit e153613

Please sign in to comment.