Narrated `Umar bin Al-Khattab
During the lifetime of the Prophet (ﷺ) there was a man called `Abdullah whose nickname was Donkey, and he used to make Allah's Messenger (ﷺ) laugh. The Prophet (ﷺ) lashed him because of drinking (alcohol). And one-day he was brought to the Prophet (ﷺ) on the same charge and was lashed. On that, a man among the people said, "O Allah, curse him ! How frequently he has been brought (to the Prophet (ﷺ) on such a charge)!" The Prophet (ﷺ) said, "Do not curse him, for by Allah, I know for he loves Allah and His Apostle."
Narrated Abu Huraira
A drunk was brought to the Prophet (ﷺ) and he ordered him to be beaten (lashed). Some of us beat him with our hands, and some with their shoes, and some with their garments (twisted in the form of a lash). When that drunk had left, a man said, "What is wrong with him? May Allah disgrace him!" Allah's Messenger (ﷺ) said, "Do not help Satan against your (Muslim) brother."