mirror of
https://github.com/developersIndia/deviras.git
synced 2024-11-30 02:32:42 +05:30
.. | ||
.env.sample | ||
discord_bot.py | ||
google_calendar.py | ||
main.py | ||
README.md | ||
requirements.txt |
Automation to create events across Google Calendar & Discord
Description
This script creates events across Google Calendar & Discord
First Time Setup
-
Get Python3
sudo apt-get install python3 && python3 --version
-
Install required packages
pip install -r requirements.txt
-
Add respective tokens in the
.env
filecp .sample.env .env
-
DISCORD_BOT_TOKEN
- Get it from Discord Developers portal) (bot must have MANAGE_EVENT & CREATE_EVENT permission)
-
DISCORD_GUILD_ID
- developersIndia's GUID is
1229786646468362260
- developersIndia's GUID is
-
GOOGLE_CALENDAR_ID
- developersIndia calendar is public,
9f1337e4154910eb1bdb3bfac32b88f69546468b1281a6db58f50a909df5049f@group.calendar.google.com
- developersIndia calendar is public,
-
-
Connect Google calendar through Google cloud Console
- 4.1 Create a Project on Google Cloud Console
- Search for calendar API and enable it
- Create Credentials -> OAuth Client ID -> Application type as Desktop
- Download the JSON file
- Rename that JSON file as
credentials.json
and save it to the project directory.
-
python3 main.py
NOTES-
Google authenication is required for the first time.
A file
token.json
will be downloaded automatically, and no web login will be needed afterwards.