aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/client.py4
-rw-r--r--discord/state.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py
index e1b2a798..6979df06 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -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'.
diff --git a/discord/state.py b/discord/state.py
index 6ac83bd1..f491bca5 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -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())