Files
botpress--botpress/integrations/googlecalendar/src/setup.ts
T
2026-07-13 13:34:48 +08:00

14 lines
536 B
TypeScript

import { GoogleClient } from './google-api/google-client'
import * as bp from '.botpress'
export const register: bp.IntegrationProps['register'] = async ({ logger, ctx, client }) => {
logger.forBot().info('Registering Google Calendar integration')
const googleClient = await GoogleClient.create({ ctx, client })
const summary = await googleClient.getCalendarSummary()
logger.forBot().info(`Successfully connected to Google Calendar: ${summary}`)
}
export const unregister: bp.IntegrationProps['unregister'] = async () => {}