如何使用 python 中的 Telethon 发送带有标题的图像?

cra*_*ash 2 python telegram telethon

我知道我可以用这个

client.send_file(receiver, '/path/to/photo.jpg')
Run Code Online (Sandbox Code Playgroud)

发送图像,但如何为图像附加标题?

Mat*_*owe 6

根据文档,只需使用关键字参数传递标题的值,如下所示client.send_file(chat, '/my/photos/me.jpg', caption="It's me!")您可以在这里阅读文档