Esempio n. 1
0
async def del_pfp(message: Message):
    if message.input_str:
        try:
            del_c = int(message.input_str)
        except ValueError as e:
            await message.err(text=e)
            return
        await message.edit(f"Deleting first {del_c} Profile Photos")
        async for photo in userge.iter_profile_photos("me", limit=del_c):
            await userge.delete_profile_photos(photo.file_id)
    else:
        await message.edit("What am i supposed to delete nothing")
        await message.reply_sticker(sticker="CAADBQADPwAD7BHsKmSxAAHVc0NMKBYE")
Esempio n. 2
0
async def del_pfp(message: Message):
    """ delete profile pics """
    if message.input_str:
        try:
            del_c = int(message.input_str)
        except ValueError as v_e:
            await message.err(v_e)
            return
        await message.edit(f"```Deleting first {del_c} Profile Photos ...```")
        async for photo in userge.iter_profile_photos("me", limit=del_c):
            await userge.delete_profile_photos(photo.file_id)
        else:
            await message.edit(
                "```What am i supposed to delete nothing !...```")
            await message.reply_sticker(
                sticker="CAADAQAD0wAD976IR_CYoqvCwXhyFgQ")
Esempio n. 3
0
async def del_pfp(message: Message):
    """ delete profile pics """
    if message.input_str:
        try:
            del_c = int(message.input_str)
        except ValueError as v_e:
            await message.err(v_e)
            return
        await message.edit(f"```Deleting first {del_c} Profile Photos ...```")
        start = datetime.now()
        ctr = 0
        async for photo in userge.iter_profile_photos("me", limit=del_c):
            await userge.delete_profile_photos(photo.file_id)
            ctr += 1
        end = datetime.now()
        difff = (end - start).seconds
        await message.edit(f"Deleted {ctr} Profile Pics in {difff} seconds!")
    else:
        await message.err("What am i supposed to delete nothing!...")
        await message.reply_sticker(sticker="CAADAQAD0wAD976IR_CYoqvCwXhyFgQ")