He should’ve listened to my ex

My ex and I have a mutual friend. I rarely see him in person and the majority of our relationship is just texting about random and pointless things. I joked around with him in a sarcastic way like I always do. He’d never reacted so negatively to it before, but today he told me that I waste his time and annoy him, and he said that my ex was right about me and he should’ve listened. I can’t even describe what I’m feeling right now. The closest word I have is frustration, but it’s different than that. He could’ve muted me or just ignored me if I was that much of a waste of time. I don’t really know what to do now.