With sentiment analysis, a chatbot can extricate verbal cues to infer the feelings of a user with the purpose of offering a tailored response.
What is sentiment analysis?
Further Reading

BLOG
What exactly is an AI chatbot?

BLOG
An comprehensive introduction to chatbots

BLOG
What is chatbot automation?