google-calendar-discord
google-calendar-discord copied to clipboard
A Discord bot for managing Google Calendar through chat.
Discord Calendar Bot
discord-calendar-bot A Node (Discord.js) based Discord bot for managing Google Calendar Events directly from Discord.
Prerequisites:
- Node.js and NPM
Install
- Clone the repository.
npm install: Install the dependencies
Config
- Follow this guide to create a Discord Bot Creating a Discord Bot and getting a Token
- Inside
/config/create a new filekeys_dev.jsexport and fill the following properties:module.exports = { "token": "", "calendarId": "", "credentials": { "installed": { "client_id": "", "project_id": "", "auth_uri": "", "token_uri": "", "auth_provider_x509_cert_url": "", "client_secret": "", "redirect_uris": ["", ""] } } }
Run the Bot Server:
npm start
- The general prefix for the bot commands is
!.
Commands
!ping: Tests if the bot is onboard. Bot repliespong.
Listing Events:
!list-events: Lists the upcoming 10 events (along with it's ID).
Deleting and Event by ID:
!remove-event _eventID_: Removes an event with eventID as it's ID.- Alias:
!delete-event
Creating a new Event:
-
!create-event name:_eventName_ date:_eventDate_ time:_eventStartTime_ endtime:_eventEndTime_ -
Parameters:
name,date,time,endtime. -
name: Takes in the event name in a string without spaces. -
date: Takes in event date in dd/mm/yyyy format. -
timeandendtime: Takes time in 12h format. -
Example
!create-event name:WebWorkshop date:20/10/2018 time:6PM endtime:9PM
Authenticating your calendar:
- To connect your own Google Calendar with the bot, just type the command
!list-eventsonce. - The bot will come up with an auth link, follow the link to get an Auth Token.
- Now use
!token-key _retrievedTokenKey_to connect and authenticate your calendar.
Example:
