async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("```Reply to any user message.```") return reply_message = await event.get_reply_message() chat = "@QuotLyBot" reply_message.sender if reply_message.sender.bot: await event.edit("```Reply to actual users message.```") return await event.edit("```Making a Quote```") async with bot.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=1031952739)) await bot.forward_messages(chat, reply_message) response = await response except YouBlockedUserError: await event.reply("```Please unblock @QuotLyBot and try again```") return if response.text.startswith("Hi!"): await event.edit( "```Can you kindly disable your forward privacy settings for good?```" ) else: await event.delete() await bot.forward_messages(event.chat_id, response.message)
async def DeezLoader(Deezlod): if Deezlod.fwd_from: return d_link = Deezlod.pattern_match.group(1) if ".com" not in d_link: await Deezlod.edit( "` I need a link to download something pro.`**(._.)**") else: await Deezlod.edit("**Initiating Download!**") chat = "@DeezLoadBot" async with bot.conversation(chat) as conv: try: msg_start = await conv.send_message("/start") response = await conv.get_response() r = await conv.get_response() msg = await conv.send_message(d_link) details = await conv.get_response() song = await conv.get_response() """ - don't spam notif - """ await bot.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: await Deezlod.edit("**Error:** `unblock` @DeezLoadBot `and retry!`" ) return await bot.send_file(Deezlod.chat_id, song, caption=details.text) await Deezlod.client.delete_messages( conv.chat_id, [msg_start.id, response.id, r.id, msg.id, details.id, song.id]) await Deezlod.delete()
async def WooMai(netase): if netase.fwd_from: return song = netase.pattern_match.group(1) chat = "@WooMaiBot" link = f"/netease {song}" await netase.edit("```Getting Your Music```") async with bot.conversation(chat) as conv: await asyncio.sleep(2) await netase.edit("`Downloading...Please wait`") try: msg = await conv.send_message(link) response = await conv.get_response() respond = await conv.get_response() """ - don't spam notif - """ await bot.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: await netase.reply("```Please unblock @WooMaiBot and try again```") return await netase.edit("`Sending Your Music...`") await asyncio.sleep(3) await bot.send_file(netase.chat_id, respond) await netase.client.delete_messages(conv.chat_id, [msg.id, response.id, respond.id]) await netase.delete()
async def _(event): if event.fwd_from: return link = event.pattern_match.group(1) chat = "@SpotifyMusicDownloaderBot" await event.edit("```Getting Your Music```") async with bot.conversation(chat) as conv: await asyncio.sleep(2) await event.edit( "`Downloading music taking some times, Stay Tuned.....`") try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=752979930)) await bot.send_message(chat, link) respond = await response except YouBlockedUserError: await event.reply( "```Please unblock @SpotifyMusicDownloaderBot and try again```" ) return await event.delete() await bot.forward_messages(event.chat_id, respond.message)
async def fetch_feds(event, borg): fedList = [] await event.edit("`Fetching Your FeD List`, This May Take A While.") reply_s = await event.get_reply_message() if reply_s and reply_s.media: downloaded_file_name = await borg.download_media( reply_s.media, "fedlist.txt") await asyncio.sleep(1) file = open(downloaded_file_name, "r") lines = file.readlines() for line in lines: try: fedList.append(line[:36]) except: pass # CleanUp os.remove(downloaded_file_name) return fedList async with borg.conversation("@MissRose_bot") as bot_conv: await bot_conv.send_message("/start") await bot_conv.send_message("/myfeds") response = await bot_conv.get_response(timeout=300) if "You can only use fed commands once every 5 minutes" in response.text: await event.edit("`Try again after 5 mins.`") return elif "make a file" in response.text: await event.edit( "`Boss, You Real Peru. You Are Admin in So Many Feds. WoW!`") await response.click(0) fedfile = await bot_conv.get_response() await asyncio.sleep(2) if "You can only use fed commands once every 5 minutes" in fedfile.text: await event.edit("`Try again after 5 mins.`") return if fedfile.media: downloaded_file_name = await borg.download_media( fedfile.media, "fedlist.txt") await asyncio.sleep(1) file = open(downloaded_file_name, "r") lines = file.readlines() for line in lines: try: fedList.append(line[:36]) except BaseException: pass os.remove(downloaded_file_name) else: In = False tempFedId = "" for x in response.text: if x == "`": if In: In = False fedList.append(tempFedId) tempFedId = "" else: In = True elif In: tempFedId += x await event.edit("`FeD List Fetched SucessFully.`") return fedList