This one kid in my school is a really strange personality, I want to be his friend but he makes it so hard (or maybe I'm just not seeing something). I was his friend about 2 weeks ago, we got pretty close, talked on discord up to 4 hours a day, but then he stopped talking to me and started making jokes/insults (insulting my appearance etc) towards me on a group chat we are in because (I think) he didn't like the fact that the girl he has a crush on is my best friend, keep in mind I don't like her sexually at all.

They used to meet before school every morning, and the girl thought that it was a bit boring and that I should come too, so I started showing up, then one day the boy seemed very upset, we were good friends at the time before we met there every morning but after we started meeting it was not really the same. We asked the boy what was up and he said nothing, after school, he texted the girl saying that I was getting in the way and that he wanted her to himself (she told me this). I felt bad so I stopped coming but it didn't change anything.

 He made more and more jokes over time and eventually it got really bad. To the point where whenever I saw him typing on the group chat I knew it was going to be an edit of me or an insult towards me (about 7 out of 10 messages were about me, I am not being biest and/or exaggerating). It was like he hated me, I didn't really understand why because I wasn't even talking to him anymore, he started making jokes about how I liked the girl and how I could never get her and things like this. I never said anything insulting back, I usually told him to grow up or to stop. This wasn't really that bad just he was making people I don't even talk to or know dislike me. He knew I'd rather be his friend that argue and fight but he proceeded.

 A few days later we had an argument about the girl, he was saying I want to go out with her but I can't, I said that the only reason he is stressing out over me talking about this is because he likes her, I told him to stop trying to mess my relationships with other people up and to stop talking about me, at the end of the argument the majority of the people who were in the group chat agreed with me and they all told him that he needs to grow up. He only said more things after this, I started saying insults back because I was getting angry but most of the time I ignored it. I thought he was bullying me for attention or something.

Today I'd had enough, he had been going with the insults about me, my parents, my personality for too long and I decided to just end it. I warned him several times prior to this that he should stop trying to put me down or I will say something about him and the girl he didn't want me to say. I didn't tell him what it was. He egged me on to do it for the whole day and so I did. I told the chat that he told the girl that I'm getting in his way and that he wants her all to himself. I feel bad, I don't think I won anything here, I'd just made things worse. AITA for telling the group chat he  said he wants the girl all to himself so that I could feel better for one day. I feel as though I just kicked a yapping dog in the face, I wanted it to shut up, but maybe I took it too far.