Is Websockets API the recommended way for building bots?

Hi!

I am new here and trying to understand the Mattermost API compared to Slack.

If I want to build a bot that for example does something each time a new user joins a team, is the Websocket API the recommended way?

It feels a bit heavy to have an open websocket connection for something that is triggered quite seldom. I was expecting something like webhooks subscribed to a “new user event” but as far as I can see there is no option to trigger webhooks on events, only on certain keywords that are posted by humans, which defeats the purpose of automation.

Grateful for any comments (preferably by humans and not bots :wink: )