He has the habit of describing his friends in unpleasant terms, but they do not object to that
Question

I usually describe my close friends in terms that if anyone else heard them, they would think that we were not friends. This is usually by addressing them as “donkey” or “stupid” and the like. Of course, all my friends see this as completely normal, and it does not lead to anyone getting angry or upset. Likewise, they also usually call me by such names. When we use these words, we do not mean them, but it is the way we usually speak. Is there anything in what we are doing that is contrary to the rulings of Islam? What is your opinion?
Praise be to Allah.The believer should make himself get used to speaking good words, and should avoid foul or indecent words. At-Tirmidhi (1977) narrated that ‘Abdullah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “The believer is not a slanderer, one who curses a great deal, one who indulges in obscenity or who in engages in foul talk.” Classed as saheeh by al-Albaani in Saheeh Sunan al-Tirmidhi. 
“The believer” that is, the perfect believer
“is not a slanderer,” that is, one who frequently slanders people and impugns their honour, their integrity or their character.
“One who indulges in obscenity” that is, one who insults them in obscene terms
“or who engages in foul talk” – it was said that this refers to one who has no shame, or one who offends people with his speech. So it means the same as one who indulges in obscenity.
See: Tuhfat al-Ahwadhi.
The fact that someone does not object to the nicknames that you mentioned does not cancel out the fact that they come under the heading of obscene or foul talk that the believer should keep away from.
And Allah knows best.