Any PHP library out there who can use bots + web sockets?

Was a bit fan of Slacks realtime data and used it in php to create an awesome lunch trail bot. Now I’d like to do the same in mm.

But it’s not clear what do use. I have the “official” API
php-mattermost-driver but I’m just unsure if I can use it.

I want to listen to a channel for certain words and the bot should act. But it that even possible as most of these seems to be around the rest api?

I’m used to finding at least some documentation but here it’s nothing. It’s not even clear to be that I can use a bot token to authenticate to a web socket connection.

Anyone done something similar?