Skip to content

Commit 4c0e571

Browse files
committed
Fix send_photo documentation
Closes #118
1 parent db39cda commit 4c0e571

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pyrogram/methods/messages/send_photo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ async def send_photo(
7878
pass an HTTP URL as a string for Telegram to get a photo from the Internet,
7979
pass a file path as string to upload a new photo that exists on your local machine, or
8080
pass a binary file-like object with its attribute ".name" set for in-memory uploads.
81+
The photo must be at most 10 MB in size.
82+
The photo's width and height must not exceed 10000 in total.
83+
The photo's width and height ratio must be at most 20.
8184
8285
caption (``str``, *optional*):
8386
Photo caption, 0-1024 characters.

pyrogram/types/messages_and_media/message.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,11 +2903,15 @@ async def reply_photo(
29032903
await message.reply_photo(photo)
29042904
29052905
Parameters:
2906-
photo (``str``):
2906+
photo (``str`` | ``BinaryIO``):
29072907
Photo to send.
29082908
Pass a file_id as string to send a photo that exists on the Telegram servers,
2909-
pass an HTTP URL as a string for Telegram to get a photo from the Internet, or
2910-
pass a file path as string to upload a new photo that exists on your local machine.
2909+
pass an HTTP URL as a string for Telegram to get a photo from the Internet,
2910+
pass a file path as string to upload a new photo that exists on your local machine, or
2911+
pass a binary file-like object with its attribute ".name" set for in-memory uploads.
2912+
The photo must be at most 10 MB in size.
2913+
The photo's width and height must not exceed 10000 in total.
2914+
The photo's width and height ratio must be at most 20.
29112915
29122916
quote (``bool``, *optional*):
29132917
If ``True``, the message will be sent as a reply to this message.

0 commit comments

Comments
 (0)