During the lifetime of the Prophet ﷺ there was a man called ʿAbdullah whose nickname was Donkey, and he used to make Messenger of Allah ﷺ 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." (Using translation from Bukhārī 6780)
أَنَّ رَجُلًا عَلَى عَهْدِ رَسُولِ اللهِ ﷺ كَانَ اسْمُهُ عَبْدُ اللهِ وَكَانَ يُلَقَّبُ حِمَارًا وَكَانَ يُضْحِكُ رَسُولَ اللهِ ﷺ وَكَانَ رَسُولُ اللهِ ﷺ قَدْ جَلَدَهُ فِي الشَّرَابِ فَأُتِيَ بِهِ يَوْمًا فَأَمَرَ بِهِ فَجُلِدَ فَقَالَ رَجُلٌ مِنَ الْقَوْمِ اللهُمَّ الْعَنْهُ مَا أَكْثَرَ مَا يُؤْتَى بِهِ فَقَالَ رَسُولُ اللهِ ﷺ لَا تَلْعَنْهُ فَوَاللهِ مَا عَلِمْتُ إِنَّهُ يُحِبُّ اللهَ وَرَسُولَهُ لَفْظُ حَدِيثِهِمَا سَوَاءٌ