aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/role.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/discord/role.py b/discord/role.py
index e134667b..086d5e55 100644
--- a/discord/role.py
+++ b/discord/role.py
@@ -113,6 +113,12 @@ class Role(Hashable):
if self.guild != other.guild:
raise RuntimeError('cannot compare roles from two different guilds.')
+ # the @everyone role is always the lowest role in hierarchy
+ guild_id = self.guild.id
+ if self.id == guild_id:
+ # everyone_role < everyone_role -> False
+ return other.id != guild_id
+
if self.position < other.position:
return True