Sends an image of an Advent of Code private leaderboard to a Discord server once a day.
Originally by Martin Hanzlowsky
Updated by Matic Babnik
Supports .env
files.
WEBHOOK_URL=...
LEADERBOARD_ID=...
SESSION_ID=...
# Install dependencies
yarn
# Build
yarn build
# Start
yarn start
To override the CronJob and instantly send the leaderboard, use the --now
flag.
yarn start --now
# Build image
docker build -t aoc-webhook .
# Run
docker run -d --name aoc-webhook aoc-webhook
To run the bot on a specific date, set the date
variable in index.ts
.
async function main() {
const date = new Date(Date.UTC(2023, 11, 25));
...
}