This is a discord bot for helping with puzzle hunts, with Google Drive integration. Runs on python 3.8+ (probably, tested on 3.11)
- Install dependencies from
requirements.txt
, eg by runningpip install -r requirements.txt
. - Create a Google Drive API project, obtain
client_secrets.json
and place it in the working directory (see PyDrive quickstart). - Create an application in Discord Developer Portal and obtain the application token, to include in
config.ini
on the next step. - Copy
example-config.ini
toconfig.ini
and fill in the fields with appropriate data:[discord] > token
: discord application token from the previous step[discord] > guild id
: id for the discord server that the bot will to run on (open discord in browser and look at the url or use Developer Mode)[Google Drive] > root folder
: name of the folder to store the spreadsheets in a Google Drive the bot will have access to[general] > rounds <true|false>
: whether to organize by rounds (default: false)
- Run
bot.py
, either by making it executable or withpython3 bot.py
. - If it outputs a link or opens your browser then follow that link to authenticate the bot and give it the required permissions. Most of these should be one time, on first run.
- On later runs, if need to reauthorize to google drive then first revoke access and then reauthorize, see Google api refresh_token null and how to refresh access token
- Rerun the bot if it crashes.