Handle cases where people put False-like values for game presences.

This commit is contained in:
Rapptz
2016-01-11 19:50:13 -05:00
parent 8974dffc4e
commit 4ea015067f
3 changed files with 6 additions and 6 deletions

View File

@@ -176,8 +176,8 @@ class Server(Hashable):
member.status = Status(member.status)
except:
pass
game = presence.get('game')
member.game = game and Game(**game)
game = presence.get('game', {})
member.game = Game(**game) if game else None
if 'channels' in guild:
channels = guild['channels']