diff options
author | 2020-12-01 18:30:12 +0100 | |
---|---|---|
committer | 2020-12-01 18:30:12 +0100 | |
commit | 210c564e1b6823617cb4f64ff5e33031dc61d487 (patch) | |
tree | 80ce941d2a11cd143903ea57ab71794acfd50d84 /bot/constants.py | |
parent | Clarify text of DM with Advent of Code join code (diff) |
Add support for ignoring scores from specific days
I've added support for ignoring scores from specific days. A list of
days to ignore can be provided using the environment variable
`AOC_IGNORED_DAYS` as a comma-separated list.
This example would ignore day 1 and day 23:
AOC_IGNORED_DAYS=1,23
I've also added a helper function to sort the leaderboard not only on
the achieved score, but also on the number of stars an individual has
completed.
Diffstat (limited to 'bot/constants.py')
-rw-r--r-- | bot/constants.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bot/constants.py b/bot/constants.py index 292a242a..e313e086 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -63,6 +63,7 @@ class AdventOfCode: staff_leaderboard_id = environ.get("AOC_STAFF_LEADERBOARD_ID", "") # Other Advent of Code constants + ignored_days = [day for day in environ.get("AOC_IGNORED_DAYS", "").split(",")] leaderboard_displayed_members = 10 leaderboard_cache_expiry_seconds = 1800 year = int(environ.get("AOC_YEAR", datetime.utcnow().year)) |