I am using custom qna module. In which I am handling event like onload, etc., event in chat widget. Based on that event I will trigger the flow. So in that function I need to event(BotpressEvent) to dialog.processEvent(sessionId, event). How to get event in my function.
Please provide more information like when exactly you want to trigger the event. You can always hook to control the flow or trigger. Try to provide a detailed condition, i can help you after that.
Thanks for the help @swetangkashyap. I used sendEvent and handle that in middleware.