A simple Discord bot that notifies a channel when an event is added, updated, or deleted from a server.
- Discord Bot Token (See: https://discord.com/developers/docs/quick-start/getting-started)
- Discord Channel IDs (Last part of the channel URL, e.g.,
https://discord.com/channels/123/5678
->5678
)ANNOUNCEMENTS_CHANNEL_ID
- Where to send notifications about new, updated, and cancelled events.EVENTS_CHANNEL_ID
- Where to create discussion threads for events ending soon.
Create a .env
file with the following vars:
DISCORD_TOKEN="asdf.ghjkl"
ANNOUNCEMENTS_CHANNEL_ID="1234"
EVENTS_CHANNEL_ID="2345"
Run the bot with the following command:
docker compose up
- Run
fly deploy
after making the code changes. - If two machines end up being deployed, scale down using
fly scale count 1
.
Note: Fly.io only uses the Dockerfile
and ignores the compose.yml
file.
- GitHub Actions are set up to automatically deploy the bot to Fly.io on every push to the
main
branch.