Last active
March 16, 2018 16:10
-
-
Save silvolu/8cf364631b28909176595949ceba7c16 to your computer and use it in GitHub Desktop.
Using plugins with Actions on Google client library v2
This file contains 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
const { dialogflow } = require('actions-on-google') | |
const { randomize, Randomization } = require('randomize') | |
const app = dialogflow() | |
.use(randomize) | |
app.intent('tell.greeting', conv => { | |
conv.ask(`The last thing I told you was ${conv.randomize.last}`) | |
conv.ask(new Randomization( | |
'How are you?', | |
'Are you having a good day?', | |
)) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment