This project is a Slack bot that will report updates for a private Advent of Code leaderboard.
It will report when someone solved a problem. Also, if any changes occured, it will report the current leaderboard.
Make sure you have a recent PHP version installed (tested with PHP 7.4) as well as Composer.
Then clone the repository and run
composer install
Create a Incoming Slack Webhook. Also log in to Advent of Code and get the private leaderboard ID number and well as your session cookie. The session cookie can be found in your browser's development console.
Now create a file .env.local
in the root of the cloned repository with the following contents:
AOC_YEAR=2020 # Defaults to 2020
AOC_SESSION_ID=<your AoC session ID>
AOC_LEADERBORD_ID=<your AoC private leaderboard ID>
SLACK_WEBHOOK=<your Slack webhook URL>
BOT_NAME="Custom bot name" # Defaults to AoC bot
Now create a cronjob that runs <path to repo>/bin/console aoc
every so often. Note that the Advent of Code site
states to not run it more than once every 15 minutes.
This project is created by Nicky Gerritsen and is based of the Python Advent of Code bot by Tom Swartz.