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