You can stop community members from sending you chat messages. This removes the 'Message ' button from your profile and your name from the Chat interface where user selects member names.
Go to My Account > Visibility, and toggle off Allow chat messages.
When the toggle is turned off:
You can still send chat messages to users who have chat messaging enabled
You can respond to already received messages
You can see your chat history