res.say doesn't work for intentRequest
See original GitHub issueapp.intent('tfc', {
'slots': {
'phonenumber': 'AMAZON.NUMBER'
},
'utterances': ['{|my} {|contact number} {|phone number} {|number} {|is} {-|phonenumber}']
}, (req, res)=>{
let number - req.slot('phonenumber');
let login = new TfcLogin();
login.sendOtp(number).then((data)=>{
res.say('Enter the otp received on your phone').shouldEndSession(false);
}).catch((error)=>{
res.say(`${error.message}`).prompt('What is your registered contact number').shouldEndSession(false);
})
})
This is a simple intent request, but it isn’t working the way it should. TfcLogin
is a class, and whole code is working fine, if there is an error it falls in the catch
block, but res.say
isn’t working as expected. Here’s the response that I received
{
"version": "1.0",
"response": {
"directives": [],
"shouldEndSession": true
},
"sessionAttributes": {},
"dummy": "text"
}
What could be the reason for this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Request Types Reference (LaunchRequest ...
Your service receives a SessionEndedRequest when a currently open session is closed for one of the following reasons: The user says "exit" or...
Read more >node.js - Amazon Alexa "AskSdk.RequestEnvelopeUtils Error ...
I fixed my problem because I used the playBehavior ENQUEUE instead of REPLACE_ALL , because ENQUEUE expects a token because if it doesn't...
Read more >alexa-parrot/README.md at master · dblock/alexa-parrot · GitHub
A simple parroting skill for Alexa to grasp basics of creating alexa skills with Alexa-App library and deploying to AWS Lambda Functions. Requires...
Read more >alexa-app.session JavaScript and Node.js code examples | Tabnine
describe("intent request with malformed session", function() { var mockRequest = mockHelper.load("intent_request_malformed_session.json"); it("responds a ...
Read more >My Alexa Skill workflow (Part 1/2) | by Simon Fletcher | Medium
res.say(prompt).reprompt(prompt).shouldEndSession(false); });. Next, we want to handle an IntentRequest sent from the Alexa platform.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, you must return a
Promise
from the function. Tryreturn login.sendOtp(number)....
to begin with?send in promise like this return(Promise.then((res)=> response.say(res.data.name).send())