Open new adaptive card with an adaptive card nodeJs

时间:2017-10-12 09:55:33

标签: node.js botframework adaptive-cards

I'm trying to make use of the adaptive cards in bot framework. I was wondering if i could call a new adaptive card in the conversation using a button in another adaptive card? So not an inline adaptive card, but a NEW adaptive card in the conversation.

How is this possible, maybe some example code? I can't seem to find a solution?

Many thanks!

1 个答案:

答案 0 :(得分:0)

此处有一个自适应卡节点示例,可能会有所帮助:https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/app.js

酒店搜索卡使用 Action.Submit 类型的操作,并演示了一种在点击按钮时如何使用自适应卡进行响应的方法:

'actions': [
    {
        'type': 'Action.Submit',
        'title': 'Search',
        'speak': '<s>Search</s>',
        'data': {
            'type': 'hotelSearch'
        }
    }
]

使用代码在这里回复: https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/app.js#L177

回应: https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/cards-AdaptiveCards/hotels-search.js