delete_profile_photos()#
- Client.delete_profile_photos()#
Delete your own profile photos.
Usable by ✅ Users ✅ Bots- Parameters:
photo_ids (
str
| List ofstr
, optional) – A singlePhoto
id as string or multiple ids as list of strings for deleting more than one photos at once. If not specified, the most recent profile photo of the user would be deleted.public (
bool
, optional) – Pass True to upload a public profile photo for users who are restricted from viewing your real profile photos due to your privacy settings. Defaults to False.for_my_bot (
int
|str
, optional) – Unique identifier (int) or username (str) of the bot for which profile photo has to be updated instead of the current user. The bot should havecan_be_edited
property set to True.
- Returns:
bool
– True on success.
Example
# Get the photos to be deleted photos = [p async for p in app.get_chat_photos("me")] # Delete one photo await app.delete_profile_photos(photos[0].file_id) # Delete the rest of the photos await app.delete_profile_photos([p.file_id for p in photos[1:]]) # Delete one photo without fetching the current profile photos of the user await app.delete_profile_photos()