mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 04:48:06 +00:00
Rename UserProfilePhotos to just Photos for brevity and elegance
This commit is contained in:
parent
3a882b870b
commit
fda456cd1e
@ -23,7 +23,7 @@ from .photo import Photo
|
|||||||
from ..pyrogram_type import PyrogramType
|
from ..pyrogram_type import PyrogramType
|
||||||
|
|
||||||
|
|
||||||
class UserProfilePhotos(PyrogramType):
|
class Photos(PyrogramType):
|
||||||
"""Contains a user's profile pictures.
|
"""Contains a user's profile pictures.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
@ -49,8 +49,8 @@ class UserProfilePhotos(PyrogramType):
|
|||||||
self.photos = photos
|
self.photos = photos
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _parse(client, photos) -> "UserProfilePhotos":
|
def _parse(client, photos) -> "Photos":
|
||||||
return UserProfilePhotos(
|
return Photos(
|
||||||
total_count=getattr(photos, "count", len(photos.photos)),
|
total_count=getattr(photos, "count", len(photos.photos)),
|
||||||
photos=[Photo._parse(client, photo) for photo in photos.photos],
|
photos=[Photo._parse(client, photo) for photo in photos.photos],
|
||||||
client=client
|
client=client
|
Loading…
x
Reference in New Issue
Block a user