async def waifu(animu): # """Creates random anime sticker!""" text = animu.pattern_match.group(1) if not text: if animu.is_reply: text = (await animu.get_reply_message()).message else: await edit_or_reply( animu, "`You haven't written any article, Waifu is going away.`" ) return animus = [1, 3, 7, 9, 13, 22, 34, 35, 36, 37, 43, 44, 45, 52, 53, 55] sticcers = await bot.inline_query( "stickerizerbot", f"#{random.choice(animus)}{(deEmojify(text))}" ) await sticcers[0].click( animu.chat_id, reply_to=animu.reply_to_msg_id, silent=True if animu.is_reply else False, hide_via=True, ) await animu.delete() CMD_HELP.update({"waifu": ".waifu : Anime that makes your writing fun."})
) 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"})
from LEGENDX import CMD_HELP from uniborg.util import admin_cmd @borg.on(admin_cmd(pattern="filext (.*)")) async def _(event): if event.fwd_from: return await event.edit("Processing ...") sample_url = "https://www.fileext.com/file-extension/{}.html" input_str = event.pattern_match.group(1).lower() response_api = requests.get(sample_url.format(input_str)) status_code = response_api.status_code if status_code == 200: raw_html = response_api.content soup = BeautifulSoup(raw_html, "html.parser") ext_details = soup.find_all("td", {"colspan": "3"})[-1].text await event.edit( "**File Extension**: `{}`\n**Description**: `{}`".format( input_str, ext_details)) else: await event.edit( "https://www.fileext.com/ responded with {} for query: {}".format( status_code, input_str)) CMD_HELP.update( {"filext": ".filext\ \nUsage: meko ni pta khud use krke dekhle 🙄.\ "})
functions.channels.CreateChannelRequest( title=group_name, about="Created By LEGENDX BOT", megagroup=type_of_group != "c", )) created_chat_id = r.chats[0].id result = await event.client( functions.messages.ExportChatInviteRequest( peer=created_chat_id, )) await event.edit( "Channel `{}` created successfully. Join {}".format( group_name, result.link)) except Exception as e: # pylint:disable=C0103,W0703 await event.edit(str(e)) else: await event.edit("Read `.plinfo create` to know how to use me") CMD_HELP.update({ "create": "**SYNTAX :** `.create b`\ \n**USAGE : **Creates a super group and send you link\ \n\n**SYNTAX : **`.create g`\ \n**USAGE : **Creates a private group and sends you link\ \n\n**SYNTAX : **`.create c`\ \n**USAGE : **Creates a Channel and sends you link\ \n\nhere the bot accout is owner\ " })
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...__""" })
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)" })
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" })
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" } )
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." })
# 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" })
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 !!' })
@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\ " })
@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.\ "})
@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__\ " })
"`◼️◼️◼️🌕◼️\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 .__""" } )
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" })
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"})
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.__" })
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. \ " } )
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." })
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.\ " } )
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." })
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\ " })
countrycode = timezone_countries[f'{country}'] except KeyError: await city.edit("`Invalid country.`") return CITY = newcity[0].strip() + "," + countrycode.strip() url = f'https://api.openweathermap.org/data/2.5/weather?q={CITY}&appid={APPID}' request = requests.get(url) result = json.loads(request.text) if request.status_code != 200: await city.edit(f"`Invalid country.`") return DEFCITY = CITY cityname = result['name'] country = result['sys']['country'] fullc_n = c_n[f"{country}"] await city.edit(f"`Set default city as {cityname}, {fullc_n}.`") CMD_HELP.update({ "weather": ".weather <city> or .weather <city>, <country name/code>\ \nUsage: Gets the weather of a city.\n\ \n.setcity <city> or .setcity <city>, <country name/code>\ \nUsage: Sets your default city so you can just use .weather." })
"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." })
return img async def check_media(reply_message): if reply_message and reply_message.media: if reply_message.photo: data = reply_message.photo elif reply_message.document: if (DocumentAttributeFilename(file_name="AnimatedSticker.tgs") in reply_message.media.document.attributes): return False if (reply_message.gif or reply_message.video or reply_message.audio or reply_message.voice): return False data = reply_message.media.document else: return False if not data or data is None: return False return data CMD_HELP.update({ "fryer": "**Syntax :** `.frybot` reply to image or sticker\ \n**Usage : **Fries the given sticker or image\ \n\n**Syntax : **`.deepfry <1 to 9>` reply to image or sticker\ \n**Usage : **Fries the given sticker or image based on level if you dont give anything then it is default to 1\ " })
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"})
from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions.account import UpdateNotifySettingsRequest from LEGENDX import bot, CMD_HELP from LEGENDX.events import register @register(outgoing=True, pattern="^.nhentai(?: |$)(.*)") async def _(event): if event.fwd_from: return link = event.pattern_match.group() chat = "@nHentaiBot" await event.edit("```Processing```") async with bot.conversation(chat) as conv: try: response = conv.wait_event(events.NewMessage(incoming=True,from_users=424466890)) await bot.send_message(chat, link) response = await response except YouBlockedUserError: await event.reply("```Please unblock @nHentaiBot and try again```") return if response.text.startswith("**Sorry I couldn't get manga from**"): await event.edit("```I think this is not the right link```") else: await event.delete() await bot.forward_messages(event.chat_id, response.message) CMD_HELP.update({ "nhentai": ".nhentai <link / code> \ \nUsage: view nhentai in telegra.ph D\n"})
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 __" })