diff options
| author | 2019-11-28 22:01:42 +0100 | |
|---|---|---|
| committer | 2019-11-28 22:01:42 +0100 | |
| commit | 623a3da6e0cce571da56052f9e4c716ab0883b4d (patch) | |
| tree | 8fdab3b922667220ae5a6842e6a12b66758a6356 | |
| parent | Add the new blinky server guild icon (#314) (diff) | |
| parent | Add env var support for Advent of Code year specification (diff) | |
Merge pull request #313 from eivl/AoC/current-year-fix
Advent of Code year binds to datetime instead of a magic number
| -rw-r--r-- | bot/constants.py | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/bot/constants.py b/bot/constants.py index aa5c3db3..732431ce 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -1,6 +1,7 @@  import logging  from os import environ  from typing import NamedTuple +from datetime import datetime  __all__ = (      "AdventOfCode", "Channels", "Client", "Colours", "Emojis", "Hacktoberfest", "Roles", "Tokens", @@ -13,10 +14,10 @@ log = logging.getLogger(__name__)  class AdventOfCode:      leaderboard_cache_age_threshold_seconds = 3600 -    leaderboard_id = 363275 +    leaderboard_id = 631135      leaderboard_join_code = str(environ.get("AOC_JOIN_CODE", None))      leaderboard_max_displayed_members = 10 -    year = 2018 +    year = int(environ.get("AOC_YEAR", datetime.utcnow().year))      role_id = int(environ.get("AOC_ROLE_ID", 518565788744024082)) | 
