diff --git a/pyrogram/methods/users/delete_profile_photos.py b/pyrogram/methods/users/delete_profile_photos.py index 2e761544..4ee8b7b5 100644 --- a/pyrogram/methods/users/delete_profile_photos.py +++ b/pyrogram/methods/users/delete_profile_photos.py @@ -43,7 +43,7 @@ class DeleteProfilePhotos: .. code-block:: python # Get the photos to be deleted - photos = list(await app.get_chat_photos("me")) + photos = [p async for p in app.get_chat_photos("me")] # Delete one photo await app.delete_profile_photos(photos[0].file_id)