It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:
"The oath is only according to the intention of the one who requests the oath to be taken."' (JA)
English reference (JA): Vol. 3, Book 11, Hadith 2120 (JA)
Arabic reference (JA): Book 11, Hadith 2201 (JA)