[英]How to send a photo with compressing (in order to show in full size) in telegram using telethon
How to send a photo with compressing.如何发送带有压缩的照片。
I have the code:我有代码:
client = TelegramClient(
"session",
api_id=CONFIG["client_api_id"],
api_hash=CONFIG["client_api_hash"]
)
client.connect()
if not client.is_user_authorized():
phone = input("Your phone: ")
code = client.send_code_request(phone)
myself = client.sign_in(phone, input("Your code: "))
# Sending a photo with description
client.send_message(
777000,
"test",
file="https://avatars.mds.yandex.net/get-zen_doc/5295210/pub_60dd6ea6828fb32711ebfc76_60dd7130df4f6532136de7b1/scale_1200"
)
When i run this code i get:当我运行此代码时,我得到:
image图片
But i want this:但我想要这个:
image图片
I tried to add force_document=False
to arguments of method .send_message
but it didn't work我试图将force_document=False
添加到方法.send_message
的参数中,但它没有用
I'm dumppy.我很矮。 force_document=False
is working xD force_document=False
正在工作 xD
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.