1
Fork 0
mirror of https://github.com/RYGhub/royal-mifia.git synced 2024-11-22 05:44:19 +00:00

Solved #38 (can't test)

This commit is contained in:
Steffo 2016-12-06 22:52:58 +01:00
parent 2e160b6e16
commit 4de819c1df
2 changed files with 16 additions and 8 deletions

View file

@ -629,7 +629,11 @@ def join(bot, update):
if game.phase == 'Join':
p = game.findplayerbyid(update.message.from_user['id'])
if p is None:
try:
p = Player(update.message.from_user['id'], update.message.from_user['username'])
except KeyError:
game.message(bot, s.error_no_username)
else:
try:
p.message(bot, s.you_joined.format(game=game.name))
except TelegramError:

View file

@ -256,6 +256,10 @@ error_invalid_config = "\U000026A0 Configurazione non valida."
error_chat_unavailable = "\U000026A0 Non hai mai scritto un messaggio in chat privata a @mifiabot!\n" \
"Scrivigli nella chat privata `/start` e riprova."
# Erorre: nessun username
error_no_username = "\U000026A0 Non hai nessun username di Telegram!\n" \
"Specificane uno nelle opzioni!"
# Lista dei possibili nomi di una partita
names_list = ["Cassata",
"Cannoli",