Like everything in the bible, it has places that say treat them well and condemns slavery for sex and it has other places that calls for taking prisoners as slaves and it admonishes slaves to obey, even harsh masters. In the fight to end slavery by some and to keep slavery by some in the United States, both sides used verses from the bible.
Side note: the Koran, which allows slavery, tells slave masters that if there is little food, your slave should eat first, yeah right like the Saudis would do that.