diff options
author | 2021-07-06 13:23:45 +0100 | |
---|---|---|
committer | 2021-07-06 13:23:45 +0100 | |
commit | 340ec46e00314c6fcef6448e816cb21fdeaa7c26 (patch) | |
tree | b1a18d42df8ae4753aee9ddd22ad602d05621c92 | |
parent | Disable filter in codejam team channels (#1670) (diff) | |
parent | Use 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.py | 2 |
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 |