Do I deserve detention because I defended myself

So here's what happend I'm in middle school and we were in lunch but it is one of those lunches where you have to go outside so I'm outside with my friends but then these group of guys come up to me saying why I pushed him now the thing I was right next to their group so it could have pushed which I fid not so I say no I did not push him but then him and his friend start chasing me I obviously run so if we get into a fight i can just say they started the fight long story short they get me into a corner and I grab a stick and start intimidating them with it but they all charge at me so I obviously fight back also side note I where glasses so if they fall off I am basically blind so anyways one of holds me back another is choking me and another is punching me and then my glasses fall so they fell of so I'm basically blind now and the guy that I "push" is watching so anyways a teacher comes and break up the fight that was last week so after the fight I asked if anybody else saw who pushed him and they say it was a different guy but now back the present day I am in class when a teacher calls me out of class and tells Me I got a detention so I'm like why and she says the head of middle school said so I ask her if I can talk to her and she said yeah so I go to her office and when I ask her why she says the mom sent a picture and wants me suspended but the head talked her down to a detention and also said if i talked to a teacher while being CHASED this would not have happend and the people who beated me up did not even get in trouble so am I in the wrong for not telling or was I in the right for fighting back?