It takes 10 seconds for it to respond to the first interaction, even though I use a trigger that loads the chatbot when the user accesses the page
This is the trigger code I am using:
window.botpressWebChat.onEvent(
function (ev) {
window.botpressWebChat.sendEvent({
type: "loadConversation",
});
},
["LIFECYCLE.LOADED"]
);
window.addEventListener("message", function (event) {
// console.log(event.data.type);
if (event.data.type == "LIFECYCLE.READY") {
window.botpressWebChat.sendEvent({
type: "trigger",
channel: "web",
payload: {
text: "",
},
});
}
});
https://cdn.discordapp.com/attachments/1142843935455203328/1142843935702659102/Captura_de_tela_2023-08-20_122526.png▾