UNPKG

@wearekadence/botbuilder-adapter-twilio-sms

Version:
33 lines (32 loc) 1.21 kB
/** * @module botbuilder-adapter-twilio-sms */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { BotWorker } from '@wearekadence/botkit'; import * as Twilio from 'twilio'; /** * This is a specialized version of [Botkit's core BotWorker class](core.md#BotWorker) that includes additional methods for interacting with Twilio SMS. * It includes all functionality from the base class, as well as the extension methods below. * * When using the TwilioAdapter with Botkit, all `bot` objects passed to handler functions will include these extensions. */ export declare class TwilioBotWorker extends BotWorker { /** * A copy of the Twilio API client. */ api: Twilio.Twilio; /** * Start a conversation with a given user identified by their phone number. Useful for sending pro-active messages: * * ```javascript * let bot = await controller.spawn(); * await bot.startConversationWithUser(MY_PHONE_NUMBER); * await bot.send('An important update!'); * ``` * * @param userId A phone number in the form +1XXXYYYZZZZ */ startConversationWithUser(userId: string): Promise<any>; }