The school in Riom was closed as a precaution, its communications official Beatrice Humbert was cited as saying by the France Bleu radio.
Prosecutor Eric Maillaud said the first messages were of pornographic nature and contained threats of rape, while the last one featured "images of jihadists, which can be found anywhere."
He said that terrorism did not appear to be at play.
Investigators reportedly said that the digital trace led them to six students. One was detained on Friday evening and released next morning, while a 15-year-old remains in custody.
France has been on edge after a string of jihadist killings last year. In a particularly gruesome attack, a teacher was beheaded near Paris for showing cartoons of Prophet Muhammad to his students.