Question by telegram. bot in Python. How to block a person by otvechaem message and special team?

The question is:is it possible to implement a block person at the time was not according to the man, and answered by admin post with some text:
man Mat wrote , I reply to the message and write the code word on the bot which is a block of a person at the time???
Here is what I have
restricted_messages = ('hush')

@bot.message_handler(func=lambda message: message.text and message.text.lower() in restricted_messages and message.chat.id == GROUP_ID)
def set_ro(message):
print(message.from_user.language_code)
 bot.restrict_chat_member(message.chat.id, message.from_user.id, until_date=time()+300)
 bot.send_message(message.chat.id strings.get(get_language(message.from_user.language_code)).get("ro_msg"),
 reply_to_message_id=message.message_id)
June 5th 19 at 21:17
1 answer
June 5th 19 at 21:19
I decided it this way , but now he does not respond to command shut up and block everyone who I meet
restricted_messages = ('hush')

def reply_validator(message):
if message.reply_to_message is None and restricted_messages:
return False
else:
return True



@bot.message_handler(func=reply_validator)
def set_ro(message):
print(message.from_user.language_code)
bot.restrict_chat_member(message.chat.id, message.reply_to_message.from_user.id, until_date=time()+300)
bot.send_message(message.chat.id strings.get(get_language(message.from_user.language_code)).get("ro_msg"),
reply_to_message_id=message.message_id)

Find more questions by tags BotsPythonTelegram