register stat on join

This commit is contained in:
Deni Putra Perdana 2018-10-14 20:52:35 +07:00
parent c55b4b81ed
commit 32b9f4491f

View file

@ -64,6 +64,9 @@ class GameManager(object):
try: try:
us = UserSetting.get(id=user.id) us = UserSetting.get(id=user.id)
if not us:
us = UserSetting(id=user.id)
us.games_played += 1 us.games_played += 1
game = self.chatid_games[chat.id][-1] game = self.chatid_games[chat.id][-1]
except (KeyError, IndexError): except (KeyError, IndexError):