Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:29:42

Indeed, Allah knows whatever thing they call upon other than Him. And He is the Exalted in Might, the Wise.  

Truly God knows whatever thing (mā functions like alladhī) they call on, ˹what˺ they worship (read yad‘ūna, ‘they call on’, or tad‘ūna, ‘you call on’) besides Him, other than Him. And He is the Mighty, in His kingdom, the Wise, in what He does.
القرآن:٢٩:٤٢

إِنَّ اللَّهَ يَعْلَمُ مَا يَدْعُونَ مِنْ دُونِهِ مِنْ شَيْءٍ ۚ وَهُوَ الْعَزِيزُ الْحَكِيمُ  

{إن الله يعلم ما} بمعنى الذي {يدعون} يعبدون بالياء والتاء {من دونه} غيره {من شيء وهو العزيز} في ملكه {الحكيم} في صنعه.