Detecting incoming raid

So I’ve just started getting into browser extensions and I’ve been wondering if there is a way to detect an incoming raid and react with a “/shoutout raidingStreamer” but also a regular chat message, all in a browser extension?

I’ve found these features in twitch irc and api seperately but I am not sure its possible to combine them.

An incoming raid can be seen via

A shoutout can be created via the API