Discord bot that announces upcoming sessions on the Additional Fun & Educational Events calendar!
Inspired by the Hack Quarantine Calendar Bot used to automatically make announcements from their calendar.
Make sure to set your Google Calendar to the same timezone as the Discord Bot. In this case, it's the timezone of the Compute Engine on Google Cloud. TODO document makefile and build-config.sh
-
save service account creds in
credentials.json
-
create a list of Discord roles to be mentioned in
roles.json
[
"742344995412347915",
"742344995412347916",
"742344995412347917"
]
- set environment variables
export GUILD_ID=123456789101112131 # your guild
export EVENTS_ID=123456789101112132 # the channel to post announcements in
export TOKEN=my.discord.token # your bots token
export [email protected] # your calendars ID
export UPDATE_INTERVAL=60 # check for events and update status every minute
This can also be defined At the top of the Makefile in the form: GUILD_ID := 123456789101112131
To run the bot using your current python use:
make run
To build, run and view the logs, simply run:
make docker-log
Alternatively build and run with docker-compose
:
docker-compose build
docker-compose up -d
docker-compose logs -f