I've tried to include something like:
window.botpressWebChat.onEvent(
function (event) {
if (event.type === 'LIFECYCLE.LOADED') {
window.botpressWebChat.sendEvent({ type: 'show' })
}
if (event.type === 'MESSAGE.SENT') {
console.log('message sent');
}
},
['LIFECYCLE.LOADED'],
);
but the MESSAGE.SENT event doesn't seem to fire.