set_profile_photo()¶
- Client.set_profile_photo()
Changes a profile photo for the current user.
Usable by Users Bots
- Parameters:
photo (
InputChatPhoto, optional) – Profile photo to set.is_public (
bool, optional) – Pass True to set the public photo, which will be visible even if the main photo is hidden by privacy settings.
- Returns:
bool– True on success.
Example
await app.set_profile_photo(photo=types.InputChatPhotoStatic("new_photo.jpg")) await app.set_profile_photo(photo=types.InputChatPhotoAnimation("new_video.mp4")) await app.set_profile_photo(photo=types.InputChatPhotoPrevious(file_id)) await app.set_profile_photo(photo=types.InputChatPhotoStatic("new_photo.jpg"), is_public=True)