Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 920 Bytes

README.md

File metadata and controls

61 lines (41 loc) · 920 Bytes

Advent of Code Discord Webhook

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

Enviromental variables

Supports .env files.

WEBHOOK_URL=...
LEADERBOARD_ID=...
SESSION_ID=...

Setup

Simple

# 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

Docker

# Build image
docker build -t aoc-webhook .

# Run
docker run -d --name aoc-webhook aoc-webhook

Development / Debugging

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));
    ...
}