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:41:25

And We appointed for them companions who made attractive to them what was before them and what was behind them ˹of sin˺, and the word has come into effect upon them among nations which had passed on before them of jinn and men. Indeed, they ˹all˺ were losers.  

And We have assigned, We have occasioned ˹for˺, them companions, from among the devils, who have adorned for them that which is before them, of what concerns this world and the following after lusts, and that which is behind them, of what concerns the Hereafter, when they ˹make them˺ say that there will be neither resurrection nor reckoning. And the word, of chastisement — namely, the verse: Assuredly I will fill Hell … ˹Q. 11:119˺) — became due against them, being among, all those, communities that passed away, ˹that˺ were destroyed, before them of jinn and mankind. Truly they were losers.
القرآن:٤١:٢٥

وَقَيَّضْنَا لَهُمْ قُرَنَاءَ فَزَيَّنُوا لَهُمْ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ وَحَقَّ عَلَيْهِمُ الْقَوْلُ فِي أُمَمٍ قَدْ خَلَتْ مِنْ قَبْلِهِمْ مِنَ الْجِنِّ وَالْإِنْسِ ۖ إِنَّهُمْ كَانُوا خَاسِرِينَ  

(وقيضنا) سببنا (لهم قرناء) من الشياطين (فزينوا لهم ما بين أيديهم) من أمر الدنيا واتباع الشهوات (وما خلفهم) من أمر الآخرة بقولهم لا بعث ولا حساب (وحق عليهم القول) بالعذاب وهو "" لأملأن جهنم "" الآية (في) جملة (أمم قد خلت) هلكت (من قبلهم من الجن والإنس إنهم كانوا خاسرين).

See similar narrations below:

Collected by Qurʾān
quran:46:18

Those are the ones upon whom the word has come into effect, ˹who will be˺ among nations which had passed on before them of jinn and men. Indeed, they ˹all˺ were losers.  

Such are the ones against whom the Word, of chastisement, is due, is necessary, concerning communities of jinn and humans that have passed away before them. Truly they are losers.
القرآن:٤٦:١٨

أُولَٰئِكَ الَّذِينَ حَقَّ عَلَيْهِمُ الْقَوْلُ فِي أُمَمٍ قَدْ خَلَتْ مِنْ قَبْلِهِمْ مِنَ الْجِنِّ وَالْإِنْسِ ۖ إِنَّهُمْ كَانُوا خَاسِرِينَ  

{أولئك الذين حق} وجب {عليهم القول} بالعذاب {في أمم قد خلت من قبلهم من الجن والإنس إنهم كانوا خاسرين}.