async def update_token(): sptoken = st.start_session(USERNAME, PASSWORD) access_token = sptoken[0] environ["spftoken"] = access_token environ["errorcheck"] = "1" await update_spotify_info() async def dirtyfix(): global SPOTIFYCHECK SPOTIFYCHECK = True await sleep(4) await update_spotify_info() @borg.on(admin_cmd(pattern=f"ensp", allow_sudo=True)) @borg.on(events.NewMessage(pattern=r"\.ensp ?(.*)", outgoing=True)) async def set_biostgraph(setstbio): setrecursionlimit(700000) if not SPOTIFYCHECK: environ["errorcheck"] = "0" await setstbio.edit(SPO_BIO_ENABLED) await get_spotify_token() await dirtyfix() else: await setstbio.edit(SPO_BIO_RUNNING) @borg.on(admin_cmd(pattern=f"disp", allow_sudo=True)) @borg.on(events.NewMessage(pattern=r"\.disp ?(.*)", outgoing=True)) async def set_biodgraph(setdbio):
# Made By @LEGENDX # Keep Credits else gay.... """Create Private Groups Available Commands: .create (b|g) GroupName""" from telethon.tl import functions from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd, edit_or_reply, sudo_cmd @bot.on(admin_cmd(pattern="create (b|g|c) (.*)")) # pylint:disable=E0602 @bot.on(sudo_cmd(pattern="create (b|g|c) (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return type_of_group = event.pattern_match.group(1) group_name = event.pattern_match.group(2) event = await edit_or_reply(event, "Creating wait sar.....") if type_of_group == "b": try: result = await event.client( functions.messages.CreateChatRequest( # pylint:disable=E0602 users=["@sarah_robot"], # Not enough users (to create a chat, for example) # Telegram, no longer allows creating a chat with ourselves title=group_name, )) created_chat_id = result.chats[0].id await event.client( functions.messages.DeleteChatUserRequest( chat_id=created_chat_id, user_id="@sarah_robot"))
""" .kickme """ from telethon.tl.functions.channels import LeaveChannelRequest from LEGENDX.utils import admin_cmd import time @borg.on(admin_cmd("kickme", outgoing=True)) async def leave(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): await e.edit("**I Iz lev this Kensur grp** 🤧🤧🤧🖕🏼") time.sleep(3) if '-' in str(e.chat_id): await borg(LeaveChannelRequest(e.chat_id)) else: await e.edit('**Iz this even a grp?😑**')
from re import findall from search_engine_parser import GoogleSearch from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd @borg.on(admin_cmd(pattern=r"gs (.*)")) async def gsearch(q_event): if q_event.fwd_from: return """ For .google command, do a Google search. """ match = q_event.pattern_match.group(1) page = findall(r"page=\d+", match) try: page = page[0] page = page.replace("page=", "") match = match.replace("page=" + page[0], "") except IndexError: page = 1 search_args = (str(match), int(page)) gsearch = GoogleSearch() gresults = await gsearch.async_search(*search_args) msg = "" for i in range(len(gresults["links"])): try: title = gresults["titles"][i] link = gresults["links"][i] desc = gresults["descriptions"][i] msg += f"[{title}]({link})\n`{desc}`\n\n"
import asyncio from asyncio import wait from LEGENDX.utils import admin_cmd @borg.on(admin_cmd("repeat ?(.*)")) async def _(event): message = event.text[10:] count = int(event.text[8:10]) repmessage = message * count await wait([event.respond(repmessage) for i in range(count)]) await event.delete()
import asyncio import random, re import datetime from telethon.tl.functions.account import UpdateNotifySettingsRequest from telegraph import Telegraph from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd from var import Var telegraph = Telegraph() mee = telegraph.create_account(short_name="yohohehe") @borg.on(admin_cmd(pattern="recognize ?(.*)")) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("Reply to any user's media message.") return reply_message = await event.get_reply_message() if not reply_message.media: await event.edit("reply to media file") return chat = "@Rekognition_Bot" sender = reply_message.sender if reply_message.sender.bot: await event.edit("Reply to actual users message.") return
""" Get the Bots in any chat* Syntax: .get_bot""" from telethon import events from telethon.tl.types import ChannelParticipantAdmin, ChannelParticipantsBots from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd @borg.on(admin_cmd("get_bot ?(.*)")) async def _(event): if event.fwd_from: return mentions = "**Bots in this Channel**: \n" input_str = event.pattern_match.group(1) to_write_chat = await event.get_input_chat() 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)
import os from datetime import datetime from urllib.parse import quote import barcode import qrcode import requests from barcode.writer import ImageWriter from bs4 import BeautifulSoup from PIL import Image, ImageColor from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from LEGENDX.utils import admin_cmd, edit_or_reply, sudo_cmd from LEGENDX import CMD_HELP @bot.on(admin_cmd(pattern="scan ?(.*)")) @bot.on(sudo_cmd(pattern="scan ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await edit_or_reply(event, "Reply to any user message.") return reply_message = await event.get_reply_message() if not reply_message.media: await edit_or_reply(event, "Reply to a media message") return chat = "@DrWebBot" if reply_message.sender.bot: await edit_or_reply(event, "Reply to actual users message.") return
import asyncio from collections import deque from LEGENDX.utils import admin_cmd, edit_or_reply, sudo_cmd from LEGENDX import ALIVE_NAME, CMD_HELP DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Hell User" @bot.on(admin_cmd(pattern=r"boxs$", outgoing=True)) @bot.on(sudo_cmd(pattern=r"boxs$", allow_sudo=True)) async def _(event): if event.fwd_from: return event = await edit_or_reply(event, "`boxs...`") deq = deque(list("🟥🟧🟨🟩🟦🟪🟫⬛⬜")) for _ in range(999): await asyncio.sleep(0.3) await event.edit("".join(deq)) deq.rotate(1) @bot.on(admin_cmd(pattern=r"rain$", outgoing=True)) @bot.on(sudo_cmd(pattern=r"rain$", allow_sudo=True)) async def _(event): if event.fwd_from: return event = await edit_or_reply(event, "`Raining.......`") deq = deque(list("🌬☁️🌩🌨🌧🌦🌥⛅🌤")) for _ in range(48): await asyncio.sleep(0.3)
import asyncio import os from datetime import datetime from pathlib import Path from LEGENDX import ALIVE_NAME from LEGENDX import bot from LEGENDX.utils import admin_cmd, load_module, remove_plugin, sudo_cmd from LEGENDX.utils import edit_or_reply as eor DELETE_TIMEOUT = 3 thumb_image_path = "./Resources/IMG_20201211_144821_071.jpg" DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "LEGENDX BOT" @bot.on(admin_cmd(pattern=r"send (?P<shortname>\w+)", outgoing=True)) @bot.on(sudo_cmd(pattern=r"send (?P<shortname>\w+)", allow_sudo=True)) async def send(event): if event.fwd_from: return hmm = bot.uid message_id = event.message.id thumb = thumb_image_path input_str = event.pattern_match.group(1) the_plugin_file = "./LEGENDX/plugins/{}.py".format(input_str) if os.path.exists(the_plugin_file): start = datetime.now() pro = await event.client.send_file( event.chat_id, the_plugin_file, force_document=True,
# gali plugin By LEGENDXBOT """Emoji Available Commands: .bsdk""" from telethon import events import asyncio from LEGENDX import CMD_HELP 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", "😂😂😂🤣🤣"
from pySmartDL import SmartDL from LEGENDX.uniborgConfig import Config from telethon import events from LEGENDX.utils import admin_cmd, humanbytes, progress, time_formatter import subprocess import patoolib import tarfile from LEGENDX import CMD_HELP thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg" extracted = Config.TMP_DOWNLOAD_DIRECTORY + "extracted/" if not os.path.isdir(extracted): os.makedirs(extracted) @borg.on(admin_cmd(pattern="compress")) async def _(event): if event.fwd_from: return if not event.is_reply: await event.edit("Reply to a file to compress it.") return mone = await event.edit("Processing ...") if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) if event.reply_to_msg_id: reply_message = await event.get_reply_message() try: c_time = time.time() downloaded_file_name = await borg.download_media( reply_message,
.lmlog <heroku app name> .dyno <type billing> .lmkp <type name of place as on indiankanoon.com> .lmki <Type name of item as on indiankanoon.com> .gem <Type name of item as on gem.gov.in> .archive <Type name of website you want to get info on wayback machine> """ from telethon import events import os import requests import json from LEGENDX.utils import admin_cmd @borg.on(admin_cmd(pattern="lmg (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) sample_url = "https://da.gd/s?url=http://google.com/search?q={}".format( input_str.replace(" ", "+")) response_api = requests.get(sample_url).text if response_api: await event.edit( "Let me **Googal** that for you:\n👉 [{}]({})\n`Thank me later 😉` " .format(input_str, response_api.rstrip())) else: await event.edit("Something went wrong. Please try again later.")
thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg" 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 @borg.on(admin_cmd("uploadir (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) if os.path.exists(input_str): start = datetime.now() # await event.edit("Processing ...") lst_of_files = sorted(get_lst_of_files(input_str, [])) logger.info(lst_of_files) u = 0 await event.edit( "Found {} files. ".format(len(lst_of_files)) + \ "Uploading will start soon. " + \ "Please wait!" )
# HELLO THIS IS 1ST TUTORIAL # for LEGENDX from LEGENDX.utils import admin_cmd import asyncio @borg.on(admin_cmd(pattern="hi")) async def legendx(event): await event.edit("HELLO MY CODE IS RUNNING") await asyncio.sleep(5) await event.reply("YEAH WORKING") await asyncio.sleep(5) await bot.send_message(event.chat_id, "HELLO THIS IS ALSO RUNNING") await asyncio.sleep(5) await bot.send_message("@LEGENDX", "HELLO VRO YOUR CODE IS WORKING") await asyncio.sleep(5) await bot.send_message(1100231654, "ID TRICK ALSO WORKING") # for ultroid import asyncio @ultroid_cmd(pattern="hi") async def legendx(event): await event.edit("HELLO MY CODE IS RUNNING") await asyncio.sleep(5) await event.reply("YEAH WORKING") await asyncio.sleep(5) await bot.send_message(event.chat_id, "HELLO THIS IS ALSO RUNNING")
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot plugin_info command """ from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd @borg.on(admin_cmd(outgoing=True, pattern="plinfo(?: |$)(.*)")) async def info(event): """ For .plinfo command,""" args = event.pattern_match.group(1).lower() if args: if args in CMD_HELP: await event.edit(str(CMD_HELP[args])) else: await event.edit("Please specify a valid plugin name.") else: await event.edit("Please specify which plugin do you want help for !!\ \nUsage: .pinfo <plugin name>") string = "" for i in CMD_HELP: string += "`" + str(i) string += "`\n" await event.reply(string)
# made by @LEGENDX # kang with credits else gey from telethon.errors.rpcerrorlist import YouBlockedUserError from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd bot = "@MadBoy_Rotomgram2_Bot" @borg.on(admin_cmd("weak ?(.*)")) async def _(event): if event.fwd_from: return sysarg = event.pattern_match.group(1) if sysarg == "": async with borg.conversation(bot) as conv: try: await conv.send_message("/start") await conv.get_response() await conv.send_message("/type") audio = await conv.get_response() await borg.send_message(event.chat_id, audio.text) await event.delete() except YouBlockedUserError: await event.edit("Error: unblock @inhumanDexBot and retry!") elif "@" in sysarg: async with borg.conversation(bot) as conv: try:
""" Syntax : .gps <location name> """ # Made by @mrconfused # help from @sunda005 and @SpEcHIDe # don't edit credits from geopy.geocoders import Nominatim from LEGENDX.utils import admin_cmd from telethon.tl import types @borg.on(admin_cmd(pattern="gps ?(.*)")) async def gps(event): if event.fwd_from: return reply_to_id = event.message if event.reply_to_msg_id: reply_to_id = await event.get_reply_message() input_str = event.pattern_match.group(1) if not input_str: return await event.edit("What should i find? Give me location.🤨") await event.edit("Finding😁") geolocator = Nominatim(user_agent="catLEGENDX") geoloc = geolocator.geocode(input_str) if geoloc: lon = geoloc.longitude
OWM_API = Config.OPEN_WEATHER_MAP_APPID async def get_tz(con): # Get time zone of the given country. Credits: @aragon12 and @zakaryan2004. for c_code in c_n: if con == c_n[c_code]: return tz(c_tz[c_code][0]) try: if c_n[con]: return tz(c_tz[con][0]) except KeyError: return @bot.on(admin_cmd(outgoing=True, pattern="climate( (.*)|$)")) @bot.on(sudo_cmd(pattern="climate( (.*)|$)", allow_sudo=True)) @errors_handler async def get_weather(weather): """ For .weather command, gets the current weather of a city. """ if not OWM_API: await edit_or_reply( weather, "`Get an API key from` https://openweathermap.org/ `first.`") return APPID = OWM_API if not weather.pattern_match.group(1): CITY = DEFCITY if not CITY: await edit_or_reply( weather, "`Please specify a city or set it as default.`")
import datetime from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions.account import UpdateNotifySettingsRequest from LEGENDX.utils import admin_cmd @borg.on(admin_cmd("grab ?(.*)")) 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() if not reply_message.media: await event.edit("```reply to text message```") return chat = "@ThemerBot" sender = reply_message.sender if reply_message.sender.bot: await event.edit("```Reply to actual users message.```") return await event.edit("```Processing```") async with borg.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=864838521)) await borg.forward_messages(chat, reply_message) response = await response except YouBlockedUserError:
from LEGENDX.utils import admin_cmd from math import ceil import json import random import re from telethon import events, errors, custom import io from platform import python_version, uname DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "LEGENDX BOY" global kanger #kanger aaya bhaago bc #make by LEGENDX X bht mehnat lag gayi yrr but banhi gaya 😅 @borg.on(admin_cmd(pattern=r"awake")) async def amireallyalive(awake): """ For .awake command, check if the bot is running. """ global PHOTO if PHOTO: 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.21\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"
🍆🍆🍆 🍆🍆🍆 🍆🍆🍆 🍆🍆🍆 🍆🍆🍆 🍆🍆🍆 🍆🍆🍆🍆 🍆🍆🍆🍆🍆🍆 🍆🍆🍆 🍆🍆🍆 🍆🍆 🍆🍆 """ # =========================================== @borg.on(admin_cmd(pattern=r"hf$")) async def facepalm(e): """ Facepalm 🤦♂ """ await e.edit("🤦♂") @borg.on(admin_cmd(pattern=r"corona$")) async def iqless(e): await e.edit( "Antivirus scan was completed \n⚠️ Warning! This donkey has Corona Virus" ) @borg.on(admin_cmd(pattern=r"ggl (.*)")) async def let_me_google_that_for_you(lmgtfy_q): textx = await lmgtfy_q.get_reply_message()
#credits: @Mr_Hops import datetime from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions.account import UpdateNotifySettingsRequest from LEGENDX.utils import admin_cmd from LEGENDX import CMD_HELP @borg.on(admin_cmd(pattern="recognize ?(.*)")) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("Reply to any user's media message.") return reply_message = await event.get_reply_message() if not reply_message.media: await event.edit("reply to media file") return chat = "@Rekognition_Bot" sender = reply_message.sender if reply_message.sender.bot: 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))
from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError from telethon.tl.functions.account import UpdateNotifySettingsRequest from telethon.tl.functions.messages import ImportChatInviteRequest from LEGENDX.utils import admin_cmd import time from LEGENDX import ALIVE_NAME naam = str(ALIVE_NAME) bot = "@ceowhitehatcracks" bluebot = "@ceowhitehatcracks" freebot = "@ceowhitehatcracks" @borg.on(admin_cmd("jav ?(.*)")) async def _(event): if event.fwd_from: return sysarg = event.pattern_match.group(1) if sysarg == "h": async with borg.conversation(bot) as conv: try: await conv.send_message("/start") response = await conv.get_response() await conv.send_message("/hello") audio = await conv.get_response() await borg.send_file( event.chat_id, audio,
import random, re from LEGENDX.utils import admin_cmd, edit_or_reply, sudo_cmd import asyncio from telethon import events from LEGENDX import CMD_HELP @bot.on(admin_cmd(pattern="degi$")) @bot.on(sudo_cmd(pattern="degi$", allow_sudo=True)) async def _(event): if event.fwd_from: return event = await edit_or_reply(event, "degi") await event.edit("WO") await asyncio.sleep(1.5) await event.edit("DegI") await asyncio.sleep(1.5) await event.edit("TuM") await asyncio.sleep(1.5) await event.edit("EkbaR") await asyncio.sleep(1.5) await event.edit("ManG") await asyncio.sleep(1.5) await event.edit("KaR") 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😄")
"""File Converter .convert mp3 """ import asyncio import os import time from datetime import datetime from LEGENDX.utils import admin_cmd, progress @borg.on(admin_cmd(pattern="convert (.*)")) # pylint:disable=E0602 async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) reply_message = await event.get_reply_message() if reply_message is None: await event.edit("reply to a media to use the `nfc` operation.\nInspired by @FileConverterBot") return await event.edit("trying to download media file, to my local") try: start = datetime.now() c_time = time.time() downloaded_file_name = await borg.download_media( reply_message, Config.TMP_DOWNLOAD_DIRECTORY, progress_callback=lambda d, t: asyncio.get_event_loop().create_task( progress(d, t, event, c_time, "trying to download") ) ) except Exception as e: # pylint:disable=C0103,W0703
# Credits @buddhhu #This software is a part of https://github.com/buddhhu/Plus # Ported to DC by @hellboi_atul import pygments, os, asyncio from pygments.lexers import Python3Lexer from pygments.formatters import ImageFormatter from LEGENDX.utils import admin_cmd @borg.on(admin_cmd(pattern="ncode ?(.*)")) async def coder_print(event): a = await event.client.download_media(await event.get_reply_message(), Var.TEMP_DOWNLOAD_DIRECTORY) s = open(a, 'r') c = s.read() s.close() pygments.highlight( f"{c}", Python3Lexer(), ImageFormatter(font_name="DejaVu Sans Mono", line_numbers=True), "out.png") res = await event.client.send_message( event.chat_id, "**Pasting this code on my page pls weit🤓...**", reply_to=event.reply_to_msg_id) await event.client.send_file(event.chat_id, "out.png", force_document=True, reply_to=event.reply_to_msg_id) await event.client.send_file(event.chat_id, "out.png",
"""COMMAND : .join , .pay , .work , .push , .aag , .climb, .ohh, .suckit, .lovestory, .bf""" import random import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from LEGENDX.utils import admin_cmd from LEGENDX import CMD_HELP, LOGS @borg.on(admin_cmd(pattern="join")) async def _(event): if event.fwd_from: return mentions = "`━━━━━┓ \n┓┓┓┓┓┃\n┓┓┓┓┓┃ ヽ○ノ ⇦ Me When You Joined \n┓┓┓┓┓┃. / \n┓┓┓┓┓┃ ノ) \n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" reply_message = None if event.reply_to_msg_id: reply_message = await event.get_reply_message() await reply_message.reply(mentions) else: await event.reply(mentions) await event.delete() @borg.on(admin_cmd(pattern="pay")) async def _(event): if event.fwd_from: return
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. """ Userbot module for frying stuff. ported by @NeoMatrix90 """ import io from random import randint, uniform from PIL import Image, ImageEnhance, ImageOps from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.types import DocumentAttributeFilename from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd, edit_or_reply, sudo_cmd @bot.on(admin_cmd(pattern="frybot$")) @bot.on(sudo_cmd(pattern="frybot$", allow_sudo=True)) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: event = await edit_or_reply(event, "Reply to any user message.") return reply_message = await event.get_reply_message() if event.is_reply: reply_message = await event.get_reply_message() data = await check_media(reply_message) if isinstance(data, bool): event = await edit_or_reply(event, "`I can't deep fry that!`") return if not event.is_reply:
# For The-TG-Bot-3.0 # By Priyam Kalra # Parts of the code below is taken from other sources, the links to the sources is commented above the taken code from PIL import Image, ImageFont, ImageDraw import textwrap import os from LEGENDX import CMD_HELP from LEGENDX.utils import admin_cmd, sudo_cmd from var import Var # how a lazy guy ports. client = borg @borg.on(admin_cmd("memify ?(.*)")) async def handler(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("You might want to try `.help memify`") return reply_message = await event.get_reply_message() if not reply_message.media: await event.edit("```Reply to a image/sticker.```") return file = await client.download_media(reply_message, Var.TEMP_DOWNLOAD_DIRECTORY) await event.edit("```Memifying this image! (」゚ロ゚)」 ```") text = str(event.pattern_match.group(1)).strip() if len(text) < 1: return await event.edit("You might want to try `.help memify`") meme = await drawText(file, text) await client.send_file(event.chat_id, file=meme, force_document=False) os.remove(meme)