aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r--pydis_site/apps/api/models/bot/filters.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/pydis_site/apps/api/models/bot/filters.py b/pydis_site/apps/api/models/bot/filters.py
index 1fb9707d..95a10e42 100644
--- a/pydis_site/apps/api/models/bot/filters.py
+++ b/pydis_site/apps/api/models/bot/filters.py
@@ -84,11 +84,6 @@ class FilterList(FilterSettingsMixin):
help_text="Whether an alert should be sent.",
)
# Where a filter should apply.
- #
- # The resolution is done in the following order:
- # - enabled_channels
- # - disabled_categories
- # - disabled_channels
enabled_channels = ArrayField(
models.CharField(max_length=100),
help_text="Channels in which to run the filter even if it's disabled in the category."
@@ -97,6 +92,10 @@ class FilterList(FilterSettingsMixin):
models.CharField(max_length=100),
help_text="Channels in which to not run the filter."
)
+ enabled_categories = ArrayField(
+ models.CharField(max_length=100),
+ help_text="The only categories in which to run the filter."
+ )
disabled_categories = ArrayField(
models.CharField(max_length=100),
help_text="Categories in which to not run the filter."
@@ -165,6 +164,11 @@ class FilterBase(FilterSettingsMixin):
models.CharField(max_length=100),
help_text="Channels in which to not run the filter.", null=True
)
+ enabled_categories = ArrayField(
+ models.CharField(max_length=100),
+ help_text="The only categories in which to run the filter.",
+ null=True
+ )
disabled_categories = ArrayField(
models.CharField(max_length=100),
help_text="Categories in which to not run the filter.",