Joshua was much more violent than God. When he was leading the people against Jericho, God gave him very precise instructions.
Then the LORD said to Joshua, "See, I have delivered Jericho into your hands, along with its king and its fighting men. March around the city once with all the armed men. Do this for six days. Have seven priests carry trumpets of rams' horns in front of the ark. On the seventh day, march around the city seven times, with the priests blowing the trumpets. When you hear them sound a long blast on the trumpets, have all the people give a loud shout; then the wall of the city will collapse and the people will go up, every man straight in" (Jos 6:2-5).
God said they should march round and shout and blast trumpets. He said they should go “straight in”. However, God did not tell Joshua to kill and destroy the inhabitants of Jericho.
Joshua told the Israelites to destroy the inhabitants of the city.
Joshua commanded the people, "Shout! For the LORD has given you the city! The city and all that is in it are to be devoted to the LORD. Only Rahab the prostitute and all who are with her in her house shall be spared, because she hid the spies we sent (Jos 6:16,17).
Joshua told the people that only Rahab should be spared. There is no record of God telling Joshua to give a command to destroy the inhabitants.
Joshua went even further and vowed that anyone who did not join in the destruction of Jericho would be under a curse.Abstain from the accursed things, lest you become accursed when you take of the accursed things, and make the camp of Israel a curse, and trouble it (Jos 6:18).
Joshua went beyond what God commanded. God had told them to destroy the idols and altars, but he had not bound them under a curse. Joshua commanded Israel to destroy everything and put them under a curse if they disobeyed. Achan caused problems for Israel, not because he had disobeyed God, but because he failed to honour the vow that Joshua had made on behalf of the Israelites (Jos 7).
When Achan’s actions were revealed, God did not accuse Israel of disobedience, but failure to keep the covenant.Israel has sinned; they have violated my covenant, which I commanded them to keep (Jos 7:11).
There was nothing in the covenant that forbade him plundering of silver and gold that was not part of an idol. However, Achan failed to fulfil the vow made on his behalf by Joshua. The curse came because he broke this vow.
The Israelites obeyed Joshua and slaughtered the people of Jericho.
They devoted the city to the LORD and destroyed with the sword every living thing in it—men and women, young and old, cattle, sheep and donkeys….Then they burned the whole city and everything in it, but they put the silver and gold and the articles of bronze and iron into the treasury of the LORD's house (Jos 6:21,24).
The people of Jericho were massacred, but there is no evidence that God intended this to happen.
God’s plan was that the people of Jericho would flee the city. Those who survived the earthquake and collapsing walls would have been trembling in fear. They would have done a runner as soon as the Israelites came in over the collapsed wall. God wanted the people of Jericho to leave the city and flee the land. Joshua slaughtered them before they could flee. He was more violent than God had intended.