mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 16:51:59 +00:00
Add default type for Game.
Good meme.
This commit is contained in:
parent
e2fe8c9471
commit
7f18efdafe
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user