aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2023-03-25 18:29:31 +0300
committerGravatar mbaruh <[email protected]>2023-03-25 18:29:31 +0300
commitd6565845ec07b9d76949da36505b3f53e402d230 (patch)
treedf6042e326740729dd17fe93d158e5cc9fcddd27 /pydis_site
parentMake the unique constraint reversible (diff)
Documentation improvements and fixes
Co-authored-by: Amrou <[email protected]>
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/migrations/0088_new_filter_schema.py4
-rw-r--r--pydis_site/apps/api/migrations/0091_antispam_filter_list.py2
-rw-r--r--pydis_site/apps/api/models/bot/filters.py5
3 files changed, 6 insertions, 5 deletions
diff --git a/pydis_site/apps/api/migrations/0088_new_filter_schema.py b/pydis_site/apps/api/migrations/0088_new_filter_schema.py
index 46756781..1506e4d7 100644
--- a/pydis_site/apps/api/migrations/0088_new_filter_schema.py
+++ b/pydis_site/apps/api/migrations/0088_new_filter_schema.py
@@ -118,7 +118,7 @@ class Migration(migrations.Migration):
('infraction_reason', models.CharField(help_text='The reason to give for the infraction.', max_length=1000, null=True, blank=True)),
('infraction_duration', models.DurationField(help_text='The duration of the infraction. 0 for permanent.', null=True)),
('infraction_channel', models.BigIntegerField(validators=(MinValueValidator(limit_value=0, message="Channel IDs cannot be negative."),), help_text="Channel in which to send the infraction.", null=True)),
- ('disabled_channels', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Channels in which to not run the filter.", null=True, size=None)),
+ ('disabled_channels', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Channels in which to not run the filter even if it's enabled in the category.", null=True, size=None)),
('disabled_categories', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Categories in which to not run the filter.", null=True, size=None)),
('enabled_channels', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Channels in which to run the filter even if it's disabled in the category.", null=True, size=None)),
('enabled_categories', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="The only categories in which to run the filter.", null=True, size=None)),
@@ -145,7 +145,7 @@ class Migration(migrations.Migration):
('infraction_reason', models.CharField(help_text='The reason to give for the infraction.', max_length=1000, blank=True)),
('infraction_duration', models.DurationField(help_text='The duration of the infraction. 0 for permanent.')),
('infraction_channel', models.BigIntegerField(validators=(MinValueValidator(limit_value=0, message="Channel IDs cannot be negative."),), help_text="Channel in which to send the infraction.")),
- ('disabled_channels', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Channels in which to not run the filter.", size=None)),
+ ('disabled_channels', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Channels in which to not run the filter even if it's enabled in the category.", size=None)),
('disabled_categories', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Categories in which to not run the filter.", size=None)),
('enabled_channels', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="Channels in which to run the filter even if it's disabled in the category.", size=None)),
('enabled_categories', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text="The only categories in which to run the filter.", size=None)),
diff --git a/pydis_site/apps/api/migrations/0091_antispam_filter_list.py b/pydis_site/apps/api/migrations/0091_antispam_filter_list.py
index 58ffa4a4..7c233142 100644
--- a/pydis_site/apps/api/migrations/0091_antispam_filter_list.py
+++ b/pydis_site/apps/api/migrations/0091_antispam_filter_list.py
@@ -7,7 +7,7 @@ import pydis_site.apps.api.models.bot.filters
def create_antispam_list(apps: Apps, _):
- """Create the 'unique' FilterList and its related Filters."""
+ """Create the 'antispam' FilterList and its related Filters."""
filter_list: pydis_site.apps.api.models.FilterList = apps.get_model("api", "FilterList")
filter_: pydis_site.apps.api.models.Filter = apps.get_model("api", "Filter")
diff --git a/pydis_site/apps/api/models/bot/filters.py b/pydis_site/apps/api/models/bot/filters.py
index 584ee726..60ae394b 100644
--- a/pydis_site/apps/api/models/bot/filters.py
+++ b/pydis_site/apps/api/models/bot/filters.py
@@ -101,7 +101,7 @@ class FilterList(ModelTimestampMixin, ModelReprMixin, models.Model):
)
disabled_channels = ArrayField(
models.CharField(max_length=100),
- help_text="Channels in which to not run the filter."
+ help_text="Channels in which to not run the filter even if it's enabled in the category."
)
enabled_categories = ArrayField(
models.CharField(max_length=100),
@@ -216,7 +216,8 @@ class FilterBase(ModelTimestampMixin, ModelReprMixin, models.Model):
)
disabled_channels = ArrayField(
models.CharField(max_length=100),
- help_text="Channels in which to not run the filter.", null=True
+ help_text="Channels in which to not run the filter even if it's enabled in the category.",
+ null=True
)
enabled_categories = ArrayField(
models.CharField(max_length=100),