Add useful repr to all data classes.

This commit is contained in:
Rapptz
2016-12-30 04:34:42 -05:00
parent ec6c7f8b34
commit dceba9d962
12 changed files with 48 additions and 1 deletions

View File

@ -103,6 +103,9 @@ class Emoji(Hashable):
def __str__(self):
return "<:{0.name}:{0.id}>".format(self)
def __repr__(self):
return '<Emoji id={0.id} name={0.name!r}>'.format(self)
@property
def created_at(self):
"""Returns the emoji's creation time in UTC."""