telegram.document module

This module contains an object that represents a Telegram Document.

class telegram.document.Document(file_id, thumb=None, file_name=None, mime_type=None, file_size=None, **kwargs)

Bases: telegram.base.TelegramObject

This object represents a Telegram Document.

file_id

str

thumb

telegram.PhotoSize

file_name

str

mime_type

str

file_size

int

Parameters:
  • file_id (str) –
  • thumb (Optional[telegram.PhotoSize]) –
  • file_name (Optional[str]) –
  • mime_type (Optional[str]) –
  • file_size (Optional[int]) –
  • **kwargs (dict) – Arbitrary keyword arguments.
static de_json(data, bot)
Parameters:
Returns:

Return type:

telegram.Document