Skip to content

Instantly share code, notes, and snippets.

@silvolu
Last active March 16, 2018 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silvolu/e52dfc336a9c3aa7a30e4a9af2968844 to your computer and use it in GitHub Desktop.
Save silvolu/e52dfc336a9c3aa7a30e4a9af2968844 to your computer and use it in GitHub Desktop.
Calling ask multiple times
app.intent('tell.greeting', (conv, { color, num }) => {
conv.ask(`Dialogflow likes ${color}`, new Suggestions('Ok', 'Cool'))
conv.ask(new BasicCard({
title: 'Card Title',
image: { // Mostly, provide anonymous Objects
url: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
accessibilityText: 'Google Logo',
},
buttons: new Button({ // Wrapper for complex sub Objects, but can also use Objects when needed
title: 'Button Title',
url: 'https://www.google.com',
}),
display: 'WHITE',
}))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment