"And [recall] when We made an appointment with Moses for forty nights"—its explanation is mentioned in Surat al-A'raf. "And you were wrongdoers"—meaning: to yourselves.
﴿وَإِذْ وَاعَدْنَا مُوسَى أَرْبَعِينَ لَيْلَةً﴾ تَفْسِيره مَذْكُور فِي سُورَة الْأَعْرَاف ﴿وَأَنْتُم ظَالِمُونَ﴾ يَعْنِي: لأنفسكم