Skip to content

Latest commit

 

History

History
57 lines (34 loc) · 1.39 KB

messagebuilder.md

File metadata and controls

57 lines (34 loc) · 1.39 KB

@aiteq/messenger-bot > MessageBuilder

Class: MessageBuilder

An abstract parent class for message builders. The message builders help to construct complex messages to be send (e.g. template messages).

Type parameters

Hierarchy

Builder

↳ MessageBuilder

TextMessageBuilder

MediaMessageBuilder

TemplateMessageBuilder

Index

Methods


Methods

addLocationQuickReply()

Adds a Quick Reply button to quickly send user's location.

Returns: this - for chaining


addQuickReply(title, id, [data, [imageUrl]])

Adds a Quick Reply button to the message.

Parameters:

Param Type Description
title string title of the Quick Reply
id string ID of the button (required for proper generation of webhook events)
data any optional data to be send when the user click on the Quick Reply button
imageUrl string URL of optional image

Returns: this - for chaining