```js window.botpressWebChat.onEvent( ...
# 🌎general
h
Copy code
js
      window.botpressWebChat.onEvent(
        (event) => {
          if (event.type === "UI.OPENED") {
            window.botpressWebChat.sendEvent({ type: "trigger" });
          }
        },
        ["UI.OPENED"]
      );
10 Views