Anas bin Malik reported,

The Messenger of Allah ﷺ was admonishing his companions when three men passed by. One of them came and sat down with the Prophet ﷺ, the second walked on a little before sitting down, and the third went on his way.The Messenger of Allah ﷺ said, "Shall I tell you about these three? As for the one who came and sat with us, he turned to Allah, so Allah turned to him in mercy. As for the one who walked on a little and then sat down, he was shy, so Allah was shy with him. And as for the one who went on his way, he turned away, so Allah turned away from him."

Azami 1142

Hasan

عن أنس

أن رسول الله ﷺ كان يعظ أصحابه فإذا ثلاثة نفر يمرون، فجاء أحدهم فجلس إلي النبي ﷺ، ومضي الثاني قليلا ثم جلس، ومضي الثالث علي وجهه، فقال رسول الله ﷺ: ألا أنبئكم بهؤلاء الثلاثة؟ أما الذي جاء فجلس إلينا فإنه تاب فتاب الله عليه، وأما الذي مضى قليلا، ثم جلس، فإنه استحيا فاستحيا الله منه، وأما الذي مضى على وجهه، فإنه استغنى فاستغنى الله عنه.

الأعظمي 1142حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Whoever comes to a gathering of knowledge should sit where the gathering ends
Numbering
Jami al-Kamil 1142 (2nd edition)