Skip to content

Danyc0/advent-of-code-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

advent-of-code-bot Latest release

A simple Discord bot for Advent Of Code

Dependencies

pip install -U Discord.py python-dotenv

Setup

You'll need to create a discord bot of your own in the Discord Developer Portal with View Channels and Read Messages permissions. It's also handy if you have an empty server (or "guild") for you to test in. This section of this guide may be helpful to set that up.

You'll need to set three environment variables:

  • DISCORD TOKEN -> The Discord token for the bot you created (Available on your bot page in the developer portal)
  • AOC_URL -> The JSON url for your or Advent Of Code private leaderboard (Available by clicking "API" then "JSON" on your private leaderboard page)
  • AOC_COOKIE -> Your Advent Of Code session cookie so the bot has permission to view your private leaderboard (You can extract this from your web browser after signing in to AoC)

You can put these in a .env file in the repo directory as it uses dotenv (See here for usage) so you don't have to keep them in your environment

Contributions

In short, patches welcome.

If you raise a PR, I'll test it, give some feedback and then (eventually) merge it.

This project aims to follow PEP8, but with a line length of 120 characters, and PEP8 Speaks and Travis CI will perk up in the comments of your PR if you go against this.

About

A simple Discord bot for Advent Of Code

Topics

Resources

License

Stars

Watchers

Forks

Languages