InputProfilePhotoAnimated

class telegram.InputProfilePhotoAnimated(animation, main_frame_timestamp=None, *, api_kwargs=None)[source]

Bases: telegram.InputProfilePhoto

An animated profile photo in the MPEG4 format.

Added in version 22.1.

Parameters:
  • animation (file object | InputFile | bytes | pathlib.Path) – The animated profile photo. To upload a file, you can either pass a file object (e.g. open("filename", "rb")) or the file contents as bytes. If the bot is running in local_mode, passing the path of the file (as string or pathlib.Path object) is supported as well.

  • main_frame_timestamp (datetime.timedelta | int | float, optional) – Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.

type[source]

'animated'.

Type:

str

animation[source]

The animated profile photo.

Type:

telegram.InputFile | str

main_frame_timestamp[source]

Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.

Type:

datetime.timedelta