diff options
| -rw-r--r-- | bot/exts/filters/antimalware.py | 5 | ||||
| -rw-r--r-- | bot/exts/filters/antispam.py | 2 | ||||
| -rw-r--r-- | bot/exts/filters/filtering.py | 2 | 
3 files changed, 8 insertions, 1 deletions
| diff --git a/bot/exts/filters/antimalware.py b/bot/exts/filters/antimalware.py index 89e539e7b..4c4836c88 100644 --- a/bot/exts/filters/antimalware.py +++ b/bot/exts/filters/antimalware.py @@ -7,6 +7,7 @@ from discord.ext.commands import Cog  from bot.bot import Bot  from bot.constants import Channels, Filter, URLs +from bot.exts.utils.jams import CATEGORY_NAME as JAM_CATEGORY_NAME  log = logging.getLogger(__name__) @@ -61,6 +62,10 @@ class AntiMalware(Cog):          if message.webhook_id or message.author.bot:              return +        # Ignore code jam channels +        if hasattr(message.channel, "category") and message.channel.category.name == JAM_CATEGORY_NAME: +            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 Filter.role_whitelist for role in message.author.roles): diff --git a/bot/exts/filters/antispam.py b/bot/exts/filters/antispam.py index 7555e25a2..48c3aa5a6 100644 --- a/bot/exts/filters/antispam.py +++ b/bot/exts/filters/antispam.py @@ -18,6 +18,7 @@ from bot.constants import (  )  from bot.converters import Duration  from bot.exts.moderation.modlog import ModLog +from bot.exts.utils.jams import CATEGORY_NAME as JAM_CATEGORY_NAME  from bot.utils import lock, scheduling  from bot.utils.messages import format_user, send_attachments @@ -148,6 +149,7 @@ class AntiSpam(Cog):              not message.guild              or message.guild.id != GuildConfig.id              or message.author.bot +            or (hasattr(message.channel, "category") and message.channel.category.name == JAM_CATEGORY_NAME)              or (message.channel.id in Filter.channel_whitelist and not DEBUG_MODE)              or (any(role.id in Filter.role_whitelist for role in message.author.roles) and not DEBUG_MODE)          ): diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index 77fb324a5..16aaf11cf 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -282,7 +282,7 @@ class Filtering(Cog):                          if delta is not None and delta < 100:                              continue -                    if filter_name == "filter_invites": +                    if filter_name in ("filter_invites", "filter_everyone_ping"):                          # Disable invites filter in codejam team channels                          category = getattr(msg.channel, "category", None)                          if category and category.name == JAM_CATEGORY_NAME: | 
