The judge said the gravity of the offending was "low to moderate" and that that was outweighed by the potential consequences of a conviction.
The man's life would be "totally ruined", he said.
The defendant met the older victim on an internet chatroom when the boy was 15, and their interactions soon moved to social media.
He requested the teen send him lewd photos of himself and the pair spent three months exchanging explicit images.
By January 2018, the defendant started demanding the victim lose weight.
If he did not, photos would be shared with other people, the man threatened.
And he followed through on the threat, sending images of the victim's genitalia to two friends.
The other set of offences occurred when a 14-year-old, who shared the interests of the defendant, went to his home.
First, the man put his hands on the victim's crotch while they watched a movie.
He stopped when told to by the teenager but later, he tried to put his hand down the back of the boy's jeans.
The act was repeated even as the defendant drove the victim home.
"Please stop," he repeated, until he was finally dropped off.
That victim read a statement to the court, detailing how his life "crashed" after he was molested by the defendant.
"It was like these voices playing on repeat and I couldn't and still can't get them to leave me alone," he said.
"The feel of what you did to me sticks to me as a part of me."
Close to other older males, the victim reported feeling "petrified" the same thing might happen again.
While the victim initially self-harmed and blamed himself, he told the court he had gained some clarity.
"You've messed with the wrong person ... now I'm strong and I feel like I can overcome anything," he said.
He hoped it would be the last day he ever saw the defendant.
"Actions have consequences," he said.
Counsel Anne Stevens QC said her client had apologised to both victims, had done community work for an environmental group and had emotional harm reparation to offer.
The defendant's parents wrote a letter to the court saying their son had changed over the past year.
They said he now talked openly with them and they believed he had learned from his mistakes.
A psychologist assessed the defendant as being a very low risk of reoffending.
The discharge without conviction was granted on the condition he pay both victims $2500.
Judge Phillips told the second victim, seated in court, that the discharge was not intended to minimise the consequences he had suffered.