discord-calendar-bot A Node (Discord.js) based Discord bot for managing Google Calendar Events directly from Discord.
- Node.js and NPM
- Clone the repository.
npm install: Install the dependencies
- 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": ["", ""] } } }
npm start
- The general prefix for the bot commands is
!.
!ping: Tests if the bot is onboard. Bot repliespong.
!list-events: Lists the upcoming 10 events (along with it's ID).
!remove-event _eventID_: Removes an event with eventID as it's ID.- Alias:
!delete-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
- 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.
