https://discord.gg/botpress logo
has the botpress webchat version been changed?
# 🤝help
g
I’m integrating Botpress event listeners into my web app. I have been doing this:
window.botpress.on('conversation', (conversationId) => { … })
but it looks like the docs have been updated and now reference
window.botpressWebChat
. I can’t find any information on these new event listeners. Does anyone know where I can find a complete list of the current listeners? Also, will my existing
window.botpress.on(...)
calls still work, even after the listener API was updated?
w
Doc is rewriting here the archive copy https://botpress-docs.readme.io/
o
Last I checked window.botpressWebChat is webchat v1 (currently deprecated). Whereas window.botpress.on is webchat v2 (we are currently on v2.4)
Therefore, to answer your question, it should still work as that is the current version we are on. Im not sure if maybe there were changes in the import of the docs. I'll have to take a look
Your current event listeners should work however!
g
thank you @orange-egg-72655 legend as always. Can i ask whether you sometimes see html as output from autonomous nodes, and have you any methods of mitigating it. (i have already prompted the node specifically to never output html only markdown) but sometimes the html slips through. I may make another help ticket about this. The following is an output from an autonomous node:
Copy code
Here are the electric cars we have available:

<ul>
    <li>
      **BMW i5**: Lease price starts from £487.79. It features an automatic gearbox, all-wheel drive, and an impressive acceleration of 3.8 seconds. The battery range is approximately 331.2 miles. 
    </li>
    <li>
      **Polestar 4**: Lease price starts from £438.31. It features an automatic gearbox, rear-wheel drive, and a battery range of 385 miles. 
    </li>
  </ul>
Also, related to this, the window.botpressWebChat came up in the new documentation. I couldnt find the old docs (with window.botpress.on) anywhere, thankfully @white-nest-40686 sent me an archive copy!
2 Views