GFSC Community Discord Bot.
- Discord → Google Calendar Sync: Automatically syncs Discord scheduled events (including recurring events) to a shared Google Calendar
- RSS Salon: Polls RSS feeds and posts new entries to a Discord channel. Community members can add feeds via PR to
config/rss-feeds.txt
- Create a new application at Discord Developer Portal
- Go to Bot → Reset Token → copy the token
- Enable these Privileged Gateway Intents:
- None required (GuildScheduledEvents is not privileged)
- Go to OAuth2 → URL Generator:
- Scopes:
bot,applications.commands - Bot Permissions:
View Channels,Manage Events
- Scopes:
- Use the generated URL to invite the bot to your server
- Create a project in Google Cloud Console
- Enable the Google Calendar API
- Create a Service Account (IAM → Service Accounts → Create)
- Create a key for the service account (JSON format)
- Base64-encode the JSON key:
base64 -i credentials.json - Share your target calendar with the service account email (found in the JSON)
Copy .env.example to .env and fill in:
DISCORD_BOT_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_server_id
GOOGLE_SERVICE_ACCOUNT_KEY=base64_encoded_json
GOOGLE_CALENDAR_ID=calendar_id@group.calendar.google.com
# RSS Salon (optional)
RSS_CHANNEL_ID=discord_channel_id
RSS_FEEDS_PATH=./config/rss-feeds.txt
RSS_POLL_INTERVAL_MINUTES=5
npm install
npm test
npm run dev- Edit
config/deploy.ymlwith your server details - Set GitHub Secrets:
SSH_PRIVATE_KEY- SSH key for your serverDISCORD_BOT_TOKENDISCORD_GUILD_IDGOOGLE_SERVICE_ACCOUNT_KEYGOOGLE_CALENDAR_ID
- Push to
mainbranch
/sync-events- Manually sync all existing Discord events to Google Calendar/cleanup-calendar- Remove orphaned Google Calendar events not linked to Discord/list-mappings- List all Discord → Google Calendar event mappings/list-feeds- List configured RSS feeds/refresh-feeds- Manually check RSS feeds for new entries
The bot listens for Discord Gateway events:
GuildScheduledEventCreate→ Creates a Google Calendar eventGuildScheduledEventUpdate→ Updates the corresponding calendar eventGuildScheduledEventDelete→ Deletes the calendar event
Event mappings (Discord ID ↔ Google Calendar ID) are stored in a SQLite database.
Recurring events are converted from Discord's recurrence rule format to Google Calendar's RRULE format.
The bot polls RSS feeds every 5 minutes (configurable) and posts new entries to a Discord channel as embeds. Only entries from the last 60 days are posted to avoid flooding on initial setup.
To add a feed, submit a PR adding the feed URL to config/rss-feeds.txt (one URL per line).