Hasan al-Basri reported: Moses, peace and blessings be upon him, asked his Lord about what encompasses all goodness. Allah said: Be a companion to people in the way you would love to be accompanied yourself.”
Source: Shu’ab al-Imān 10374
عَنِ الْحَسَنِ رحمه الله أَنَّ مُوسَى صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ سَأَلَ رَبَّهُ جِمَاعًا مِنَ الْخَيْرِ فَقَالَ اصْحَبِ النَّاسَ بِمَا تُحِبُّ أَنْ تُصْحَبَ بِهِ
10374 شعب الإيمان للبيهقي