Racist jokes are so mean, I used to have black friends. Until my dad sold them.
Why would you say this about a certain skin color of friend?
They were slaves. I don't mean "sell" literally, my dad bought them. They had to work.
You shouldn't make jokes where you refer to anyone as a slave, and you should definitely not pretend that your father had them as property. While this may seem funny, it is a very outdated way of joking and could alienate you from a lot of different people.