【发布时间】:2019-12-06 09:39:47
【问题描述】:
为什么? Amazon Alexa 显示错误“抱歉,我不知道那个。”
是节点js代码 在哪里,alexa 不工作.... 不知道为什么会报错
const spiderman_Handler = {
canHandle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
return request.type === 'IntentRequest' && request.intent.name === 'spiderman' ;
},
handle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
const responseBuilder = handlerInput.responseBuilder;
let sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
let say = 'spiderman bio';
return responseBuilder
.speak(say)
.reprompt('Hey! Want to know about other avengers, It will be fun...' + say)
.getResponse();
},
};
查看此代码
启动编辑器:
const LaunchRequest_Handler = {
canHandle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
return request.type === 'LaunchRequest';
},
handle(handlerInput) {
const responseBuilder = handlerInput.responseBuilder;
let say = 'hello!!! You are here for information about your favorite avenger, Nice to see you here. Which Avenger is your favorite?';
let skillTitle = capitalize(invocationName);
return responseBuilder
.speak(say)
.reprompt('try again, ' + say)
.withStandardCard('Welcome!',
'Hello!\nThis is a card for your skill, ' + skillTitle,
welcomeCardImg.smallImageUrl, welcomeCardImg.largeImageUrl)
.getResponse();
},
};
【问题讨论】:
-
您能解释一下您的问题吗?像这样的问题没有人可以帮助你! -- 添加一些代码等和visit how to ask
-
亚马逊技能和调用必须同名吗?技能名称;我最喜欢的复仇者召唤名称:最喜欢的复仇者
-
启动处理程序:
标签: amazon-web-services alexa-skills-kit alexa-skill