diff --git a/main.py b/main.py index ddedf11..3b141f5 100644 --- a/main.py +++ b/main.py @@ -589,7 +589,7 @@ def join(bot, update): game.message(bot, s.error_player_already_joined) return # Giocatore senza username - if not (hasattr(update.message, "from_user") and 'username' in update.message.from_user): + if update.message.from_user["username"] is not None: game.message(bot, s.error_no_username) return p = Player(update.message.from_user['id'], update.message.from_user['username'])