Make Roles totally ordered.
This also fixes a bug with Member.top_role that chose the wrong role should they have the same position.
This commit is contained in:
1 parent
09e77e548a
commit
13f85b3292
2 files changed
+50
-12
No files matched your search
+1
-1
@@ -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
|
||||
Reference in new issue
Block a user