mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 08:17:47 +00:00
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."""
|
||||
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):
|
||||
"""A generator that retrieves every :class:`Channel` the client can 'access'.
|
||||
|
||||
|
@ -164,6 +164,9 @@ class ConnectionState:
|
||||
def emojis(self):
|
||||
return list(self._emojis.values())
|
||||
|
||||
def get_emoji(self, emoji_id):
|
||||
return self._emojis.get(emoji_id)
|
||||
|
||||
@property
|
||||
def private_channels(self):
|
||||
return list(self._private_channels.values())
|
||||
|
Loading…
x
Reference in New Issue
Block a user