Answer the question
In order to leave comments, you need to log in
How not to delete the Telegram url?
Tell me how to make the Telegram bot not delete the url t dot me.
There is such a code, but it removes all links, you need to add the Tr domain to the exception.
def delete_links(message):
for entity in message.entities:
if entity.type in ["url", "text_link"]:
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