The Messenger of Allah ﷺ said, "Whoever among you swears an oath and says in his oath, 'By al-Lat and al-Uzza,' let him say, 'There is no god but Allah.' And whoever says to his companion, 'Come, let me gamble with you,' let him give in charity."
قال رسول الله ﷺ: من حلف منكم فقال في حلفه: باللات والعزى فليقل: لا إله إلا الله ومن قال لصاحبه: تعال أقامرك فليتصدق.
Bukhari narrated it in the Book of Seeking Permission (6301), and Muslim in the Book of Oaths and Vows (1647), both through Zuhri, who said, "Humayd bin Abdul-Rahman told me, from Abu Hurairah," and he mentioned it.