Answer the question
In order to leave comments, you need to log in
TelegramBot Message filter?
It is necessary that the bot checks the message for the presence of words familiar to it, and if such are present, then delete them.
Here is my code.
@bot.message_handler(content_types=['text'])
def filter(message):
if message.text == "Привет":
bot.delete_message(message.chat.id, message.message_id)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question