https://discord.gg/botpress logo
window.botpress.on triggers multiple times
# 🤝help
i
I have embedded the bot on my website, window.botpress.on is triggering multiple times. Is there any reason why this is happening. I have attached the code I am using for embedding the bot on my website window.addEventListener('beforeunload', function() { sessionStorage.clear(); }); window.botpress.on("webchat:ready", () => { window.botpress.open(); console.log("bp ready"); }); window.botpress.init({ "botId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "configuration": { "version": "v1", "composerPlaceholder": "Type a food item/ ingredient", "botName": "xxx", "botAvatar": "https://xxxxxxxxxxxxxxxxxxxx", "website": {}, "email": { "title": "tech@xxxx.in", "link": "tech@xxx.in" }, "phone": {}, "termsOfService": {}, "privacyPolicy": {}, "color": "#95DEDB", "variant": "solid", "headerVariant": "solid", "themeMode": "light", "fontFamily": "inter", "radius": 4, "feedbackEnabled": false, "showPoweredBy": false, "footer": "", "additionalStylesheetUrl": "https://xxxxxxxxxxx", "storageLocation": "sessionStorage" }, "clientId": "xxxxxxxxxxxxxxxxxxxxx" });