function onIntent(intentRequest, session, callback) {
    console.log("onIntent requestId=" + intentRequest.requestId
        + ", sessionId=" + session.sessionId);

    var intent = intentRequest.intent,
        intentName = intentRequest.intent.name;

    // handle yes/no intent after the user has been prompted
    if (session.attributes && session.attributes.userPromptedToContinue) {
        delete session.attributes.userPromptedToContinue;
        if ("AMAZON.NoIntent" === intentName) {
            handleFinishSessionRequest(intent, session, callback);
        } else if ("AMAZON.YesIntent" === intentName) {
            handleRepeatRequest(intent, session, callback);
        }
    }

    // dispatch custom intents to handlers here
    if ("AnswerIntent" === intentName) {
      console.log("handling AnswerIntent");
        handleAnswerRequest(intent, session, callback);
    } else if ("DontKnowIntent" === intentName) {
        handleAnswerRequest(intent, session, callback);
    } else if ("AMAZON.YesIntent" === intentName) {
        handleAnswerRequest(intent, session, callback);
    } else if ("AMAZON.NoIntent" === intentName) {
        handleAnswerRequest(intent, session, callback);
    } else if ("AMAZON.StartOverIntent" === intentName) {
        getWelcomeResponse(callback);
    } else if ("AMAZON.RepeatIntent" === intentName) {
        handleRepeatRequest(intent, session, callback);
    } else if ("AMAZON.HelpIntent" === intentName) {
        handleGetHelpRequest(intent, session, callback);
    } else if ("AMAZON.StopIntent" === intentName) {
        handleFinishSessionRequest(intent, session, callback);
    } else if ("AMAZON.CancelIntent" === intentName) {
        handleFinishSessionRequest(intent, session, callback);
    } else {
      handleAnswerRequest(intent, session, callback);
    }
}
/**
 * Called when the user specifies an intent for this skill.
 */
Called when the user specifies an intent for this skill.
Called when the user specifies an intent for this skill .
function onIntent(intentRequest, session, callback) {
    console.log("onIntent requestId=" + intentRequest.requestId
        + ", sessionId=" + session.sessionId);
    var intent = intentRequest.intent,
        intentName = intentRequest.intent.name;
    if (session.attributes && session.attributes.userPromptedToContinue) {
        delete session.attributes.userPromptedToContinue;
        if ("AMAZON.NoIntent" === intentName) {
            handleFinishSessionRequest(intent, session, callback);
        } else if ("AMAZON.YesIntent" === intentName) {
            handleRepeatRequest(intent, session, callback);
        }
    }
    if ("AnswerIntent" === intentName) {
      console.log("handling AnswerIntent");
        handleAnswerRequest(intent, session, callback);
    } else if ("DontKnowIntent" === intentName) {
        handleAnswerRequest(intent, session, callback);
    } else if ("AMAZON.YesIntent" === intentName) {
        handleAnswerRequest(intent, session, callback);
    } else if ("AMAZON.NoIntent" === intentName) {
        handleAnswerRequest(intent, session, callback);
    } else if ("AMAZON.StartOverIntent" === intentName) {
        getWelcomeResponse(callback);
    } else if ("AMAZON.RepeatIntent" === intentName) {
        handleRepeatRequest(intent, session, callback);
    } else if ("AMAZON.HelpIntent" === intentName) {
        handleGetHelpRequest(intent, session, callback);
    } else if ("AMAZON.StopIntent" === intentName) {
        handleFinishSessionRequest(intent, session, callback);
    } else if ("AMAZON.CancelIntent" === intentName) {
        handleFinishSessionRequest(intent, session, callback);
    } else {
      handleAnswerRequest(intent, session, callback);
    }
}
function onIntent ( intentRequest , session , callback ) { console . log ( "onIntent requestId=" + intentRequest . requestId + ", sessionId=" + session . sessionId ) ; var intent = intentRequest . intent , intentName = intentRequest . intent . name ; if ( session . attributes && session . attributes . userPromptedToContinue ) { delete session . attributes . userPromptedToContinue ; if ( "AMAZON.NoIntent" === intentName ) { handleFinishSessionRequest ( intent , session , callback ) ; } else if ( "AMAZON.YesIntent" === intentName ) { handleRepeatRequest ( intent , session , callback ) ; } } if ( "AnswerIntent" === intentName ) { console . log ( "handling AnswerIntent" ) ; handleAnswerRequest ( intent , session , callback ) ; } else if ( "DontKnowIntent" === intentName ) { handleAnswerRequest ( intent , session , callback ) ; } else if ( "AMAZON.YesIntent" === intentName ) { handleAnswerRequest ( intent , session , callback ) ; } else if ( "AMAZON.NoIntent" === intentName ) { handleAnswerRequest ( intent , session , callback ) ; } else if ( "AMAZON.StartOverIntent" === intentName ) { getWelcomeResponse ( callback ) ; } else if ( "AMAZON.RepeatIntent" === intentName ) { handleRepeatRequest ( intent , session , callback ) ; } else if ( "AMAZON.HelpIntent" === intentName ) { handleGetHelpRequest ( intent , session , callback ) ; } else if ( "AMAZON.StopIntent" === intentName ) { handleFinishSessionRequest ( intent , session , callback ) ; } else if ( "AMAZON.CancelIntent" === intentName ) { handleFinishSessionRequest ( intent , session , callback ) ; } else { handleAnswerRequest ( intent , session , callback ) ; } }
Called when the user specifies an intent for this skill.
Called when the user specifies an intent for this skill .
// handle yes/no intent after the user has been prompted // dispatch custom intents to handlers here