Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:11:10

But if We give him a taste of favor after hardship has touched him, he will surely say, "Bad times have left me." Indeed, he is exultant and boastful -  

But if We cause him to taste prosperity after some misery, ˹such as˺ impoverishment and hardship, that had befallen him, assuredly he will say, ‘The ills, the afflictions, have gone from me’, when he had not anticipated that they would go away; yet still he does not give thanks for this; lo!, he is exultant, wanton, boastful, to people of what he has been given;
القرآن:١١:١٠

وَلَئِنْ أَذَقْنَاهُ نَعْمَاءَ بَعْدَ ضَرَّاءَ مَسَّتْهُ لَيَقُولَنَّ ذَهَبَ السَّيِّئَاتُ عَنِّي ۚ إِنَّهُ لَفَرِحٌ فَخُورٌ  

{ولئن أذقناه نعماءَ بعد ضرَّاء} فقر وشدة {مَسَّته ليقولون ذهب السيئات} المصائب {عني} ولم يتوقع زوالها ولا شكر عليها {إنه لفرح} بطر {فخور} على الناس بما أوتي.