async def download(cat): await cat.delete() if not get_parent_id(): parent_id = None else: catparent_id = get_parent_id() if len(catparent_id) == 1: parent_id = catparent_id[0].cat elif len(catparent_id) > 1: for fid in catparent_id: rmparent_id(fid.cat) parent_id = None setf = await cat.reply("Processing ...") input_str = cat.pattern_match.group(1) if input_str: gid = input_str catparent_id = get_parent_id() if len(catparent_id) == 1: if is_folder(parent_id): rmparent_id(parent_id) gparent_id(gid) await setf.edit( f"Custom Folder ID set successfully. The next uploads will upload to `{gid}` till `.gsetclear`" ) else: await setf.edit( "Use `.gsetf <link to GDrive Folder>` to set the folder to upload new files to." )
async def download(gclr): if not get_parent_id(): parent_id = None else: catparent_id = get_parent_id() if len(catparent_id) == 1: parent_id = catparent_id[0].cat elif len(catparent_id) > 1: for fid in catparent_id: rmparent_id(fid.cat) parent_id = None if parent_id: if is_folder(parent_id): rmparent_id(parent_id) await gclr.edit("Custom Folder ID cleared successfully.")