The Four Types of Friends According to the Buddha
Young man, be aware of these four good-hearted friends: the helper, the friend who endures in good times and bad, the mentor, and the compassionate friend.
The helper can be identified by four things: by protecting you when you are vulnerable, and likewise your wealth, being a refuge when you are afraid, and in various tasks providing double what is requested.
The enduring friend can be identified by four things: by telling you secrets, guarding your own secrets closely, not abandoning you in misfortune, and even dying for you.
The mentor can be identified by four things: by restraining you from wrongdoing, guiding you towards good actions, telling you what you ought to know, and showing you the path to samsaric heavens.
The compassionate friend can be identified by four things: by not rejoicing in your misfortune, delighting in your good fortune, preventing others from speaking ill of you, and encouraging others who praise your good qualities.
Taken from the Sigalovada Sutta