All too often, I see punished players attempting to justify their toxic behavior by claiming it was in "self defense." This attitude is a misplaced vestige originating from the real world. In the real world of physical experience, people occasionally need to defend themselves from harm. This means taking whatever actions are necessary to prevent some sort of malady or injury from befalling us. For example, someone who took a wrong turn in a bad neighborhood may find themselves the victim of an assault. If they do nothing, they may be grievously injured. Therefore, it's reasonable for this person to not only e.g. use their arms to protect their head, but also to hit back at the person attacking them. The reasoning behind such an action is that the attacker will either rethink their actions and break off the attack, or, if they do not, they may be physically incapacitated by their victim's retaliation. This is why firearms - a type of weapon - have legitimate defensive purposes. If an attacker is physically imposing and skilled in hand-to-hand combat, it's logical to defend oneself from that from as great a distance as possible, which firearms permit.
This is why it is relatively commonplace to hear that one person attacked another in self defense - a reactionary attack that prevented an attack. Self defense is commonly considered to be an acceptable practice, even when it involves going on the offensive, if that's what's necessary for someone to protect themselves from harm.
LoL chat is "real life" in that it occurs between real people, but this interaction is far removed from the context of physical experience. No one can be injured by participating in LoL chat, and it's entirely voluntary. The only component of LoL chat is the messages we send and receive. Unfortunately, some players occasionally decide to send chat messages that bother other players, whether through racial and homophobic slurs, harassment, or spam. Understandably, other players would like to protect themselves from this unpleasantness. Here we have "self defense." However, while the basic idea here is the same as it is for self defense in the real world, there is one very important practical difference.
There is a mute function.
Muting another player prevents any of their chat messages from reaching you. The degree of protection is so absolute that you won't even know when a muted player is talking. It is the end-all, be-all of self defense. A good thing, too, because "hitting back" like we occasionally do to defend ourselves in the real world _doesn't even work in LoL chat_. Nothing a player says carries any kind of authority over other players. Flaming back just tells the toxic player that they got under someone's skin, which is more likely to spur them on than quell their efforts. In the real world, passive measures (like covering our head with our arms) might not be enough to save us from harm, while "hitting back" can occasionally be effective, which is why the latter is considered acceptable. LoL chat is the opposite. The purely defensive measure of muting is 100% effective, and flaming back is 100% ineffective.
Muting is the only self-defense. Don't respond to poor behavior with poor behavior.