aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-08-16 19:36:17 -0400
committerRapptz <[email protected]>2017-08-16 19:37:35 -0400
commit7f18efdafe769573f9d4ccc6459dbb7b7c329a31 (patch)
tree75829cf83577d1fc6bcd637ca278ba95ba6e72c2 /discord
parentHide constructor for objects that shouldn't be created by users. (diff)
downloaddiscord.py-7f18efdafe769573f9d4ccc6459dbb7b7c329a31.tar.xz
discord.py-7f18efdafe769573f9d4ccc6459dbb7b7c329a31.zip
Add default type for Game.
Good meme.
Diffstat (limited to 'discord')
-rw-r--r--discord/game.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/discord/game.py b/discord/game.py
index 49e5a4fb..d5b5b894 100644
--- a/discord/game.py
+++ b/discord/game.py
@@ -43,20 +43,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 self.name