An example for an incoming whisper is this:
@badges=;color=#D2691E;display-name=FreddyOriginal;emotes=;message-id=27;thread-id=37468248_47772503;turbo=0;user-id=37468248;user-type= :freddyoriginal!freddyoriginal@freddyoriginal.tmi.twitch.tv WHISPER freddybot :test
So the format is like
[tags] :[sender]![sender]@[sender].tmi.twitch.tv WHISPER [recipient] :[message]
You just have to handle it accordingly