There is no risk here.
Hands don't transmit STDs, including HIV, and touching someone's semen, if that's indeed what it was, won't transmit it either.
STDs are transmitted by oral, vaginal and anal sex. Sometimes, they are transmitted by heavy genital or anal grinding and rubbing, while unclothed, but that's not as common.