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

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

    // Dispatch to your skill's intent handlers
    if ("MyColorIsIntent" === intentName) {
        setColorInSession(intent, session, callback);
    } else if ("WhatsMy" === intentName) {
        withStars(intent, session, callback);
    } else if ("WhatsMyDesc" === intentName) {
        withDesc(intent, session, callback);
    } else if ("WhatsMyColorIntent" === intentName) {
        getColorFromSession(intent, session, callback);
    } else if ("HelpIntent" === intentName) {
        getWelcomeResponse(callback);
    } else {
        throw "Invalid intent";
    }
}
/**
 * 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 ("MyColorIsIntent" === intentName) {
        setColorInSession(intent, session, callback);
    } else if ("WhatsMy" === intentName) {
        withStars(intent, session, callback);
    } else if ("WhatsMyDesc" === intentName) {
        withDesc(intent, session, callback);
    } else if ("WhatsMyColorIntent" === intentName) {
        getColorFromSession(intent, session, callback);
    } else if ("HelpIntent" === intentName) {
        getWelcomeResponse(callback);
    } else {
        throw "Invalid intent";
    }
}
function onIntent ( intentRequest , session , callback ) { console . log ( "onIntent requestId=" + intentRequest . requestId + ", sessionId=" + session . sessionId ) ; var intent = intentRequest . intent , intentName = intentRequest . intent . name ; if ( "MyColorIsIntent" === intentName ) { setColorInSession ( intent , session , callback ) ; } else if ( "WhatsMy" === intentName ) { withStars ( intent , session , callback ) ; } else if ( "WhatsMyDesc" === intentName ) { withDesc ( intent , session , callback ) ; } else if ( "WhatsMyColorIntent" === intentName ) { getColorFromSession ( intent , session , callback ) ; } else if ( "HelpIntent" === intentName ) { getWelcomeResponse ( callback ) ; } else { throw "Invalid intent" ; } }
Called when the user specifies an intent for this skill.
Called when the user specifies an intent for this skill .
// Dispatch to your skill's intent handlers