Touching never transmits STDs.
To get an STD, you'd have to have done at least one of these things:
Mouth to genital contact (oral sex)
Genital to genital contact while unclothed (rubbing, grinding, penetration)
Genital to anal contact while unclothed (rubbing, grinding, penetration)
Everyone involved would have to be unclothed.
You had no risk at all. Your friends may be awesome, but they don't know about STD risk.