如何从自适应卡中获取数据并基于其发送响应?

时间:2020-09-29 10:53:16

标签: node.js botframework

我用两个步骤创建了一个瀑布对话框。当我单击卡时,它将数据显示为来自用户的消息。如何捕获此数据而不将其作为消息从用户发送,然后如何根据数据在步骤2中进行sendActivity。

我的卡1数据:

        "selectAction": {
        "type": "Action.Submit",
        "title": "TITLE",
        "data": "DATA"
    }

瀑布步骤-

async Step1(stepContext) {
    await stepContext.context.sendActivity({
        attachments: [
            this.createAdaptiveCard1(),
            this.createAdaptiveCard2(),
            this.createAdaptiveCard3()


        ],
        attachmentLayout: AttachmentLayoutTypes.Carousel
    });
     return await stepContext.prompt('somePrompt','Choose an option');

    
}
async Step2(stepContext) {
//capture data value and do something
}

0 个答案:

没有答案