[Permissions] Exclude @everyone role when retrieving rules (#2484)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-02-25 10:19:00 +11:00 committed by GitHub
parent b38ac1d025
commit bb5aab16c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,7 +531,10 @@ class Requires:
if category is not None:
channels.append(category)
model_chain = [author, *channels, *author.roles, guild]
# We want author roles sorted highest to lowest, and exclude the @everyone role
author_roles = reversed(author.roles[1:])
model_chain = [author, *channels, *author_roles, guild]
for rules in rules_chain:
for model in model_chain: