Skip to content

Commit

Permalink
Add deleting command-message to mystats, and correct exception there
Browse files Browse the repository at this point in the history
  • Loading branch information
zimfv committed Apr 7, 2024
1 parent ce97e34 commit 567e28a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handlers/mystats.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def mystats(
await context.bot.send_photo(chat_id=chat_id,
photo=await draw_user_winrate(user_id, context=context),
disable_notification=True)
#await update.effective_message.delete()
except TelegramError as e:
await update.effective_message.delete()
except Exception as e:
logging.error(f"Failed to send photo: {e}")
await context.bot.send_message(chat_id=chat_id, text="Sorry, there was an error processing your request.")

0 comments on commit 567e28a

Please sign in to comment.