Skip to content
Back to top
View this page

# InputProfilePhotoAnimated

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

  Bases: `telegram.InputProfilePhoto`

  An animated profile photo in the MPEG4 format.

  Use In

  `telegram.Bot.set_business_account_profile_photo()`

  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

    `'animated'`.

    Type:

      `str`

  animation

    The animated profile photo.

    Type:

      `telegram.InputFile` | `str`

  main_frame_timestamp

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

    Type:

      `datetime.timedelta`