fix stats

This commit is contained in:
Pesakitan22 2018-04-18 09:59:10 +07:00
parent 10c44d266d
commit c55b4b81ed

View file

@ -108,7 +108,7 @@ def do_play_card(bot, player, result_id):
text=__("{name} won!", multi=game.translate) text=__("{name} won!", multi=game.translate)
.format(name=user.first_name)) .format(name=user.first_name))
send_async(bot, chat.id, send_async(bot, chat.id,
text=__("Game ended! Flawless Victory!", multi=game.translate)) text=__("Game ended! Flawless Victory!"))
if us.stats: if us.stats:
# us.games_played += 1 # us.games_played += 1
@ -122,7 +122,8 @@ def do_play_card(bot, player, result_id):
game.players_won += 1 game.players_won += 1
try: try:
gm.leave_game(user, chat) if game.mode != 'one':
gm.leave_game(user, chat)
except NotEnoughPlayersError: except NotEnoughPlayersError:
send_async(bot, chat.id, send_async(bot, chat.id,
text=__("Game ended!", multi=game.translate)) text=__("Game ended!", multi=game.translate))