Use @Format

Use formats

Quick response

Show quick answers like this:

@Event('start')
start() {
    @Format('quickReplies', ['yes', 'no'])
    > Continue ?
    Prompt()
    > Ok !
}

Here's how to display a carousel:

@Event('start')
start() {
    @Format('carousel', [
        {
            title: 'TITLE',
            subtitle: 'SUBTITLE',
            image: 'URL_IMAGE',
            buttons: [
                {
                    url: 'URL',
                    title: 'TITLE BUTTON'
                }
            ]
        }
    ])
    > Continue ?
}

Display an image

Send text with buttons

Webview

  1. Create an webviews folder at the root of the project

  2. Put an HTML file (eg webviews/map.html)

Share button

On Facebook Messenger, NewBot ChatBox and Twitter, we can share content with the following code

On Twitter

On Twitter, let's add the tweet property:

  • tweet.text (required): Text in the tweet

  • tweet.url (optional): Url to share

  • tweet.via (optional): User Profile to Share

  • tweet.hashtags (optional): Embed Hashtags

Show a video

Send a contact

Last updated

Was this helpful?