Reputation: 3
How to delete any link (text_link, url) from message that i want to copy (copy_message function)?
I imagine it like this: We have original message from some telegram channel enter image description here And I want to copy this message to my telegram channel, BUT remove (delete) the link enter image description here
in the end
Upvotes: 0
Views: 260
Reputation: 31
You can copy the message and then change the caption to anything you want. Here is the piece of code for that.
@app.on_message()
def my_handler(client, message):
copy = message.copy(receiving_chat_id)
copy.edit('Anything you want to change the caption of the images')
Upvotes: 0