aboutsummaryrefslogtreecommitdiffstats
path: root/api/models.py
diff options
context:
space:
mode:
authorGravatar Hasan-Ahmad <[email protected]>2018-10-11 16:14:34 +0100
committerGravatar Hasan-Ahmad <[email protected]>2018-10-11 16:14:34 +0100
commit2ae5f5205ec19dbc1574b6136da9479e080c6ba2 (patch)
tree9059566c30cc1e4f1496d2b750eb6cc8f0795013 /api/models.py
parentUse proper keyword argument. (diff)
Added snake facts api
Diffstat (limited to 'api/models.py')
-rw-r--r--api/models.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/api/models.py b/api/models.py
index e5ec7992..32f978d4 100644
--- a/api/models.py
+++ b/api/models.py
@@ -77,6 +77,19 @@ class SnakeName(ModelReprMixin, models.Model):
return f"{self.name} ({self.scientific})"
+class SnakeFact(ModelReprMixin, models.Model):
+ """A snake fact used by the bot's snake cog."""
+
+ fact = models.CharField(
+ primary_key=True,
+ max_length=200,
+ help_text="A fact about snakes."
+ )
+
+ def __str__(self):
+ return f"{self.fact}"
+
+
class Role(ModelReprMixin, models.Model):
"""A role on our Discord server."""