getUserProfilePhotos method

Future<UserProfilePhotos> getUserProfilePhotos({
  1. int? offset,
  2. int? limit,
})

Gets profile photos for the user who sent the current message.

Example:

final photos = await ctx.getUserProfilePhotos();
print('User has ${photos.totalCount} profile photos');

Implementation

Future<UserProfilePhotos> getUserProfilePhotos({
  int? offset,
  int? limit,
}) async {
  final userId = from?.id;
  _verifyInfo(
    [userId],
    APIMethod.getUserProfilePhotos,
    description: "No user information found in the current update.",
  );

  return api.getUserProfilePhotos(userId!, offset: offset, limit: limit);
}