aboutsummaryrefslogtreecommitdiffstats
path: root/bot/constants.py
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-29 18:04:45 +0200
committerGravatar kwzrd <[email protected]>2020-03-29 18:39:35 +0200
commit0c7d501501dbe9a30df5b21452465a81ec688516 (patch)
tree51bf687e8085ccd9da51029f31b3ffe4718f521d /bot/constants.py
parentDeseasonify: add `month_override` env var (diff)
Deseasonify: validate configured month override
Diffstat (limited to 'bot/constants.py')
-rw-r--r--bot/constants.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 7a8f13e7..c739e277 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -151,6 +151,12 @@ class Month(enum.IntEnum):
december = 12
+# If a month override was configured, check that it's a valid Month
+# Prevents delaying an exception after the bot starts
+if Client.month_override is not None:
+ Month(Client.month_override)
+
+
class Roles(NamedTuple):
admin = int(environ.get("SEASONALBOT_ADMIN_ROLE_ID", 267628507062992896))
announcements = 463658397560995840