Hadithcore
Al-Adab Al-Mufrad, 785
sahih· Al-Albani

Anas ibn Malik heard the Messenger of Allah, (ﷺ), say, "I have nothing to do with diversions and diversions have nothing to do with me." He meant that he does not do anything worthless."

حَدَّثَنَا مُحَمَّدُ بْنُ سَلامٍ، قَالَ‏:‏ أَخْبَرَنَا يَحْيَى بْنُ مُحَمَّدٍ أَبُو عَمْرٍو الْبَصْرِيُّ قَالَ‏:‏ سَمِعْتُ عَمْرًا مَوْلَى الْمُطَّلِبِ قَالَ‏:‏ سَمِعْتُ أَنَسَ بْنَ مَالِكٍ يَقُولُ‏:‏ قَالَ رَسُولُ اللهِ صلى الله عليه وسلم‏:‏ لَسْتُ مِنْ دَدٍ، وَلاَ الدَّدُ مِنِّي بِشَيْءٍ، يَعْنِي‏:‏ لَيْسَ الْبَاطِلُ مِنِّي بِشَيْءٍ‏.‏

References2 variants
In-Book Reference
Book 33, Hadith 32
English Reference
Book 33, Hadith 785