"Your book of Eternal Truth says that your god told Moses what the law should be. One of those laws (Leviticus 21:20) was that they were allowed to beat their slaves as harshly as they wanted provided that slave didn't die within a few days. In the time of the Old Testament then was the non-fatal beating of slaves a sin or not?"
Snorbs, I believe you meant Exodus 21:20. Let's look at the verse (and verse 21 as well):
"Anyone who beats their male or female slave with a rod must be punished if the slave dies as a direct result, but they are not to be punished if the slave recovers after a day or two, since the slave is their property."
The term for ?punished? here is 'avenged', indicating the standard 'lex talionis', the law of equivalent retribution.
lex talionis: the law of retaliation equivalent to an offense; esp : the principle of retributive justice based on the Mosaic law of ?eye for eye, tooth for tooth? in Exod 21:23?25 ?called also talion
www.merriam-webster.com/dictionary/lex%20talionis
So allow me to translate. This passage is saying, "If you beat your slave and he dies, you are to be put to death also. But if he recovers and does not die, than you will not be put to death either. But there is still the eye-for-an-eye punishment."
This would be similar to a law today which states: "If you murder someone you will be executed. (i.e. capital punishment). But if you assault someone, you will be assaulted." Today, we would just put them in jail and not assault them. But that's because we don't take sin as seriously as God does.
To take these passages and misrepresent them as if God is okay with beating someone within an inch of his life is just like claiming that our laws today say it is okay to assault someone as long as we don't murder them. I think you have a very skewed understanding of the text and I think it is because you let your bias get in the way. Please keep these passages in mind:
Leviticus 25:35-43
35 ??If any of your fellow Israelites become poor and are unable to support themselves among you, help them as you would a foreigner and stranger, so they can continue to live among you. 36 Do not take interest or any profit from them, but fear your God, so that they may continue to live among you. 37 You must not lend them money at interest or sell them food at a profit. 38 I am the Lord your God, who brought you out of Egypt to give you the land of Canaan and to be your God.
39 ??If any of your fellow Israelites become poor and sell themselves to you, do not make them work as slaves. 40 They are to be treated as hired workers or temporary residents among you; they are to work for you until the Year of Jubilee. 41 Then they and their children are to be released, and they will go back to their own clans and to the property of their ancestors. 42 Because the Israelites are my servants, whom I brought out of Egypt, they must not be sold as slaves. 43 Do not rule over them ruthlessly, but fear your God.