2017-05-25 166 views
0

试图使用BotKit对第三方集成进行自定义集成响应。第三方集成仅通过回复进行通信,如attachmentsHowdyAI的Botkit可以监听附件内容吗?

有没有办法让我的自定义集成“听到”附件?如果它已经存在,我一直无法在文档中找到它。

+0

我没有找到与此相关的一个问题。 https://github.com/howdyai/botkit/issues/46 我会看看,如果这是功能 –

回答

0

答案出现在comments on the issue

本质:

controller.on('bot_message', function(bot, message) { 
    console.log('message.attachments: ' + message.attachments); 
    var attachment = message.attachments[0]; 
    console.log('attachments.title: ' + attachment.title); 
    console.log('attachments.text: ' + attachment.text); 
}); 
相关问题