从Microsoft Bot Framework发送松散附件

时间:2018-05-07 11:16:24

标签: botframework bots slack-api

我正试图像这样从Microsoft Bot框架发送附件(ref)的松弛消息。

0325E180

但它只提供了这个

    var message={
    "text": "I hope the tour went well, Mr. Wonka.",
    "response_type": "in_channel",
    "attachments": [
    {
        "text": "Who wins the lifetime supply of chocolate?",
        "fallback": "You could be telling the computer exactly what it can do with a lifetime supply of chocolate.",
        "color": "#3AA3E3",
        "attachment_type": "default",
        "callback_id": "select_simple_1234",
        "actions": [
            {
                "name": "winners_list",
                "text": "Who should win?",
                "type": "select",
                "data_source": "users"
            }
            ]
        }
    ]
};


session.send(message);

我无法理解这里的问题是什么。

1 个答案:

答案 0 :(得分:1)

终于找到了这样做的方法,我在JSON中缺少“channelData”。

results = []
currentStep = data[0]
for i in range(data.shape[0]):
    pred = simu(currentStep)
    results.append(pred)
    results = [results, pred]  
print (results)  

};