From 66fef430b3075987b957658ef06a9e2ea4d1edd8 Mon Sep 17 00:00:00 2001 From: Anekashastrahasta <134799010+Anekashastrahasta@users.noreply.github.com> Date: Mon, 19 Jun 2023 01:39:15 +0530 Subject: [PATCH] Fixed name 'googleimagesdownload' is not defined causing error in doing clone --- clone.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clone.py b/clone.py index e219439..33ae8be 100644 --- a/clone.py +++ b/clone.py @@ -16,7 +16,7 @@ """ import html - +import io from telethon.tl.functions.account import UpdateProfileRequest from telethon.tl.functions.photos import DeletePhotosRequest, UploadProfilePhotoRequest from telethon.tl.functions.users import GetFullUserRequest @@ -57,7 +57,8 @@ async def _(event): await event.client(UpdateProfileRequest(about=user_bio)) if profile_pic: pfile = await event.client.upload_file(profile_pic) - await event.client(UploadProfilePhotoRequest(pfile)) + await event.client(UploadProfilePhotoRequest(file=pfile)) + os.remove(profile_pic) await eve.delete() await event.client.send_message( event.chat_id, f"**I am `{first_name}` from now...**", reply_to=reply_message