我正在尝试创建 MessageFactory 或任何类型的 Message ,这些附件都带有带有 title 和每张卡的按钮,希望获得帮助。
var attachments = []
clients.forEach((client)=> {
if(client === selectedClient){
numberOfPlans(client)
}
}
function numberOfPlans(client){
while(client.plans[i] !== undefined){
const card = client.plans[i]
**This does not work**
// const card = MessageFactory.carousel(
// CardFactory.heroCard(dc)
// .title(client["Valued Entry Number "+i+" Description"])
// .button("Select")
// );
**This is what I'm trying to do**
attachments.push(card)
i++;
}
}
const message = MessageFactory.suggestedActions(carePlansCards);
**This does not work**
// const message = MessageFactory.carousel([{
// text: "IT WORKS",
// actions: carePlansCards
// }])
await dc.prompt(CSELECT_PLAN, message)
return dc.endDialog()
如您在屏幕快照中所见,我能够仅使用按钮上的标题来创建卡片,但它已被删除。