updateProfilePhoto method

Future<Result<PhotosPhotoBase>> updateProfilePhoto({
  1. required bool fallback,
  2. InputUserBase? bot,
  3. required InputPhotoBase id,
})

Update Profile Photo.

ID: 09e82039.

Implementation

Future<Result<PhotosPhotoBase>> updateProfilePhoto({
  required bool fallback,
  InputUserBase? bot,
  required InputPhotoBase id,
}) async {
  // Preparing the request.
  final request = PhotosUpdateProfilePhoto(
    fallback: fallback,
    bot: bot,
    id: id,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<PhotosPhotoBase>();
}