Just hook in this API, problem solved
https://www.wired.com/2017/02/googles-troll-fighting-ai-now-belongs-world/
"...uses machine learning to automatically detect insults, harassment, and abusive speech online. Enter a sentence into its interface, and Jigsaw says its AI can immediately spit out an assessment of the phrase’s “toxicity” more accurately than any keyword blacklist, and faster than any human moderator."