aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2022-09-27 00:57:09 +0300
committerGravatar mbaruh <[email protected]>2022-09-27 00:57:09 +0300
commit8c07c20c184371552d6811398ed5208ed2213c9b (patch)
tree4caca89170f6e640d852394369f850a0175aa11e /pydis_site/apps/api
parentMerge branch 'main' into new-filter-schema (diff)
Add voice mute to infraction choices
Diffstat (limited to 'pydis_site/apps/api')
-rw-r--r--pydis_site/apps/api/migrations/0084_new_filter_schema.py4
-rw-r--r--pydis_site/apps/api/models/bot/filters.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/pydis_site/apps/api/migrations/0084_new_filter_schema.py b/pydis_site/apps/api/migrations/0084_new_filter_schema.py
index 10e83b8b..393f4b9f 100644
--- a/pydis_site/apps/api/migrations/0084_new_filter_schema.py
+++ b/pydis_site/apps/api/migrations/0084_new_filter_schema.py
@@ -105,7 +105,7 @@ class Migration(migrations.Migration):
('enabled', models.BooleanField(help_text='Whether this filter is currently enabled.', null=True)),
('dm_content', models.CharField(help_text='The DM to send to a user triggering this filter.', max_length=1000, null=True)),
('dm_embed', models.CharField(help_text='The content of the DM embed', max_length=2000, null=True)),
- ('infraction_type', models.CharField(choices=[('note', 'Note'), ('warning', 'Warning'), ('watch', 'Watch'), ('mute', 'Mute'), ('kick', 'Kick'), ('ban', 'Ban'), ('superstar', 'Superstar'), ('voice_ban', 'Voice Ban')], help_text='The infraction to apply to this user.', max_length=9, null=True)),
+ ('infraction_type', models.CharField(choices=[('note', 'Note'), ('warning', 'Warning'), ('watch', 'Watch'), ('mute', 'Mute'), ('kick', 'Kick'), ('ban', 'Ban'), ('superstar', 'Superstar'), ("voice_mute", "Voice Mute"), ('voice_ban', 'Voice Ban')], help_text='The infraction to apply to this user.', max_length=10, null=True)),
('infraction_reason', models.CharField(help_text='The reason to give for the infraction.', max_length=1000, null=True)),
('infraction_duration', models.DurationField(help_text='The duration of the infraction. Null if permanent.', 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)),
@@ -128,7 +128,7 @@ class Migration(migrations.Migration):
('enabled', models.BooleanField(help_text='Whether this filter is currently enabled.')),
('dm_content', models.CharField(help_text='The DM to send to a user triggering this filter.', max_length=1000, null=True)),
('dm_embed', models.CharField(help_text='The content of the DM embed', max_length=2000, null=True)),
- ('infraction_type', models.CharField(choices=[('note', 'Note'), ('warning', 'Warning'), ('watch', 'Watch'), ('mute', 'Mute'), ('kick', 'Kick'), ('ban', 'Ban'), ('superstar', 'Superstar'), ('voice_ban', 'Voice Ban')], help_text='The infraction to apply to this user.', max_length=9, null=True)),
+ ('infraction_type', models.CharField(choices=[('note', 'Note'), ('warning', 'Warning'), ('watch', 'Watch'), ('mute', 'Mute'), ('kick', 'Kick'), ('ban', 'Ban'), ('superstar', 'Superstar'), ("voice_mute", "Voice Mute"), ('voice_ban', 'Voice Ban')], help_text='The infraction to apply to this user.', max_length=10, null=True)),
('infraction_reason', models.CharField(help_text='The reason to give for the infraction.', max_length=1000, null=True)),
('infraction_duration', models.DurationField(help_text='The duration of the infraction. Null if permanent.', 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.", size=None)),
diff --git a/pydis_site/apps/api/models/bot/filters.py b/pydis_site/apps/api/models/bot/filters.py
index 708ceadc..f90eb6e6 100644
--- a/pydis_site/apps/api/models/bot/filters.py
+++ b/pydis_site/apps/api/models/bot/filters.py
@@ -28,7 +28,7 @@ class FilterSettingsMixin(models.Model):
)
infraction_type = models.CharField(
choices=Infraction.TYPE_CHOICES,
- max_length=9,
+ max_length=10,
null=True,
help_text="The infraction to apply to this user."
)