@aiteq/messenger-bot > MediaMessageBuilder
Helps to create a message with media attachment. (see more about content types)
↳ MediaMessageBuilder
- addLocationQuickReply()
- addQuickReply(title, id, [data, [imageUrl]])
- setReusable(reusable)
- setUrl(url)
Creates an instance of MediaMessageBuilder.
Parameters:
Param | Type | Description |
---|---|---|
type | MediaAttachmentType | type of the attachment |
Returns: MediaMessageBuilder
Inherited from MessageBuilder
Adds a Quick Reply button to quickly send user's location.
Returns: this
- for chaining
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
Controls attachment's reusability.
Parameters:
Param | Type | Description |
---|---|---|
reusable | boolean |
if true the attachment will be reused |
Returns: this
- for chaining
Sets a URL of the media file.
Parameters:
Param | Type | Description |
---|---|---|
url | string |
URL of the attachment |
Returns: this
- for chaining