عَنِ ابْنِ عَبَّاسٍ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ جَاءَهُ رَجُلٌ فَقَالَ: إِنِّي أُحَدِّثُ نَفْسِي بِالشَّيْءِ لَأَنْ أَكُونَ حُمَمَةً أَحَبُّ إِلَيَّ مِنْ أَنْ أَتَكَلَّمَ بِهِ. قَالَ: «الْحَمْدُ لِلَّهِ الَّذِي رَدَّ أَمْرَهُ إِلَى الْوَسْوَسَةِ» . رَوَاهُ أَبُو دَاوُد
Translation

Ibn ‘Abbas told how a man came to the Prophet and said, "I have thoughts of such a nature that I would rather be reduced to charcoal than speak about them.” He replied, ‘‘Praise be to God who has reduced [the devil] 1 to no more than evil prompting!” Abu Dawud transmitted it.1 Or [his thoughts].