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:
@ -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