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:28:47

And if not that a disaster should strike them for what their hands put forth ˹of sins˺ and they would say, "Our Lord, why did You not send us a messenger so we could have followed Your verses and been among the believers?"...  

Otherwise, if an affliction, a punishment, should befall them because of what their own hands have sent before them, in the way of disbelief and otherwise, they might say, ‘Our Lord, why did You not send a messenger to us, that we might have followed Your signs, the ones sent with the messengers, and been of the believers?’ (the response to ˹the conditional particle˺ lawlā, ‘if’, has been omitted, and what follows it is a ˹new˺ subject; the meaning is: ‘were it not for the affliction that is the cause of their saying’, or, ‘were it not for their saying that is the cause of their affliction, We would have hastened on for them their punishment and We would not have sent you as a messenger to them’).
القرآن:٢٨:٤٧

وَلَوْلَا أَنْ تُصِيبَهُمْ مُصِيبَةٌ بِمَا قَدَّمَتْ أَيْدِيهِمْ فَيَقُولُوا رَبَّنَا لَوْلَا أَرْسَلْتَ إِلَيْنَا رَسُولًا فَنَتَّبِعَ آيَاتِكَ وَنَكُونَ مِنَ الْمُؤْمِنِينَ  

{ولولا أن تصيبهم مصيبة} عقوبة {بما قدمت أيديهم} من الكفر وغيره {فيقولوا ربنا لولا} هلا {أرسلت إلينا رسولا فنتبع آياتك} المرسل بها {ونكون من المؤمنين} وجواب لولا محذوف وما بعده مبتدأ، والمعنى لولا الإصابة المسبب عنها قولهم أو لولا قولهم المسبب عنها لعاجلناهم بالعقوبة ولما أرسلناك إليهم رسولا.