diff options
author | 2020-02-26 16:04:17 -0500 | |
---|---|---|
committer | 2020-02-26 16:04:17 -0500 | |
commit | ded5c543d6b7abcb9789cd3c8f097a5649270c75 (patch) | |
tree | 387eaa343a3228082a60577d0037932099f73dbc | |
parent | Merge branch 'master' into master (diff) |
Add clarifying comment to role checking logic implementation
-rw-r--r-- | bot/cogs/antimalware.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bot/cogs/antimalware.py b/bot/cogs/antimalware.py index 957c458c0..9e9e81364 100644 --- a/bot/cogs/antimalware.py +++ b/bot/cogs/antimalware.py @@ -23,6 +23,7 @@ class AntiMalware(Cog): return # Check if user is staff, if is, return + # Since we only care that roles exist to iterate over, check for the attr rather than a User/Member instance if hasattr(message.author, "roles") and any(role.id in STAFF_ROLES for role in message.author.roles): return |