Chat is via IRC/IRC over sockets.
But any attempt by “a bot” to whisper will likely result in failiure.
It’s not designed to be automated/triggered by a bot.
But for completeness
PRIVMSG #channel :.w target message
is the syntax, but you’ll usually find it will fail/be unpredictable in it’s delivery success. (It’s a common issue on the forums/discord and there is no fix)