简体   繁体   English

在Microsoft Bot Framework中,如何发送具有表格格式的味精?

[英]In Microsoft Bot Framework, how do I send a msg with a table format?

I am trying to create a msg to send to the user: 我正在尝试创建一个味精发送给用户:

var msg = new Builder.Message().address(messageAddress);
msg.addAttachment(??);

bot.send(msg, (err)=>{
    if(err){
        reject(err);
    }
    resolve();
});

How do I add a table to my msg? 如何将表格添加到味精中?

Example of a table: 表格示例:

在此处输入图片说明

I was able to this to work based on the answer of stackoverflow.com/a/48160573/2884059 . 我能够根据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);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Microsoft Bot框架中以表格格式显示数据 - How to display data in Table format in microsoft bot framework 如何从Microsoft Bot Framework发送SMS(使用Twilio通道)? - How to send SMS (using Twilio channel) from Microsoft Bot Framework? 如何使用 Microsoft Bot Framework (v3) 最好地模块化对话框? - How do I best modularize dialogs with Microsoft Bot Framework (v3)? 如何使用azure bot框架向skype组发送通知消息? - How do I send out notification messages to skype groups using the azure bot framework? 如何在Bot Framework中实现RecordAction? - How do I implement RecordAction in Bot Framework? BotBuilder for Node.js v3和Microsoft Bot Framework:如何远程触发与用户的新对话的开始? - BotBuilder for Node.js v3 & Microsoft Bot Framework: How do I remotely trigger the start of a new conversation with a user? 如何在使用瀑布对话框(Node js)的同时使用微软机器人框架将英雄卡片发送到 fb 信使 - How to send hero cards to the fb messenger using microsoft bot framework while using waterfall dialogs (Node js) 如何使用Microsoft Bot Framework和Facebook Messenger发送富文本卡? - How to send rich text card using Microsoft Bot Framework and Facebook Messenger? Microsoft Bot Framework-如何从第三方API发送响应 - Microsoft Bot Framework - how to send responses from a 3rd party API 如何在 Microsoft Bot Framework v.3 (Node.js) 中发送欢迎消息并自动加载特定对话框? - How to send welcome message AND load a specific dialog automatically in Microsoft Bot Framework v.3 (Node.js)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM