Skip to content

Adding a room to butler bot

languantan edited this page Feb 23, 2019 · 2 revisions

Create associated Google Calendar

  1. Using the Google account USER_ID in your .env file, login to create a New Calendar.
  2. Name the calendar [Level#] . e.g. [L8] Bumblebee.
  3. Click Create. Click on Configure to see details of the calendar.
  4. Make the calendar public.
  5. Share the calendar with the service account SERVICE_ACCT_ID specified in your .env file.
  6. Take note of the Calendar ID: e.g. [email protected].

Add Calendar to Butler-Bot config.

  1. Append the new Calendar ID so butler knows which calendar to update.
#<path-to-butler-bot>/.env

CALENDAR_ID={
    ...
    ,"bb": "[email protected]"
}
  1. Update butler to show new options in the telegram bot
//<path-to-butler-bot>/config/settings.js

const ROOM_CONFIG = {
    roomsOpenForBooking: { // '/book' option in telegram
        'bb': { 'command': '/book_bb', 'text': '[L8] Bumblebee' },
    },
    roomsListing: { // '/any' option in telegram
        'bb': { name: 'Bumblebee [Level 8] (6 pax)', id: 'bb' }
    }
}
  1. Restart the bot.
Clone this wiki locally