Я создаю специальный навык для Alexa. Я хочу закрыть сеанс AMAZON.StopIntent
. Как я могу добиться этого с помощью кода ниже?
const ExitHandler = {
canHandle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
return request.type === 'IntentRequest'
&& (request.intent.name === 'AMAZON.StopIntent');
},
handle(handlerInput) {
return handlerInput.responseBuilder
.speak('bye!')
.reprompt('bye!')
.getResponse();
},
};