首页 > 解决方案 > 如何在 python 中使用 Telethon 发送带有标题的图像?

问题描述

我知道我可以使用这个

client.send_file(receiver, '/path/to/photo.jpg')

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

标签: pythontelegramtelethon

解决方案


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


推荐阅读