https://github.com/mrhappyma/gcal-discord-sync
google calendar --> discord
https://github.com/mrhappyma/gcal-discord-sync
Last synced: about 1 year ago
JSON representation
google calendar --> discord
- Host: GitHub
- URL: https://github.com/mrhappyma/gcal-discord-sync
- Owner: mrhappyma
- Created: 2023-11-08T02:38:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-06T22:47:19.000Z (over 1 year ago)
- Last Synced: 2025-02-12T03:49:35.471Z (over 1 year ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gcal-discord-sync
syncs upcoming google calendar events in the next 30 days to discord (cron every 3 hours)
a little clunky but does the job
## Setup
[Create a Google Cloud project](https://console.cloud.google.com/), and [enable the calendar API](https://console.cloud.google.com/flows/enableapi?apiid=calendar-json.googleapis.com). [Configure the consent screen](https://console.cloud.google.com/apis/credentials/consent), you don't need any scopes and you should add yourself as a test user. Most of the other fields don't matter. [Create an OAuth client ID](https://console.cloud.google.com/apis/credentials) for a desktop application (or web if you're deploying somewhere. set the redirect url env variable then.). Click OK through most of the prompts, and store your client ID and secret somewhere.
[Create your Discord bot](https://discord.com/developers/applications), and add it to your server.
Set your environment variables:
```
CLIENT_ID = # google client id
PROJECT_ID = # google project id
CLIENT_SECRET = # google client secret
CALENDAR_ID = # source google calendar id
BOT_TOKEN = # discord bot token
GUILD_ID = # target discord guild id
DATABASE_URL = # oh yeah you need a postgres database too
REDIRECT_URL = #optional, helpful if you're deploying it somewhere. no trailing slash.
```
`bun install` `bunx prisma db push` and `bun .` and you're good to go.