A judge told a teen to avoid drugs and drink in moderation at a debs ball.
The teen was allowed a change to bail conditions at Naas District Court so that he could attend the event.
The case arose because the teen had been in relationship with a girl which had turned toxic, according to defending solicitor Tim Kennelly and a safety order had been granted to the girl.
Mr Kennelly said the circumstances surrounding this order were entirely disputed by his client.
He also said that the ex girlfriend will not be at the event.
Judge Desmond Zaidan varied the bail conditions and told the teen if any of his friends consume “party drugs” he is to avoid them and he must avoid any drinking to excess.
“Don't get locked or be crawling on your knees at four in the morning,” the judge said.
Referring to the previous incident, Mr Kennelly said there is video available which showed that the teen did nothing.
Nevertheless, he added, this led to him being arrested and spending a night in a cell because no court was available.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.