mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-02 00:00:02 +00:00
Add platform key in __repr__ method for Game and Streaming
This commit is contained in:
parent
c524f655be
commit
826aa22868
@ -418,7 +418,7 @@ class Game(BaseActivity):
|
|||||||
return str(self.name)
|
return str(self.name)
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f'<Game name={self.name!r}>'
|
return f'<Game name={self.name!r} platform={self.platform!r}>'
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
timestamps: Dict[str, Any] = {}
|
timestamps: Dict[str, Any] = {}
|
||||||
@ -514,7 +514,7 @@ class Streaming(BaseActivity):
|
|||||||
return str(self.name)
|
return str(self.name)
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f'<Streaming name={self.name!r}>'
|
return f'<Streaming name={self.name!r} platform={self.platform!r}>'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def twitch_name(self) -> Optional[str]:
|
def twitch_name(self) -> Optional[str]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user