Dara O'Neill (29) was taken into custody and charged because he had a "lot of drink consumed" on his stag night.
He avoided a criminal conviction after he made a €250 charity donation at Blanchardstown District Court.
O'Neill, of Gaelcarraig Park, Newcastle, Galway, pleaded guilty to public drunkenness at Citywest Hotel, Saggart on October 13, 2010.
A charge of causing a breach of the peace was withdrawn.
The prosecuting garda told the court the defendant was "in a very drunken state and had a lot of drink consumed".
He was arrested and brought to Clondalkin Garda Station. He had no previous convictions.
The incident happened on the defendant's stag night and he had since married, his solicitor, Ms Buckley said. He was in employment and had €100 with him to offer the court.
"You know that isn't enough", Judge Hugh O'Donnell said, telling Ms Buckley the defendant would need to produce €250.
"That is actually in court," she replied. "He was negotiating, was he?" the judge asked.
He struck the charge out after the money was paid to the Capuchin Day Centre.