Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CardAction

Builder class to simplify adding actions to a card.

Hierarchy

  • CardAction

Implements

Index

Constructors

constructor

Methods

image

  • For buttons an image to include next to the buttons label. Not supported by all channels.

    Parameters

    • url: string

    Returns CardAction

title

  • Title of the action. For buttons this will be the label of the button. For tap actions this may be used for accesibility purposes or shown on hover.

    Parameters

    Returns CardAction

toAction

type

value

Static call

  • Places a call to a phone number. The should include country code in +44/+1 format for Skype calls.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • number: string
    • Optional title: TextType

    Returns CardAction

Static dialogAction

  • Binds a button or tap action to a named action registered for a dialog or globally off the bot.

    Can be used anywhere a postBack is valid. You may also statically bind a button to an action for something like Facebooks Persistent Menus. The payload for the button should be action?<action> for actions without data or action?<action>=<data> for actions with data.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • action: string

      Name of the action to invoke when tapped.

    • Optional data: string

      (Optional) data to pass to the action when invoked. The IRecognizeActionResult.data property can be used to access this data. If using beginDialogAction() this value will be passed as part of the dialogs initial arguments.

    • Optional title: TextType

      (Optional) title to assign when binding the action to a button.

    Returns CardAction

Static downloadFile

  • Downloads the specified file to the users device. Not currently supported for Skype.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • url: string
    • Optional title: TextType

    Returns CardAction

Static imBack

  • Sends a message to the bot for processing in a way that's visible to all members of the conversation. For some channels this may get mapped to a postBack.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • msg: string
    • Optional title: TextType

    Returns CardAction

Static openUrl

  • Opens the specified URL.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • url: string
    • Optional title: TextType

    Returns CardAction

Static playAudio

  • Plays the specified audio file to the user. Not currently supported for Skype.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • url: string
    • Optional title: TextType

    Returns CardAction

Static playVideo

  • Plays the specified video to the user. Not currently supported for Skype.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • url: string
    • Optional title: TextType

    Returns CardAction

Static postBack

  • Sends a message to the bot for processing in a way that's hidden from all members of the conversation. For some channels this may get mapped to a imBack.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • msg: string
    • Optional title: TextType

    Returns CardAction

Static showImage

  • Opens the specified image in a native image viewer. For Skype only valid as a tap action on a CardImage.

    Parameters

    • session: Session

      (Optional) Current session object for the conversation. If specified will be used to localize titles.

    • url: string
    • Optional title: TextType

    Returns CardAction

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