A received whisper looks like
@badges=;color=#2E8B57;display-name=BarryKitten;emotes=;message-id=818;thread-id=15185913_91429215;turbo=0;user-id=91429215;user-type= :barrykitten!barrykitten@barrykitten.tmi.twitch.tv WHISPER barrycarlyon :oi
And a PRIVMSG is the same, just swap WHISPER for PRIVMSG
You may need to have enabled the COMMANDS cap
The docs don’t mention specifically. But most people always enabled commands, for extra commands, and tags for extra data.
I predict the commands cap is required to receive whispers, and you didn’t request it
EDIT: Confirmed. the commands capability is required to receive Whispers
After sending PASS and NICK and before joining any channels, send
CAP REQ :twitch.tv/commands
and if you want extra data
CAP REQ :twitch.tv/tags
So
PASS oauth:whatever
NICK whatever
CAP REQ :twitch.tv/commands
CAP REQ :twitch.tv/tags
JOIN #someroom
And away you go (joining optional)
There is a uservoice open for a documentation fix here