how to stop chatbot replying to swear words.

Hi, I am building an Ai chatbot for a business but an issue that has been occurring is that when the chatbot has asked for names people have put swear words.how can I stop it from replying to these ?
Was this page helpful?