Skip to content

Discord bot for advent of code leaderboards πŸŽ– Here to champion your AOC efforts!

License

Notifications You must be signed in to change notification settings

giraugh/advent-of-code-friend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Advent of Code Friend

Discord bot for Advent of Code leaderboards πŸŽ–

Please note that because Advent of Code releases puzzles at midnight EST, this bot and all times it uses are also EST.

Commands

/register <session_token> <leaderboard_id>

Sets up the bot to use this leaderboard in the server you run the command in. All leaderboard commands in this server will use the token and leaderboard provided to fetch the API.

/unregister

Clears the session token and leaderboard ID being used by this server.

/leaderboard [ordering] [year]

Uses the registered leaderboard ID to fetch the leaderboard and post it. You can specify a custom ordering method, and optionally a year, otherwise it will attempt to fetch from the current year.

/puzzle [day] [year]

Posts a link to the latest puzzle (or for a day/year you choose). Note that you can't specify a year without also specifying a day.

/daily leaderboard <channel> [hour] [ordering]

Register the bot to send the leaderboard into a channel you specify at a specific time every day (of December). By default it will send at midnight EST. You can also change the ordering used by the leaderboard that's sent. This will always send the leaderboard for the current year.

Note: Registering the same channel twice will override the previous registration.

/daily puzzle <channel> [hour]

Register the bot to send the latest puzzle into a channel you specify at a specific time every day (of December). By default it will send at midnight EST. Thsi will always send puzzles from the current year.

Note: Registering the same channel twice will override the previous registration.

/daily unregister leaderboard <channel>

Clear any leaderboard registration bound to this channel.

/daily unregister puzzle <channel>

Clear any puzzle registration bound to this channel.

/status

Displays the current registration and dailies set up in the server (if any).

/help

Get info on how to set up the bot.

Contributing

Issues/Feature Requests

If you find any issues with the bot, or you have a cool feature request, you can create an issue on this repository.

Development

AOC Friend is written in Rust, you can use Cargo to build and run the bot. If you're looking for something to contribute to, consider checking out issues tagged with good first issue.

Make sure you create a .env file with your Discord bot token and run cargo run to start the bot. (or use cargo watch -x run if you have cargo-watch installed to restart when files change) You can then compile an executable with cargo build.

About

Discord bot for advent of code leaderboards πŸŽ– Here to champion your AOC efforts!

Resources

License

Stars

Watchers

Forks

Languages