A drug dealer who was arrested after accidentally texting drug prices to a police officer in the U.K. has pleaded guilty to drug possession, according to a Monday report.

Martynas Benosenko, 22, was arrested at a festival near Leeds in August 2018 after he was caught with nearly $4,700 worth of cocaine, MDMA and cannabis, Leeds Lives reported.

Martynas Benosenko has been jailed for three years and four months

The Lithuanian national had also accidentally sent his drug prices to a police officer via text. Prosecutors said a security guard at the festival had spotted Benosenko smoking cannabis in a tent before he was arrested.

Leeds Crown Court heard arguments that Benosenko had lost his job as a chef at TGI Friday’s shortly before the festival and needed money.

“He decided to go sell drugs at Leeds Festival while completely high,” said Christopher Dunn, Benosenko’s defense. “He thought it would be a good idea, not having a clue what he was getting himself into.”

A judge admonished Benosenko for making money at the expense of young people at the festival who are “vulnerable to people like you preying on their vulnerability and stupidity.”

GERMAN NURSE SUSPECTED OF DRUGGING 5 INFANTS WITH MORPHINE IS FREED AFTER TESTING MIX-UP

“There is not a single festival of this size that goes on without young people collapsing, becoming seriously ill and, in some circumstances, dying,” Joanne Kidd said. “The fact that you chose this venue to ply your trade is an aggravating feature.”

CLICK HERE TO GET THE FOX NEWS APP

Benosenko pleaded guilty to two offenses of possession of a class A drug with intent to supply and possession of cannabis. He has been sentenced to three years and four months in jail.