我在轮播卡中有问题,第一次点击时无法正常工作。
我也为“ actions_intent_OPTION”添加了一个意图,但它也不能与我一起使用,我参考了文档,但是在处理我需要的简单响应时,我单击卡片以获取钥匙并显示意图并不是一件简单的事情响应。
任何人都可以帮助我。谢谢
app.intent('action.intent.OPTIONS', async (conv, option, params) => {
console.info('option --------------- ', option, typeof option);
const str = option.toString()
switch (str) {
case 'The Exams Dates': {
triggerExamsDateIntent(conv);
break;
}
case 'Entrance exam': {
triggerEntranceExamIntent(conv);
break;
}
case 'majors': {
triggerMajorsIntent(conv);
break;
}
case 'Courses': {
triggerCoursesIntent(conv);
break;
}
case 'Ask Question': {
triggerAskQuestionIntent(conv);
break;
}
case 'MobileDevelopment': {
triggerMobileDevelopmentIntent(conv);
break;
}
case 'Partial': {
triggerPartialIntent(conv);
break;
}
case 'Entrance Exam Sample': {
triggerSampleExamIntent(conv);
break;
}
case 'Dont Have Questions': {
triggerDontHaveQuestionsIntent(conv);
break;
}
case 'Exams Schedule': {
triggerExamsScheduleIntent(conv);
break;
}
case 'Final': {
triggerFinalIntent(conv);
break;
}
case 'second round': {
triggersecondroundIntent(conv);
break;
}
case 'MIS': {
triggerMISIntent(conv);
break;
}
case 'Banking': {
triggerBankingIntent(conv);
break;
}
case 'Marketing': {
triggerMarketingIntent(conv);
break;
}
case 'Accounting': {
triggerAccountingIntent(conv);
break;
}
case 'Management': {
triggerManagementIntent(conv);
break;
}
case 'About Entrance Exam': {
triggerAboutEntranceExamIntent(conv);
break;
}
case 'About Exam': {
triggerAboutExamIntent(conv);
break;
}
case 'Required Documents': {
triggerRequiredDocumentsIntent(conv);
break;
}
case 'Partial Schedule': {
triggerScheduleIntent(conv, 'Partial Schedule');
break;
}
case 'Final Schedule': {
triggerScheduleIntent(conv, 'Final Schedule');
break;
}
case 'Second Schedule': {
triggerScheduleIntent(conv, 'Second Schedule');
break;
}
default: {
conv.ask('Response not set for this item! \n please set response first');
}
}
});
答案 0 :(得分:0)
在params
信息之前传递option
参数。所以应该是
app.intent('action.intent.OPTIONS', async (conv, params, option) => {