From cb40beceee006f33fe34615030ddf6d6e4ef2765 Mon Sep 17 00:00:00 2001 From: sco1 Date: Tue, 27 Nov 2018 16:40:02 -0700 Subject: Add AoC Cog (#66) * Add Advent of Code cog * Update leaderboard last updated time when updating the leaderboard Remove unnecessary test command * Shift leaderboard embed build into helper method * Frame global leaderboard command * Split leaderboard entries check into helper method * Refactor commands to support global board * Remove unused leaderboard update, wall off global leaderboard command Hide & short circuit global leaderboard command until implemented Fix faulty logic causing board to be reloaded regardless of the age of the cache * Add help shortstrings * Use command builtin to disable global lb command until implemented * Add AoC global leaderboard parsing * Update pipfile and lock Tweak global lb regex Tweak method names for clarity * Refactor for global leaderboard command Separate Global & Private leaderboards into distinct classes * Add missing header divider * Move token for Joseph * Phrasing We're still doing phrasing, right? * Clarify variable name --- bot/constants.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 4294b8e1..6020f1c1 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -66,8 +66,27 @@ class Roles(NamedTuple): rockstars = 458226413825294336 +class Colours: + soft_red = 0xcd6d6d + soft_green = 0x68c290 + + +class Emojis: + star = "\u2B50" + christmas_tree = u"\U0001F384" + + class Tokens(NamedTuple): giphy = environ.get("GIPHY_TOKEN") + aoc_session_cookie = environ.get("AOC_SESSION_COOKIE") + + +class AdventOfCode: + leaderboard_cache_age_threshold_seconds = 3600 + leaderboard_id = 363275 + leaderboard_join_code = "363275-442b6939" + leaderboard_max_displayed_members = 10 + year = 2018 bot = SeasonalBot(command_prefix=Client.prefix) -- cgit v1.2.3