Skip to content

Commit

Permalink
Add default type for Game.
Browse files Browse the repository at this point in the history
Good meme.
  • Loading branch information
Rapptz committed Aug 16, 2017
1 parent e2fe8c9 commit 7f18efd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions discord/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f18efd

Please sign in to comment.