aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2018-03-31 22:55:42 -0400
committerRapptz <[email protected]>2018-03-31 22:55:42 -0400
commit87a7efc410154514999fbfce7fde59ffa67a4ab5 (patch)
treecf180b634f0342a9d4a4480629ffb9326353a411
parentForce RTD to pip install rather than use setup.py install (diff)
downloaddiscord.py-87a7efc410154514999fbfce7fde59ffa67a4ab5.tar.xz
discord.py-87a7efc410154514999fbfce7fde59ffa67a4ab5.zip
Flip comparison in Guild.by_category.
-rw-r--r--discord/guild.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 752a2909..b54eecb5 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -340,7 +340,7 @@ class Guild(Hashable):
def key(t):
k, v = t
- return ((isinstance(k, TextChannel), k.position, k.id) if k else (-1, -1), v)
+ return ((not isinstance(k, TextChannel), k.position, k.id) if k else (-1, -1, -1), v)
_get = self._channels.get
as_list = [(_get(k), v) for k, v in grouped.items()]