aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-08-16 19:36:17 -0400
committerRapptz <[email protected]>2017-08-16 19:36:17 -0400
commitb8c19954e444f88a6667761cc27bcf16693f5544 (patch)
tree58afbd57ab0fa886a1e93ade1774277c299bb2b1
parentuse cdn url for custom emojis (diff)
downloaddiscord.py-b8c19954e444f88a6667761cc27bcf16693f5544.tar.xz
discord.py-b8c19954e444f88a6667761cc27bcf16693f5544.zip
Add default type for Game.
Good meme.
-rw-r--r--discord/game.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/discord/game.py b/discord/game.py
index 3026f14c..13c12714 100644
--- a/discord/game.py
+++ b/discord/game.py
@@ -47,20 +47,20 @@ class Game:
Attributes
-----------
- name : str
+ name: str
The game's name.
- url : str
+ url: str
The game's URL. Usually used for twitch streaming.
- type : int
+ type: int
The type of game being played. 1 indicates "Streaming".
"""
__slots__ = ('name', 'type', 'url')
- def __init__(self, **kwargs):
- self.name = kwargs.get('name')
- self.url = kwargs.get('url')
- self.type = kwargs.get('type')
+ def __init__(self, *, name, url=None, type=0):
+ self.name = name
+ self.url = url
+ self.type = type
def __str__(self):
return str(self.name)