Skip to content

Commit

Permalink
Merge pull request #301 from C-Pro/feature/aoc-every-year
Browse files Browse the repository at this point in the history
aoc forever
  • Loading branch information
C-Pro authored Dec 2, 2023
2 parents 1ce1f1a + f68cf7e commit 805dfb8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions bot/skills/aoc_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,21 @@

logger = logging.getLogger(__name__)

AOC_ENDPOINT = "https://adventofcode.com/2022/leaderboard/private/view/458538.json"
AOC_START_TIME = datetime.fromtimestamp(1669870800)

AOC_ENDPOINT = f"https://adventofcode.com/{datetime.utcnow().year}/leaderboard/private/view/458538.json"
AOC_START_TIME = (
datetime.utcnow()
.replace(
year=datetime.utcnow().year,
month=12,
day=1,
hour=5,
minute=0,
second=0,
microsecond=0,
)
.timestamp()
)
AOC_UPDATE_INTERVAL = timedelta(minutes=15)
JOB_AOC_UPDATE = "aoc_update_job"

Expand Down

0 comments on commit 805dfb8

Please sign in to comment.