aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhazhyk <[email protected]>2017-07-03 23:10:33 -0700
committerkhazhyk <[email protected]>2017-07-03 23:14:16 -0700
commit94eb938d29137a140d66682dfa36c6c99b61127f (patch)
treee33cb89f4d5af583f1a43c828a3fc80ed70b92f8
parent[commands] fix unloading incorrect cogs (diff)
downloaddiscord.py-94eb938d29137a140d66682dfa36c6c99b61127f.tar.xz
discord.py-94eb938d29137a140d66682dfa36c6c99b61127f.zip
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.
-rw-r--r--discord/game.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/game.py b/discord/game.py
index 121bf4c2..3026f14c 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 '<Game name={0.name!r} type={0.type!r} url={0.url!r}>'.format(self)