mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Slightly improve documentation
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user