aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2020-07-16 10:38:14 +0800
committerGravatar kosayoda <[email protected]>2020-07-16 10:38:14 +0800
commit2c88104434ad1af68877959059ef04a69eae5c33 (patch)
treeccabc76099d78b7b2fa79fed18574fd148af44b5 /pydis_site
parentMerge pull request #368 from python-discord/remove_django_crispy_bulma (diff)
Add mentions field to Reminder model
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/models/bot/reminder.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pydis_site/apps/api/models/bot/reminder.py b/pydis_site/apps/api/models/bot/reminder.py
index d53fedb5..4b5d15ca 100644
--- a/pydis_site/apps/api/models/bot/reminder.py
+++ b/pydis_site/apps/api/models/bot/reminder.py
@@ -1,3 +1,4 @@
+from django.contrib.postgres.fields import ArrayField
from django.core.validators import MinValueValidator
from django.db import models
@@ -45,6 +46,19 @@ class Reminder(ModelReprMixin, models.Model):
expiration = models.DateTimeField(
help_text="When this reminder should be sent."
)
+ mentions = ArrayField(
+ models.BigIntegerField(
+ validators=(
+ MinValueValidator(
+ limit_value=0,
+ message="Mention IDs cannot be negative."
+ ),
+ )
+ ),
+ default=list,
+ blank=True,
+ help_text="IDs of roles or users to ping with the reminder."
+ )
def __str__(self):
"""Returns some info on the current reminder, for display purposes."""