What happened to you was also by Allah’s command. So we can say that you deserved what happened to you.