Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Action

An action that enables interactivity with the Chat card. The Action does not happen directly on the client but rather invokes an Apps Script callback function with optional parameters.

Hierarchy

  • Action

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

action

action: { actionMethodName: string; parameters: Parameter[] } = ...

Type declaration

  • actionMethodName: string
  • parameters: Parameter[]

Methods

addParameter

  • addParameter(parameter: Parameter): Action
  • Add a key value parameter to add special-case clicks to different buttons for your bot.

    Parameters

    • parameter: Parameter

      key/value { "key": "cardId", "value": "123abc" }

    Returns Action

    this object, for chaining

setActionMethodName

  • setActionMethodName(actionMethodName: string): Action
  • Parameters

    • actionMethodName: string

      Apps Scripts bots must specify action.actionMethodName. To support interactive cards, bots must also define an onClickCard(event) method on the server to handle user clicks. This method will receive a callback when the user clicks the card.

    Returns Action

    this object, for chaining

Generated using TypeDoc