aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-07-06 13:23:45 +0100
committerGravatar GitHub <[email protected]>2021-07-06 13:23:45 +0100
commit340ec46e00314c6fcef6448e816cb21fdeaa7c26 (patch)
treeb1a18d42df8ae4753aee9ddd22ad602d05621c92
parentDisable filter in codejam team channels (#1670) (diff)
parentUse getattr with a default, to protect against DM channels (diff)
Merge pull request #1673 from python-discord/fix-category-check-in-dm-channels
Use getattr with a default, to protect against DM channels
-rw-r--r--bot/exts/filters/filtering.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py
index 5d5f59590..77fb324a5 100644
--- a/bot/exts/filters/filtering.py
+++ b/bot/exts/filters/filtering.py
@@ -284,7 +284,7 @@ class Filtering(Cog):
if filter_name == "filter_invites":
# Disable invites filter in codejam team channels
- category = msg.channel.category
+ category = getattr(msg.channel, "category", None)
if category and category.name == JAM_CATEGORY_NAME:
continue