iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 18
0
AI & Machine Learning

Microsoft Bot Framework 30天上手 + 自幹 Line Builder 串接 + Line Bot Demo系列 第 18

Intercept messages

如果有掛  https://www.getbotimize.com/ 這一類的分析套件,就可以將其掛在這裡了。


bot.use({
    receive: function (event, next) {
        logUserConversation(event);
        next();
    },
    send: function (event, next) {
        logUserConversation(event);
        next();
    }
});

const logUserConversation = (event) => {
    console.log('message: ' + event.text + ', user: ' + event.address.user.name);
};

上一篇
Add suggested actions to messages
下一篇
Manage state data 補充 mongo storage
系列文
Microsoft Bot Framework 30天上手 + 自幹 Line Builder 串接 + Line Bot Demo30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言