Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Payload

Create and parse rich message content.

Hierarchy

  • Payload

Implements

Indexable

[key: string]: any

Create and parse rich message content.

Index

Constructors

constructor

  • Create a new payload instance. Create a new payload instance.

    Parameters

    Returns Payload

Properties

Optional actions

actions: IAction[]

Optional attachments

attachments: IAttachment[]

Optional quickReplies

quickReplies: IQuickReply[]

Methods

action

  • Add an action button to the payload.

    Parameters

    Returns this

attachment

  • Add an attachment to the payload.

    Parameters

    Returns this

custom

  • custom(object: any): this
  • Add any custom attributes / JSON to a message.

    Parameters

    • object: any

    Returns this

quickReply

  • Add a quick reply button to the payload.

    Parameters

    Returns this

toObject

  • Get the payload as a plain object.

    Returns IPayload

Generated using TypeDoc