aboutsummaryrefslogtreecommitdiff
path: root/discord/member.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-09-21 03:53:24 -0400
committerRapptz <[email protected]>2016-09-21 04:22:12 -0400
commit13f85b3292909a08e62ec9c2c1b3be18ce37b741 (patch)
treea7132669a5eb617ca217f3a65107930ac0f45a57 /discord/member.py
parentUpgrade requirements to stable aiohttp. (diff)
downloaddiscord.py-13f85b3292909a08e62ec9c2c1b3be18ce37b741.tar.xz
discord.py-13f85b3292909a08e62ec9c2c1b3be18ce37b741.zip
Make Roles totally ordered.
This also fixes a bug with Member.top_role that chose the wrong role should they have the same position.
Diffstat (limited to 'discord/member.py')
-rw-r--r--discord/member.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/member.py b/discord/member.py
index 5130a241..eaf70db8 100644
--- a/discord/member.py
+++ b/discord/member.py
@@ -197,6 +197,6 @@ class Member(User):
"""
if self.roles:
- roles = sorted(self.roles, key=lambda r: r.position, reverse=True)
+ roles = sorted(self.roles, reverse=True)
return roles[0]
return None