async def _(event): reply_to_id = event.message.id if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id reply = await event.get_reply_message() if event.pattern_match.group(1): query = event.pattern_match.group(1) await event.edit("wi8..! I am finding your song....") elif reply.message: query = reply.message await event.edit("wi8..! I am finding your song....") else: await event.edit("`What I am Supposed to find `") return catdef.catmusic(str(query), "320k") l = glob.glob("*.mp3") if l: await event.edit("yeah..! i found something wi8..🥰") else: await event.edit(f"Sorry..! i can't find anything with `{query}`") loa = l[0] await borg.send_file(event.chat_id, loa, force_document=True, allow_cache=False, caption=query, reply_to=reply_to_id) await event.delete() os.system("rm -rf *.mp3") subprocess.check_output("rm -rf *.mp3", shell=True)
async def _(event): reply_to_id = event.message.id if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id reply = await event.get_reply_message() if event.pattern_match.group(1): query = event.pattern_match.group(1) await event.edit("Let me find that Song. :) ") elif reply.message: query = reply.message await event.edit("let me try okay..? ") else: await event.edit("`What I am Supposed to find `") return catdef.catmusic(str(query), "320k") l = glob.glob("*.mp3") if l: await event.edit("Aah.. Somethig there.. ") else: await event.edit(f"Sorry..! i can't find anything with `{query}`") loa = l[0] await borg.send_file( event.chat_id, loa, force_document=True, allow_cache=False, caption= ("**Song Name : **" + query + "\n**Uploaded by :** [Kannan](@kannappan04) 👻\n**Channel :** [പാട്ടുപെട്ടി](t.me/puthiyapaattukal) ✅" ), reply_to=reply_to_id) await event.delete() os.system("rm -rf *.mp3") subprocess.check_output("rm -rf *.mp3", shell=True)