diff options
| author | Rapptz <[email protected]> | 2017-08-16 19:36:17 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-08-16 19:37:35 -0400 |
| commit | 7f18efdafe769573f9d4ccc6459dbb7b7c329a31 (patch) | |
| tree | 75829cf83577d1fc6bcd637ca278ba95ba6e72c2 /discord | |
| parent | Hide constructor for objects that shouldn't be created by users. (diff) | |
| download | discord.py-7f18efdafe769573f9d4ccc6459dbb7b7c329a31.tar.xz discord.py-7f18efdafe769573f9d4ccc6459dbb7b7c329a31.zip | |
Add default type for Game.
Good meme.
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/game.py | 14 |
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 |