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:7:93

And he turned away from them and said, "O my people, I had certainly conveyed to you the messages of my Lord and advised you, so how could I grieve for a disbelieving people?"  

So he turned back on them, and said, ‘O my people, I have conveyed to you the Messages of my Lord and advised you sincerely, but you believe not: so why should I grieve for a disbelieving people?’ (the interrogative is meant ˹rhetorically˺ as a negation).
القرآن:٧:٩٣

فَتَوَلَّىٰ عَنْهُمْ وَقَالَ يَا قَوْمِ لَقَدْ أَبْلَغْتُكُمْ رِسَالَاتِ رَبِّي وَنَصَحْتُ لَكُمْ ۖ فَكَيْفَ آسَىٰ عَلَىٰ قَوْمٍ كَافِرِينَ  

{فتولى} أعرض {عنهم وقال يا قوم لقد أبلغتكم رسالات ربي ونصحت لكم} فلم تؤمنوا {فكيف آسى} أحزن {على قوم كافرين} استفهام بمعنى النفي.

See similar narrations below:

Collected by Qurʾān
quran:7:79

And he turned away from them and said, "O my people, I had certainly conveyed to you the message of my Lord and advised you, but you do not like advisors."  

So he turned his back on them, Sālih left ˹them˺, and said, ‘O my people, I have conveyed to you the Message of my Lord and gave you sincere advice, but you do not love sincere advisers’.
القرآن:٧:٧٩

فَتَوَلَّىٰ عَنْهُمْ وَقَالَ يَا قَوْمِ لَقَدْ أَبْلَغْتُكُمْ رِسَالَةَ رَبِّي وَنَصَحْتُ لَكُمْ وَلَٰكِنْ لَا تُحِبُّونَ النَّاصِحِينَ  

{فتولى} أعرض صالح {عنهم وقال يا قوم لقد أبلغتكم رسالة ربي ونصحت لكم ولكن لا تحبون الناصحين}.