Answer the question
In order to leave comments, you need to log in
A bot that checks a URL, redirects it, and blocks it for a certain amount of time?
I am writing a telegram bot. Python. There was a difficulty with the implementation of the following. When a user sends a link to the bot that starts with https://www.google.com/..., then the bot redirects this link to the group (or me), after, within 7 days, nothing from this user to the group (or me) not redirected.
Here is a simple code to send a message to a group:
@bot.message_handler(content_types=["text"])
def URL(message):
bot.send_message(GroupID, '%s ' % message.chat.username + '(ID:' + str(message.chat.id) + '): ' + message.text)
bot.send_message(message.chat.id, 'Ваша ссылка отправлена! Следующую ссылку Вы можете отправить через 7 дней')
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