How to catch error or fire callback when creating direct line connection BotFramework-WebChat -
i'm using botframework-webchat create direct line connection bot web page , want have chat pop when conversation has started.
i have variation of code:
<!doctype html> <html> <head> <link href="https://unpkg.com/botframework-webchat/botchat.css" rel="stylesheet" /> </head> <body> <div id="bot"/> <script src="https://unpkg.com/botframework-webchat/botchat.js"> </script> <script> botchat.app({ directline: { secret: direct_line_secret }, user: { id: 'userid' }, bot: { id: 'botid' }, resize: 'detect' }, document.getelementbyid("bot")); </script> </body> </html>
right i'm getting error when bot tries connect , want catch , not show chat box.
is there way can have callback fire when either conversation connects succssfully or there error?
Comments
Post a Comment