From 94eb938d29137a140d66682dfa36c6c99b61127f Mon Sep 17 00:00:00 2001 From: khazhyk Date: Mon, 3 Jul 2017 23:10:33 -0700 Subject: [PATCH] handle Game.name being None re #221, Game.name can still be None, which will cause TypeError on str(game). Currently discord does not treat these weird statuses uniformly, with it showing as playing a game on mobile, but not playing a game on desktop. It may be useful to know users are in this weird state. --- discord/game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/game.py b/discord/game.py index 121bf4c2e..3026f14c2 100644 --- a/discord/game.py +++ b/discord/game.py @@ -63,7 +63,7 @@ class Game: self.type = kwargs.get('type') def __str__(self): - return self.name + return str(self.name) def __repr__(self): return ''.format(self)