UniversalBot class is not a part of the Bot SDK v4.
You can check this link for transition from v3 to v4: https://video2.skills-academy.com/en-us/azure/bot-service/migration/javascript-migration-quickreference?view=azure-bot-service-4.0
The OnEvent method in ActivityHandler might be the one you are looking for: https://video2.skills-academy.com/es-es/javascript/api/botbuilder-core/activityhandler?view=botbuilder-ts-latest#onevent-bothandler-
Additionally, you can refer to this link to check which events are available for which channel: https://video2.skills-academy.com/en-us/azure/bot-service/bot-service-channels-reference?view=azure-bot-service-4.0
Hope this helps!