Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UniversalCallBot

Manages your bots conversations with users across multiple channels.

Hierarchy

  • UniversalCallBot

Index

Constructors

Methods

Constructors

constructor

  • Creates a new instance of the UniversalCallBot.

    Parameters

    • connector: ICallConnector

      (Optional) the default connector to use for requests. If there's not a more specific connector registered for a channel then this connector will be used./**

    • Optional settings: IUniversalCallBotSettings

      (Optional) settings to configure the bot with.

    Returns UniversalCallBot

Methods

dialog

  • Registers or returns a dialog for the bot.

    Parameters

    • id: string

      Unique ID of the dialog being regsitered or retrieved.

    • Optional dialog: Dialog | IDialogWaterfallStep[] | IDialogWaterfallStep

      (Optional) dialog or waterfall to register.

      • dialog: {Dialog} - Dialog to add.
      • dialog: {IDialogWaterfallStep[]} - Waterfall of steps to execute. See IDialogWaterfallStep for details.
      • dialog: {IDialogWaterfallStep} - Single step waterfall. Calling a built-in prompt or starting a new dialog will result in the current dialog ending upon completion of the child prompt/dialog.

    Returns Dialog

get

  • get(name: string): any

library

  • Registers or returns a library dependency.

    Parameters

    • lib: Library | string
      • lib: {Library} - Library to register as a dependency.
      • lib: {string} - Unique name of the library to lookup. All dependencies will be searched as well.

    Returns Library

on

  • on(event: string, listener: Function): void
  • Registers an event listener.

    Parameters

    • event: string

      Name of the event. Event types:

    • listener: Function

      Function to invoke.

    Returns void

set

use

  • Installs middleware for the bot. Middleware lets you intercept incoming and outgoing events/messages.

    Parameters

    • Rest ...args: IMiddlewareMap[]

      One or more sets of middleware hooks to install.

    Returns UniversalCallBot

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method