aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models
diff options
context:
space:
mode:
authorGravatar swfarnsworth <[email protected]>2021-07-04 21:35:32 -0400
committerGravatar swfarnsworth <[email protected]>2021-07-04 21:35:32 -0400
commitcb058d85af826077641f7a6b05c07a975122987d (patch)
tree030c02f91a3cffcc491b848eee25796e7ffb5b23 /pydis_site/apps/api/models
parentUpdate templates with new resource urls. (diff)
parentMerge pull request #547 from Numerlor/docker-override (diff)
Merge branch 'main' of https://github.com/python-discord/site into swfarnsworth/smarter-resources/new-resources
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r--pydis_site/apps/api/models/bot/message.py2
-rw-r--r--pydis_site/apps/api/models/bot/role.py8
2 files changed, 3 insertions, 7 deletions
diff --git a/pydis_site/apps/api/models/bot/message.py b/pydis_site/apps/api/models/bot/message.py
index ff06de21..60e2a553 100644
--- a/pydis_site/apps/api/models/bot/message.py
+++ b/pydis_site/apps/api/models/bot/message.py
@@ -43,7 +43,7 @@ class Message(ModelReprMixin, models.Model):
verbose_name="Channel ID"
)
content = models.CharField(
- max_length=2_000,
+ max_length=4_000,
help_text="The content of this message, taken from Discord.",
blank=True
)
diff --git a/pydis_site/apps/api/models/bot/role.py b/pydis_site/apps/api/models/bot/role.py
index cfadfec4..733a8e08 100644
--- a/pydis_site/apps/api/models/bot/role.py
+++ b/pydis_site/apps/api/models/bot/role.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from django.core.validators import MaxValueValidator, MinValueValidator
+from django.core.validators import MinValueValidator
from django.db import models
from pydis_site.apps.api.models.mixins import ModelReprMixin
@@ -38,16 +38,12 @@ class Role(ModelReprMixin, models.Model):
),
help_text="The integer value of the colour of this role from Discord."
)
- permissions = models.IntegerField(
+ permissions = models.BigIntegerField(
validators=(
MinValueValidator(
limit_value=0,
message="Role permissions cannot be negative."
),
- MaxValueValidator(
- limit_value=2 << 32,
- message="Role permission bitset exceeds value of having all permissions"
- )
),
help_text="The integer value of the permission bitset of this role from Discord."
)