For example: If the following message contains some character, the bot does not respond in response. I know it's simple.
If it's easier to say how to make a list of forbidden characters?
Well, if it's single characters, not substrings...
forbidden = frozenset('XYZ') #список запрещённых символов
text: str = message.text #берём сообщение
message_is_ok: bool = forbidden.isdisjoint(text)
#True - сообщение не содержит запрещённых символов