A Discord bot designed to monitor a private Advent of Code (AoC) leaderboard. It automatically fetches and checks for updates, then notifies members when someone on the leaderboard earns a new star, or when a new member has joined.
Table of Contents
The AocDiscordBot is a specialized Discord bot designed to enhance the experience of participating in the Advent of Code (AoC) challenges among a private group. Advent of Code is an annual series of programming puzzles that span a variety of skill sets and challenge types. The bot is designed for small, personal servers and can easily be self-hosted. I am currently running this bot on my Raspberry Pi 4.
Key Features:
-
Automated Updates: The bot automatically fetches the latest stars and scores from the Advent of Code leaderboard.
-
Real-Time Notifications: Members are notified in Discord when someone on the leaderboard earns a new star, keeping everyone up-to-date and engaged.
To add this bot to your own server, follow these steps.
You need to create your own Discord app through their Devloper Portal
Make sure to enable MESSAGE CONTENT INTENT for the bot:
-
Clone the repo
git clone https://github.com/PaytonWebber/AocDiscordBot.git
-
Create a .env file at the root of the repo
touch .env
-
Enter the following information in the .env file you just created
SESSION_COOKIE="<YOUR COOKIE>" LEADERBOARD_ID="<YOUR LEADERBOARD ID>" DISCORD_TOKEN="<YOUR BOT's TOKEN>" CHANNEL_ID="<THE CHANNEL YOU WANT THE BOT TO MONITOR>"
-
Build the project
make
-
Start the bot
./bot
The bot is mostly autonomous, but can be interacted with using the following commands: