Growing peppers

I grow beautiful bell peppers, shepherd peppers and chilli peppers. Unfortunately when I cut them open they are full of worms. This is heartbreaking. Is there some kind os spray that I can use to prevent or eliminate the infestation…