Add created_at property to PartialEmoji
Also fixed docstring for PartialEmoji.url
This commit is contained in:
parent
6ea7fce828
commit
6e6a3bed1a
@ -136,6 +136,17 @@ class PartialEmoji(_EmojiTag):
|
|||||||
return self.name
|
return self.name
|
||||||
return '%s:%s' % (self.name, self.id)
|
return '%s:%s' % (self.name, self.id)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def created_at(self):
|
||||||
|
"""Optional[:class:`datetime.datetime`]: Returns the emoji's creation time in UTC, or None if Unicode emoji.
|
||||||
|
|
||||||
|
.. versionadded:: 1.6
|
||||||
|
"""
|
||||||
|
if self.is_unicode_emoji():
|
||||||
|
return None
|
||||||
|
|
||||||
|
return utils.snowflake_time(self.id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self):
|
def url(self):
|
||||||
""":class:`Asset`: Returns an asset of the emoji, if it is custom."""
|
""":class:`Asset`: Returns an asset of the emoji, if it is custom."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user