Add Client.get_emoji to get an Emoji from an ID.
This commit is contained in:
parent
d3a86a5fb6
commit
10453d6718
@ -532,6 +532,10 @@ class Client:
|
|||||||
"""Returns a :class:`User` with the given ID. If not found, returns None."""
|
"""Returns a :class:`User` with the given ID. If not found, returns None."""
|
||||||
return self.connection.get_user(id)
|
return self.connection.get_user(id)
|
||||||
|
|
||||||
|
def get_emoji(self, id):
|
||||||
|
"""Returns a :class:`Emoji` with the given ID. If not found, returns None."""
|
||||||
|
return self.connection.get_emoji(id)
|
||||||
|
|
||||||
def get_all_channels(self):
|
def get_all_channels(self):
|
||||||
"""A generator that retrieves every :class:`Channel` the client can 'access'.
|
"""A generator that retrieves every :class:`Channel` the client can 'access'.
|
||||||
|
|
||||||
|
@ -164,6 +164,9 @@ class ConnectionState:
|
|||||||
def emojis(self):
|
def emojis(self):
|
||||||
return list(self._emojis.values())
|
return list(self._emojis.values())
|
||||||
|
|
||||||
|
def get_emoji(self, emoji_id):
|
||||||
|
return self._emojis.get(emoji_id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def private_channels(self):
|
def private_channels(self):
|
||||||
return list(self._private_channels.values())
|
return list(self._private_channels.values())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user