Created
January 7, 2018 13:05
-
-
Save marcorei/0f9d555232a67edc54947d93b4d60d5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buildOptionItem(app: DialogflowApp, aString: string): Responses.OptionItem { | |
// Provide a key which is unique to each option. | |
// And synonyms that the user can say alternativly to the title | |
return app.buildOptionItem(`KEY_${aString}`, aString) | |
.setTitle(`Option ${aString}`) | |
// Description and image are optional. | |
.setDescription(`Description for ${aString}`) | |
.setImage('https://example.com/image.jpg', 'An image') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment