Created
May 3, 2016 15:28
-
-
Save joshskeen/459da370f097f02436cb6d21781a4f01 to your computer and use it in GitHub Desktop.
custom utterance support for an alexa-app skill
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
var skillService = new Skill.app('myskill'); | |
var utterancesMethod = skillService.utterances; | |
skillService.utterances = function() { | |
return utterancesMethod().replace(/\{\-\|/g, '{'); | |
}; | |
skillService.intent('airportInfoIntent', { | |
'slots': { | |
'AIRPORTCODE': 'FAACODES' | |
}, | |
'utterances': ['{|flight|airport} {|delay|status} {|info} {|for} {-|AIRPORTCODE}'] | |
}, | |
function(req, res) { | |
var airportCode = req.slot('AIRPORTCODE'); | |
... skill goes here! | |
} | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment