An oath is judged on the intention of the one who asks for it to be sworn.
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا يَزِيدُ بْنُ هَارُونَ، عَنْ هُشَيْمٍ، عَنْ عَبَّادِ بْنِ، أَبِي صَالِحٍ عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " الْيَمِينُ عَلَى نِيَّةِ الْمُسْتَحْلِفِ " .
Abu Huraira reported Allah's Messenger (ﷺ) as saying: An oath is to be interpreted according to the intention of the one who takes it.