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:5:117

I said not to them except what You commanded me - to worship Allah, my Lord and your Lord. And I was a witness over them as long as I was among them; but when You took me up, You were the Observer over them, and You are, over all things, Witness.  

I only said to them that which You commanded me, to ˹say˺, and that is: “Worship God, my Lord and your Lord.” And I was a witness, a watcher, over them, preventing them from ˹saying˺ what they used to say, whilst I was amongst them; but when You took me ˹to You˺, ˹when˺ You raised me up to the heaven, You were Yourself the Watcher over them, the Observer of their deeds, and You Yourself are Witness over all things, Aware and knowing them, including what I said to them and what they said after me, and whatever else.
القرآن:٥:١١٧

مَا قُلْتُ لَهُمْ إِلَّا مَا أَمَرْتَنِي بِهِ أَنِ اعْبُدُوا اللَّهَ رَبِّي وَرَبَّكُمْ ۚ وَكُنْتُ عَلَيْهِمْ شَهِيدًا مَا دُمْتُ فِيهِمْ ۖ فَلَمَّا تَوَفَّيْتَنِي كُنْتَ أَنْتَ الرَّقِيبَ عَلَيْهِمْ ۚ وَأَنْتَ عَلَىٰ كُلِّ شَيْءٍ شَهِيدٌ  

{ما قلتُ لهم إلا ما أمرتني به} وهو {أن اعبدوا الله ربي وربكم وكنتُ عليهم شهيدا} رقيبا أمنعهم مما يقولون {ما دمت فيهم فلما توفيتني} قبضتني بالرفع إلى السماء {كنتَ أنت الرقيب عليهم} الحفيظ لأعمالهم {وأنت على كل شيء} من قولي لهم وقولهم بعدي وغير ذلك {شهيد} مطلع عالم به.