Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# UserProfilePhotos

class telegram.UserProfilePhotos(total_count, photos, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents a user’s profile pictures.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their `total_count` and `photos` are equal.

  Parameters:

    - total_count (`int`) – Total number of profile pictures the target user has.

    - photos (Sequence[Sequence[`telegram.PhotoSize`]]) –

      Requested profile pictures (in up to 4 sizes each).

      Changed in version 20.0: Accepts any `collections.abc.Sequence` as input instead of just a list. The input is converted to a tuple.

  total_count

    Total number of profile pictures.

    Type:

      `int`

  photos

    Requested profile pictures (in up to 4 sizes each).

    Changed in version 20.0: This attribute is now an immutable tuple.

    Type:

      Tuple[Tuple[`telegram.PhotoSize`]]

  Returned In

  `telegram.Bot.get_user_profile_photos()`

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json()`.