rapid-waiter-6556
08/31/2025, 5:33 PMmodern-fireman-38515
08/31/2025, 5:25 PMthousands-librarian-34989
08/31/2025, 3:22 PMfreezing-zebra-15502
08/31/2025, 1:06 PMblue-book-3899
08/31/2025, 10:50 AMbitter-midnight-73660
08/30/2025, 4:39 PMdazzling-yak-63163
08/29/2025, 8:08 AMfreezing-airport-56398
08/29/2025, 6:10 AMmysterious-fall-54669
08/28/2025, 9:39 PMbetter-crayon-33221
08/28/2025, 9:30 PMlate-monitor-34182
08/28/2025, 12:24 PMred-appointment-79270
08/28/2025, 11:47 AMmysterious-fall-54669
08/27/2025, 9:54 PMincalculable-area-18540
08/27/2025, 4:26 PMbrash-greece-44635
08/27/2025, 4:13 PMgorgeous-animal-82790
08/27/2025, 12:17 PMnarrow-planet-91101
08/27/2025, 9:36 AMcool-horse-31904
08/27/2025, 9:28 AMgreen-salesmen-95102
08/27/2025, 8:59 AMmysterious-fall-54669
08/27/2025, 4:12 AMsilly-soccer-78425
08/26/2025, 7:56 PMpolite-lighter-67824
08/26/2025, 2:03 PMbored-wolf-92614
08/26/2025, 12:14 PMfamous-accountant-8282
08/26/2025, 11:14 AMgentle-policeman-89141
08/26/2025, 9:37 AMwindow.botpress && window.botpress.initialized === true
, then immediately sends an event to the bot on page load. However, even though this condition is met, sending the event sometimes throws an error "`Botpress webchat is not initialized. Please call botpress.init() before sending events.`" suggesting the bot isn't fully ready yet, even though initialized === true (window.botpress.init has been called upstream) and the global functions are available.
Question: Should there be a timing delay between when window.botpress.initialized === true and when the bot can actually receive events (ie is this intended)? Is there a better guard to detect when the bot is actually ready to receive events from my web app?
Potential Solutions I'm Considering:
1. Add a fixed delay (e.g., 500ms-1s) after initialized === true
2. Use a different condition to check if events can be sent
thanks in advance!brave-winter-65930
08/26/2025, 8:42 AMbitter-oil-70438
08/26/2025, 5:03 AMwonderful-minister-91070
08/26/2025, 3:43 AMlively-kitchen-23311
08/25/2025, 9:07 PMstale-controller-12588
08/25/2025, 8:33 PM