The Messenger of Allah ﷺ said, "Whoever swears an oath and says in his oath, 'By al-Lat,' let him say, 'There is no god but Allah.' And whoever says to his companion, 'Come, let me gamble with you,' let him give something in charity."
حدثنا الحسن بن علي حدثنا عبد الرزاق أخبرنا معمر عن الزهري عن حميد بن عبد الرحمن
قال رسول الله ﷺ من حلف فقال في حلفه واللات فليقل لا إله إلا الله ومن قال لصاحبه تعال أقامرك فليتصدق بشيء
Sourcing, Muslim narrated it in the Book of Oaths, chapter of whoever swears by Lat and Uzza should say, "There is no god but Allah," no. 1647, from the hadith of Abdul-Razzaq. Bukhari also narrated it in tafsir, Surah Najm, chapter of "Have you seen Lat and Uzza," no. 4860, from the hadith of Maamar with the same wording, and it is also found in Musannaf Abdul-Razzaq, no.