复制不含 URL(链接)热解图的消息

问题描述 投票:0回答:1

如何从我想要复制的消息中删除任何链接(text_link、url)(copy_message 函数)?

我想象是这样的: 我们有来自某个电报频道的原始消息 enter image description here 我想将此消息复制到我的电报频道,但删除(删除)链接 enter image description here

最后

message pyrogram
1个回答
0
投票

您可以复制消息,然后将标题更改为您想要的任何内容。这是一段代码。

@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')
© www.soinside.com 2019 - 2024. All rights reserved.