mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-26 02:53:07 +00:00
Add useful repr to all data classes.
This commit is contained in:
@@ -61,6 +61,9 @@ class Game:
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __repr__(self):
|
||||
return '<Game name={0.name!r} type={0.type!r} url={0.url!r}>'.format(self)
|
||||
|
||||
def _iterator(self):
|
||||
for attr in self.__slots__:
|
||||
value = getattr(self, attr, None)
|
||||
|
||||
Reference in New Issue
Block a user