Skip to content

Latest commit

 

History

History
102 lines (63 loc) · 2.38 KB

mediamessagebuilder.md

File metadata and controls

102 lines (63 loc) · 2.38 KB

@aiteq/messenger-bot > MediaMessageBuilder

Class: MediaMessageBuilder

Helps to create a message with media attachment. (see more about content types)

Hierarchy

MessageBuilder

↳ MediaMessageBuilder

Index

Constructors

Methods


Constructors

new MediaMessageBuilder(type)

Creates an instance of MediaMessageBuilder.

Parameters:

Param Type Description
type MediaAttachmentType type of the attachment

Returns: MediaMessageBuilder


Methods

addLocationQuickReply()

Inherited from MessageBuilder

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

Returns: this - for chaining


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

Inherited from MessageBuilder

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


setReusable(reusable)

Controls attachment's reusability.

Parameters:

Param Type Description
reusable boolean if true the attachment will be reused

Returns: this - for chaining


setUrl(url)

Sets a URL of the media file.

Parameters:

Param Type Description
url string URL of the attachment

Returns: this - for chaining