Last active
July 13, 2019 07:43
-
-
Save anchetaWern/0d8958aa9d3980ff16697470d1648ed1 to your computer and use it in GitHub Desktop.
Pokedex Bot: extract Dialogflow parameters in server.js
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 { intent, parameters, outputContexts, queryText } = req.body.queryResult; | |
const pokemon = (parameters.pokemon) ? parameters.pokemon.toLowerCase().replace('.', '-').replace(' ', '').replace("'", "") : ''; | |
const specs = parameters.specs; | |
const get_type_effectiveness = (parameters.type_effectiveness) ? true : false; | |
let response_obj = {}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment