mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-27 20:03:46 +03:00
Slightly improve documentation
This commit is contained in:
parent
acfde7132b
commit
0563430314
|
@ -223,7 +223,8 @@ class DownloadMethods:
|
|||
The output file path, directory, or stream-like object.
|
||||
If the path exists and is a file, it will be overwritten.
|
||||
If file is the type `bytes`, it will be downloaded in-memory
|
||||
as a bytestring (e.g. ``file=bytes``).
|
||||
and returned as a bytestring (i.e. ``file=bytes``, without
|
||||
parentheses or quotes).
|
||||
|
||||
download_big (`bool`, optional):
|
||||
Whether to use the big version of the available photos.
|
||||
|
@ -333,7 +334,8 @@ class DownloadMethods:
|
|||
The output file path, directory, or stream-like object.
|
||||
If the path exists and is a file, it will be overwritten.
|
||||
If file is the type `bytes`, it will be downloaded in-memory
|
||||
as a bytestring (e.g. ``file=bytes``).
|
||||
and returned as a bytestring (i.e. ``file=bytes``, without
|
||||
parentheses or quotes).
|
||||
|
||||
progress_callback (`callable`, optional):
|
||||
A callback function accepting two parameters:
|
||||
|
@ -376,6 +378,9 @@ class DownloadMethods:
|
|||
path = await message.download_media()
|
||||
await message.download_media(filename)
|
||||
|
||||
# Downloading to memory
|
||||
blob = await client.download_media(message, bytes)
|
||||
|
||||
# Printing download progress
|
||||
def callback(current, total):
|
||||
print('Downloaded', current, 'out of', total,
|
||||
|
|
|
@ -427,6 +427,7 @@ STICKER_FILE_INVALID,400,Sticker file invalid
|
|||
STICKER_GIF_DIMENSIONS,400,The specified video sticker has invalid dimensions
|
||||
STICKER_ID_INVALID,400,The provided sticker ID is invalid
|
||||
STICKER_INVALID,400,The provided sticker is invalid
|
||||
STICKER_MIME_INVALID,400,Make sure to pass a valid image file for the right InputFile parameter
|
||||
STICKER_PNG_DIMENSIONS,400,Sticker png dimensions invalid
|
||||
STICKER_PNG_NOPNG,400,Stickers must be a png file but the used image was not a png
|
||||
STICKER_TGS_NODOC,400,You must send the animated sticker as a document
|
||||
|
|
|
|
@ -332,7 +332,7 @@ phone.toggleGroupCallSettings,user,GROUPCALL_NOT_MODIFIED
|
|||
photos.deletePhotos,user,
|
||||
photos.getUserPhotos,both,MAX_ID_INVALID USER_ID_INVALID
|
||||
photos.updateProfilePhoto,user,PHOTO_ID_INVALID
|
||||
photos.uploadProfilePhoto,user,ALBUM_PHOTOS_TOO_MANY FILE_PARTS_INVALID IMAGE_PROCESS_FAILED PHOTO_CROP_SIZE_SMALL PHOTO_EXT_INVALID VIDEO_FILE_INVALID
|
||||
photos.uploadProfilePhoto,user,ALBUM_PHOTOS_TOO_MANY FILE_PARTS_INVALID IMAGE_PROCESS_FAILED PHOTO_CROP_SIZE_SMALL PHOTO_EXT_INVALID STICKER_MIME_INVALID VIDEO_FILE_INVALID
|
||||
ping,both,
|
||||
reqDHParams,both,
|
||||
reqPq,both,
|
||||
|
|
|
Loading…
Reference in New Issue
Block a user