diff options
| author | 2020-02-25 20:01:15 +0200 | |
|---|---|---|
| committer | 2020-02-26 19:12:23 +0200 | |
| commit | c2d695fe196c49d3dfcae1186c1dafe13ba98e88 (patch) | |
| tree | 6273a133715c0942556ad50f4b2fa8bb780111c1 | |
| parent | Merge pull request #711 from python-discord/bug/backend/b704/ready-missing-cache (diff) | |
Added to AntiMalware staff ignore check.
| -rw-r--r-- | bot/cogs/antimalware.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/cogs/antimalware.py b/bot/cogs/antimalware.py index 28e3e5d96..d2ff9f79c 100644 --- a/bot/cogs/antimalware.py +++ b/bot/cogs/antimalware.py @@ -4,7 +4,7 @@ from discord import Embed, Message, NotFound from discord.ext.commands import Cog from bot.bot import Bot -from bot.constants import AntiMalware as AntiMalwareConfig, Channels, URLs +from bot.constants import AntiMalware as AntiMalwareConfig, Channels, STAFF_ROLES, URLs log = logging.getLogger(__name__) @@ -21,6 +21,10 @@ class AntiMalware(Cog): if not message.attachments: return + # Check if user is staff, if is, return + if hasattr(message.author, "roles") and any(role.id in STAFF_ROLES for role in message.author.roles): + return + embed = Embed() for attachment in message.attachments: filename = attachment.filename.lower() |