Skip to content

Commit

Permalink
you are not poll creator error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Kopylov committed Mar 24, 2024
1 parent 36fc244 commit 124aadb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handlers/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ async def _pass_checks(
return False

if update.effective_user.id != poll_data.creator_id:
user = msg_with_poll.from_user.username if msg_with_poll.from_user.username else msg_with_poll.from_user.first_name
await update.effective_message.reply_text(
f"You are not the creator of the game! Only @{poll_data['creator_username']} can stop this poll."
f"You are not the creator of the game! Only @{user} can stop this poll."
)
return False

Expand Down

0 comments on commit 124aadb

Please sign in to comment.