aiogram/aiogram/types/file.py

23 lines
704 B
Python
Raw Normal View History

2017-10-12 16:43:23 +03:00
from . import base
from . import fields
2018-01-24 02:29:48 +02:00
from . import mixins
2017-10-12 16:43:23 +03:00
2018-01-24 02:29:48 +02:00
class File(base.TelegramObject, mixins.Downloadable):
2017-10-12 16:43:23 +03:00
"""
This object represents a file ready to be downloaded.
The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>.
It is guaranteed that the link will be valid for at least 1 hour.
When the link expires, a new one can be requested by calling getFile.
Maximum file size to download is 20 MB
https://core.telegram.org/bots/api#file
"""
file_id: base.String = fields.Field()
2019-12-31 22:46:08 +05:00
file_unique_id: base.String = fields.Field()
2017-10-12 16:43:23 +03:00
file_size: base.Integer = fields.Field()
file_path: base.String = fields.Field()