diff options
| author | 2022-11-05 16:06:47 +0200 | |
|---|---|---|
| committer | 2022-11-05 16:06:47 +0200 | |
| commit | e83717b8d6770a1562f2e82871a09b63c7b0c9b9 (patch) | |
| tree | 474c43ae7884e253559bc8373c0c3e96bf474aa0 | |
| parent | Bring back auto-infraction reporting (diff) | |
Handle threads in channel_scope
| -rw-r--r-- | bot/exts/filtering/_settings_types/validations/channel_scope.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/exts/filtering/_settings_types/validations/channel_scope.py b/bot/exts/filtering/_settings_types/validations/channel_scope.py index ae6c24c97..80f837a15 100644 --- a/bot/exts/filtering/_settings_types/validations/channel_scope.py +++ b/bot/exts/filtering/_settings_types/validations/channel_scope.py @@ -53,6 +53,8 @@ class ChannelScope(ValidationEntry): if not hasattr(channel, "category"): # This is not a guild channel, outside the scope of this setting. return True + if hasattr(channel, "parent"): + channel = channel.parent enabled_channel = channel.id in self.enabled_channels or channel.name in self.enabled_channels disabled_channel = channel.id in self.disabled_channels or channel.name in self.disabled_channels |