aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2022-10-08 01:18:59 +0300
committerGravatar mbaruh <[email protected]>2022-10-08 01:18:59 +0300
commite5d655a81f71c4b5bfb15d567bc11f88023e5879 (patch)
tree26be1f9c5c26df2bf29289ccd757e1202734a5e3 /pydis_site/apps/api/models
parentProperly add dm_embed to serializers (diff)
Add infraction channel setting
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r--pydis_site/apps/api/models/bot/filters.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pydis_site/apps/api/models/bot/filters.py b/pydis_site/apps/api/models/bot/filters.py
index 95a10e42..22482870 100644
--- a/pydis_site/apps/api/models/bot/filters.py
+++ b/pydis_site/apps/api/models/bot/filters.py
@@ -1,4 +1,5 @@
from django.contrib.postgres.fields import ArrayField
+from django.core.validators import MinValueValidator
from django.db import models
from django.db.models import UniqueConstraint
@@ -41,6 +42,16 @@ class FilterSettingsMixin(models.Model):
null=True,
help_text="The duration of the infraction. Null if 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.",
+ null=True
+ )
class Meta:
"""Metaclass for settings mixin."""