【发布时间】:2019-07-15 22:07:29
【问题描述】:
我的自适应卡发送,并继续对话的下一步(打印一些内容以确保)但由于某种原因,它不会显示任何其他活动,无论是提示、另一张自适应卡还是只是文本。我试过让它们在同一个异步步骤中并一个接一个地发送,但这也不起作用。我没有收到任何错误消息,除了任何“sendActivity”方法之外,该步骤中的所有其他内容都将执行。是否有某种我不知道的约定?
我已将问题范围缩小到 Cortana 频道,因为它在网络聊天和模拟器中都能完美运行
class BookingDialog extends CancelAndHelpDialog {
constructor(id) {
super(id || 'bookingDialog');
this.addDialog(new TextPrompt(TEXT_PROMPT))
.addDialog(new ConfirmPrompt(CONFIRM_PROMPT))
.addDialog(new DateResolverDialog(DATE_RESOLVER_DIALOG))
.addDialog(new WaterfallDialog(WATERFALL_DIALOG, [
this.destinationStep.bind(this),
this.originStep.bind(this),
this.travelDateStep.bind(this),
this.confirmStep.bind(this),
this.finalStep.bind(this)
]));
this.initialDialogId = WATERFALL_DIALOG;
}
/**
* If a destination city has not been provided, prompt for one.
*/
async destinationStep(stepContext) {
console.log("DESTINATION");
var Card = CardFactory.adaptiveCard(WelcomeCard);
const bookingDetails = stepContext.options;
await stepContext.context.sendActivity({ attachments: [Card],attachmentLayout: AttachmentLayoutTypes.Carousel});
return await stepContext.next(bookingDetails);
}
/**
* If an origin city has not been provided, prompt for one.
*/
async originStep(stepContext) {
return await stepContext.context.sendActivity("Would you like to email them?");
}
【问题讨论】:
标签: node.js azure-bot-service cortana-skills-kit