我正在尝试创建一个味精以发送给用户:
var msg = new Builder.Message().address(messageAddress);
msg.addAttachment(??);
bot.send(msg, (err)=>{
if(err){
reject(err);
}
resolve();
});
如何将表格添加到味精中?
表格示例:
答案 0 :(得分:1)
我能够根据stackoverflow.com/a/48160573/2884059的答案进行此工作。
var msg: Builder.Message = new Builder.Message(session);
msg.addAttachment({
"contentType": "application/vnd.microsoft.card.adaptive",
"content":{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "ColumnSet",
"columns": columnSet
}
]
}
});
session.endDialog(msg);