photos.UpdateProfilePhoto

class pyrogram.raw.functions.photos.UpdateProfilePhoto

Installs a previously uploaded photo as a profile photo.

Details:
  • Layer: 223

  • ID: 9E82039

Parameters:
  • id (InputPhoto) – Input photo

  • fallback (bool, optional) – If set, the chosen profile photo will be shown to users that can’t display your main profile photo due to your privacy settings.

  • bot (InputUser, optional) – Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user.

Returns:

photos.Photo

TL Schema

photos.updateProfilePhoto#9e82039
flags:#
fallback:flags.0?true
bot:flags.1?InputUser
id:InputPhoto

= photos.Photo

Parameter Tree

UpdateProfilePhoto
├── fallbacktrue (optional)
├── botInputUser (optional)
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
└── idInputPhoto
├── InputPhotoEmpty
└── InputPhoto
├── idlong
├── access_hashlong
└── file_referencebytes

Example

await app.invoke(
    UpdateProfilePhoto(
        fallback=None,
        bot=await app.resolve_user(chat_id),
        id=InputPhotoEmpty(),
    )
)