How to have the chatbot already open at the html opening


#1

Hello Botpress!

I would like the chatbot window is already open to the opening of the html page.
Without having to click somewhere.
I’m looking at the windows.botpressWebChat.init settings in my script but I can not do it. Do you have a solution?

Thank!


#2

Ok, it was enough to revise the DOM and JS …
Maybe it helps somebody

<body id="opened_bot">

    <script>

        document.body.onload  = () => {
            window.botpressWebChat.sendEvent({ type: 'show' });
        };

    </script>


 <body>