1
Fork 0
mirror of https://github.com/RYGhub/royal-mifia.git synced 2024-11-26 07:34:19 +00:00
This commit is contained in:
Steffo 2017-07-07 17:37:41 +03:00
parent 9f9b9924db
commit a9740613fb

View file

@ -589,7 +589,7 @@ def join(bot, update):
game.message(bot, s.error_player_already_joined) game.message(bot, s.error_player_already_joined)
return return
# Giocatore senza username # Giocatore senza username
if 'username' not in update.message.from_user: if not (hasattr(update.message, "from_user") and 'username' in update.message.from_user):
game.message(bot, s.error_no_username) game.message(bot, s.error_no_username)
return return
p = Player(update.message.from_user['id'], update.message.from_user['username']) p = Player(update.message.from_user['id'], update.message.from_user['username'])
@ -627,7 +627,7 @@ def status(bot, update):
text = str() text = str()
if __debug__: if __debug__:
text += s.debug_mode text += s.debug_mode
text += s.status_header.format(name=game.name, admin=game.admin.tusername, phase=game.phase) text += s.status_header.format(name=game.name, admin=game.admin.tusername if game.admin is not None else "-", phase=game.phase)
game.updatevotes() game.updatevotes()
# Aggiungi l'elenco dei giocatori # Aggiungi l'elenco dei giocatori
for player in game.players: for player in game.players: