include username in status message to notify player, if available
This commit is contained in:
parent
2dedb16cb8
commit
b6f156327d
1 changed files with 4 additions and 3 deletions
7
bot.py
7
bot.py
|
@ -231,9 +231,10 @@ def chosen_card(bot, update):
|
|||
gm.leave_game(user)
|
||||
bot.sendMessage(chat_id, text="Player won!")
|
||||
|
||||
bot.sendMessage(chat_id,
|
||||
text="Next player: " +
|
||||
game.current_player.user.first_name)
|
||||
player_name = player.user.first_name
|
||||
if player.user.username:
|
||||
player_name += ' (' + player.user.username + ')'
|
||||
bot.sendMessage(chat_id, text="Next player: " + player_name)
|
||||
|
||||
|
||||
def error(bot, update, error):
|
||||
|
|
Loading…
Reference in a new issue