Hadith 1807
Abu Hurairah (May Allah be pleased with him) said:
وعن أبي هريرة رضي الله عنه عن النبي صلى الله عليه وسلم قال: “من حلف فقال في حلفه: باللات والعزى، فليقل: لا إله إلا الله، ومن قال لصاحبه: تعالى أقامرك فليتصدق" ((متفق عليه)).
The Prophet (ﷺ) said, "He who takes an oath and involuntarily says: 'By Al-Lat and Al-'Uzza' should at once affirm: 'La ilaha illallah (there is no true god except Allah)', and he who says to his companion: 'Come let's gamble' should make expiation by giving something in charity." [Al-Bukhari and Muslim].
In plain words
The Prophet taught quick repairs for slips of the tongue: one who carelessly swears by something other than Allah should at once affirm there is no god but Allah, and one who invites another to gamble should give something in charity. The lesson is to make amends right away rather than despair.
Reference : Riyad as-Salihin 1807 In-book reference : Book 17, Hadith 297