From 0dac5e31392710fa76cdc72f4307cc3f3d7a429c Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 10 Feb 2017 15:46:00 -0500 Subject: Add Client.emojis to get all emojis. This removes the older get_all_emojis generator. --- discord/client.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'discord/client.py') diff --git a/discord/client.py b/discord/client.py index 5931c22b..9d7903e0 100644 --- a/discord/client.py +++ b/discord/client.py @@ -173,6 +173,11 @@ class Client: """List[:class:`Guild`]: The guilds that the connected client is a member of.""" return self.connection.guilds + @property + def emojis(self): + """List[:class:`Emoji`]: The emojis that the connected client has.""" + return self.connection.emojis + @property def private_channels(self): """List[:class:`abc.PrivateChannel`]: The private channels that the connected client is participating on.""" @@ -478,12 +483,6 @@ class Client: """Returns a :class:`User` with the given ID. If not found, returns None.""" return self.connection.get_user(id) - def get_all_emojis(self): - """Returns a generator with every :class:`Emoji` the client can see.""" - for guild in self.guilds: - for emoji in guild.emojis: - yield emoji - def get_all_channels(self): """A generator that retrieves every :class:`Channel` the client can 'access'. -- cgit v1.2.3