diff options
author | 2020-03-30 19:52:48 +0200 | |
---|---|---|
committer | 2020-03-30 19:52:48 +0200 | |
commit | 83f5b0c7b62df74edc0e58b67f535bfb11284c26 (patch) | |
tree | ebe107afe0127665259795ca2e5c1bc0e392116c | |
parent | Deseasonify: move current month resolver to utils (diff) |
Deseasonify: resolve current season w.r.t. month override
Previously, the env var was only being used for seasonal decorators,
not branding. Although for testing purposes, seasons can be easily
set via bot commands, it makes sense to also use the env var to
choose the current season.
-rw-r--r-- | bot/seasons.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/seasons.py b/bot/seasons.py index 8c3df48c..1376d50b 100644 --- a/bot/seasons.py +++ b/bot/seasons.py @@ -1,8 +1,8 @@ import logging import typing as t -from datetime import datetime from bot.constants import Colours, Month +from bot.utils import resolve_current_month log = logging.getLogger(__name__) @@ -130,7 +130,7 @@ def get_all_seasons() -> t.List[t.Type[SeasonBase]]: def get_current_season() -> t.Type[SeasonBase]: """Give active season, based on current UTC month.""" - current_month = Month(datetime.utcnow().month) + current_month = resolve_current_month() active_seasons = tuple( season |