Add useful repr to all data classes.

This commit is contained in:
Rapptz
2017-01-03 09:52:06 -05:00
parent ec6c7f8b34
commit dceba9d962
12 changed files with 48 additions and 1 deletions
+3
View File
@@ -95,6 +95,9 @@ class Invite(Hashable):
def __str__(self):
return self.url
def __repr__(self):
return '<Invite code={0.code!r}>'.format(self)
@property
def id(self):
"""Returns the proper code portion of the invite."""