diff --git a/src/handlers/game.py b/src/handlers/game.py index 75d0aee..ad942ba 100644 --- a/src/handlers/game.py +++ b/src/handlers/game.py @@ -38,3 +38,6 @@ async def game(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: ) ) context.bot_data.update(game_metadata) + + # Delete command message + await update.effective_message.delete() diff --git a/src/handlers/save.py b/src/handlers/save.py index 1c0bd77..93892eb 100644 --- a/src/handlers/save.py +++ b/src/handlers/save.py @@ -95,6 +95,13 @@ async def save(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: await update.effective_message.reply_text( "The Game has been saved!. Results: {}".format(game.results) ) + # Delete the poll + await context.bot.delete_message( + chat_id=game.chat_id, + message_id=game.poll_id + ) + # Delete this callback /save message + await update.effective_message.delete() else: await update.effective_message.reply_text( "Something went wrong. Can't process your request."