telegram.Animation

class telegram.Animation(file_id, width, height, duration, thumb=None, file_name=None, mime_type=None, file_size=None, **kwargs)

Bases: telegram.base.TelegramObject

This object represents an animation file to be displayed in the message containing a game.

file_id

str – Unique file identifier.

width

int – Video width as defined by sender.

height

int – Video height as defined by sender.

duration

int – Duration of the video in seconds as defined by sender.

thumb

telegram.PhotoSize – Optional. Animation thumbnail as defined by sender.

file_name

str – Optional. Original animation filename as defined by sender.

mime_type

str – Optional. MIME type of the file as defined by sender.

file_size

int – Optional. File size.

Parameters:
  • file_id (str) – Unique file identifier.
  • width (int) – Video width as defined by sender.
  • height (int) – Video height as defined by sender.
  • duration (int) – Duration of the video in seconds as defined by sender.
  • thumb (telegram.PhotoSize, optional) – Animation thumbnail as defined by sender.
  • file_name (str, optional) – Original animation filename as defined by sender.
  • mime_type (str, optional) – MIME type of the file as defined by sender.
  • file_size (int, optional) – File size.