From 32b9f4491f34fe7605c3cdcb95832bf830950f5d Mon Sep 17 00:00:00 2001 From: Deni Putra Perdana Date: Sun, 14 Oct 2018 20:52:35 +0700 Subject: [PATCH] register stat on join --- game_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game_manager.py b/game_manager.py index a3763e1..b1fa52c 100644 --- a/game_manager.py +++ b/game_manager.py @@ -64,6 +64,9 @@ class GameManager(object): try: us = UserSetting.get(id=user.id) + if not us: + us = UserSetting(id=user.id) + us.games_played += 1 game = self.chatid_games[chat.id][-1] except (KeyError, IndexError):