mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 04:17:16 +00:00
Add default type for Game.
Good meme.
This commit is contained in:
parent
e0f733a5c1
commit
b8c19954e4
@ -47,20 +47,20 @@ class Game:
|
|||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
-----------
|
-----------
|
||||||
name : str
|
name: str
|
||||||
The game's name.
|
The game's name.
|
||||||
url : str
|
url: str
|
||||||
The game's URL. Usually used for twitch streaming.
|
The game's URL. Usually used for twitch streaming.
|
||||||
type : int
|
type: int
|
||||||
The type of game being played. 1 indicates "Streaming".
|
The type of game being played. 1 indicates "Streaming".
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ('name', 'type', 'url')
|
__slots__ = ('name', 'type', 'url')
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, *, name, url=None, type=0):
|
||||||
self.name = kwargs.get('name')
|
self.name = name
|
||||||
self.url = kwargs.get('url')
|
self.url = url
|
||||||
self.type = kwargs.get('type')
|
self.type = type
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.name)
|
return str(self.name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user