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 narrated it in the Book of Oaths and Vows (1647:5), both of them via Zuhri, from Humayd bin Abdul-Rahman bin Awf, from Abu Hurairah, and he mentioned it.