[英]How to send a photo with compressing (in order to show in full size) in telegram using telethon
如何發送帶有壓縮的照片。
我有代碼:
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"
)
當我運行此代碼時,我得到:
圖片
但我想要這個:
圖片
我試圖將force_document=False
添加到方法.send_message
的參數中,但它沒有用
我很矮。 force_document=False
正在工作 xD
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.