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

Popular posts from this blog

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

node.js - Node js - Trying to send POST request, but it is not loading javascript content -