├── .deepsource.toml ├── .gitignore ├── .gitlab-ci.yml ├── Fonts └── digital.ttf ├── LICENSE ├── Procfile ├── README.md ├── README.rst ├── _config.yml ├── app.json ├── heroku_config.py ├── requirements-startup.txt ├── requirements.txt ├── telesetup.py ├── userbot ├── __init__.py ├── __main__.py ├── _core.py ├── events.py ├── google_imgs.py ├── plugins │ ├── README.md │ ├── _helper.py │ ├── _inlinebot.py │ ├── add.py │ ├── admin.py │ ├── afk.py │ ├── alive.py │ ├── android.py │ ├── animesticker.py │ ├── antivirus.py │ ├── app.py │ ├── autobio.py │ ├── autoname.py │ ├── autopic.py │ ├── avengersdp.py │ ├── barcode.py │ ├── bash.py │ ├── batch_up.py │ ├── belo.py │ ├── blacklist.py │ ├── botfeatures.py │ ├── broadcast.py │ ├── calladmin.py │ ├── carbon.py │ ├── carbonRGB.py │ ├── cbutton.py │ ├── chain.py │ ├── channel_download.py │ ├── checker.py │ ├── chotatweak.py │ ├── clock.py │ ├── clone.py │ ├── cmd_list.py │ ├── coinflip.py │ ├── colors.py │ ├── congratulations.py │ ├── conversationqt.py │ ├── count.py │ ├── countdown.py │ ├── cow.py │ ├── crackbotupdater.py │ ├── create.py │ ├── cry.py │ ├── currency.py │ ├── decide.py │ ├── deepfryer.py │ ├── delfp.py │ ├── deploy.py │ ├── design.py │ ├── diceandart.py │ ├── dictionary.py │ ├── ding.py │ ├── direct_links.py │ ├── dns.py │ ├── duckduckgo.py │ ├── dumpster.py │ ├── emojis.py │ ├── eval.py │ ├── exec.py │ ├── extload.py │ ├── extra.py │ ├── extra1.py │ ├── extranotes.py │ ├── eye.py │ ├── fconvert.py │ ├── ff_mpeg.py │ ├── figlet.py │ ├── fileext.py │ ├── filext.py │ ├── filters.py │ ├── fleaveme.py │ ├── fpost.py │ ├── frybot.py │ ├── ftext.py │ ├── fuck.py │ ├── fun.py │ ├── fwd.py │ ├── gDrive.py │ ├── gamersdp.py │ ├── gangasta.py │ ├── gbun.py │ ├── gdrive_download.py │ ├── gdrivenew.py │ ├── get_admin.py │ ├── get_bot.py │ ├── get_id.py │ ├── getmusic.py │ ├── git.py │ ├── gitcommit.py │ ├── github.py │ ├── gizoogle.py │ ├── gmute.py │ ├── google.py │ ├── got_memes.py │ ├── got_thoughts.py │ ├── gps.py │ ├── groupencounter.py │ ├── hack.py │ ├── harrypoter.py │ ├── hash.py │ ├── heroku.py │ ├── howtogoogle.py │ ├── hyperlink.py │ ├── hypnotis.py │ ├── iffuci.py │ ├── ifsc.py │ ├── imdb.py │ ├── img.py │ ├── information.py │ ├── jainder.py │ ├── jio.py │ ├── json.py │ ├── kill.py │ ├── labstack.py │ ├── lastfm.py │ ├── lastupdate.py │ ├── letmeabuse.py │ ├── list.py │ ├── listmyusernames.py │ ├── locks.py │ ├── log_pms.py │ ├── lol.py │ ├── lovestory.py │ ├── lucky.py │ ├── lydia.py │ ├── lyric.py │ ├── malayalamcalender.py │ ├── markdown.py │ ├── mashup.py │ ├── mask.py │ ├── meaning.py │ ├── meme.py │ ├── memes.py │ ├── memify.py │ ├── mention.py │ ├── mf.py │ ├── mirrorace.py │ ├── misc.py │ ├── moon.py │ ├── mp3converter.py │ ├── musicdl.py │ ├── mute.py │ ├── muth.py │ ├── nakal.py │ ├── ninja.py │ ├── np.py │ ├── ocr.py │ ├── ok.py │ ├── os.py │ ├── owm.py │ ├── padmin.py │ ├── pastebin.py │ ├── phd.py │ ├── phonecontrol.py │ ├── phub.py │ ├── pin_message.py │ ├── ping.py │ ├── plane.py │ ├── pmpermit.py │ ├── pmpermit_menu.py │ ├── police.py │ ├── polls.py │ ├── poto.py │ ├── power_tools.py │ ├── pro_nub.py │ ├── profile.py │ ├── proxyscrape.py │ ├── purge.py │ ├── qr_code.py │ ├── quickheal.py │ ├── quotes.py │ ├── quotly.py │ ├── rain.py │ ├── react.py │ ├── remove.bg.py │ ├── rename.py │ ├── repeat.py │ ├── reverse.py │ ├── sangmata.py │ ├── sca.py │ ├── screencapture.py │ ├── screenlong.py │ ├── sed.py │ ├── selfdestruct.py │ ├── shout.py │ ├── shouts.py │ ├── singer.py │ ├── slap.py │ ├── snake.py │ ├── snip.py │ ├── solarsystem.py │ ├── something.py │ ├── sp_search.py │ ├── spacedp.py │ ├── speedtest.py │ ├── sql_helper │ │ ├── __init__.py │ │ ├── blacklist_sql.py │ │ ├── broadcast_sql.py │ │ ├── filter_sql.py │ │ ├── gmute_sql.py │ │ ├── locks_sql.py │ │ ├── mute_sql.py │ │ ├── notes_sql.py │ │ ├── pmpermit_sql.py │ │ ├── police.py │ │ ├── snips_sql.py │ │ └── welcome_sql.py │ ├── stats.py │ ├── stickcreater.py │ ├── stickerchat.py │ ├── stickers.py │ ├── stt.py │ ├── supportgroup.py │ ├── tagall.py │ ├── tb_button.py │ ├── telegraph.py │ ├── test.py │ ├── thanos.py │ ├── think.py │ ├── thumbnail.py │ ├── time.py │ ├── translate.py │ ├── typing.py │ ├── ukinti.py │ ├── ultragoogle.py │ ├── undlt.py │ ├── unzipfile.py │ ├── upload_dl.py │ ├── uploadtoverysteam.py │ ├── urbandictionary.py │ ├── userinfo.py │ ├── verysteam.py │ ├── voice.py │ ├── warnbun.py │ ├── weather.py │ ├── webshot.py │ ├── webupload.py │ ├── weebify.py │ ├── welcome.py │ ├── whatsapp_hack.py │ ├── wikimedia.py │ ├── wikipedia.py │ ├── wtf.py │ ├── xkcd.py │ ├── ytdl.py │ ├── zipfile.py │ └── zombies.py ├── uniborgConfig.py └── utils.py └── var.py /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [[analyzers]] 4 | name = "python" 5 | enabled = true 6 | dependency_file_paths = ["requirements.txt"] 7 | 8 | [analyzers.meta] 9 | runtime_version = "3.x.x" 10 | max_line_length = 100 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | CheckUserBotWorking: 2 | script: 3 | - echo "Nothing" 4 | -------------------------------------------------------------------------------- /Fonts/digital.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crackexy/CrackBot/d8d1383ef7791edce158ba47a9aba1bcca752d48/Fonts/digital.ttf -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Crackexy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | userbot: python -m userbot 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CrackBot 2 | 3 | ## Use Repo At Your Own Risk... 4 | ![Enterprise](https://telegra.ph/file/3feaa0629756e0e45a2b7.jpg) 5 | 6 | [![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/) 7 | 8 | 9 | 10 | Best User Bot To Manage Your Telegram Account 11 | ## Best, Powerful, And Safest Userbot. 12 | 13 | ## CrackBot By [Crackexy](t.me/Crackexy). 14 | 15 | ### For any query or to know how it works join Group And Channel 16 | 17 | 18 | 19 | 20 | ## HOW TO DEPLOY 21 | 22 | 23 | 24 | 25 | 26 | ## Installing Heroku 27 | 28 | ### The Easy Way 29 | [![Deploy To Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Crackexy/CrackBot) 30 | 31 | ## GET STRING SESSION FROM REPL RUN 32 | 33 | ## [![Get String Session online](https://repl.it/badge/github/Crackexy/StringSession)](https://stringsession.crackexy.repl.run/) 34 | 35 | 36 | ### The Simple Way 37 | 38 | Simply clone the repository and run the main file: 39 | ```sh 40 | git clone https://github.com/starkGang/Fridayuserbot 41 | cd Userbot 42 | virtualenv -p /usr/bin/python3 venv 43 | . ./venv/bin/activate 44 | pip install -r requirements.txt 45 | # 46 | python3 -m userbot 47 | ``` 48 | 49 | An example `local_config.py` file could be: 50 | 51 | **Not All of the variables are mandatory** 52 | 53 | __The Userbot should work by setting only the first two variables__ 54 | 55 | ```python3 56 | from heroku_config import Var 57 | 58 | class Development(Var): 59 | APP_ID = 6 60 | API_HASH = "eb06d4abfb49dc3eeb1aeb98ae0f581e" 61 | ``` 62 | 63 | 64 | ### UniBorg Configuration 65 | 66 | 67 | The UniBorg Config is situated in `userbot/uniborgConfig.py`. 68 | 69 | **Heroku Configuration** 70 | Simply just leave the Config as it is. 71 | 72 | **Local Configuration** 73 | Fortunately there are no Mandatory vars for the UniBorg Support Config. 74 | 75 | ## Mandatory Vars 76 | 77 | - Only two of the environment variables are mandatory. 78 | - This is because of `telethon.errors.rpc_error_list.ApiIdPublishedFloodError` 79 | - `APP_ID`: You can get this value from https://my.telegram.org 80 | - `API_HASH`: You can get this value from https://my.telegram.org 81 | - The userbot will not work without setting the mandatory vars. 82 | 83 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Policy 🤯 2 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /heroku_config.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | class Var(object): 4 | APP_ID = int(os.environ.get("APP_ID", 6)) 5 | # 6 is a placeholder 6 | API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e") 7 | STRING_SESSION = os.environ.get("STRING_SESSION", None) 8 | DB_URI = os.environ.get("DATABASE_URL", None) 9 | TEMP_DOWNLOAD_DIRECTORY = os.environ.get("TEMP_DOWNLOAD_DIRECTORY", None) 10 | LOGGER = True 11 | GITHUB_ACCESS_TOKEN = os.environ.get("GITHUB_ACCESS_TOKEN", None) 12 | GIT_REPO_NAME = os.environ.get("GIT_REPO_NAME", None) 13 | # Here for later purposes 14 | SUDO_USERS = set(int(x) for x in os.environ.get("SUDO_USERS", "1097131648").split()) 15 | WHITELIST_USERS = set(int(x) for x in os.environ.get("WHITELIST_USERS", "832241419").split()) 16 | BLACKLIST_USERS = set(int(x) for x in os.environ.get("BLACKLIST_USERS", "").split()) 17 | DEVLOPERS = set(int(x) for x in os.environ.get("DEVLOPERS", "719195224").split()) 18 | OWNER_ID = set(int(x) for x in os.environ.get("OWNER_ID", "813878981").split()) 19 | SUPPORT_USERS = set(int(x) for x in os.environ.get("SUPPORT_USERS", "").split()) 20 | PLUGIN_CHANNEL = int(os.environ.get("PLUGIN_CHANNEL", None)) 21 | LYDIA_API_KEY = os.environ.get("LYDIA_API_KEY", None) 22 | HEROKU_API_KEY = os.environ.get("HEROKU_API_KEY", None) 23 | HEROKU_APP_NAME = os.environ.get("HEROKU_APP_NAME", None) 24 | TG_BOT_TOKEN_BF_HER = os.environ.get("TG_BOT_TOKEN_BF_HER", None) 25 | TG_BOT_USER_NAME_BF_HER = os.environ.get("TG_BOT_USER_NAME_BF_HER", None) 26 | DOWNLOAD_PFP_URL_CLOCK = os.environ.get("DOWNLOAD_PFP_URL_CLOCK", None) 27 | G_DRIVE_CLIENT_ID = os.environ.get("G_DRIVE_CLIENT_ID", None) 28 | G_DRIVE_CLIENT_SECRET = os.environ.get("G_DRIVE_CLIENT_SECRET", None) 29 | GDRIVE_FOLDER_ID = os.environ.get("GDRIVE_FOLDER_ID", "root") 30 | AUTH_TOKEN_DATA = os.environ.get("AUTH_TOKEN_DATA", None) 31 | if AUTH_TOKEN_DATA != None: 32 | os.makedirs(TEMP_DOWNLOAD_DIRECTORY) 33 | t_file = open(TEMP_DOWNLOAD_DIRECTORY+"auth_token.txt","w") 34 | t_file.write(AUTH_TOKEN_DATA) 35 | t_file.close() 36 | PRIVATE_GROUP_ID = os.environ.get("PRIVATE_GROUP_ID", None) 37 | if PRIVATE_GROUP_ID != None: 38 | try: 39 | PRIVATE_GROUP_ID = int(PRIVATE_GROUP_ID) 40 | except ValueError: 41 | raise ValueError("Invalid Private Group ID. Make sure your ID is starts with -100 and make sure that it is only numbers.") 42 | 43 | class Development(Var): 44 | LOGGER = True 45 | # Here for later purposes 46 | -------------------------------------------------------------------------------- /requirements-startup.txt: -------------------------------------------------------------------------------- 1 | Pillow>=5.3.0 2 | PyGithub 3 | aiofiles 4 | aiohttp 5 | aria2p 6 | async_generator 7 | beautifulsoup4 8 | bs4 9 | bwb==3.0.0 10 | cfscrape 11 | coffeehouse 12 | cowpy 13 | cryptg 14 | dnspython 15 | emoji 16 | gTTS-token>=1.1.3 17 | gTTS>=2.0.1 18 | geopy 19 | gitpython 20 | google-api-python-client==1.8.0 21 | google-auth-oauthlib 22 | google_images_download>=2.7.1 23 | googletrans>=2.4.0 24 | gsearch 25 | hachoir 26 | heroku3 27 | httplib2 28 | humanize 29 | lxml 30 | lyricsgenius 31 | oauth2client 32 | psycopg2 33 | psycopg2-binary 34 | PyLyrics 35 | PyPDF2 36 | pySmartDL 37 | pybase64>=0.4.0 38 | pyfiglet 39 | pylast 40 | pymongo 41 | python-barcode 42 | python-dotenv 43 | python-magic 44 | pytube 45 | pytz 46 | qrcode 47 | regex 48 | requests>=2.18.4 49 | search-engine-parser>=0.4.2 50 | selenium 51 | speedtest-cli>=2.0.2 52 | sqlalchemy>=1.2 53 | telegraph 54 | tswift 55 | urbandict>=0.5 56 | wikipedia>=1.4.0 57 | youtube-dl 58 | covid 59 | validators 60 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | telethon>=1.10.3 2 | -r requirements-startup.txt 3 | -------------------------------------------------------------------------------- /telesetup.py: -------------------------------------------------------------------------------- 1 | from telethon.sync import TelegramClient 2 | from telethon.sessions import StringSession 3 | print ("") 4 | print ("") 5 | print("""processing.......""") 6 | 7 | API_KEY = '1754367' 8 | API_HASH = "231b8cc6cca12ee51a85cf543321f476" 9 | while True: 10 | try: 11 | with TelegramClient(StringSession(), API_KEY, API_HASH) as client: 12 | print("") 13 | session = client.session.save() 14 | client.send_message("me", f"Here is your TELEGRAM STRING SESSION\n(tap to copy)👇 \n\n `{session}`") 15 | print("You telegramString session successfully stored in your telegram, please check your Telegram Saved Messages ") 16 | print("Store it safe !!") 17 | except: 18 | print ("") 19 | print ("Wrong phone number \n make sure its with correct country code") 20 | print ("") 21 | continue 22 | break 23 | -------------------------------------------------------------------------------- /userbot/__main__.py: -------------------------------------------------------------------------------- 1 | from userbot import bot 2 | from sys import argv 3 | import sys 4 | from telethon.errors.rpcerrorlist import PhoneNumberInvalidError 5 | import os 6 | from telethon import TelegramClient 7 | from var import Var 8 | from userbot.utils import load_module 9 | from userbot import LOAD_PLUG, BOTLOG_CHATID, LOGS 10 | from pathlib import Path 11 | import asyncio 12 | import telethon.utils 13 | 14 | async def add_bot(bot_token): 15 | await bot.start(bot_token) 16 | bot.me = await bot.get_me() 17 | bot.uid = telethon.utils.get_peer_id(bot.me) 18 | 19 | 20 | 21 | if len(argv) not in (1, 3, 4): 22 | bot.disconnect() 23 | else: 24 | bot.tgbot = None 25 | if Var.TG_BOT_USER_NAME_BF_HER is not None: 26 | print("Initiating Inline Bot") 27 | # ForTheGreatrerGood of beautification 28 | bot.tgbot = TelegramClient( 29 | "TG_BOT_TOKEN", 30 | api_id=Var.APP_ID, 31 | api_hash=Var.API_HASH 32 | ).start(bot_token=Var.TG_BOT_TOKEN_BF_HER) 33 | print("Initialisation finished with no errors") 34 | print("Starting Userbot") 35 | bot.loop.run_until_complete(add_bot(Var.TG_BOT_USER_NAME_BF_HER)) 36 | print("Startup Completed") 37 | else: 38 | bot.start() 39 | 40 | 41 | import glob 42 | path = 'userbot/plugins/*.py' 43 | files = glob.glob(path) 44 | for name in files: 45 | with open(name) as f: 46 | path1 = Path(f.name) 47 | shortname = path1.stem 48 | load_module(shortname.replace(".py", "")) 49 | 50 | import userbot._core 51 | 52 | print("Yo, Your Fuqing CrackBot Is Working, Now Go Fuq YourSelf Bish. Friday Userbot Base Raped And Modded By @Crackexy") 53 | 54 | if len(argv) not in (1, 3, 4): 55 | bot.disconnect() 56 | else: 57 | bot.run_until_disconnected() 58 | 59 | 60 | -------------------------------------------------------------------------------- /userbot/plugins/README.md: -------------------------------------------------------------------------------- 1 | ## Mandatory Imports 2 | ```python3 3 | None 4 | ``` 5 | There is None Mandatory Imports. Because Var, bot and command are already automatically imported. 6 | 7 | ## Explanation 8 | The Mandatory Imports are now automatically imported. 9 | 10 | ### Formation 11 | Now I will show a short script to show the formation of the desired script. 12 | ```python3 13 | @command(pattern="^.alive", outgoing=True) 14 | async def hello_world(event): 15 | if event.fwd_from: 16 | return 17 | await event.edit("**HELLO WORLD**\n\nThe following is controlling me too!\n" + Var.SUDO_USERS) 18 | ``` 19 | -------------------------------------------------------------------------------- /userbot/plugins/_helper.py: -------------------------------------------------------------------------------- 1 | from userbot import CMD_LIST 2 | from userbot.utils import admin_cmd 3 | 4 | @command(pattern="^.help ?(.*)") 5 | #@borg.on(admin_cmd(pattern=r"help ?(.*)")) 6 | async def cmd_list(event): 7 | if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): 8 | tgbotusername = Var.TG_BOT_USER_NAME_BF_HER 9 | input_str = event.pattern_match.group(1) 10 | if tgbotusername is None or input_str == "text": 11 | string = "" 12 | for i in CMD_LIST: 13 | string += "☣️ " + i + "\n" 14 | for iter_list in CMD_LIST[i]: 15 | string += " `" + str(iter_list) + "`" 16 | string += "\n" 17 | string += "\n" 18 | if len(string) > 4095: 19 | with io.BytesIO(str.encode(string)) as out_file: 20 | out_file.name = "cmd.txt" 21 | await bot.send_file( 22 | event.chat_id, 23 | out_file, 24 | force_document=True, 25 | allow_cache=False, 26 | caption="**COMMANDS**", 27 | reply_to=reply_to_id 28 | ) 29 | await event.delete() 30 | else: 31 | await event.edit(string) 32 | elif input_str: 33 | if input_str in CMD_LIST: 34 | string = "Commands found in {}:".format(input_str) 35 | for i in CMD_LIST[input_str]: 36 | string += " " + i 37 | string += "\n" 38 | await event.edit(string) 39 | else: 40 | await event.edit(input_str + " is not a valid plugin!") 41 | else: 42 | help_string = """Userbot Modules For\n [CRACKBOT](https://t.me/CrackBotUB)\nUserbot Helper to reveal all the modules""" 43 | results = await bot.inline_query( # pylint:disable=E0602 44 | tgbotusername, 45 | help_string 46 | ) 47 | await results[0].click( 48 | event.chat_id, 49 | reply_to=event.reply_to_msg_id, 50 | hide_via=True 51 | ) 52 | await event.delete() 53 | -------------------------------------------------------------------------------- /userbot/plugins/add.py: -------------------------------------------------------------------------------- 1 | """Invite the user(s) to the current chat 2 | Syntax: .invite """ 3 | 4 | from telethon import functions 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd(pattern="invite ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | to_add_users = event.pattern_match.group(1) 13 | if event.is_private: 14 | await event.edit("`.invite` users to a chat, not to a Private Message") 15 | else: 16 | logger.info(to_add_users) 17 | if not event.is_channel and event.is_group: 18 | # https://lonamiwebs.github.io/Telethon/methods/messages/add_chat_user.html 19 | for user_id in to_add_users.split(" "): 20 | try: 21 | await borg(functions.messages.AddChatUserRequest( 22 | chat_id=event.chat_id, 23 | user_id=user_id, 24 | fwd_limit=1000000 25 | )) 26 | except Exception as e: 27 | await event.reply(str(e)) 28 | await event.edit("Invited Successfully") 29 | else: 30 | # https://lonamiwebs.github.io/Telethon/methods/channels/invite_to_channel.html 31 | for user_id in to_add_users.split(" "): 32 | try: 33 | await borg(functions.channels.InviteToChannelRequest( 34 | channel=event.chat_id, 35 | users=[user_id] 36 | )) 37 | except Exception as e: 38 | await event.reply(str(e)) 39 | await event.edit("Invited Successfully") 40 | -------------------------------------------------------------------------------- /userbot/plugins/alive.py: -------------------------------------------------------------------------------- 1 | """Check if userbot alive. If you change these, you become the gayest gay such that even the gay world will disown you.""" 2 | #IMG CREDITS: @WhySooSerious 3 | import asyncio 4 | from telethon import events 5 | from uniborg.util import admin_cmd 6 | from userbot import ALIVE_NAME 7 | from telethon.tl.types import ChannelParticipantsAdmins 8 | DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "CrackBot" 9 | PM_IMG = "https://telegra.ph/file/3feaa0629756e0e45a2b7.jpg" 10 | pm_caption = "**ᴄʀᴀᴄᴋʙᴏᴛ ᴏғғɪᴄɪᴀʟ**\n\n" 11 | pm_caption += "**Yes Master, Am Alive And Systems Are Working Perfectly As It Should Be...**\n\n" 12 | pm_caption += "✘ About My System ✘\n\n" 13 | pm_caption += "➾ **Telethon Version** : 6.0.9\n➾ **Python** : 3.7.4\n" 14 | pm_caption += "➾ **DataBase** : Functioning\n" 15 | pm_caption += "➾ **Bot Creator** : [Crackexy](https://t.me/Crackexy)\n" 16 | pm_caption += "➾ **Crackbot Version** : 3.0\n\n" 17 | pm_caption += f"➾ **My Master** : {DEFAULTUSER}\n" 18 | #@command(outgoing=True, pattern="^.alive$") 19 | @borg.on(admin_cmd(pattern=r"alive")) 20 | async def amireallyalive(alive): 21 | chat = await alive.get_chat() 22 | await alive.delete() 23 | """ For .alive command, check if the bot is running. """ 24 | await borg.send_file(alive.chat_id, PM_IMG,caption=pm_caption) 25 | await alive.delete() 26 | 27 | -------------------------------------------------------------------------------- /userbot/plugins/animesticker.py: -------------------------------------------------------------------------------- 1 | #imported from ppe-remix by @heyworld & @DeletedUser420 2 | #Translated & Updated by @Sur_vivor 3 | from asyncio import sleep 4 | from random import choice, getrandbits, randint 5 | import re 6 | from re import sub 7 | import random 8 | from os import execl 9 | import time 10 | from telethon import events 11 | from userbot import bot 12 | from collections import deque 13 | import requests 14 | import sys 15 | import os 16 | import io 17 | import html 18 | import json 19 | from PIL import ImageEnhance, ImageOps 20 | 21 | from userbot import CMD_HELP 22 | from userbot.events import register 23 | 24 | 25 | 26 | EMOJI_PATTERN = re.compile( 27 | "[" 28 | "\U0001F1E0-\U0001F1FF" # flags (iOS) 29 | "\U0001F300-\U0001F5FF" # symbols & pictographs 30 | "\U0001F600-\U0001F64F" # emoticons 31 | "\U0001F680-\U0001F6FF" # transport & map symbols 32 | "\U0001F700-\U0001F77F" # alchemical symbols 33 | "\U0001F780-\U0001F7FF" # Geometric Shapes Extended 34 | "\U0001F800-\U0001F8FF" # Supplemental Arrows-C 35 | "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs 36 | "\U0001FA00-\U0001FA6F" # Chess Symbols 37 | "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A 38 | "\U00002702-\U000027B0" # Dingbats 39 | "]+") 40 | 41 | 42 | def deEmojify(inputString: str) -> str: 43 | """Remove emojis and other non-safe characters from string""" 44 | return re.sub(EMOJI_PATTERN, '', inputString) 45 | 46 | 47 | @register(outgoing=True, pattern="^.waifu(?: |$)(.*)") 48 | 49 | async def waifu(animu): 50 | #"""Creates random anime sticker!""" 51 | 52 | text = animu.pattern_match.group(1) 53 | if not text: 54 | if animu.is_reply: 55 | text = (await animu.get_reply_message()).message 56 | else: 57 | await animu.edit("`You haven't written any article, Waifu is going away.`") 58 | return 59 | animus = [1, 3, 7, 9, 13, 22, 34, 35, 36, 37, 43, 44, 45, 52, 53, 55] 60 | sticcers = await bot.inline_query( 61 | "stickerizerbot", f"#{random.choice(animus)}{(deEmojify(text))}") 62 | await sticcers[0].click(animu.chat_id, 63 | reply_to=animu.reply_to_msg_id, 64 | silent=True if animu.is_reply else False, 65 | hide_via=True) 66 | await animu.delete() 67 | 68 | 69 | CMD_HELP.update({ 70 | 'waifu': 71 | ".waifu : Anime that makes your writing fun." 72 | }) 73 | -------------------------------------------------------------------------------- /userbot/plugins/antivirus.py: -------------------------------------------------------------------------------- 1 | # Lots of lub to @r4v4n4 for gibing the base <3 2 | import datetime 3 | from telethon import events 4 | from telethon.errors.rpcerrorlist import YouBlockedUserError 5 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 6 | from userbot.utils import admin_cmd,register 7 | 8 | @borg.on(admin_cmd("scan ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | if not event.reply_to_msg_id: 13 | await event.edit("```Reply to any user message.```") 14 | return 15 | reply_message = await event.get_reply_message() 16 | if not reply_message.media: 17 | await event.edit("```reply to a media message```") 18 | return 19 | chat = "@DrWebBot" 20 | sender = reply_message.sender 21 | if reply_message.sender.bot: 22 | await event.edit("```Reply to actual users message.```") 23 | return 24 | await event.edit(" `Sliding my tip, of fingers over it`") 25 | async with borg.conversation(chat) as conv: 26 | try: 27 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=161163358)) 28 | await borg.forward_messages(chat, reply_message) 29 | response = await response 30 | except YouBlockedUserError: 31 | await event.reply("```Please unblock @sangmatainfo_bot and try again```") 32 | return 33 | if response.text.startswith("Forward"): 34 | await event.edit("```can you kindly disable your forward privacy settings for good?```") 35 | else: 36 | if response.text.startswith("Select"): 37 | await event.edit("`Please go to` @DrWebBot `and select your language.`") 38 | else: 39 | await event.edit(f"**Antivirus scan was completed. I got dem final results.**\n {response.message.message}") 40 | -------------------------------------------------------------------------------- /userbot/plugins/autobio.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import time 3 | from telethon.tl import functions 4 | from telethon.errors import FloodWaitError 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | DEL_TIME_OUT = 60 9 | 10 | 11 | @borg.on(admin_cmd(pattern="bio")) # pylint:disable=E0602 12 | async def _(event): 13 | if event.fwd_from: 14 | return 15 | while True: 16 | DMY = time.strftime("%d.%m.%Y") 17 | HM = time.strftime("%H:%M:%S") 18 | bio = f"📅 {DMY} | Haters Will Hate Just Don't Care | ⌚️ {HM}" 19 | logger.info(bio) 20 | try: 21 | await borg(functions.account.UpdateProfileRequest( # pylint:disable=E0602 22 | about=bio 23 | )) 24 | except FloodWaitError as ex: 25 | logger.warning(str(e)) 26 | await asyncio.sleep(ex.seconds) 27 | # else: 28 | # logger.info(r.stringify()) 29 | # await borg.send_message( # pylint:disable=E0602 30 | # Config.PRIVATE_GROUP_BOT_API_ID, # pylint:disable=E0602 31 | # "Successfully Changed Profile Bio" 32 | # ) 33 | await asyncio.sleep(DEL_TIME_OUT) 34 | 35 | 36 | -------------------------------------------------------------------------------- /userbot/plugins/autoname.py: -------------------------------------------------------------------------------- 1 | """Auto Profile Updation Commands 2 | .autoname""" 3 | from telethon import events 4 | import asyncio 5 | import time 6 | from telethon.tl import functions 7 | from telethon.errors import FloodWaitError 8 | from uniborg.util import admin_cmd 9 | from userbot import ALIVE_NAME 10 | 11 | 12 | DEL_TIME_OUT = 60 13 | DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "CrackBot" 14 | 15 | 16 | @borg.on(admin_cmd(pattern="autoname")) # pylint:disable=E0602 17 | async def _(event): 18 | if event.fwd_from: 19 | return 20 | while True: 21 | DM = time.strftime("%d-%m-%y") 22 | HM = time.strftime("%H:%M") 23 | name = f"🕒{HM} 😎{DEFAULTUSER}😎 📅{DM}" 24 | logger.info(name) 25 | try: 26 | await borg(functions.account.UpdateProfileRequest( # pylint:disable=E0602 27 | first_name=name 28 | )) 29 | except FloodWaitError as ex: 30 | logger.warning(str(e)) 31 | await asyncio.sleep(ex.seconds) 32 | 33 | # else: 34 | # logger.info(r.stringify()) 35 | # await borg.send_message( # pylint:disable=E0602 36 | # Config.PRIVATE_GROUP_BOT_API_ID, # pylint:disable=E0602 37 | # "Successfully Changed Profile Name" 38 | # ) 39 | await asyncio.sleep(DEL_TIME_OUT) 40 | await event.edit(f"Auto Name has been started Master") 41 | -------------------------------------------------------------------------------- /userbot/plugins/autopic.py: -------------------------------------------------------------------------------- 1 | import os 2 | from datetime import datetime 3 | from PIL import Image, ImageDraw, ImageFont 4 | from pySmartDL import SmartDL 5 | from telethon.tl import functions 6 | import asyncio 7 | import shutil 8 | from userbot.utils import admin_cmd 9 | 10 | 11 | FONT_FILE_TO_USE = "Fonts/digital.ttf" 12 | 13 | @command(pattern="^.autopic", outgoing=True) 14 | #@borg.on(admin_cmd(pattern=r"autopic")) 15 | async def autopic(event): 16 | downloaded_file_name = "userbot/original_pic.png" 17 | downloader = SmartDL(Var.DOWNLOAD_PFP_URL_CLOCK, downloaded_file_name, progress_bar=False) 18 | downloader.start(blocking=False) 19 | photo = "userbot/photo_pfp.png" 20 | while not downloader.isFinished(): 21 | place_holder = None 22 | counter = -30 23 | while True: 24 | shutil.copy(downloaded_file_name, photo) 25 | im = Image.open(photo) 26 | file_test = im.rotate(counter, expand=False).save(photo, "PNG") 27 | current_time = datetime.now().strftime("%H:%M") 28 | img = Image.open(photo) 29 | drawn_text = ImageDraw.Draw(img) 30 | fnt = ImageFont.truetype(FONT_FILE_TO_USE, 50) 31 | drawn_text.text((95, 250), current_time, font=fnt, fill=(124, 252, 0)) 32 | img.save(photo) 33 | file = await bot.upload_file(photo) # pylint:disable=E0602 34 | try: 35 | await bot(functions.photos.UploadProfilePhotoRequest( # pylint:disable=E0602 36 | file 37 | )) 38 | os.remove(photo) 39 | counter -= 30 40 | await asyncio.sleep(60) 41 | except: 42 | return 43 | -------------------------------------------------------------------------------- /userbot/plugins/avengersdp.py: -------------------------------------------------------------------------------- 1 | #Made By @MarioDevs Keep Credits If You Are Goanna Kang This Lol 2 | 3 | #And Thanks To The Creator Of Autopic This Script Was Made from Snippets From That Script 4 | 5 | #Usage .avengersdp Im Not Responsible For Any Ban caused By This 6 | 7 | import requests , re , random 8 | 9 | import urllib , os 10 | 11 | from telethon.tl import functions 12 | 13 | from datetime import datetime 14 | 15 | from PIL import Image, ImageDraw, ImageFont 16 | 17 | from userbot.utils import admin_cmd 18 | 19 | import asyncio 20 | 21 | from time import sleep 22 | 23 | COLLECTION_STRING = [ 24 | 25 | "avengers-logo-wallpaper", 26 | 27 | "avengers-hd-wallpapers-1080p", 28 | 29 | "avengers-iphone-wallpaper", 30 | 31 | "iron-man-wallpaper-1920x1080", 32 | 33 | "iron-man-wallpapers" 34 | 35 | ] 36 | 37 | async def animepp(): 38 | 39 | os.system("rm -rf donot.jpg") 40 | 41 | rnd = random.randint(0, len(COLLECTION_STRING) - 1) 42 | 43 | pack = COLLECTION_STRING[rnd] 44 | 45 | pc = requests.get("http://getwallpapers.com/collection/" + pack).text 46 | 47 | f = re.compile('/\w+/full.+.jpg') 48 | 49 | f = f.findall(pc) 50 | 51 | fy = "http://getwallpapers.com"+random.choice(f) 52 | 53 | print(fy) 54 | 55 | if not os.path.exists("f.ttf"): 56 | 57 | urllib.request.urlretrieve("https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf","f.ttf") 58 | 59 | urllib.request.urlretrieve(fy,"donottouch.jpg") 60 | 61 | @borg.on(admin_cmd(pattern="avengersdp ?(.*)")) 62 | 63 | async def main(event): 64 | 65 | await event.edit("**Starting Avengers Profile Pic...\n\nDone ! Check Your DP By @MarioDevs**") 66 | 67 | while True: 68 | 69 | await animepp() 70 | 71 | file = await event.client.upload_file("donottouch.jpg") 72 | 73 | await event.client(functions.photos.UploadProfilePhotoRequest( file)) 74 | 75 | os.system("rm -rf donottouch.jpg") 76 | 77 | await asyncio.sleep(1000) #Edit this to your required needs 78 | 79 | -------------------------------------------------------------------------------- /userbot/plugins/barcode.py: -------------------------------------------------------------------------------- 1 | """BarCode Generator 2 | Command .barcode (your text) 3 | By @snappy101 4 | """ 5 | 6 | import asyncio 7 | import barcode 8 | import os 9 | import time 10 | from barcode.writer import ImageWriter 11 | from datetime import datetime 12 | from uniborg.util import admin_cmd 13 | 14 | 15 | @borg.on(admin_cmd(pattern="barcode ?(.*)")) 16 | async def _(event): 17 | if event.fwd_from: 18 | return 19 | await event.edit("...") 20 | start = datetime.now() 21 | input_str = event.pattern_match.group(1) 22 | message = "SYNTAX: `.barcode `" 23 | reply_msg_id = event.message.id 24 | if input_str: 25 | message = input_str 26 | elif event.reply_to_msg_id: 27 | previous_message = await event.get_reply_message() 28 | reply_msg_id = previous_message.id 29 | if previous_message.media: 30 | downloaded_file_name = await borg.download_media( 31 | previous_message, 32 | Config.TMP_DOWNLOAD_DIRECTORY, 33 | ) 34 | m_list = None 35 | with open(downloaded_file_name, "rb") as fd: 36 | m_list = fd.readlines() 37 | message = "" 38 | for m in m_list: 39 | message += m.decode("UTF-8") + "\r\n" 40 | os.remove(downloaded_file_name) 41 | else: 42 | message = previous_message.message 43 | else: 44 | message = "SYNTAX: `.barcode `" 45 | bar_code_type = "code128" 46 | try: 47 | bar_code_mode_f = barcode.get(bar_code_type, message, writer=ImageWriter()) 48 | filename = bar_code_mode_f.save(bar_code_type) 49 | await borg.send_file( 50 | event.chat_id, 51 | filename, 52 | caption=message, 53 | reply_to=reply_msg_id, 54 | ) 55 | os.remove(filename) 56 | except Exception as e: 57 | await event.edit(str(e)) 58 | return 59 | end = datetime.now() 60 | ms = (end - start).seconds 61 | await event.edit("Created BarCode in {} seconds".format(ms)) 62 | await asyncio.sleep(5) 63 | await event.delete() 64 | -------------------------------------------------------------------------------- /userbot/plugins/bash.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import subprocess 3 | from telethon.errors import MessageEmptyError, MessageTooLongError, MessageNotModifiedError 4 | import io 5 | import asyncio 6 | import time 7 | 8 | 9 | @command(pattern="^.bash ?(.*)") 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | DELAY_BETWEEN_EDITS = 0.3 14 | PROCESS_RUN_TIME = 100 15 | cmd = event.pattern_match.group(1) 16 | reply_to_id = event.message.id 17 | if event.reply_to_msg_id: 18 | reply_to_id = event.reply_to_msg_id 19 | start_time = time.time() + PROCESS_RUN_TIME 20 | process = await asyncio.create_subprocess_shell( 21 | cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE 22 | ) 23 | stdout, stderr = await process.communicate() 24 | e = stderr.decode() 25 | if not e: 26 | e = "No Error" 27 | o = stdout.decode() 28 | if not o: 29 | o = "**Tip**: \n`If you want to see the results of your code, I suggest printing them to stdout.`" 30 | else: 31 | _o = o.split("\n") 32 | o = "`\n".join(_o) 33 | OUTPUT = f"**QUERY:**\n__Command:__\n`{cmd}` \n__PID:__\n`{process.pid}`\n\n**stderr:** \n`{e}`\n**Output:**\n{o}" 34 | if len(OUTPUT) > 4095: 35 | with io.BytesIO(str.encode(OUTPUT)) as out_file: 36 | out_file.name = "exec.text" 37 | await bot.send_file( 38 | event.chat_id, 39 | out_file, 40 | force_document=True, 41 | allow_cache=False, 42 | caption=cmd, 43 | reply_to=reply_to_id 44 | ) 45 | await event.delete() 46 | await event.edit(OUTPUT) 47 | -------------------------------------------------------------------------------- /userbot/plugins/batch_up.py: -------------------------------------------------------------------------------- 1 | """ 2 | Files Batch Uploader Plugin for userbot. 3 | usage:- .upb 4 | Note:- set TEMP_DIR in Your ENV Vars First. 5 | By:-@Zero_cool7870 6 | 7 | """ 8 | import os 9 | import asyncio 10 | from uniborg.util import admin_cmd 11 | from telethon import events 12 | from userbot.utils import admin_cmd 13 | 14 | 15 | @borg.on(admin_cmd(pattern=r"upb")) 16 | async def batch_upload(event): 17 | if event.fwd_from: 18 | return 19 | temp_dir = Config.TEMP_DIR 20 | if os.path.exists(temp_dir): 21 | files = os.listdir(temp_dir) 22 | files.sort() 23 | await event.edit("Uploading Files on Telegram...") 24 | for file in files: 25 | required_file_name = temp_dir+"/"+file 26 | print(required_file_name) 27 | await borg.send_file( 28 | event.chat_id, 29 | required_file_name, 30 | force_document=True 31 | ) 32 | else: 33 | await event.edit("Directory Not Found.") 34 | return 35 | await event.edit("Successfull.") 36 | -------------------------------------------------------------------------------- /userbot/plugins/calladmin.py: -------------------------------------------------------------------------------- 1 | """.admin Plugin for @UniBorg""" 2 | import asyncio 3 | from telethon import events 4 | from telethon.tl.types import ChannelParticipantsAdmins 5 | from uniborg.util import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd(pattern="admins")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | mentions = "@admin: **Spam Spotted**" 13 | chat = await event.get_input_chat() 14 | async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): 15 | mentions += f"[\u2063](tg://user?id={x.id})" 16 | reply_message = None 17 | if event.reply_to_msg_id: 18 | reply_message = await event.get_reply_message() 19 | await reply_message.reply(mentions) 20 | else: 21 | await event.reply(mentions) 22 | await event.delete() 23 | -------------------------------------------------------------------------------- /userbot/plugins/chain.py: -------------------------------------------------------------------------------- 1 | # This Source Code Form is subject to the terms of the Mozilla Public 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | 5 | from telethon import events 6 | from telethon.tl.functions.messages import SaveDraftRequest 7 | from userbot.utils import admin_cmd 8 | 9 | @borg.on(admin_cmd(pattern="chain")) 10 | async def _(event): 11 | await event.edit("Counting...") 12 | count = -1 13 | message = event.message 14 | while message: 15 | reply = await message.get_reply_message() 16 | if reply is None: 17 | await borg(SaveDraftRequest( 18 | await event.get_input_chat(), 19 | "", 20 | reply_to_msg_id=message.id 21 | )) 22 | message = reply 23 | count += 1 24 | await event.edit(f"Chain length: {count}") 25 | -------------------------------------------------------------------------------- /userbot/plugins/chotatweak.py: -------------------------------------------------------------------------------- 1 | 2 | import datetime 3 | from telethon import events 4 | from telethon.errors.rpcerrorlist import YouBlockedUserError 5 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 6 | from uniborg.util import admin_cmd 7 | 8 | @borg.on(admin_cmd(pattern="ctg ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | if not event.reply_to_msg_id: 13 | await event.edit("```Reply to a Link.```") 14 | return 15 | reply_message = await event.get_reply_message() 16 | if not reply_message.text: 17 | await event.edit("```Reply to a Link```") 18 | return 19 | chat = "@chotamreaderbot" 20 | sender = reply_message.sender 21 | await event.edit("```Processing```") 22 | async with event.client.conversation(chat) as conv: 23 | try: 24 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=272572121)) 25 | await event.client.forward_messages(chat, reply_message) 26 | response = await response 27 | except YouBlockedUserError: 28 | await event.reply("`RIP Check Your Blacklist Boss`") 29 | return 30 | if response.text.startswith(""): 31 | await event.edit("Am I Dumb Or Am I Dumb?") 32 | else: 33 | await event.delete() 34 | await event.client.send_message(event.chat_id, response.message) 35 | -------------------------------------------------------------------------------- /userbot/plugins/clock.py: -------------------------------------------------------------------------------- 1 | # (c) @UniBorg 2 | # Original written by @UniBorg edit by @INF1N17Y 3 | 4 | from telethon import events 5 | import asyncio 6 | from collections import deque 7 | from userbot.utils import admin_cmd 8 | 9 | 10 | @borg.on(admin_cmd(pattern=r"clock")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | deq = deque(list("🕛🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚")) 15 | for _ in range(60): 16 | await asyncio.sleep(0.1) 17 | await event.edit("".join(deq)) 18 | deq.rotate(1) 19 | 20 | -------------------------------------------------------------------------------- /userbot/plugins/cmd_list.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import subprocess 3 | import asyncio 4 | import time 5 | from userbot.utils import admin_cmd 6 | 7 | #@command(pattern="^.cmds", outgoing=True) 8 | @borg.on(admin_cmd(pattern=r"cmds")) 9 | async def install(event): 10 | if event.fwd_from: 11 | return 12 | cmd = "ls userbot/plugins" 13 | process = await asyncio.create_subprocess_shell( 14 | cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE 15 | ) 16 | stdout, stderr = await process.communicate() 17 | o = stdout.decode() 18 | _o = o.split("\n") 19 | o = "\n".join(_o) 20 | OUTPUT = f"**List of Plugins:**\n{o}\n\n**HELP:** __If you want to know the commands for a plugin, do:-__ \n `.help ` **without the < > brackets.**\n__All plugins might not work directly." 21 | await event.edit(OUTPUT) 22 | -------------------------------------------------------------------------------- /userbot/plugins/coinflip.py: -------------------------------------------------------------------------------- 1 | """CoinFlip for @UniBorg 2 | Syntax: .coinflip [optional_choice]""" 3 | from telethon import events 4 | import random, re 5 | from uniborg.util import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd(pattern="coin ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | r = random.randint(1, 100) 13 | input_str = event.pattern_match.group(1) 14 | if input_str: 15 | input_str = input_str.lower() 16 | if r % 2 == 1: 17 | if input_str == "heads": 18 | await event.edit("The coin landed on: **Heads**. \n You were correct.") 19 | elif input_str == "tails": 20 | await event.edit("The coin landed on: **Heads**. \n You weren't correct, try again ...") 21 | else: 22 | await event.edit("The coin landed on: **Heads**.") 23 | elif r % 2 == 0: 24 | if input_str == "tails": 25 | await event.edit("The coin landed on: **Tails**. \n You were correct.") 26 | elif input_str == "heads": 27 | await event.edit("The coin landed on: **Tails**. \n You weren't correct, try again ...") 28 | else: 29 | await event.edit("The coin landed on: **Tails**.") 30 | else: 31 | await event.edit("¯\_(ツ)_/¯") 32 | -------------------------------------------------------------------------------- /userbot/plugins/colors.py: -------------------------------------------------------------------------------- 1 | """Color Plugin for @UniBorg 2 | Syntax: .color """ 3 | from telethon import events 4 | import os 5 | from PIL import Image, ImageColor 6 | from userbot.utils import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd(pattern="color (.*)")) 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | input_str = event.pattern_match.group(1) 14 | message_id = event.message.id 15 | if event.reply_to_msg_id: 16 | message_id = event.reply_to_msg_id 17 | if input_str.startswith("#"): 18 | try: 19 | usercolor = ImageColor.getrgb(input_str) 20 | except Exception as e: 21 | await event.edit(str(e)) 22 | return False 23 | else: 24 | im = Image.new(mode="RGB", size=(1280, 720), color=usercolor) 25 | im.save("UniBorg.png", "PNG") 26 | input_str = input_str.replace("#", "#COLOR_") 27 | await borg.send_file( 28 | event.chat_id, 29 | "UniBorg.png", 30 | force_document=False, 31 | caption=input_str, 32 | reply_to=message_id 33 | ) 34 | os.remove("UniBorg.png") 35 | await event.delete() 36 | else: 37 | await event.edit("Syntax: `.color `") 38 | -------------------------------------------------------------------------------- /userbot/plugins/congratulations.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import random, re 3 | from uniborg.util import admin_cmd 4 | 5 | RUNSREACTS = [ 6 | "`Congratulations and BRAVO!`", 7 | "`You did it! So proud of you!`", 8 | "`This calls for celebrating! Congratulations!`", 9 | "`I knew it was only a matter of time. Well done!`", 10 | "`Congratulations on your well-deserved success.`", 11 | "`Heartfelt congratulations to you.`", 12 | "`Warmest congratulations on your achievement.`", 13 | "`Congratulations and best wishes for your next adventure!”`", 14 | "`So pleased to see you accomplishing great things.`", 15 | "`Feeling so much joy for you today. What an impressive achievement!`", 16 | ] 17 | 18 | @borg.on(admin_cmd(pattern="congo")) 19 | async def _(event): 20 | if event.fwd_from: 21 | return 22 | bro = random.randint(0, len(RUNSREACTS) - 1) 23 | reply_text = RUNSREACTS[bro] 24 | await event.edit(reply_text) 25 | -------------------------------------------------------------------------------- /userbot/plugins/countdown.py: -------------------------------------------------------------------------------- 1 | """COMMAND : .cd, .scd, .padmin""" 2 | 3 | from telethon import events 4 | 5 | from datetime import datetime 6 | 7 | from uniborg.util import admin_cmd 8 | 9 | import importlib.util 10 | 11 | import asyncio 12 | 13 | import random 14 | 15 | import importlib.util 16 | 17 | 18 | 19 | 20 | 21 | @borg.on(admin_cmd(pattern='(f?c)d ')) 22 | 23 | async def timer_blankx(e): 24 | 25 | txt=e.text[4:] + '\nDeleting in ' 26 | 27 | j=86400 28 | 29 | k=j 30 | 31 | for j in range(j): 32 | 33 | await e.edit(txt + str(k)) 34 | 35 | k=k-50 36 | 37 | await asyncio.sleep(50) 38 | 39 | if e.pattern_match.group(1) == 'c': 40 | 41 | await e.delete() 42 | 43 | else: 44 | 45 | await e.edit(txt + 'NaN') 46 | 47 | 48 | @borg.on(admin_cmd(pattern='(f?s)cd ')) 49 | 50 | async def timer_blankx(e): 51 | 52 | txt=e.text[4:] + '\nDeleting in ' 53 | 54 | j=10 55 | 56 | k=j 57 | 58 | for j in range(j): 59 | 60 | await e.edit(txt + str(k)) 61 | 62 | k=k-1 63 | 64 | await asyncio.sleep(1) 65 | 66 | if e.pattern_match.group(1) == 's': 67 | 68 | await e.delete() 69 | 70 | else: 71 | 72 | await e.edit(txt + 'NaN') 73 | 74 | 75 | 76 | 77 | @borg.on(events.NewMessage(outgoing=True, pattern='^\.(f?p)an ')) 78 | 79 | async def timer_blankx(e): 80 | 81 | txt=e.text[7:] + '\n\n`Promoting You As Admin In` ' 82 | 83 | j=5 84 | 85 | k=j 86 | 87 | for j in range(j): 88 | 89 | await e.edit(txt + str(k)) 90 | 91 | k=k-1 92 | 93 | await asyncio.sleep(1) 94 | 95 | if e.pattern_match.group(1) == 'f': 96 | 97 | await e.edit("`Successfully Promoted As Admin.` ") 98 | 99 | -------------------------------------------------------------------------------- /userbot/plugins/cow.py: -------------------------------------------------------------------------------- 1 | """.cowsay, .tuxsay, .milksay, .kisssay, .wwwsay, .defaultsay, .bunnysay, 2 | .moosesay, .sheepsay, .rensay, .cheesesay, .ghostbusterssay, .skeletonsay, 3 | and may cmd would be added soon.""" 4 | 5 | 6 | import asyncio 7 | from telethon import events 8 | from cowpy import cow 9 | from uniborg.util import admin_cmd 10 | 11 | 12 | @borg.on(events.NewMessage(pattern=r"^.(\w+)say (.*)", outgoing=True)) 13 | async def univsaye(cowmsg): 14 | """ For .cowsay module, uniborg wrapper for cow which says things. """ 15 | if not cowmsg.text[0].isalpha() and cowmsg.text[0] not in ("/", "#", "@", "!"): 16 | arg = cowmsg.pattern_match.group(1).lower() 17 | text = cowmsg.pattern_match.group(2) 18 | 19 | if arg == "cow": 20 | arg = "default" 21 | if arg not in cow.COWACTERS: 22 | return 23 | cheese = cow.get_cow(arg) 24 | cheese = cheese() 25 | 26 | await cowmsg.edit(f"`{cheese.milk(text).replace('`', '´')}`") 27 | -------------------------------------------------------------------------------- /userbot/plugins/cry.py: -------------------------------------------------------------------------------- 1 | """Use cmd `.cry` to cry""" 2 | 3 | from telethon import events 4 | from uniborg.util import admin_cmd 5 | import asyncio 6 | 7 | 8 | 9 | 10 | 11 | @borg.on(admin_cmd(pattern="lcry")) 12 | 13 | async def _(event): 14 | 15 | if event.fwd_from: 16 | 17 | return 18 | 19 | animation_interval = 1 20 | 21 | 22 | animation_ttl = range(0, 103) 23 | 24 | 25 | 26 | 27 | 28 | await event.edit("crying") 29 | 30 | animation_chars = [ 31 | 32 | ";__", 33 | ";___", 34 | ";____", 35 | ";_____", 36 | ";______", 37 | ";_______", 38 | ";________", 39 | ";__________", 40 | ";____________", 41 | ";______________", 42 | ";________________", 43 | ";__________________", 44 | ";____________________", 45 | ";______________________", 46 | ";________________________", 47 | ";_________________________", 48 | ";_________________________", 49 | ";________________________", 50 | ";_______________________", 51 | ";______________________", 52 | ";_____________________", 53 | ";____________________", 54 | ";___________________", 55 | ";__________________", 56 | ";_________________", 57 | ";________________", 58 | ";_______________", 59 | ";_____________", 60 | ";___________", 61 | ";_________", 62 | ";_______", 63 | ";_____", 64 | ";____", 65 | ";___", 66 | ";__", 67 | ";You made me `CRY`" 68 | ] 69 | 70 | for i in animation_ttl: 71 | 72 | await asyncio.sleep(animation_interval) 73 | await event.edit(animation_chars[i % 35]) 74 | -------------------------------------------------------------------------------- /userbot/plugins/currency.py: -------------------------------------------------------------------------------- 1 | """Currency Converter Plugin for @UniBorg 2 | Syntax: .currency number from to""" 3 | from telethon import events 4 | import asyncio 5 | from datetime import datetime 6 | import requests 7 | from uniborg.util import admin_cmd 8 | 9 | 10 | @borg.on(admin_cmd(pattern="currency (.*)")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | start = datetime.now() 15 | input_str = event.pattern_match.group(1) 16 | input_sgra = input_str.split(" ") 17 | if len(input_sgra) == 3: 18 | try: 19 | number = float(input_sgra[0]) 20 | currency_from = input_sgra[1].upper() 21 | currency_to = input_sgra[2].upper() 22 | request_url = "https://api.exchangeratesapi.io/latest?base={}".format(currency_from) 23 | current_response = requests.get(request_url).json() 24 | if currency_to in current_response["rates"]: 25 | current_rate = float(current_response["rates"][currency_to]) 26 | rebmun = round(number * current_rate, 2) 27 | await event.edit("{} {} = {} {}".format(number, currency_from, rebmun, currency_to)) 28 | else: 29 | await event.edit("IDEKNOWTDWTT") 30 | except e: 31 | await event.edit(str(e)) 32 | else: 33 | await event.edit("`.currency number from to`") 34 | end = datetime.now() 35 | ms = (end - start).seconds 36 | -------------------------------------------------------------------------------- /userbot/plugins/decide.py: -------------------------------------------------------------------------------- 1 | """Quickly make a decision 2 | Syntax: .decide""" 3 | from telethon import events 4 | import requests 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("decide")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | message_id = event.message.id 13 | if event.reply_to_msg_id: 14 | message_id = event.reply_to_msg_id 15 | r = requests.get("https://yesno.wtf/api").json() 16 | await borg.send_message( 17 | event.chat_id, 18 | r["answer"], 19 | reply_to=message_id, 20 | file=r["image"] 21 | ) 22 | await event.delete() 23 | -------------------------------------------------------------------------------- /userbot/plugins/delfp.py: -------------------------------------------------------------------------------- 1 | from telethon.errors import ImageProcessFailedError, PhotoCropSizeSmallError 2 | 3 | from telethon.errors.rpcerrorlist import (PhotoExtInvalidError, 4 | UsernameOccupiedError) 5 | 6 | from telethon.tl.functions.account import (UpdateProfileRequest, 7 | UpdateUsernameRequest) 8 | 9 | from telethon.tl.functions.channels import GetAdminedPublicChannelsRequest 10 | 11 | from telethon.tl.functions.photos import (DeletePhotosRequest, 12 | GetUserPhotosRequest, 13 | UploadProfilePhotoRequest) 14 | 15 | from telethon.tl.types import InputPhoto, MessageMediaPhoto, User, Chat, Channel 16 | 17 | from uniborg.util import admin_cmd 18 | 19 | @borg.on(admin_cmd(pattern="delpfp ?(.*)")) 20 | async def remove_profilepic(delpfp): 21 | """ For .delpfp command, delete your current profile picture in Telegram. """ 22 | group = delpfp.text[8:] 23 | if group == 'all': 24 | lim = 0 25 | elif group.isdigit(): 26 | lim = int(group) 27 | else: 28 | lim = 1 29 | 30 | pfplist = await delpfp.client( 31 | GetUserPhotosRequest(user_id=delpfp.from_id, 32 | offset=0, 33 | max_id=0, 34 | limit=lim)) 35 | input_photos = [] 36 | for sep in pfplist.photos: 37 | input_photos.append( 38 | InputPhoto(id=sep.id, 39 | access_hash=sep.access_hash, 40 | file_reference=sep.file_reference)) 41 | await delpfp.client(DeletePhotosRequest(id=input_photos)) 42 | await delpfp.edit( 43 | f"`Successfully deleted {len(input_photos)} profile picture(s).`") 44 | -------------------------------------------------------------------------------- /userbot/plugins/deploy.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .deploy""" 6 | 7 | from telethon import events 8 | 9 | import asyncio 10 | 11 | from uniborg.util import admin_cmd 12 | 13 | from userbot import AUTONAME 14 | 15 | 16 | DEFAULTUSER = str(AUTONAME) if AUTONAME else "FRIDAY" 17 | 18 | @borg.on(admin_cmd(pattern=r"deploy")) 19 | 20 | async def _(event): 21 | 22 | if event.fwd_from: 23 | 24 | return 25 | 26 | animation_interval = 10 27 | 28 | animation_ttl = range(0, 12) 29 | 30 | # input_str = event.pattern_match.group(1) 31 | 32 | 33 | 34 | await event.edit("Deploying...") 35 | 36 | animation_chars = [ 37 | 38 | "**Heroku Connecting To Latest Github Build (Crackexy/Crackbot)**", 39 | "**Build started by user** **{DEFAULTUSER}**", 40 | "**Deploy** `535a74f0` **by user** **{DEFAULTUSER}**", 41 | "**Restarting Heroku Server...**", 42 | "**State changed from up to starting**", 43 | "**Stopping all processes with SIGTERM**", 44 | "**Process exited with** `status 143`", 45 | "**Starting process with command** `python3 -m stdborg`", 46 | "**State changed from starting to up**", 47 | "__INFO:CrackBot:Logged in as 557667062__", 48 | "__INFO:CrackBot:Successfully loaded all plugins__", 49 | "**Build Succeeded**" 50 | 51 | ] 52 | 53 | for i in animation_ttl: 54 | 55 | await asyncio.sleep(animation_interval) 56 | 57 | await event.edit(animation_chars[i % 12]) 58 | -------------------------------------------------------------------------------- /userbot/plugins/design.py: -------------------------------------------------------------------------------- 1 | """.admin Plugin for @UniBorg""" 2 | import asyncio 3 | from telethon import events 4 | from telethon.tl.types import ChannelParticipantsAdmins 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("join")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | 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┓┓┓┓┓┃`" 13 | chat = await event.get_input_chat() 14 | async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): 15 | mentions += f"" 16 | reply_message = None 17 | if event.reply_to_msg_id: 18 | reply_message = await event.get_reply_message() 19 | await reply_message.reply(mentions) 20 | else: 21 | await event.reply(mentions) 22 | await event.delete() 23 | 24 | @borg.on(admin_cmd("pay")) 25 | async def _(event): 26 | if event.fwd_from: 27 | return 28 | mentions = "`█▀▀▀▀▀█░▀▀░░░█░░░░█▀▀▀▀▀█\n█░███░█░█▄░█▀▀░▄▄░█░███░█\n█░▀▀▀░█░▀█▀▀▄▀█▀▀░█░▀▀▀░█\n▀▀▀▀▀▀▀░▀▄▀▄▀▄█▄▀░▀▀▀▀▀▀▀\n█▀█▀▄▄▀░█▄░░░▀▀░▄█░▄▀█▀░▀\n░█▄▀░▄▀▀░░░▄▄▄█░▀▄▄▄▀▄▄▀▄\n░░▀█░▀▀▀▀▀▄█░▄░████ ██▀█▄\n▄▀█░░▄▀█▀█▀░█▄▀░▀█▄██▀░█▄\n░░▀▀▀░▀░█▄▀▀▄▄░▄█▀▀▀█░█▀▀\n█▀▀▀▀▀█░░██▀█░░▄█░▀░█▄░██\n█░███░█░▄▀█▀██▄▄▀▀█▀█▄░▄▄\n█░▀▀▀░█░█░░▀▀▀░█░▀▀▀▀▄█▀░\n▀▀▀▀▀▀▀░▀▀░░▀░▀░░░▀▀░▀▀▀▀`" 29 | chat = await event.get_input_chat() 30 | async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): 31 | mentions += f"" 32 | reply_message = None 33 | if event.reply_to_msg_id: 34 | reply_message = await event.get_reply_message() 35 | await reply_message.reply(mentions) 36 | else: 37 | await event.reply(mentions) 38 | await event.delete() 39 | -------------------------------------------------------------------------------- /userbot/plugins/diceandart.py: -------------------------------------------------------------------------------- 1 | from telethon.tl.types import InputMediaDice 2 | from userbot.utils import admin_cmd 3 | 4 | # EMOJI CONSTANTS 5 | DART_E_MOJI = "🎯" 6 | DICE_E_MOJI = "🎲" 7 | BALL_E_MOJI = "🏀" 8 | # EMOJI CONSTANTS 9 | 10 | 11 | @borg.on(admin_cmd(pattern=f"({DART_E_MOJI}|{DICE_E_MOJI}|{BALL_E_MOJI}) ?(.*)")) 12 | async def _(event): 13 | if event.fwd_from: 14 | return 15 | reply_message = event 16 | if event.reply_to_msg_id: 17 | reply_message = await event.get_reply_message() 18 | emoticon = event.pattern_match.group(1) 19 | input_str = event.pattern_match.group(2) 20 | await event.delete() 21 | r = await reply_message.reply(file=InputMediaDice(emoticon=emoticon)) 22 | if input_str: 23 | try: 24 | required_number = int(input_str) 25 | while not r.media.value == required_number: 26 | await r.delete() 27 | r = await reply_message.reply(file=InputMediaDice(emoticon=emoticon)) 28 | except: 29 | pass 30 | -------------------------------------------------------------------------------- /userbot/plugins/dictionary.py: -------------------------------------------------------------------------------- 1 | """Dictionary Plugin for @UniBorg 2 | Syntax: .meaning """ 3 | 4 | import requests 5 | from telethon import events 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd("meaning (.*)")) 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | input_str = event.pattern_match.group(1) 14 | input_url = "https://bots.shrimadhavuk.me/dictionary/?s={}".format(input_str) 15 | headers = {"USER-AGENT": "UniBorg"} 16 | caption_str = f"Meaning of __{input_str}__\n" 17 | try: 18 | response = requests.get(input_url, headers=headers).json() 19 | pronounciation = response.get("p") 20 | meaning_dict = response.get("lwo") 21 | for current_meaning in meaning_dict: 22 | current_meaning_type = current_meaning.get("type") 23 | current_meaning_definition = current_meaning.get("definition") 24 | caption_str += f"**{current_meaning_type}**: {current_meaning_definition}\n\n" 25 | except Exception as e: 26 | caption_str = str(e) 27 | reply_msg_id = event.message.id 28 | if event.reply_to_msg_id: 29 | reply_msg_id = event.reply_to_msg_id 30 | try: 31 | await borg.send_file( 32 | event.chat_id, 33 | pronounciation, 34 | caption=f"Pronounciation of __{input_str}__", 35 | force_document=False, 36 | reply_to=reply_msg_id, 37 | allow_cache=True, 38 | voice_note=True, 39 | silent=True, 40 | supports_streaming=True 41 | ) 42 | except: 43 | pass 44 | await event.edit(caption_str) 45 | -------------------------------------------------------------------------------- /userbot/plugins/ding.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .ding""" 6 | 7 | from telethon import events 8 | 9 | import asyncio 10 | 11 | from userbot.utils import admin_cmd 12 | 13 | 14 | 15 | @borg.on(admin_cmd(pattern=r"ding")) 16 | 17 | async def _(event): 18 | 19 | if event.fwd_from: 20 | 21 | return 22 | 23 | animation_interval = 0.5 24 | 25 | animation_ttl = range(0, 10) 26 | 27 | #input_str = event.pattern_match.group(1) 28 | 29 | #if input_str == "ding": 30 | 31 | await event.edit("**Dong**") 32 | 33 | animation_chars = [ 34 | 35 | "🔴⬛⬛⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 36 | "⬜⬜⬛⬜⬜\n⬜⬛⬜⬜⬜\n🔴⬜⬜⬜⬜", 37 | "⬜⬜⬛⬜⬜\n⬜⬜⬛⬜⬜\n⬜⬜🔴⬜⬜", 38 | "⬜⬜⬛⬜⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜⬜🔴", 39 | "⬜⬜⬛⬛🔴\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 40 | "⬜⬜⬛⬜⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜⬜🔴", 41 | "⬜⬜⬛⬜⬜\n⬜⬜⬛⬜⬜\n⬜⬜🔴⬜⬜", 42 | "⬜⬜⬛⬜⬜\n⬜⬛⬜⬜⬜\n🔴⬜⬜⬜⬜", 43 | "🔴⬛⬛⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 44 | "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n⬜ CRACKBOT ⬜\n⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜" 45 | 46 | ] 47 | 48 | for i in animation_ttl: 49 | 50 | await asyncio.sleep(animation_interval) 51 | 52 | await event.edit(animation_chars[i % 10]) 53 | -------------------------------------------------------------------------------- /userbot/plugins/dns.py: -------------------------------------------------------------------------------- 1 | """DA.GD helpers in @UniBorg 2 | Available Commands: 3 | .isup URL 4 | .dns google.com 5 | .url 6 | .unshort """ 7 | from telethon import events 8 | import os 9 | import requests 10 | import json 11 | from userbot.utils import admin_cmd 12 | 13 | 14 | @borg.on(admin_cmd("dns (.*)")) 15 | async def _(event): 16 | if event.fwd_from: 17 | return 18 | input_str = event.pattern_match.group(1) 19 | sample_url = "https://da.gd/dns/{}".format(input_str) 20 | response_api = requests.get(sample_url).text 21 | if response_api: 22 | await event.edit("DNS records of {} are \n{}".format(input_str, response_api)) 23 | else: 24 | await event.edit("i can't seem to find {} on the internet".format(input_str)) 25 | 26 | 27 | @borg.on(admin_cmd("url (.*)")) 28 | async def _(event): 29 | if event.fwd_from: 30 | return 31 | input_str = event.pattern_match.group(1) 32 | sample_url = "https://da.gd/s?url={}".format(input_str) 33 | response_api = requests.get(sample_url).text 34 | if response_api: 35 | await event.edit("Generated {} for {}.".format(response_api, input_str)) 36 | else: 37 | await event.edit("something is wrong. please try again later.") 38 | 39 | 40 | @borg.on(admin_cmd("unshort (.*)")) 41 | async def _(event): 42 | if event.fwd_from: 43 | return 44 | input_str = event.pattern_match.group(1) 45 | if not input_str.startswith("http"): 46 | input_str = "http://" + input_str 47 | r = requests.get(input_str, allow_redirects=False) 48 | if str(r.status_code).startswith('3'): 49 | await event.edit("Input URL: {}\nReDirected URL: {}".format(input_str, r.headers["Location"])) 50 | else: 51 | await event.edit("Input URL {} returned status_code {}".format(input_str, r.status_code)) 52 | -------------------------------------------------------------------------------- /userbot/plugins/duckduckgo.py: -------------------------------------------------------------------------------- 1 | """use command .ducduckgo""" 2 | 3 | from telethon import events 4 | import os 5 | import requests 6 | import json 7 | from uniborg.util import admin_cmd 8 | 9 | 10 | @borg.on(admin_cmd("ducduckgo (.*)")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | input_str = event.pattern_match.group(1) 15 | sample_url = "https://duckduckgo.com/?q={}".format(input_str.replace(" ","+")) 16 | if sample_url: 17 | link = sample_url.rstrip() 18 | await event.edit("Let me 🦆 DuckDuckGo that for you:\n🔎 [{}]({})".format(input_str, link)) 19 | else: 20 | await event.edit("something is wrong. please try again later.") 21 | -------------------------------------------------------------------------------- /userbot/plugins/dumpster.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import asyncio 3 | from userbot.utils import admin_cmd 4 | 5 | 6 | @borg.on(admin_cmd(pattern="dump ?(.*)")) 7 | async def _(message): 8 | try: 9 | obj = message.pattern_match.group(1) 10 | if len(obj) != 3: 11 | raise IndexError 12 | inp = ' '.join(obj) 13 | except IndexError: 14 | inp = "🥞 🎂 🍫" 15 | u, t, g, o, s, n = inp.split(), '🗑', '<(^_^ <)', '(> ^_^)>', '⠀ ', '\n' 16 | h = [(u[0], u[1], u[2]), (u[0], u[1], ''), (u[0], '', '')] 17 | for something in reversed([y for y in ([''.join(x) for x in ( 18 | f + (s, g, s + s * f.count(''), t), f + (g, s * 2 + s * f.count(''), t), 19 | f[:i] + (o, f[i], s * 2 + s * f.count(''), t), f[:i] + (s + s * f.count(''), o, f[i], s, t), 20 | f[:i] + (s * 2 + s * f.count(''), o, f[i], t), f[:i] + (s * 3 + s * f.count(''), o, t), 21 | f[:i] + (s * 3 + s * f.count(''), g, t))] for i, f in enumerate(reversed(h)))]): 22 | for something_else in something: 23 | await asyncio.sleep(0.3) 24 | try: 25 | await message.edit(something_else) 26 | except errors.MessageIdInvalidError: 27 | return 28 | -------------------------------------------------------------------------------- /userbot/plugins/emojis.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | Available Commands: 3 | .emoji shrug 4 | .emoji apple 5 | .emoji :/ 6 | .emoji -_-""" 7 | from telethon import events 8 | import asyncio 9 | from uniborg.util import admin_cmd 10 | 11 | 12 | @borg.on(admin_cmd(pattern="emoji (.*)")) 13 | async def _(event): 14 | if event.fwd_from: 15 | return 16 | animation_interval = 0.3 17 | animation_ttl = range(0, 16) 18 | input_str = event.pattern_match.group(1) 19 | if input_str == "shrug": 20 | await event.edit("¯\_(ツ)_/¯") 21 | elif input_str == "apple": 22 | await event.edit("\uF8FF") 23 | elif input_str == ":/": 24 | await event.edit(input_str) 25 | animation_chars = [ 26 | ":\\", 27 | ":/" 28 | ] 29 | for i in animation_ttl: 30 | await asyncio.sleep(animation_interval) 31 | await event.edit(animation_chars[i % 2]) 32 | elif input_str == "-_-": 33 | await event.edit(input_str) 34 | animation_chars = [ 35 | "-__-", 36 | "-_-" 37 | ] 38 | for i in animation_ttl: 39 | await asyncio.sleep(animation_interval) 40 | await event.edit(animation_chars[i % 2]) 41 | -------------------------------------------------------------------------------- /userbot/plugins/eval.py: -------------------------------------------------------------------------------- 1 | """Evaluate Python Code inside Telegram 2 | Syntax: .eval PythonCode""" 3 | # This Source Code Form is subject to the terms of the Mozilla Public 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 | 7 | from telethon import events, errors, functions, types 8 | import inspect 9 | import traceback 10 | import asyncio 11 | import sys 12 | import io 13 | from uniborg.util import admin_cmd 14 | 15 | 16 | @borg.on(admin_cmd("eval")) 17 | async def _(event): 18 | if event.fwd_from: 19 | return 20 | await event.edit("Processing ...") 21 | cmd = event.text.split(" ", maxsplit=1)[1] 22 | reply_to_id = event.message.id 23 | if event.reply_to_msg_id: 24 | reply_to_id = event.reply_to_msg_id 25 | 26 | old_stderr = sys.stderr 27 | old_stdout = sys.stdout 28 | redirected_output = sys.stdout = io.StringIO() 29 | redirected_error = sys.stderr = io.StringIO() 30 | stdout, stderr, exc = None, None, None 31 | 32 | try: 33 | await aexec(cmd, event) 34 | except Exception: 35 | exc = traceback.format_exc() 36 | 37 | stdout = redirected_output.getvalue() 38 | stderr = redirected_error.getvalue() 39 | sys.stdout = old_stdout 40 | sys.stderr = old_stderr 41 | 42 | evaluation = "" 43 | if exc: 44 | evaluation = exc 45 | elif stderr: 46 | evaluation = stderr 47 | elif stdout: 48 | evaluation = stdout 49 | else: 50 | evaluation = "Success" 51 | 52 | final_output = "**EVAL**: `{}` \n\n **OUTPUT**: \n`{}` \n".format(cmd, evaluation) 53 | 54 | if len(final_output) > Config.MAX_MESSAGE_SIZE_LIMIT: 55 | with io.BytesIO(str.encode(final_output)) as out_file: 56 | out_file.name = "eval.text" 57 | await borg.send_file( 58 | event.chat_id, 59 | out_file, 60 | force_document=True, 61 | allow_cache=False, 62 | caption=cmd, 63 | reply_to=reply_to_id 64 | ) 65 | await event.delete() 66 | else: 67 | await event.edit(final_output) 68 | 69 | 70 | async def aexec(code, event): 71 | exec( 72 | f'async def __aexec(event): ' + 73 | ''.join(f'\n {l}' for l in code.split('\n')) 74 | ) 75 | return await locals()['__aexec'](event) 76 | -------------------------------------------------------------------------------- /userbot/plugins/exec.py: -------------------------------------------------------------------------------- 1 | """Execute GNU/Linux commands inside Telegram 2 | Syntax: .exec Code""" 3 | # This Source Code Form is subject to the terms of the Mozilla Public 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 | from telethon import events 7 | import subprocess 8 | from telethon.errors import MessageEmptyError, MessageTooLongError, MessageNotModifiedError 9 | import io 10 | import asyncio 11 | import time 12 | from uniborg.util import admin_cmd 13 | 14 | 15 | @borg.on(admin_cmd(pattern="exec ?(.*)")) 16 | async def _(event): 17 | if event.fwd_from or event.via_bot_id: 18 | return 19 | DELAY_BETWEEN_EDITS = 0.3 20 | PROCESS_RUN_TIME = 100 21 | cmd = event.pattern_match.group(1) 22 | reply_to_id = event.message.id 23 | if event.reply_to_msg_id: 24 | reply_to_id = event.reply_to_msg_id 25 | start_time = time.time() + PROCESS_RUN_TIME 26 | process = await asyncio.create_subprocess_shell( 27 | cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE 28 | ) 29 | stdout, stderr = await process.communicate() 30 | e = stderr.decode() 31 | if not e: 32 | e = "No Error" 33 | o = stdout.decode() 34 | if not o: 35 | o = "**Tip**: \n`If you want to see the results of your code, I suggest printing them to stdout.`" 36 | else: 37 | _o = o.split("\n") 38 | o = "`\n".join(_o) 39 | OUTPUT = f"**QUERY:**\n__Command:__\n`{cmd}` \n__PID:__\n`{process.pid}`\n\n**stderr:** \n`{e}`\n**Output:**\n{o}" 40 | if len(OUTPUT) > Config.MAX_MESSAGE_SIZE_LIMIT: 41 | with io.BytesIO(str.encode(OUTPUT)) as out_file: 42 | out_file.name = "exec.text" 43 | await borg.send_file( 44 | event.chat_id, 45 | out_file, 46 | force_document=True, 47 | allow_cache=False, 48 | caption=cmd, 49 | reply_to=reply_to_id 50 | ) 51 | await event.delete() 52 | await event.edit(OUTPUT) 53 | -------------------------------------------------------------------------------- /userbot/plugins/extload.py: -------------------------------------------------------------------------------- 1 | from userbot import bot 2 | from telethon import events 3 | from telethon import functions, types 4 | from telethon.tl.types import InputMessagesFilterDocument 5 | from userbot.utils import command, remove_plugin, load_module 6 | from var import Var 7 | from pathlib import Path 8 | from userbot import LOAD_PLUG 9 | import sys 10 | import asyncio 11 | import traceback 12 | import os 13 | import userbot.utils 14 | 15 | @command(pattern="^.extload", outgoing=True) 16 | async def install(event): 17 | if event.fwd_from: 18 | return 19 | chat = Var.PLUGIN_CHANNEL 20 | documentss = await borg.get_messages(chat, None , filter=InputMessagesFilterDocument) 21 | total = int(documentss.total) 22 | total_doxx = range(0, total) 23 | await event.delete() 24 | for ixo in total_doxx: 25 | mxo = documentss[ixo].id 26 | downloaded_file_name = await event.client.download_media(await borg.get_messages(chat, ids=mxo), "userbot/plugins/") 27 | if "(" not in downloaded_file_name: 28 | path1 = Path(downloaded_file_name) 29 | shortname = path1.stem 30 | load_module(shortname.replace(".py", "")) 31 | await borg.send_message(event.chat_id, "This Plugin `{}` have been Loaded successfully.".format(os.path.basename(downloaded_file_name))) 32 | else: 33 | await borg.send_message(event.chat_id, "Plugin `{}` has been already Loaded and cannot be installed.".format(os.path.basename(downloaded_file_name))) 34 | -------------------------------------------------------------------------------- /userbot/plugins/extranotes.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import asyncio 3 | import os 4 | import sys 5 | from uniborg.util import admin_cmd 6 | 7 | @borg.on(admin_cmd(pattern=r"gaali")) 8 | async def test(event): 9 | if event.fwd_from: 10 | return 11 | await event.edit("`Main roz teri behno ki banjar chut me apna lawda daalke andar haryali lata tha magar aaj unke ke baare me sunke mujhe bhut afsos huwa ki unko ab bada loudha chahye ab mera balatkaaari lawda lagataar 4 ghante tk apne muh me kon rakhega vo teri behne hi thi jo apni kaali magar rasilli chut mere saamne khol deti aur zameen pe naagin ki tarah rengne lgti thi jaise ki kisine unki chut pe naariyal tod diya ho vo b bada wala mumbai ka naariyal..apni chennal maa ko b nhi bhej rahe mere paas to main kaixe tum logo se vaada karu ki main teri maa chodd dungaw ab agar tun sach me chahta hai ki main tum dono k mc ki chut me dhammal karu to mera lawda apne muh me rakho aur kaho Sameer hamare sage papa hain Aur agar tb b tjhe apni maa ki kaali chut mere saamne nahi rakhi to tumhare ghar me ghuske tumhari maa ka balatkaar kar dungaw jaixe delhi me huwa tha ab teri chudi hui kuttiyo ki tarah apni gaand hilaate hue mere aage kalapna mt ni to tumhari fatti bhoxdi me 100 ched karunga!`") 12 | -------------------------------------------------------------------------------- /userbot/plugins/eye.py: -------------------------------------------------------------------------------- 1 | """COMMAND : .eye""" 2 | 3 | from telethon import events 4 | 5 | import asyncio 6 | 7 | from userbot.utils import admin_cmd 8 | 9 | 10 | 11 | @borg.on(admin_cmd(pattern="eye")) 12 | 13 | async def _(event): 14 | 15 | if event.fwd_from: 16 | 17 | return 18 | 19 | animation_interval = 3 20 | 21 | animation_ttl = range(0, 103) 22 | 23 | #input_str = event.pattern_match.group(1) 24 | 25 | #if input_str == "eye": 26 | 27 | await event.edit("👁👁") 28 | 29 | animation_chars = [ 30 | 31 | "👁👁\n 👄 =====> Abey Ja Na Gandu", 32 | "👁👁\n 👅 =====> Abey Ja Na Madarchod", 33 | "👁👁\n 💋 =====> Abey Ja Na Randi", 34 | "👁👁\n 👄 =====> Abey Ja Na Betichod", 35 | "👁👁\n 👅 =====> Abey Ja Na Behenchod", 36 | "👁👁\n 💋 =====> Abey Ja Na Na Mard", 37 | "👁👁\n 👄 =====> Abey Ja Na Randi", 38 | "👁👁\n 👅 =====> Abey Ja Na Bhosdk", 39 | "👁👁\n 💋 =====> Abey Ja Na Chutiye", 40 | "👁👁\n 👄 =====> Hi All, How Are You Guys..." 41 | ] 42 | 43 | for i in animation_ttl: 44 | 45 | await asyncio.sleep(animation_interval) 46 | 47 | await event.edit(animation_chars[i % 103]) 48 | -------------------------------------------------------------------------------- /userbot/plugins/figlet.py: -------------------------------------------------------------------------------- 1 | import pyfiglet 2 | from userbot.utils import admin_cmd 3 | 4 | #@command(pattern="^.figlet ?(.*)", outgoing=True) 5 | @borg.on(admin_cmd(pattern=r"figlet ?(.*)")) 6 | async def figlet(event): 7 | if event.fwd_from: 8 | return 9 | CMD_FIG = {"slant": "slant", "3D": "3-d", "5line": "5lineoblique", "alpha": "alphabet", "banner": "banner3-D", "doh": "doh", "iso": "isometric1", "letter": "letters", "allig": "alligator", "dotm": "dotmatrix", "bubble": "bubble", "bulb": "bulbhead", "digi": "digital"} 10 | input_str = event.pattern_match.group(1) 11 | if "|" in input_str: 12 | text, cmd = input_str.split("|", maxsplit=1) 13 | elif input_str is not None: 14 | cmd = None 15 | text = input_str 16 | else: 17 | await event.edit("Please add some text to figlet") 18 | return 19 | if cmd is not None: 20 | try: 21 | font = CMD_FIG[cmd] 22 | except KeyError: 23 | await event.edit("Invalid selected font.") 24 | return 25 | result = pyfiglet.figlet_format(text, font=font) 26 | else: 27 | result = pyfiglet.figlet_format(text) 28 | await event.respond("‌‌‎`{}`".format(result)) 29 | await event.delete() 30 | -------------------------------------------------------------------------------- /userbot/plugins/fileext.py: -------------------------------------------------------------------------------- 1 | """Get info about a File Extension 2 | Syntax: .filext EXTENSION""" 3 | from telethon import events 4 | import requests 5 | from bs4 import BeautifulSoup 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd(pattern="filext (.*)")) 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | await event.edit("Processing ...") 14 | sample_url = "https://www.fileext.com/file-extension/{}.html" 15 | input_str = event.pattern_match.group(1).lower() 16 | response_api = requests.get(sample_url.format(input_str)) 17 | status_code = response_api.status_code 18 | if status_code == 200: 19 | raw_html = response_api.content 20 | soup = BeautifulSoup(raw_html, "html.parser") 21 | ext_details = soup.find_all("td", {"colspan": "3"})[-1].text 22 | await event.edit("**File Extension**: `{}`\n**Description**: `{}`".format(input_str, ext_details)) 23 | else: 24 | await event.edit("https://www.fileext.com/ responded with {} for query: {}".format(status_code, input_str)) 25 | -------------------------------------------------------------------------------- /userbot/plugins/filext.py: -------------------------------------------------------------------------------- 1 | """Get info about a File Extension 2 | Syntax: .filext EXTENSION""" 3 | from telethon import events 4 | import requests 5 | from bs4 import BeautifulSoup 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd(pattern="filext (.*)")) 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | await event.edit("Processing ...") 14 | sample_url = "https://www.fileext.com/file-extension/{}.html" 15 | input_str = event.pattern_match.group(1).lower() 16 | response_api = requests.get(sample_url.format(input_str)) 17 | status_code = response_api.status_code 18 | if status_code == 200: 19 | raw_html = response_api.content 20 | soup = BeautifulSoup(raw_html, "html.parser") 21 | ext_details = soup.find_all("td", {"colspan": "3"})[-1].text 22 | await event.edit("**File Extension**: `{}`\n**Description**: `{}`".format(input_str, ext_details)) 23 | else: 24 | await event.edit("https://www.fileext.com/ responded with {} for query: {}".format(status_code, input_str)) 25 | -------------------------------------------------------------------------------- /userbot/plugins/fleaveme.py: -------------------------------------------------------------------------------- 1 | #Credit: @r4v4n4 2 | """Emoji 3 | 4 | Available Commands: 5 | 6 | .fleave""" 7 | 8 | from telethon import events 9 | 10 | import asyncio 11 | 12 | from uniborg.util import admin_cmd 13 | 14 | 15 | 16 | @borg.on(admin_cmd(pattern=r"fleave")) 17 | 18 | async def _(event): 19 | 20 | if event.fwd_from: 21 | 22 | return 23 | 24 | animation_interval = 1 25 | 26 | animation_ttl = range(0, 17) 27 | 28 | #input_str = event.pattern_match.group(1) 29 | 30 | #if input_str == "fleave": 31 | 32 | await event.edit("fleave") 33 | 34 | animation_chars = [ 35 | 36 | "⬛⬛⬛\n⬛⬛⬛\n⬛⬛⬛", 37 | "⬛⬛⬛\n⬛🔄⬛\n⬛⬛⬛", 38 | "⬛⬆️⬛\n⬛🔄⬛\n⬛⬛⬛", 39 | "⬛⬆️↗️\n⬛🔄⬛\n⬛⬛⬛", 40 | "⬛⬆️↗️\n⬛🔄➡️\n⬛⬛⬛", 41 | "⬛⬆️↗️\n⬛🔄➡️\n⬛⬛↘️", 42 | "⬛⬆️↗️\n⬛🔄➡️\n⬛⬇️↘️", 43 | "⬛⬆️↗️\n⬛🔄➡️\n↙️⬇️↘️", 44 | "⬛⬆️↗️\n⬅️🔄➡️\n↙️⬇️↘️", 45 | "↖️⬆️↗️\n⬅️🔄➡️\n↙️⬇️↘️", 46 | "**Chat Message Exported To** `./Inpu/`", 47 | "**Chat Message Exported To** `./Inpu/homework/`", 48 | "**Chat Message Exported To** `./Inpu/homework/groupchat.txt`", 49 | "__Legend is leaving this chat.....! ", 50 | "__Legend is leaving this chat.....!" 51 | 52 | ] 53 | 54 | for i in animation_ttl: 55 | 56 | await asyncio.sleep(animation_interval) 57 | 58 | await event.edit(animation_chars[i % 17]) 59 | -------------------------------------------------------------------------------- /userbot/plugins/fpost.py: -------------------------------------------------------------------------------- 1 | # This Source Code Form is subject to the terms of the Mozilla Public 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | """ Command: .fpost word 5 | 6 | credit: @pureindialover""" 7 | 8 | import string 9 | 10 | from telethon import events 11 | from telethon.tl import types 12 | from uniborg.util import admin_cmd 13 | 14 | msg_cache = {} 15 | 16 | 17 | @borg.on(admin_cmd(pattern=r"fpost\s+(.*)")) 18 | async def _(event): 19 | await event.delete() 20 | text = event.pattern_match.group(1) 21 | destination = await event.get_input_chat() 22 | 23 | for c in text.lower(): 24 | if c not in string.ascii_lowercase: 25 | continue 26 | if c not in msg_cache: 27 | async for msg in borg.iter_messages(None, search=c): 28 | if msg.raw_text.lower() == c and msg.media is None: 29 | msg_cache[c] = msg 30 | break 31 | await borg.forward_messages(destination, msg_cache[c]) 32 | -------------------------------------------------------------------------------- /userbot/plugins/frybot.py: -------------------------------------------------------------------------------- 1 | #credits: @r4v4n4 2 | import datetime 3 | from telethon import events 4 | from telethon.errors.rpcerrorlist import YouBlockedUserError 5 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 6 | from userbot.utils import admin_cmd 7 | 8 | @borg.on(admin_cmd("frybot ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | if not event.reply_to_msg_id: 13 | await event.edit("```Reply to any user message.```") 14 | return 15 | reply_message = await event.get_reply_message() 16 | if not reply_message.media: 17 | await event.edit("```reply to text message```") 18 | return 19 | chat = "@image_deepfrybot" 20 | sender = reply_message.sender 21 | if reply_message.sender.bot: 22 | await event.edit("```Reply to actual users message.```") 23 | return 24 | await event.edit("```Processing```") 25 | async with borg.conversation(chat) as conv: 26 | try: 27 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=432858024)) 28 | await borg.forward_messages(chat, reply_message) 29 | response = await response 30 | except YouBlockedUserError: 31 | await event.reply("```Please unblock @sangmatainfo_bot and try again```") 32 | return 33 | if response.text.startswith("Forward"): 34 | await event.edit("```can you kindly disable your forward privacy settings for good?```") 35 | else: 36 | await borg.send_file(event.chat_id, response.message.media) 37 | -------------------------------------------------------------------------------- /userbot/plugins/ftext.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import asyncio 3 | import os 4 | import sys 5 | from uniborg.util import admin_cmd 6 | 7 | 8 | 9 | @borg.on(admin_cmd(pattern="ftext ?(.*)")) 10 | async def payf(event): 11 | input_str=event.pattern_match.group(1) 12 | if input_str: 13 | paytext=input_str 14 | pay = "{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}".format(paytext*8, paytext*8, paytext*2, paytext*2, paytext*2, paytext*6, paytext*6, paytext*2, paytext*2, paytext*2, paytext*2, paytext*2) 15 | else: 16 | pay = "╭━━━╮\n┃╭━━╯\n┃╰━━╮\n┃╭━━╯\n┃┃\n╰╯\n" 17 | # pay = "{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}".format(paytext*8, paytext*8, paytext*2, paytext*2, paytext*2, paytext*6, paytext*6, paytext*2, paytext*2, paytext*2, paytext*2, paytext*2) 18 | await event.edit(pay) 19 | -------------------------------------------------------------------------------- /userbot/plugins/fuck.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | Available Commands: 4 | 5 | .sux 6 | 7 | .fuk 8 | 9 | .kiss""" 10 | 11 | from telethon import events 12 | 13 | import asyncio 14 | 15 | from userbot.utils import admin_cmd 16 | 17 | 18 | 19 | @borg.on(admin_cmd("fuck")) 20 | 21 | async def _(event): 22 | 23 | if event.fwd_from: 24 | 25 | return 26 | 27 | animation_interval = 1 28 | 29 | animation_ttl = range(0, 101) 30 | 31 | #input_str = event.pattern_match.group(1) 32 | 33 | # if input_str == "fuk": 34 | 35 | await event.edit("fuk") 36 | 37 | animation_chars = [ 38 | 39 | "👉 ✊️", 40 | 41 | "👉 ✊️", 42 | 43 | "👉 ✊️", 44 | 45 | "👉✊️💦" 46 | 47 | ] 48 | 49 | for i in animation_ttl: 50 | 51 | await asyncio.sleep(animation_interval) 52 | 53 | await event.edit(animation_chars[i % 4]) 54 | 55 | 56 | @borg.on(admin_cmd("sux")) 57 | 58 | async def _(event): 59 | 60 | if event.fwd_from: 61 | 62 | return 63 | 64 | animation_interval = 1 65 | 66 | animation_ttl = range(0, 101) 67 | 68 | #input_str = event.pattern_match.group(1) 69 | 70 | #if input_str == "sux": 71 | 72 | await event.edit("sux") 73 | 74 | animation_chars = [ 75 | 76 | "🤵 👰", 77 | 78 | "🤵 👰", 79 | 80 | "🤵 👰", 81 | 82 | "🤵👼👰" 83 | 84 | ] 85 | 86 | for i in animation_ttl: 87 | 88 | await asyncio.sleep(animation_interval) 89 | 90 | await event.edit(animation_chars[i % 4]) 91 | 92 | 93 | "" 94 | 95 | 96 | from telethon import events 97 | 98 | import asyncio 99 | 100 | 101 | 102 | 103 | 104 | @borg.on(admin_cmd("kiss")) 105 | 106 | async def _(event): 107 | 108 | if event.fwd_from: 109 | 110 | return 111 | 112 | animation_interval = 1 113 | 114 | animation_ttl = range(0, 101) 115 | 116 | #input_str = event.pattern_match.group(1) 117 | 118 | #if input_str == "kiss": 119 | 120 | await event.edit("kiss") 121 | 122 | animation_chars = [ 123 | 124 | "🤵 👰", 125 | 126 | "🤵 👰", 127 | 128 | "🤵 👰", 129 | 130 | "🤵💋👰" 131 | 132 | ] 133 | 134 | for i in animation_ttl: 135 | 136 | await asyncio.sleep(animation_interval) 137 | 138 | await event.edit(animation_chars[i % 4]) 139 | -------------------------------------------------------------------------------- /userbot/plugins/fwd.py: -------------------------------------------------------------------------------- 1 | """Enable Seen Counter in any message, Fix by @pureindialover 2 | to know how many users have seen your message 3 | Syntax: .fwd as reply to any message""" 4 | from telethon import events 5 | from telethon import sync 6 | from telethon.tl import types, functions 7 | from userbot.utils import admin_cmd 8 | 9 | 10 | @borg.on(admin_cmd(pattern="frwd")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | if Config.PLUGIN_CHANNEL is None: 15 | await event.edit("Please set the required environment variable `PLUGIN_CHANNEL` for this plugin to work") 16 | return 17 | try: 18 | e = await borg.get_entity(Config.PLUGIN_CHANNEL) 19 | except Exception as e: 20 | await event.edit(str(e)) 21 | else: 22 | re_message = await event.get_reply_message() 23 | # https://t.me/telethonofftopic/78166 24 | fwd_message = await borg.forward_messages( 25 | e, 26 | re_message, 27 | silent=True 28 | ) 29 | await borg.forward_messages( 30 | event.chat_id, 31 | fwd_message 32 | ) 33 | await fwd_message.delete() 34 | await event.delete() 35 | -------------------------------------------------------------------------------- /userbot/plugins/gamersdp.py: -------------------------------------------------------------------------------- 1 | import requests , re , random 2 | 3 | import urllib , os 4 | 5 | from telethon.tl import functions 6 | 7 | from datetime import datetime 8 | 9 | from PIL import Image, ImageDraw, ImageFont 10 | 11 | from userbot.utils import admin_cmd 12 | 13 | import asyncio 14 | 15 | from time import sleep 16 | 17 | COLLECTION_STRINGZ = [ 18 | 19 | "star-wars-wallpaper-1080p", 20 | 21 | "4k-sci-fi-wallpaper", 22 | 23 | "star-wars-iphone-6-wallpaper", 24 | 25 | "kylo-ren-wallpaper", 26 | 27 | "darth-vader-wallpaper" 28 | 29 | ] 30 | 31 | async def animepp(): 32 | 33 | os.system("rm -rf donot.jpg") 34 | 35 | rnd = random.randint(0, len(COLLECTION_STRINGZ) - 1) 36 | 37 | pack = COLLECTION_STRINGZ[rnd] 38 | 39 | pc = requests.get("http://getwallpapers.com/collection/" + pack).text 40 | 41 | f = re.compile('/\w+/full.+.jpg') 42 | 43 | f = f.findall(pc) 44 | 45 | fy = "http://getwallpapers.com"+random.choice(f) 46 | 47 | print(fy) 48 | 49 | if not os.path.exists("f.ttf"): 50 | 51 | urllib.request.urlretrieve("https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf","f.ttf") 52 | 53 | urllib.request.urlretrieve(fy,"donottouch.jpg") 54 | 55 | @borg.on(admin_cmd(pattern="gamerdp ?(.*)")) 56 | 57 | async def main(event): 58 | 59 | await event.edit("**Starting Gamer Profile Pic...\n\nDone !!! Check Your DP") #Owner MarioDevs 60 | 61 | while True: 62 | 63 | await animepp() 64 | 65 | file = await event.client.upload_file("donottouch.jpg") 66 | 67 | await event.client(functions.photos.UploadProfilePhotoRequest( file)) 68 | 69 | os.system("rm -rf donottouch.jpg") 70 | 71 | await asyncio.sleep(3600) #Edit this to your required needs 72 | -------------------------------------------------------------------------------- /userbot/plugins/gangasta.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import random, re 3 | from userbot.utils import admin_cmd 4 | import asyncio 5 | 6 | 7 | 8 | @borg.on(admin_cmd("gangasta ?(.*)")) 9 | async def _(event): 10 | if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): 11 | await event.edit("EVERyBOdy") 12 | await asyncio.sleep(0.3) 13 | await event.edit("iZ") 14 | await asyncio.sleep(0.2) 15 | await event.edit("GangSTur") 16 | await asyncio.sleep(0.5) 17 | await event.edit("UNtIL ") 18 | await asyncio.sleep(0.2) 19 | await event.edit("I") 20 | await asyncio.sleep(0.3) 21 | await event.edit("ArRivE") 22 | await asyncio.sleep(0.3) 23 | await event.edit("🔥🔥🔥") 24 | await asyncio.sleep(0.3) 25 | await event.edit("EVERyBOdy iZ GangSTur UNtIL I ArRivE 🔥🔥🔥") 26 | -------------------------------------------------------------------------------- /userbot/plugins/gbun.py: -------------------------------------------------------------------------------- 1 | # This is a troll indeed ffs *facepalm* 2 | import asyncio 3 | from telethon import events 4 | from telethon.tl.functions.users import GetFullUserRequest 5 | from telethon.tl.types import ChannelParticipantsAdmins 6 | from userbot.utils import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd("gbun")) 10 | async def gbun(event): 11 | if event.fwd_from: 12 | return 13 | gbunVar = event.text 14 | gbunVar = gbunVar[6:] 15 | mentions = "Warning!! User 𝙂𝘽𝘼𝙉𝙉𝙀𝘿 By Admin...\n" 16 | no_reason = "__Reason: Not given __" 17 | await event.edit("**Gbanning This User❗️⚜️☠️**") 18 | asyncio.sleep(3.5) 19 | chat = await event.get_input_chat() 20 | async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): 21 | mentions += f"" 22 | reply_message = None 23 | if event.reply_to_msg_id: 24 | reply_message = await event.get_reply_message() 25 | replied_user = await event.client(GetFullUserRequest(reply_message.from_id)) 26 | firstname = replied_user.user.first_name 27 | usname = replied_user.user.username 28 | idd = reply_message.from_id 29 | # make meself invulnerable cuz why not xD 30 | if idd == 1263617196: 31 | await reply_message.reply("`Wait a second, This is my master!`\n**How dare you threaten to ban my master nigger!**\n\n__Your account has been hacked! Pay 69$ to my master__ [StarkxD](t.me/Fridayot) __to release your account__😏") 32 | else: 33 | jnl=("Warning!! " 34 | "[{}](tg://user?id={})" 35 | " 𝙂𝘽𝘼𝙉𝙉𝙀𝘿 By Admin...\n\n" 36 | "**Person's Name: ** __{}__\n" 37 | "**ID : ** `{}`\n" 38 | ).format(firstname, idd, firstname, idd) 39 | if usname == None: 40 | jnl += "**Victim Nigga's username: ** `Doesn't own a username!`\n" 41 | elif usname != "None": 42 | jnl += "**Victim Nigga's username** : @{}\n".format(usname) 43 | if len(gbunVar) > 0: 44 | gbunm = "`{}`".format(gbunVar) 45 | gbunr = "**Reason: **"+gbunm 46 | jnl += gbunr 47 | else: 48 | jnl += no_reason 49 | await reply_message.reply(jnl) 50 | else: 51 | mention = "Warning!! User 𝙂𝘽𝘼𝙉𝙉𝙀𝘿 By Admin...\nReason: Not Given " 52 | await event.reply(mention) 53 | await event.delete() 54 | -------------------------------------------------------------------------------- /userbot/plugins/get_admin.py: -------------------------------------------------------------------------------- 1 | """Get Administrators of any Chat* 2 | Syntax: .get_admin""" 3 | from telethon import events 4 | from telethon.tl.types import ChannelParticipantsAdmins, ChannelParticipantAdmin, ChannelParticipantCreator 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("get_ad?(m)in ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | mentions = "**Admins in this Channel**: \n" 13 | should_mention_admins = False 14 | reply_message = None 15 | pattern_match_str = event.pattern_match.group(1) 16 | if "m" in pattern_match_str: 17 | should_mention_admins = True 18 | if event.reply_to_msg_id: 19 | reply_message = await event.get_reply_message() 20 | input_str = event.pattern_match.group(2) 21 | to_write_chat = await event.get_input_chat() 22 | chat = None 23 | if not input_str: 24 | chat = to_write_chat 25 | else: 26 | mentions_heading = "Admins in {} channel: \n".format(input_str) 27 | mentions = mentions_heading 28 | try: 29 | chat = await borg.get_entity(input_str) 30 | except Exception as e: 31 | await event.edit(str(e)) 32 | return None 33 | try: 34 | async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): 35 | if not x.deleted: 36 | if isinstance(x.participant, ChannelParticipantCreator): 37 | mentions += "\n 🔱 [{}](tg://user?id={}) `{}`".format(x.first_name, x.id, x.id) 38 | mentions += "\n" 39 | async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): 40 | if not x.deleted: 41 | if isinstance(x.participant, ChannelParticipantAdmin): 42 | mentions += "\n 🥇 [{}](tg://user?id={}) `{}`".format(x.first_name, x.id, x.id) 43 | else: 44 | mentions += "\n `{}`".format(x.id) 45 | except Exception as e: 46 | mentions += " " + str(e) + "\n" 47 | if should_mention_admins: 48 | if reply_message: 49 | await reply_message.reply(mentions) 50 | else: 51 | await event.reply(mentions) 52 | await event.delete() 53 | else: 54 | await event.edit(mentions) 55 | -------------------------------------------------------------------------------- /userbot/plugins/get_bot.py: -------------------------------------------------------------------------------- 1 | """ Get the Bots in any chat* 2 | Syntax: .get_bot""" 3 | from telethon import events 4 | from telethon.tl.types import ChannelParticipantAdmin, ChannelParticipantsBots 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("get_bot ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | mentions = "**Bots in this Channel**: \n" 13 | input_str = event.pattern_match.group(1) 14 | to_write_chat = await event.get_input_chat() 15 | chat = None 16 | if not input_str: 17 | chat = to_write_chat 18 | else: 19 | mentions = "Bots in {} channel: \n".format(input_str) 20 | try: 21 | chat = await borg.get_entity(input_str) 22 | except Exception as e: 23 | await event.edit(str(e)) 24 | return None 25 | try: 26 | async for x in borg.iter_participants(chat, filter=ChannelParticipantsBots): 27 | if isinstance(x.participant, ChannelParticipantAdmin): 28 | mentions += "\n ⚜️ [{}](tg://user?id={}) `{}`".format(x.first_name, x.id, x.id) 29 | else: 30 | mentions += "\n [{}](tg://user?id={}) `{}`".format(x.first_name, x.id, x.id) 31 | except Exception as e: 32 | mentions += " " + str(e) + "\n" 33 | await event.edit(mentions) 34 | -------------------------------------------------------------------------------- /userbot/plugins/get_id.py: -------------------------------------------------------------------------------- 1 | """Get ID of any Telegram media, or any user 2 | Syntax: .get_id""" 3 | from telethon import events 4 | from telethon.utils import pack_bot_file_id 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("get_id")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | if event.reply_to_msg_id: 13 | chat = await event.get_input_chat() 14 | r_msg = await event.get_reply_message() 15 | if r_msg.media: 16 | bot_api_file_id = pack_bot_file_id(r_msg.media) 17 | await event.edit("Current Chat ID: `{}`\nFrom User ID: `{}`\nBot API File ID: `{}`".format(str(event.chat_id), str(r_msg.from_id), bot_api_file_id)) 18 | else: 19 | await event.edit("Current Chat ID: `{}`\nFrom User ID: `{}`".format(str(event.chat_id), str(r_msg.from_id))) 20 | else: 21 | await event.edit("Current Chat ID: `{}`".format(str(event.chat_id))) 22 | -------------------------------------------------------------------------------- /userbot/plugins/getmusic.py: -------------------------------------------------------------------------------- 1 | # modified for FRIDAY by @WhySooSerious 2 | import datetime 3 | from telethon import events 4 | from telethon.errors.rpcerrorlist import YouBlockedUserError 5 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 6 | import asyncio 7 | from userbot.utils import admin_cmd 8 | 9 | 10 | @borg.on(admin_cmd("smd (.*)")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | name = event.pattern_match.group(1) 15 | chat = "@SpotifyMusicDownloaderBot" 16 | await event.edit("```Getting Your Music```") 17 | async with bot.conversation(chat) as conv: 18 | await asyncio.sleep(2) 19 | await event.edit("`Downloading Music \nIt may take some time\n So Stay Tuned.....`") 20 | try: 21 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=752979930)) 22 | await bot.send_message(chat, name) 23 | respond = await response 24 | except YouBlockedUserError: 25 | await event.reply("```Please unblock @SpotifyMusicDownloaderBot and try again```") 26 | return 27 | await event.delete() 28 | await bot.forward_messages(event.chat_id, respond.message) 29 | -------------------------------------------------------------------------------- /userbot/plugins/git.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | 3 | import asyncio 4 | 5 | 6 | 7 | 8 | 9 | @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) 10 | 11 | async def _(event): 12 | 13 | if event.fwd_from: 14 | 15 | return 16 | 17 | animation_interval = 0.1 18 | 19 | animation_ttl = range(0, 101) 20 | 21 | input_str = event.pattern_match.group(1) 22 | 23 | if input_str == "githubs": 24 | 25 | await event.edit(input_str) 26 | 27 | animation_chars = [ 28 | 29 | "https://github.com/Crackexy/CrackBot", 30 | 31 | "https://github.com/Crackexy/CrackBot" 32 | ] 33 | 34 | for i in animation_ttl: 35 | 36 | await asyncio.sleep(animation_interval) 37 | 38 | await event.edit(animation_chars[i % 2]) 39 | -------------------------------------------------------------------------------- /userbot/plugins/github.py: -------------------------------------------------------------------------------- 1 | """Get information about an user on GitHub 2 | Syntax: .github USERNAME""" 3 | from telethon import events 4 | import requests 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("github (.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | input_str = event.pattern_match.group(1) 13 | url = "https://api.github.com/users/{}".format(input_str) 14 | r = requests.get(url) 15 | if r.status_code != 404: 16 | b = r.json() 17 | avatar_url = b["avatar_url"] 18 | html_url = b["html_url"] 19 | gh_type = b["type"] 20 | name = b["name"] 21 | company = b["company"] 22 | blog = b["blog"] 23 | location = b["location"] 24 | bio = b["bio"] 25 | created_at = b["created_at"] 26 | await borg.send_file( 27 | event.chat_id, 28 | caption="""Name: [{}]({}) 29 | Type: {} 30 | Company: {} 31 | Blog: {} 32 | Location: {} 33 | Bio: {} 34 | Profile Created: {}""".format(name, html_url, gh_type, company, blog, location, bio, created_at), 35 | file=avatar_url, 36 | force_document=False, 37 | allow_cache=False, 38 | reply_to=event 39 | ) 40 | await event.delete() 41 | else: 42 | await event.edit("`{}`: {}".format(input_str, r.text)) 43 | -------------------------------------------------------------------------------- /userbot/plugins/gizoogle.py: -------------------------------------------------------------------------------- 1 | import re 2 | import bs4 3 | import requests 4 | from uniborg.util import admin_cmd 5 | 6 | @borg.on(admin_cmd(pattern="giz ?(.*)")) 7 | async def gizoogle(event): 8 | if event.fwd_from: 9 | return 10 | input_str = event.pattern_match.group(1) 11 | await event.edit("Processing...") 12 | if not input_str: 13 | return await event.edit("I can't gizoogle nothing.") 14 | else: 15 | try: 16 | result = text(input_str) 17 | except: 18 | result = "Failed to gizoogle the text." 19 | finally: 20 | return await event.edit(result) 21 | 22 | def text(input_text: str) -> str: 23 | """Taken from https://github.com/chafla/gizoogle-py/blob/master/gizoogle.py""" 24 | params = {"translatetext": input_text} 25 | target_url = "http://www.gizoogle.net/textilizer.php" 26 | resp = requests.post(target_url, data=params) 27 | # the html returned is in poor form normally. 28 | soup_input = re.sub("/name=translatetext[^>]*>/", 'name="translatetext" >', resp.text) 29 | soup = bs4.BeautifulSoup(soup_input, "lxml") 30 | giz = soup.find_all(text=True) 31 | giz_text = giz[37].strip("\r\n") # Hacky, but consistent. 32 | return giz_text 33 | -------------------------------------------------------------------------------- /userbot/plugins/google.py: -------------------------------------------------------------------------------- 1 | """ Powered by @Google 2 | Available Commands: 3 | .go credits to owner of bot 4 | """ 5 | 6 | import asyncio 7 | import os 8 | from re import findall 9 | import requests 10 | from bs4 import BeautifulSoup 11 | from datetime import datetime 12 | from requests import get 13 | from urllib.parse import quote_plus 14 | from urllib.error import HTTPError 15 | from google_images_download import google_images_download 16 | from gsearch.googlesearch import search 17 | from userbot.utils import admin_cmd 18 | from search_engine_parser import GoogleSearch 19 | 20 | 21 | def progress(current, total): 22 | logger.info("Downloaded {} of {}\nCompleted {}".format(current, total, (current / total) * 100)) 23 | 24 | 25 | @borg.on(admin_cmd("go (.*)")) 26 | async def gsearch(q_event): 27 | """ For .google command, do a Google search. """ 28 | match = q_event.pattern_match.group(1) 29 | page = findall(r"page=\d+", match) 30 | try: 31 | page = page[0] 32 | page = page.replace("page=", "") 33 | match = match.replace("page=" + page[0], "") 34 | except IndexError: 35 | page = 1 36 | search_args = (str(match), int(page)) 37 | gsearch = GoogleSearch() 38 | gresults = await gsearch.async_search(*search_args) 39 | msg = "" 40 | for i in range(len(gresults["links"])): 41 | try: 42 | title = gresults["titles"][i] 43 | link = gresults["links"][i] 44 | desc = gresults["descriptions"][i] 45 | msg += f"[{title}]({link})\n`{desc}`\n\n" 46 | except IndexError: 47 | break 48 | await q_event.edit("**Search Query:**\n`" + match + "`\n\n**Results:**\n" + 49 | msg, 50 | link_preview=False) 51 | -------------------------------------------------------------------------------- /userbot/plugins/gps.py: -------------------------------------------------------------------------------- 1 | # Credits ;- @mrconfused 2 | from geopy.geocoders import Nominatim 3 | from userbot.utils import admin_cmd 4 | from telethon.tl import types 5 | from userbot import CMD_HELP 6 | 7 | 8 | @borg.on(admin_cmd(pattern="gps ?(.*)")) 9 | async def gps(event): 10 | if event.fwd_from: 11 | return 12 | reply_to_id = event.message 13 | if event.reply_to_msg_id: 14 | reply_to_id = await event.get_reply_message() 15 | input_str = event.pattern_match.group(1) 16 | 17 | if not input_str: 18 | return await event.edit("Boss ! Give A Place To Search 😔 !.") 19 | 20 | await event.edit("Finding This Location In Maps Server.....") 21 | 22 | geolocator = Nominatim(user_agent="F.R.I.D.A.Y USERBOT") 23 | geoloc = geolocator.geocode(input_str) 24 | 25 | if geoloc: 26 | lon = geoloc.longitude 27 | lat = geoloc.latitude 28 | await reply_to_id.reply( 29 | input_str, 30 | file=types.InputMediaGeoPoint( 31 | types.InputGeoPoint( 32 | lat, lon 33 | ) 34 | ) 35 | ) 36 | await event.delete() 37 | else: 38 | await event.edit("i coudn't find it") 39 | 40 | 41 | CMD_HELP.update({"gps": "`.gps` :\ 42 | \nUSAGE: Sends you the given location name\ 43 | " 44 | }) 45 | -------------------------------------------------------------------------------- /userbot/plugins/howtogoogle.py: -------------------------------------------------------------------------------- 1 | #Modded from dagd.py 2 | """ 3 | Animate How To Google 4 | Command .ggl Search Query 5 | By @loxxi 6 | """ 7 | 8 | from telethon import events 9 | import os 10 | import requests 11 | import json 12 | from userbot.utils import admin_cmd 13 | 14 | 15 | @borg.on(admin_cmd("ggl (.*)")) 16 | async def _(event): 17 | if event.fwd_from: 18 | return 19 | input_str = event.pattern_match.group(1) 20 | sample_url = "https://da.gd/s?url=https://lmgtfy.com/?q={}%26iie=1".format(input_str.replace(" ","+")) 21 | response_api = requests.get(sample_url).text 22 | if response_api: 23 | await event.edit("[{}]({})\n`Thank me Later 🙃` ".format(input_str,response_api.rstrip())) 24 | else: 25 | await event.edit("something is wrong. please try again later.") 26 | -------------------------------------------------------------------------------- /userbot/plugins/hyperlink.py: -------------------------------------------------------------------------------- 1 | # For UniBorg 2 | # By Priyam Kalra 3 | # Syntax (.hl ) 4 | 5 | from telethon import events 6 | from userbot.utils import admin_cmd 7 | import asyncio 8 | from telethon.tl import functions, types 9 | 10 | @borg.on(admin_cmd(pattern="hl ?(.*)")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | input = event.pattern_match.group(1) 15 | await event.edit("[ㅤㅤㅤㅤㅤㅤㅤ](" + input + ")") 16 | -------------------------------------------------------------------------------- /userbot/plugins/hypnotis.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .hypno""" 6 | 7 | from telethon import events 8 | 9 | import asyncio 10 | 11 | from uniborg.util import admin_cmd 12 | 13 | 14 | 15 | @borg.on(admin_cmd(pattern=r"hypno")) 16 | 17 | async def _(event): 18 | 19 | if event.fwd_from: 20 | 21 | return 22 | 23 | animation_interval = 0.8 24 | 25 | animation_ttl = range(0, 15) 26 | 27 | #input_str = event.pattern_match.group(1) 28 | 29 | #if input_str == "hypno": 30 | 31 | #await event.edit(input_str) 32 | 33 | await event.edit("hypnotysing...") 34 | 35 | animation_chars = [ 36 | 37 | "⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜", 38 | "⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬛⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜", 39 | "⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬛⬛⬛⬜⬜\n⬜⬜⬛⬜⬛⬜⬜\n⬜⬜⬛⬛⬛⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜", 40 | "⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜", 41 | "⬛⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬛⬛⬛⬛⬛⬛", 42 | "⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛", 43 | "⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜", 44 | "⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜", 45 | "⬛⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬛⬛⬛⬛⬛⬛", 46 | "⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜", 47 | "⬛⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬛⬛⬛⬛⬛⬛", 48 | "⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜", 49 | "⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬛\n⬛⬜⬛⬜⬛\n⬛⬜⬜⬜⬛\n⬛⬛⬛⬛⬛", 50 | "⬜⬜⬜\n⬜⬛⬜\n⬜⬜⬜", 51 | "[👉🔴👈](https://t.me/PremiumArenaofficials)" 52 | 53 | ] 54 | 55 | for i in animation_ttl: 56 | 57 | await asyncio.sleep(animation_interval) 58 | 59 | await event.edit(animation_chars[i % 15]) 60 | -------------------------------------------------------------------------------- /userbot/plugins/iffuci.py: -------------------------------------------------------------------------------- 1 | """iffuci.tk pastebin site 2 | Code written by @loxxi {iffuci} 3 | Syntax: .iffuci""" 4 | from telethon import events 5 | import asyncio 6 | from datetime import datetime 7 | import os 8 | import requests 9 | from userbot.utils import admin_cmd 10 | 11 | 12 | def progress(current, total): 13 | logger.info("Downloaded {} of {}\nCompleted {}".format(current, total, (current / total) * 100)) 14 | 15 | 16 | @borg.on(admin_cmd(pattern="iffuci ?(.*)")) 17 | async def _(event): 18 | if event.fwd_from: 19 | return 20 | start = datetime.now() 21 | if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): 22 | os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) 23 | input_str = event.pattern_match.group(1) 24 | message = "SYNTAX: `.iffuci `" 25 | if input_str: 26 | message = input_str 27 | elif event.reply_to_msg_id: 28 | previous_message = await event.get_reply_message() 29 | if previous_message.media: 30 | downloaded_file_name = await borg.download_media( 31 | previous_message, 32 | Config.TMP_DOWNLOAD_DIRECTORY, 33 | progress_callback=progress 34 | ) 35 | m_list = None 36 | with open(downloaded_file_name, "rb") as fd: 37 | m_list = fd.readlines() 38 | message = "" 39 | for m in m_list: 40 | message += m.decode("UTF-8") + "\r\n" 41 | os.remove(downloaded_file_name) 42 | else: 43 | message = previous_message.message 44 | else: 45 | message = "SYNTAX: `.iffuci `" 46 | url = "https://www.iffuci.tk/documents" 47 | r = requests.post(url, data=message.encode("UTF-8")).json() 48 | url = f"https://iffuci.tk/{r['key']}" 49 | end = datetime.now() 50 | ms = (end - start).seconds 51 | if r["isUrl"]: 52 | nurl = f"https://iffuci.tk/v/{r['key']}" 53 | await event.edit("code is pasted to {} in {} seconds. GoTo Original URL: {}".format(url, ms, nurl)) 54 | else: 55 | await event.edit("code is pasted to {} in {} seconds".format(url, ms)) 56 | -------------------------------------------------------------------------------- /userbot/plugins/ifsc.py: -------------------------------------------------------------------------------- 1 | """Query Indian Financial System Code to get address of the relevant bank or branch 2 | Syntax: .ifsc rp """ 3 | from telethon import events 4 | import requests 5 | import json 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd(pattern="ifsc(.*)")) 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | input_str = event.pattern_match.group(1) 14 | url = "https://ifsc.razorpay.com/{}".format(input_str) 15 | r = requests.get(url) 16 | if r.status_code == 200: 17 | b = r.json() 18 | a = json.dumps(b, sort_keys=True, indent=4) 19 | # https://stackoverflow.com/a/9105132/4723940 20 | await event.edit(str(a)) 21 | else: 22 | await event.edit("`{}`: {}".format(input_str, r.text)) 23 | -------------------------------------------------------------------------------- /userbot/plugins/img.py: -------------------------------------------------------------------------------- 1 | """Download & Upload Images on Telegram\n 2 | Syntax: `.img ` or `.img (replied message)` 3 | \n Upgraded and Google Image Error Fixed 4 | """ 5 | 6 | from userbot.google_imgs import googleimagesdownload 7 | import os 8 | import shutil 9 | from re import findall 10 | from userbot.utils import admin_cmd 11 | 12 | 13 | @borg.on(admin_cmd(pattern="img ?(.*)")) 14 | async def img_sampler(event): 15 | await event.edit("`Processing...`") 16 | reply = await event.get_reply_message() 17 | if event.pattern_match.group(1): 18 | query = event.pattern_match.group(1) 19 | elif reply: 20 | query = reply.message 21 | else: 22 | await event.edit("`um, mind mentioning what I actually need to search for ;_;`") 23 | return 24 | 25 | lim = findall(r"lim=\d+", query) 26 | # lim = event.pattern_match.group(1) 27 | try: 28 | lim = lim[0] 29 | lim = lim.replace("lim=", "") 30 | query = query.replace("lim=" + lim[0], "") 31 | except IndexError: 32 | lim = 5 33 | response = googleimagesdownload() 34 | 35 | # creating list of arguments 36 | arguments = { 37 | "keywords": query, 38 | "limit": lim, 39 | "format": "jpg", 40 | "no_directory": "no_directory" 41 | } 42 | 43 | # passing the arguments to the function 44 | paths = response.download(arguments) 45 | lst = paths[0][query] 46 | await event.client.send_file(await event.client.get_input_entity(event.chat_id), lst) 47 | shutil.rmtree(os.path.dirname(os.path.abspath(lst[0]))) 48 | await event.delete() 49 | -------------------------------------------------------------------------------- /userbot/plugins/jio.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | Available Commands: 3 | .emoji shrug 4 | .emoji apple 5 | .emoji :/ 6 | .emoji -_-""" 7 | 8 | from telethon import events 9 | 10 | import asyncio 11 | 12 | from uniborg.util import admin_cmd 13 | 14 | 15 | 16 | @borg.on(admin_cmd(pattern=r"jio")) 17 | 18 | async def _(event): 19 | 20 | if event.fwd_from: 21 | 22 | return 23 | 24 | animation_interval = 1 25 | 26 | animation_ttl = range(0, 19) 27 | 28 | # input_str = event.pattern_match.group(1) 29 | 30 | # if input_str == "jio": 31 | 32 | await event.edit("jio") 33 | 34 | animation_chars = [ 35 | 36 | "`Connecting To JIO Network 📡 ....`", 37 | "`█ ▇ ▆ ▅ ▄ ▂ ▁`", 38 | "`▒ ▇ ▆ ▅ ▄ ▂ ▁`", 39 | "`▒ ▒ ▆ ▅ ▄ ▂ ▁`", 40 | "`▒ ▒ ▒ ▅ ▄ ▂ ▁`", 41 | "`▒ ▒ ▒ ▒ ▄ ▂ ▁`", 42 | "`▒ ▒ ▒ ▒ ▒ ▂ ▁`", 43 | "`▒ ▒ ▒ ▒ ▒ ▒ ▁`", 44 | "`▒ ▒ ▒ ▒ ▒ ▒ ▒`", 45 | "*Optimising Network....*", 46 | "`▒ ▒ ▒ ▒ ▒ ▒ ▒`", 47 | "`▁ ▒ ▒ ▒ ▒ ▒ ▒`", 48 | "`▁ ▂ ▒ ▒ ▒ ▒ ▒`", 49 | "`▁ ▂ ▄ ▒ ▒ ▒ ▒`", 50 | "`▁ ▂ ▄ ▅ ▒ ▒ ▒`", 51 | "`▁ ▂ ▄ ▅ ▆ ▒ ▒`", 52 | "`▁ ▂ ▄ ▅ ▆ ▇ ▒`", 53 | "`▁ ▂ ▄ ▅ ▆ ▇ █`", 54 | "**JIO Network Connected and Boosted....**" 55 | 56 | ] 57 | 58 | for i in animation_ttl: 59 | 60 | await asyncio.sleep(animation_interval) 61 | 62 | await event.edit(animation_chars[i % 19]) 63 | -------------------------------------------------------------------------------- /userbot/plugins/json.py: -------------------------------------------------------------------------------- 1 | """Get Detailed info about any message 2 | Syntax: .json""" 3 | from telethon import events 4 | import io 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("json")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | the_real_message = None 13 | reply_to_id = None 14 | if event.reply_to_msg_id: 15 | previous_message = await event.get_reply_message() 16 | the_real_message = previous_message.stringify() 17 | reply_to_id = event.reply_to_msg_id 18 | else: 19 | the_real_message = event.stringify() 20 | reply_to_id = event.message.id 21 | if len(the_real_message) > Config.MAX_MESSAGE_SIZE_LIMIT: 22 | with io.BytesIO(str.encode(the_real_message)) as out_file: 23 | out_file.name = "json.text" 24 | await borg.send_file( 25 | event.chat_id, 26 | out_file, 27 | force_document=True, 28 | allow_cache=False, 29 | reply_to=reply_to_id 30 | ) 31 | await event.delete() 32 | else: 33 | await event.edit("`{}`".format(the_real_message)) 34 | -------------------------------------------------------------------------------- /userbot/plugins/labstack.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | import os 3 | import requests 4 | import subprocess 5 | import time 6 | import json 7 | import sys 8 | 9 | @command(pattern="^.labstack ?(.*)") 10 | async def labstack(event): 11 | if event.fwd_from: 12 | return 13 | await event.edit("Processing...") 14 | input_str = event.pattern_match.group(1) 15 | reply = await event.get_reply_message() 16 | if input_str: 17 | filebase = input_str 18 | elif reply: 19 | filebase = await event.client.download_media(reply.media, Var.TEMP_DOWNLOAD_DIRECTORY) 20 | else: 21 | await event.edit("Reply to a media file or provide a directory to upload the file to labstack") 22 | return 23 | filesize = os.path.getsize(filebase) 24 | filename = os.path.basename(filebase) 25 | headers2 = {'Up-User-ID': 'IZfFbjUcgoo3Ao3m'} 26 | files2 = {"ttl":604800,"files":[{"name": filename, "type": "", "size": filesize}]} 27 | r2 = requests.post("https://up.labstack.com/api/v1/links", json=files2, headers=headers2) 28 | r2json = json.loads(r2.text) 29 | 30 | url = "https://up.labstack.com/api/v1/links/{}/send".format(r2json['code']) 31 | max_days = 7 32 | command_to_exec = [ 33 | "curl", 34 | "-F", "files=@" + filebase, 35 | "-H","Transfer-Encoding: chunked", 36 | "-H","Up-User-ID: IZfFbjUcgoo3Ao3m", 37 | url 38 | ] 39 | try: 40 | logger.info(command_to_exec) 41 | t_response = subprocess.check_output(command_to_exec, stderr=subprocess.STDOUT) 42 | except subprocess.CalledProcessError as exc: 43 | logger.info("Status : FAIL", exc.returncode, exc.output) 44 | await event.edit(exc.output.decode("UTF-8")) 45 | return 46 | else: 47 | logger.info(t_response) 48 | t_response_arry = "https://up.labstack.com/api/v1/links/{}/receive".format(r2json['code']) 49 | await event.edit(t_response_arry + "\nMax Days:" + str(max_days), link_preview=False) 50 | 51 | -------------------------------------------------------------------------------- /userbot/plugins/lastupdate.py: -------------------------------------------------------------------------------- 1 | # Base by @Sur_Vivor And Idea And Created By @StarkxD 2 | from telethon import events 3 | from datetime import datetime 4 | from telethon import events 5 | from datetime import datetime 6 | from userbot.utils import admin_cmd 7 | from userbot.__init__ import Lastupdate 8 | import time 9 | 10 | 11 | 12 | def get_readable_time(seconds: int) -> str: 13 | count = 0 14 | ping_time = "" 15 | time_list = [] 16 | time_suffix_list = ["s", "m", "h", "days"] 17 | 18 | while count < 4: 19 | count += 1 20 | if count < 3: 21 | remainder, result = divmod(seconds, 60) 22 | else: 23 | remainder, result = divmod(seconds, 24) 24 | if seconds == 0 and remainder == 0: 25 | break 26 | time_list.append(int(result)) 27 | seconds = int(remainder) 28 | 29 | for x in range(len(time_list)): 30 | time_list[x] = str(time_list[x]) + time_suffix_list[x] 31 | if len(time_list) == 4: 32 | ping_time += time_list.pop() + ", " 33 | 34 | time_list.reverse() 35 | ping_time += ":".join(time_list) 36 | 37 | return ping_time 38 | 39 | 40 | #@command(pattern="^.lastinfo") 41 | @borg.on(admin_cmd(pattern="lastinfo")) 42 | async def _(event): 43 | if event.fwd_from: 44 | return 45 | start = datetime.now() 46 | await event.edit("Calculating Last Update or Restart Time") 47 | end = datetime.now() 48 | ms = (end - start).microseconds / 1000 49 | uptime = get_readable_time((time.time() - Lastupdate)) 50 | await event.edit(f"**CrackBot**\nLast Time Restarted {uptime}\nLast Time Updated {uptime}") 51 | -------------------------------------------------------------------------------- /userbot/plugins/list.py: -------------------------------------------------------------------------------- 1 | """ 2 | List Files plugin for userbot //Simple Module for people who dont wanna use shell executor for listing files. 3 | cmd: .ls // will return files from current working directory 4 | .ls path // will return output according to path 5 | 6 | By:- @Zero_cool7870 7 | 8 | """ 9 | 10 | from uniborg.util import admin_cmd 11 | import asyncio 12 | import os 13 | 14 | 15 | @borg.on(admin_cmd(pattern="ls ?(.*)")) 16 | async def lst(event): 17 | if event.fwd_from: 18 | return 19 | input_str = event.pattern_match.group(1) 20 | if input_str: 21 | msg = "**Files in {} :**\n".format(input_str) 22 | files = os.listdir(input_str) 23 | else: 24 | msg = "**Files in Current Directory :**\n" 25 | files = os.listdir(os.getcwd()) 26 | for file in files: 27 | msg += "`{}`\n".format(file) 28 | if len(msg) <= Config.MAX_MESSAGE_SIZE_LIMIT: 29 | await event.edit(msg) 30 | else: 31 | msg = msg.replace("`","") 32 | out = 'filesList.txt' 33 | with open(out,'w') as f: 34 | f.write(f) 35 | await borg.send_file( 36 | event.chat_id, 37 | out, 38 | force_document=True, 39 | allow_cache=False, 40 | caption="`Output is huge. Sending as a file...`" 41 | ) 42 | await event.delete() 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /userbot/plugins/listmyusernames.py: -------------------------------------------------------------------------------- 1 | # For @UniBorg 2 | # (c) Shrimadhav U K 3 | 4 | from telethon import events, functions, types 5 | from uniborg.util import admin_cmd 6 | 7 | from telethon.tl.functions.channels import GetAdminedPublicChannelsRequest 8 | 9 | @borg.on(admin_cmd("listmyusernames")) 10 | 11 | async def mine(event): 12 | """ For .reserved command, get a list of your reserved usernames. """ 13 | result = await bot(GetAdminedPublicChannelsRequest()) 14 | output_str = "" 15 | for channel_obj in result.chats: 16 | output_str += f"{channel_obj.title}\n@{channel_obj.username}\n\n" 17 | await event.edit(output_str) 18 | -------------------------------------------------------------------------------- /userbot/plugins/log_pms.py: -------------------------------------------------------------------------------- 1 | """Log PMs 2 | Check https://t.me/tgbeta/3505""" 3 | # R4V4N4 And Mr Confused 4 | 5 | import asyncio 6 | from telethon import events 7 | from telethon.tl import functions, types 8 | from uniborg.util import admin_cmd 9 | 10 | 11 | 12 | 13 | NO_PM_LOG_USERS = [] 14 | 15 | 16 | @borg.on(admin_cmd(incoming=True, func=lambda e: e.is_private)) 17 | async def monito_p_m_s(event): 18 | sender = await event.get_sender() 19 | if Config.NC_LOG_P_M_S and not sender.bot: 20 | chat = await event.get_chat() 21 | if chat.id not in NO_PM_LOG_USERS and chat.id != borg.uid: 22 | try: 23 | e = await borg.get_entity(int(Config.PM_LOGGR_BOT_API_ID)) 24 | fwd_message = await borg.forward_messages( 25 | e, 26 | event.message, 27 | silent=True 28 | ) 29 | except Exception as e: 30 | logger.warn(str(e)) 31 | 32 | 33 | @borg.on(admin_cmd(pattern="nolog ?(.*)")) 34 | async def approve_p_m(event): 35 | if event.fwd_from: 36 | return 37 | reason = event.pattern_match.group(1) 38 | chat = await event.get_chat() 39 | if Config.NC_LOG_P_M_S: 40 | if event.is_private: 41 | if chat.id not in borg.storage.NO_PM_LOG_USERS: 42 | NO_PM_LOG_USERS.append(chat.id) 43 | await event.edit("Won't Log Messages from this chat") 44 | await asyncio.sleep(3) 45 | await event.delete() 46 | -------------------------------------------------------------------------------- /userbot/plugins/lol.py: -------------------------------------------------------------------------------- 1 | #if u steal credits u wil be the gayest gay in the world. i will fban u from 100 feds and u will leave tg 2 | """ 3 | Pulls Up A Random string created by Indian Bhai. 4 | cmd: .lol 5 | full credits : @pureindialover 6 | """ 7 | from telethon import events 8 | import asyncio 9 | import os 10 | import sys 11 | import random 12 | from uniborg.util import admin_cmd 13 | 14 | 15 | 16 | @borg.on(admin_cmd(pattern=r"lol")) 17 | 18 | async def _(event): 19 | 20 | if event.fwd_from: 21 | 22 | return 23 | 24 | await event.edit("Typing...") 25 | 26 | await asyncio.sleep(2) 27 | 28 | x=(random.randrange(1,28)) 29 | if (x==1): 30 | await event.edit(";l;;o;;l;") 31 | if (x==2): 32 | await event.edit("lloll") 33 | if (x==3): 34 | await event.edit(";l;o;l;") 35 | if (x==4): 36 | await event.edit("lo/;l") 37 | if (x==5): 38 | await event.edit("/lol/*") 39 | if (x==6): 40 | await event.edit("\lol") 41 | if (x==7): 42 | await event.edit("lllolll") 43 | if (x==8): 44 | await event.edit("l-o-l") 45 | if (x==9): 46 | await event.edit("-l;o;l-") 47 | if (x==10): 48 | await event.edit("[lol]") 49 | if (x==11): 50 | await event.edit(";;loo;l") 51 | if (x==12): 52 | await event.edit("l.o.l") 53 | if (x==13): 54 | await event.edit(";l.o.l;") 55 | if (x==14): 56 | await event.edit("llooll") 57 | if (x==15): 58 | await event.edit("phuck.lol") 59 | if (x==16): 60 | await event.edit("/l:o;l.") 61 | if (x==17): 62 | await event.edit("ll;oo;lll") 63 | if (x==18): 64 | await event.edit("loooooooooooool") 65 | if (x==19): 66 | await event.edit("lollll.lll;lol") 67 | if (x==20): 68 | await event.edit(";;;llloo;oo;ollll;;") 69 | if (x==21): 70 | await event.edit("lol me laughed hehehe") 71 | if (x==22): 72 | await event.edit("tum haso ab lol") 73 | if (x==23): 74 | await event.edit(":l:o:l:") 75 | if (x==24): 76 | await event.edit("l-o+l") 77 | if (x==25): 78 | await event.edit("l+o=l") 79 | if (x==26): 80 | await event.edit("l|o|l") 81 | if (x==27): 82 | await event.edit("hola lol") 83 | if (x==28): 84 | await event.edit("llllllllllllllooooooooooollllllllll") 85 | 86 | -------------------------------------------------------------------------------- /userbot/plugins/lovestory.py: -------------------------------------------------------------------------------- 1 | """COMMAND : .lovestory""" 2 | 3 | from telethon import events 4 | 5 | import asyncio 6 | 7 | from userbot.utils import admin_cmd 8 | 9 | 10 | 11 | @borg.on(admin_cmd(pattern="lovestory")) 12 | 13 | async def _(event): 14 | 15 | if event.fwd_from: 16 | 17 | return 18 | 19 | animation_interval = 3 20 | 21 | animation_ttl = range(0, 103) 22 | 23 | #input_str = event.pattern_match.group(1) 24 | 25 | #if input_str == "lovestory": 26 | 27 | await event.edit("Starting asf") 28 | 29 | animation_chars = [ 30 | 31 | "1 ❤️ love story", 32 | " 😐 😕 \n/👕\ <👗\ \n 👖 /|", 33 | " 😉 😳 \n/👕\ /👗\ \n 👖 /|", 34 | " 😚 😒 \n/👕\ <👗> \n 👖 /|", 35 | " 😍 ☺️ \n/👕\ /👗\ \n 👖 /|", 36 | " 😍 😍 \n/👕\ /👗\ \n 👖 /|", 37 | " 😘 😊 \n /👕\/👗\ \n 👖 /|", 38 | " 😳 😁 \n /|\ /👙\ \n / / |", 39 | "😈 /😰\ \n<|\ 👙 \n /🍆 / |", 40 | "😅 \n/(),✊😮 \n /\ _/\\/|", 41 | "😎 \n/\\_,__😫 \n // // \\", 42 | "😖 \n/\\_,💦_😋 \n // // \\", 43 | " 😭 ☺️ \n /|\ /(👶)\ \n /!\ / \ ", 44 | "The End 😂..." 45 | ] 46 | 47 | for i in animation_ttl: 48 | 49 | await asyncio.sleep(animation_interval) 50 | 51 | await event.edit(animation_chars[i % 103]) 52 | -------------------------------------------------------------------------------- /userbot/plugins/lucky.py: -------------------------------------------------------------------------------- 1 | # plugin by lejend @pureindialover 2 | """Emoji 3 | 4 | Available Commands: 5 | 6 | .lucky""" 7 | 8 | from telethon import events 9 | 10 | import asyncio 11 | from uniborg.util import admin_cmd 12 | 13 | 14 | 15 | 16 | @borg.on(admin_cmd(pattern="lucky")) 17 | 18 | async def _(event): 19 | 20 | if event.fwd_from: 21 | 22 | return 23 | 24 | animation_interval = 0.5 25 | 26 | animation_ttl = range(0, 17) 27 | 28 | #input_str = event.pattern_match.group(1) 29 | 30 | #if input_str == "lucky": 31 | 32 | await event.edit("Lucky..") 33 | 34 | animation_chars = [ 35 | 36 | "⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜🎁⬜", 37 | "⬛⬜⬜⬜⬜\n👇⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜🎁⬜", 38 | "⬛⬛⬜⬜⬜\n⬜👇⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜🎁⬜", 39 | "⬛⬛⬛⬜⬜\n⬜⬜👇⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜🎁⬜", 40 | "⬛⬛⬛⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜🎁⬜", 41 | "⬛⬛⬛⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜🎁⬜", 42 | "⬛⬛⬛⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜🎁⬜", 43 | "⬛⬛⬛⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜🎁⬜\n⬜⬜⬜⬜⬜", 44 | "⬛⬛⬛⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜🎁⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 45 | "⬛⬛⬛⬜⬜\n⬜⬜👇⬜⬜\n⬜⬜🎁⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 46 | "⬛⬛⬜⬜⬜\n⬜👇⬜⬜⬜\n⬜🎁⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 47 | "⬛⬜⬜⬜⬜\n👇⬜⬜⬜⬜\n🎁⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 48 | "⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 49 | "⬜⬜⬜⬜\n⬜⬜⬜⬜\n⬜⬜⬜⬜\n⬜⬜⬜⬜", 50 | "⬜⬜⬜\n⬜⬜⬜\n⬜⬜⬜", 51 | "⬜⬜\n⬜⬜", 52 | "🎁" 53 | 54 | ] 55 | 56 | for i in animation_ttl: 57 | 58 | await asyncio.sleep(animation_interval) 59 | 60 | await event.edit(animation_chars[i % 17]) 61 | -------------------------------------------------------------------------------- /userbot/plugins/malayalamcalender.py: -------------------------------------------------------------------------------- 1 | """Malayalam Calendar plugin for Indian Bot 2 | SYNTAX: .calendar YYYY-MM-DD""" 3 | from telethon import events 4 | import asyncio 5 | from datetime import datetime 6 | import requests 7 | import json 8 | from uniborg.util import admin_cmd 9 | 10 | 11 | @borg.on(admin_cmd(pattern="calendar (.*)")) 12 | async def _(event): 13 | if event.fwd_from: 14 | return 15 | start = datetime.now() 16 | input_str = event.pattern_match.group(1) 17 | input_sgra = input_str.split("-") 18 | if len(input_sgra) == 3: 19 | yyyy = input_sgra[0] 20 | mm = input_sgra[1] 21 | dd = input_sgra[2] 22 | required_url = "https://calendar.kollavarsham.org/api/years/{}/months/{}/days/{}?lang={}".format(yyyy, mm, dd, "en") 23 | headers = {"Accept": "application/json"} 24 | response_content = requests.get(required_url, headers=headers).json() 25 | a = "" 26 | if "error" not in response_content: 27 | current_date_detail_arraays = response_content["months"][0]["days"][0] 28 | a = json.dumps(current_date_detail_arraays, sort_keys=True, indent=4) 29 | else: 30 | a = response_content["error"] 31 | await event.edit(str(a)) 32 | else: 33 | await event.edit("SYNTAX: .calendar YYYY-MM-DD") 34 | end = datetime.now() 35 | ms = (end - start).seconds 36 | -------------------------------------------------------------------------------- /userbot/plugins/mask.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from telethon import events 3 | from telethon.errors.rpcerrorlist import YouBlockedUserError 4 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 5 | from uniborg.util import admin_cmd 6 | 7 | @borg.on(admin_cmd("mask ?(.*)")) 8 | async def _(event): 9 | if event.fwd_from: 10 | return 11 | if not event.reply_to_msg_id: 12 | await event.edit("```Reply to any user message.```") 13 | return 14 | reply_message = await event.get_reply_message() 15 | if not reply_message.media: 16 | await event.edit("```reply to text message```") 17 | return 18 | chat = "@hazmat_suit_bot" 19 | sender = reply_message.sender 20 | if reply_message.sender.bot: 21 | await event.edit("```Reply to actual users message.```") 22 | return 23 | await event.edit("```Processing```") 24 | async with borg.conversation(chat) as conv: 25 | try: 26 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=905164246)) 27 | await borg.send_message(chat, reply_message) 28 | response = await response 29 | except YouBlockedUserError: 30 | await event.reply("```Please unblock @sangmatainfo_bot and try again```") 31 | return 32 | if response.text.startswith("Forward"): 33 | await event.edit("```can you kindly disable your forward privacy settings for good?```") 34 | else: 35 | await borg.send_file(event.chat_id, response.message.media) 36 | -------------------------------------------------------------------------------- /userbot/plugins/meaning.py: -------------------------------------------------------------------------------- 1 | """Dictionary Plugin for @UniBorg 2 | Syntax: .mean """ 3 | 4 | import requests 5 | from telethon import events 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd(pattern="mean (.*)")) 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | input_str = event.pattern_match.group(1) 14 | input_url = "https://bots.shrimadhavuk.me/dictionary/?s={}".format(input_str) 15 | headers = {"USER-AGENT": "CrackBot"} 16 | caption_str = f"Meaning of __{input_str}__\n" 17 | try: 18 | response = requests.get(input_url, headers=headers).json() 19 | pronounciation = response.get("p") 20 | meaning_dict = response.get("lwo") 21 | for current_meaning in meaning_dict: 22 | current_meaning_type = current_meaning.get("type") 23 | current_meaning_definition = current_meaning.get("definition") 24 | caption_str += f"**{current_meaning_type}**: {current_meaning_definition}\n\n" 25 | except Exception as e: 26 | caption_str = str(e) 27 | reply_msg_id = event.message.id 28 | if event.reply_to_msg_id: 29 | reply_msg_id = event.reply_to_msg_id 30 | try: 31 | await borg.send_file( 32 | event.chat_id, 33 | pronounciation, 34 | caption=f"Pronounciation of __{input_str}__", 35 | force_document=False, 36 | reply_to=reply_msg_id, 37 | allow_cache=True, 38 | voice_note=True, 39 | silent=True, 40 | supports_streaming=True 41 | ) 42 | except: 43 | pass 44 | await event.edit(caption_str) 45 | -------------------------------------------------------------------------------- /userbot/plugins/mention.py: -------------------------------------------------------------------------------- 1 | # For Uniborg 2 | # (c) @INF1N17Y 3 | 4 | from telethon import events 5 | from uniborg.util import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("mention (.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | input_str = event.pattern_match.group(1) 13 | if event.reply_to_msg_id: 14 | previous_message = await event.get_reply_message() 15 | if previous_message.forward: 16 | replied_user = previous_message.forward.from_id 17 | else: 18 | replied_user = previous_message.from_id 19 | else: 20 | await event.edit("reply To Message") 21 | user_id = replied_user 22 | caption = """{}""".format(user_id, input_str) 23 | await event.edit(caption, parse_mode="HTML") 24 | -------------------------------------------------------------------------------- /userbot/plugins/mf.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | import os 4 | """Available Commands: 5 | .mf""" 6 | 7 | from telethon import events, functions, __version__ 8 | 9 | import asyncio 10 | 11 | from userbot.utils import admin_cmd 12 | 13 | @borg.on(admin_cmd("(.*)")) 14 | 15 | async def _(event): 16 | if event.fwd_from: 17 | return 18 | animation_interval = 1 19 | animation_ttl = range(0,27) 20 | input_str = event.pattern_match.group(1) 21 | if input_str == "mf": 22 | await event.edit(input_str) 23 | animation_chars = [ 24 | "\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..............\.............\..." 25 | ] 26 | 27 | for i in animation_ttl: 28 | 29 | await asyncio.sleep(animation_interval) 30 | await event.edit(animation_chars[i %27 ]) 31 | 32 | @borg.on(admin_cmd(pattern="dc")) # pylint:disable=E0602 33 | async def _(event): 34 | if event.fwd_from: 35 | return 36 | result = await borg(functions.help.GetNearestDcRequest()) # pylint:disable=E0602 37 | await event.edit(result.stringify()) 38 | 39 | 40 | @borg.on(admin_cmd(pattern="config")) # pylint:disable=E0602 41 | async def _(event): 42 | if event.fwd_from: 43 | return 44 | result = await borg(functions.help.GetConfigRequest()) # pylint:disable=E0602 45 | result = result.stringify() 46 | logger.info(result) # pylint:disable=E0602 47 | await event.edit("""Telethon UserBot powered by @FRIDAYSUPPORTOFFICIAL""") 48 | -------------------------------------------------------------------------------- /userbot/plugins/misc.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2019 The Raphielscape Company LLC. 2 | # 3 | # Licensed under the Raphielscape Public License, Version 1.b (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # 6 | # You can find misc modules, which dont fit in anything xD 7 | 8 | """ Userbot module for other small commands. """ 9 | 10 | from random import randint 11 | from time import sleep 12 | 13 | 14 | from userbot.events import register 15 | 16 | 17 | @register(outgoing=True, pattern="^.random") 18 | async def randomise(items): 19 | """ For .random command, get a random item from the list of items. """ 20 | if not items.text[0].isalpha() and items.text[0] not in ("/", "#", "@", "!"): 21 | itemo = (items.text[8:]).split() 22 | index = randint(1, len(itemo) - 1) 23 | await items.edit("**Query: **\n`" + items.text[8:] + "`\n**Output: **\n`" + itemo[index] + "`") 24 | 25 | 26 | @register(outgoing=True, pattern="^.sleep( [0-9]+)?$") 27 | async def sleepybot(time): 28 | """ For .sleep command, let the userbot snooze for a few second. """ 29 | message = time.text 30 | if not message[0].isalpha() and message[0] not in ("/", "#", "@", "!"): 31 | if " " not in time.pattern_match.group(1): 32 | await time.reply("Syntax: `.sleep [seconds]`") 33 | else: 34 | counter = int(time.pattern_match.group(1)) 35 | await time.edit("`I am sulking and snoozing....`") 36 | sleep(2) 37 | if LOGGER: 38 | await time.client.send_message( 39 | LOGGER_GROUP, 40 | "You put the bot to sleep for " + str(counter) + " seconds", 41 | ) 42 | sleep(counter) 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /userbot/plugins/musicdl.py: -------------------------------------------------------------------------------- 1 | """ Spotify / Deezer downloader plugin by @anubisxx | Syntax: .sdd link""" 2 | import datetime 3 | import asyncio 4 | from telethon import events 5 | from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError 6 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 7 | from telethon.tl.functions.messages import ImportChatInviteRequest 8 | from userbot.utils import admin_cmd 9 | 10 | @borg.on(admin_cmd("sdd ?(.*)")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | d_link = event.pattern_match.group(1) 15 | if ".com" not in d_link: 16 | await event.edit("` I need a link to download something bish.`**(-__-)**") 17 | else: 18 | await event.edit("🎶**Initiating Download!**🎶") 19 | bot = "@DeezLoadBot" 20 | 21 | async with borg.conversation("@DeezLoadBot") as conv: 22 | try: 23 | await conv.send_message("/start") 24 | response = await conv.get_response() 25 | try: 26 | await borg(ImportChatInviteRequest('AAAAAFZPuYvdW1A8mrT8Pg')) 27 | except UserAlreadyParticipantError: 28 | await asyncio.sleep(0.00000069420) 29 | await conv.send_message(d_link) 30 | details = await conv.get_response() 31 | await borg.send_message(event.chat_id, details) 32 | await conv.get_response() 33 | songh = await conv.get_response() 34 | await borg.send_file(event.chat_id, songh, caption="☣️**Here's the Requested Song!**☣️\nSong leached By CrackBot 😎") 35 | await event.delete() 36 | except YouBlockedUserError: 37 | await event.edit("**Error:** `unblock` @DeezLoadBot `and then retry!`") 38 | -------------------------------------------------------------------------------- /userbot/plugins/muth.py: -------------------------------------------------------------------------------- 1 | """ 2 | Available Commands 3 | .muth""" 4 | 5 | from telethon import events 6 | 7 | import asyncio 8 | 9 | 10 | 11 | 12 | 13 | @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) 14 | 15 | async def _(event): 16 | 17 | if event.fwd_from: 18 | 19 | return 20 | 21 | animation_interval = 0.3 22 | 23 | animation_ttl = range(0, 100) 24 | 25 | input_str = event.pattern_match.group(1) 26 | 27 | if input_str == "muth": 28 | 29 | await event.edit(input_str) 30 | 31 | animation_chars = [ 32 | 33 | "8✊️===D", 34 | 35 | "8=✊️==D", 36 | 37 | "8==✊️=D", 38 | 39 | "8===✊️D", 40 | 41 | "8==✊️=D", 42 | 43 | "8=✊️==D", 44 | 45 | "8✊️===D", 46 | 47 | "8===✊️D💦", 48 | 49 | "8==✊️=D💦💦", 50 | 51 | "8=✊️==D💦💦💦" 52 | 53 | ] 54 | 55 | for i in animation_ttl: 56 | 57 | await asyncio.sleep(animation_interval) 58 | 59 | await event.edit(animation_chars[i % 8]) 60 | 61 | -------------------------------------------------------------------------------- /userbot/plugins/ninja.py: -------------------------------------------------------------------------------- 1 | # This Source Code Form is subject to the terms of the Mozilla Public 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this 3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | 5 | import asyncio 6 | 7 | from telethon import events 8 | import telethon.utils 9 | 10 | from uniborg.util import admin_cmd,re 11 | 12 | 13 | async def get_target_message(event): 14 | if event.is_reply and (await event.get_reply_message()).from_id == borg.uid: 15 | return await event.get_reply_message() 16 | async for message in borg.iter_messages( 17 | await event.get_input_chat(), limit=20): 18 | if message.out: 19 | return message 20 | 21 | 22 | async def await_read(chat, message): 23 | chat = telethon.utils.get_peer_id(chat) 24 | 25 | async def read_filter(read_event): 26 | return (read_event.chat_id == chat 27 | and read_event.is_read(message)) 28 | fut = borg.await_event(events.MessageRead(inbox=False), read_filter) 29 | 30 | if await is_read(borg, chat, message): 31 | fut.cancel() 32 | return 33 | 34 | await fut 35 | 36 | 37 | @borg.on(admin_cmd(pattern="(del)(?:ete)?$")) 38 | @borg.on(admin_cmd(pattern="(edit)(?:\s+(.*))?$")) 39 | async def delete(event): 40 | await event.delete() 41 | command = event.pattern_match.group(1) 42 | if command == 'edit': 43 | text = event.pattern_match.group(2) 44 | if not text: 45 | return 46 | target = await get_target_message(event) 47 | if target: 48 | chat = await event.get_input_chat() 49 | await await_read(chat, target) 50 | await asyncio.sleep(.5) 51 | if command == 'edit': 52 | await borg.edit_message(chat, target, text) 53 | else: 54 | await borg.delete_messages(chat, target, revoke=True) 55 | -------------------------------------------------------------------------------- /userbot/plugins/np.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | Available Commands: 3 | .nope 4 | Credits to @mariodevs 5 | """ 6 | 7 | from telethon import events 8 | 9 | import asyncio 10 | 11 | from userbot.utils import admin_cmd 12 | 13 | @borg.on(admin_cmd("nope")) 14 | async def _(event): 15 | if event.fwd_from: 16 | return 17 | animation_interval = 0.1 18 | animation_ttl = range(0,36) 19 | #input_str = event.pattern_match.group(1) 20 | # if input_str == "nope": 21 | await event.edit("nope") 22 | animation_chars = [ 23 | "No", 24 | "Problem", 25 | "Boss", 26 | "Yeah ! No problem", 27 | "No Problem Boss.lol", 28 | "No Problem Boss😇.Lol", 29 | "No Problem Man😇.Lol" 30 | ] 31 | 32 | 33 | for i in animation_ttl: 34 | 35 | await asyncio.sleep(animation_interval) 36 | await event.edit(animation_chars[i % 18]) 37 | -------------------------------------------------------------------------------- /userbot/plugins/ok.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .ok""" 6 | 7 | from telethon import events 8 | 9 | import asyncio 10 | 11 | from userbot.utils import admin_cmd 12 | 13 | @borg.on(admin_cmd("ok")) 14 | async def _(event): 15 | if event.fwd_from: 16 | return 17 | animation_interval = 0.1 18 | animation_ttl = range(0,36) 19 | #input_str = event.pattern_match.group(1) 20 | # if input_str == "ok": 21 | await event.edit("ok") 22 | animation_chars = [ 23 | "OK", 24 | "BOSS", 25 | "OK MAN", 26 | "OK BITCH", 27 | "OK FUKCER", 28 | "OK SEXY BABE", 29 | "OK GAY", 30 | "OK SIR", 31 | "GO AND SAY OK", 32 | "OK LOL", 33 | "YAA OK", 34 | "FCUK", 35 | "OK", 36 | "Boss", 37 | "Yeahhhhhh", 38 | "O", 39 | "K", 40 | "Ok Boss! 😇" 41 | ] 42 | 43 | for i in animation_ttl: 44 | 45 | await asyncio.sleep(animation_interval) 46 | await event.edit(animation_chars[i % 18]) 47 | -------------------------------------------------------------------------------- /userbot/plugins/padmin.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .padmin""" 6 | 7 | from telethon import events 8 | 9 | import asyncio 10 | 11 | from uniborg.util import admin_cmd 12 | 13 | 14 | 15 | @borg.on(admin_cmd(pattern=r"padmin")) 16 | 17 | async def _(event): 18 | 19 | if event.fwd_from: 20 | 21 | return 22 | 23 | animation_interval = 1 24 | 25 | animation_ttl = range(0, 20) 26 | 27 | await event.edit("Promoting") 28 | 29 | animation_chars = [ 30 | 31 | "**Promoting User As Admin...**", 32 | "**Enabling All Permissions To User...**", 33 | "**(1) Send Messages: ☑️**", 34 | "**(1) Send Messages: ✅**", 35 | "**(2) Send Media: ☑️**", 36 | "**(2) Send Media: ✅**", 37 | "**(3) Send Stickers & GIFs: ☑️**", 38 | "**(3) Send Stickers & GIFs: ✅**", 39 | "**(4) Send Polls: ☑️**", 40 | "**(4) Send Polls: ✅**", 41 | "**(5) Embed Links: ☑️**", 42 | "**(5) Embed Links: ✅**", 43 | "**(6) Add Users: ☑️**", 44 | "**(6) Add Users: ✅**", 45 | "**(7) Pin Messages: ☑️**", 46 | "**(7) Pin Messages: ✅**", 47 | "**(8) Change Chat Info: ☑️**", 48 | "**(8) Change Chat Info: ✅**", 49 | "**Permission Granted Successfully**", 50 | "**User Promoted Successfully 😐😂😐**" 51 | 52 | ] 53 | 54 | for i in animation_ttl: 55 | 56 | await asyncio.sleep(animation_interval) 57 | 58 | await event.edit(animation_chars[i % 20]) 59 | -------------------------------------------------------------------------------- /userbot/plugins/pastebin.py: -------------------------------------------------------------------------------- 1 | """IX.IO pastebin like site 2 | Syntax: .paste""" 3 | from telethon import events 4 | import asyncio 5 | from datetime import datetime 6 | import os 7 | import requests 8 | from userbot.utils import admin_cmd 9 | 10 | 11 | def progress(current, total): 12 | logger.info("Downloaded {} of {}\nCompleted {}".format(current, total, (current / total) * 100)) 13 | 14 | 15 | @borg.on(admin_cmd("paste ?(.*)")) 16 | async def _(event): 17 | if event.fwd_from: 18 | return 19 | start = datetime.now() 20 | if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): 21 | os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) 22 | input_str = event.pattern_match.group(1) 23 | message = "SYNTAX: `.paste `" 24 | if input_str: 25 | message = input_str 26 | elif event.reply_to_msg_id: 27 | previous_message = await event.get_reply_message() 28 | if previous_message.media: 29 | downloaded_file_name = await borg.download_media( 30 | previous_message, 31 | Config.TMP_DOWNLOAD_DIRECTORY, 32 | progress_callback=progress 33 | ) 34 | m_list = None 35 | with open(downloaded_file_name, "rb") as fd: 36 | m_list = fd.readlines() 37 | message = "" 38 | for m in m_list: 39 | message += m.decode("UTF-8") + "\r\n" 40 | os.remove(downloaded_file_name) 41 | else: 42 | message = previous_message.message 43 | else: 44 | message = "SYNTAX: `.paste `" 45 | url = "https://del.dog/documents" 46 | r = requests.post(url, data=message.encode("UTF-8")).json() 47 | url = f"https://del.dog/{r['key']}" 48 | end = datetime.now() 49 | ms = (end - start).seconds 50 | if r["isUrl"]: 51 | nurl = f"https://del.dog/v/{r['key']}" 52 | await event.edit("Dogged to {} in {} seconds. GoTo Original URL: {}".format(url, ms, nurl)) 53 | else: 54 | await event.edit("Dogged to {} in {} seconds".format(url, ms)) 55 | -------------------------------------------------------------------------------- /userbot/plugins/phub.py: -------------------------------------------------------------------------------- 1 | 2 | from telethon import events 3 | 4 | import asyncio 5 | 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | 10 | @borg.on(admin_cmd(pattern="phub")) 11 | 12 | async def _(event): 13 | 14 | if event.fwd_from: 15 | 16 | return 17 | 18 | animation_interval = 0.5 19 | 20 | animation_ttl = range(0, 101) 21 | 22 | await event.edit("phub") 23 | 24 | animation_chars = [ 25 | 26 | "P_", 27 | 28 | "PO_", 29 | 30 | "POR_", 31 | 32 | "PORN_", 33 | 34 | "PORNH_", 35 | 36 | "PORNHU_", 37 | 38 | "PORNHUB_", 39 | 40 | "PORNHUB", 41 | 42 | ] 43 | 44 | for i in animation_ttl: 45 | 46 | await asyncio.sleep(animation_interval) 47 | 48 | await event.edit(animation_chars[i % 10]) 49 | 50 | 51 | @borg.on(admin_cmd(pattern=r"amore")) 52 | 53 | async def _(event): 54 | 55 | if event.fwd_from: 56 | 57 | return 58 | 59 | animation_interval = 0.5 60 | 61 | animation_ttl = range(0, 101) 62 | 63 | await event.edit("amore") 64 | 65 | animation_chars = [ 66 | 67 | "A_", 68 | 69 | "AM_", 70 | 71 | "AMO_", 72 | 73 | "AMOR_", 74 | 75 | "AMORE_", 76 | 77 | "AMORE❤_", 78 | 79 | ".-.", 80 | 81 | ] 82 | 83 | for i in animation_ttl: 84 | 85 | await asyncio.sleep(animation_interval) 86 | 87 | await event.edit(animation_chars[i % 10]) 88 | 89 | 90 | 91 | 92 | from telethon import events 93 | 94 | import asyncio 95 | 96 | 97 | 98 | 99 | 100 | @borg.on(admin_cmd(pattern=r"sexy")) 101 | 102 | async def _(event): 103 | 104 | if event.fwd_from: 105 | 106 | return 107 | 108 | animation_interval = 0.5 109 | 110 | animation_ttl = range(0, 101) 111 | 112 | await event.edit("Sexy") 113 | 114 | animation_chars = [ 115 | 116 | "S_", 117 | 118 | "SE_", 119 | 120 | "SEX_", 121 | 122 | "SEXY_", 123 | 124 | "SEXY👄_", 125 | 126 | "SEXY👄", 127 | 128 | ] 129 | 130 | for i in animation_ttl: 131 | 132 | await asyncio.sleep(animation_interval) 133 | 134 | await event.edit(animation_chars[i % 10]) 135 | -------------------------------------------------------------------------------- /userbot/plugins/pin_message.py: -------------------------------------------------------------------------------- 1 | """Pins the replied message 2 | Syntax: .cpin [LOUD]""" 3 | from telethon import events 4 | from telethon.tl import functions, types 5 | from userbot.utils import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd("cpin ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | silent = True 13 | input_str = event.pattern_match.group(1) 14 | if input_str: 15 | silent = False 16 | if event.message.reply_to_msg_id is not None: 17 | message_id = event.message.reply_to_msg_id 18 | try: 19 | await borg(functions.messages.UpdatePinnedMessageRequest( 20 | event.chat_id, 21 | message_id, 22 | silent 23 | )) 24 | except Exception as e: 25 | await event.edit(str(e)) 26 | else: 27 | await event.delete() 28 | else: 29 | await event.edit("Reply to a message to pin the message in this Channel.") 30 | -------------------------------------------------------------------------------- /userbot/plugins/ping.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | from datetime import datetime 3 | from telethon import events 4 | from datetime import datetime 5 | from userbot.utils import admin_cmd 6 | import time 7 | 8 | @borg.on(admin_cmd(pattern="pong ?(.*)")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | await event.delete() 13 | start = datetime.now() 14 | mone = await event.reply("Ping 🥍") 15 | end = datetime.now() 16 | ms = (end - start).microseconds * 0.00001 17 | await mone.edit("‎‎‎‎‎‎‎‎Ping 🥍 Speed is `{} ms`".format(ms)) 18 | 19 | 20 | def get_readable_time(seconds: int) -> str: 21 | count = 0 22 | ping_time = "" 23 | time_list = [] 24 | time_suffix_list = ["s", "m", "h", "days"] 25 | 26 | while count < 4: 27 | count += 1 28 | if count < 3: 29 | remainder, result = divmod(seconds, 60) 30 | else: 31 | remainder, result = divmod(seconds, 24) 32 | if seconds == 0 and remainder == 0: 33 | break 34 | time_list.append(int(result)) 35 | seconds = int(remainder) 36 | 37 | for x in range(len(time_list)): 38 | time_list[x] = str(time_list[x]) + time_suffix_list[x] 39 | if len(time_list) == 4: 40 | ping_time += time_list.pop() + ", " 41 | 42 | time_list.reverse() 43 | ping_time += ":".join(time_list) 44 | 45 | return ping_time 46 | 47 | 48 | #@command(pattern="^.ping$") 49 | @borg.on(admin_cmd(pattern="ping$")) 50 | async def _(event): 51 | if event.fwd_from: 52 | return 53 | start = datetime.now() 54 | await event.edit("Pong 🏓") 55 | end = datetime.now() 56 | ms = (end - start).microseconds / 1000 57 | await event.edit(f"Pong Speed is `{ms}` 🏓") 58 | -------------------------------------------------------------------------------- /userbot/plugins/plane.py: -------------------------------------------------------------------------------- 1 | """By STARKTM1 2 | cmd : .plane""" 3 | from telethon import events 4 | import asyncio 5 | import os 6 | import sys 7 | 8 | 9 | @borg.on(events.NewMessage(pattern=r"\.plane", outgoing=True)) 10 | async def _(event): 11 | if event.fwd_from: 12 | return 13 | 14 | 15 | await event.edit("✈-------------") 16 | await event.edit("-✈------------") 17 | await event.edit("--✈-----------") 18 | await event.edit("---✈----------") 19 | await event.edit("----✈---------") 20 | await event.edit("-----✈--------") 21 | await event.edit("------✈-------") 22 | await event.edit("-------✈------") 23 | await event.edit("--------✈-----") 24 | await event.edit("---------✈----") 25 | await event.edit("----------✈---") 26 | await event.edit("-----------✈--") 27 | await event.edit("------------✈-") 28 | await event.edit("-------------✈") 29 | await asyncio.sleep(3) 30 | await event.delete() 31 | 32 | -------------------------------------------------------------------------------- /userbot/plugins/police.py: -------------------------------------------------------------------------------- 1 | 2 | from telethon import events 3 | 4 | import asyncio 5 | 6 | from uniborg.util import admin_cmd 7 | 8 | from userbot import ALIVE_NAME 9 | 10 | 11 | DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Friday Userbot" 12 | 13 | @borg.on(admin_cmd(pattern=r"police")) 14 | 15 | async def _(event): 16 | 17 | if event.fwd_from: 18 | 19 | return 20 | 21 | animation_interval = 0.3 22 | 23 | animation_ttl = range(0, 12) 24 | 25 | await event.edit("Police") 26 | 27 | animation_chars = [ 28 | 29 | "🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵", 30 | "🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴", 31 | "🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵", 32 | "🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴", 33 | "🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵", 34 | "🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴", 35 | "🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵", 36 | "🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴", 37 | "🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵", 38 | "🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴\n🔵🔵🔵⬜⬜⬜🔴🔴🔴", 39 | "🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵\n🔴🔴🔴⬜⬜⬜🔵🔵🔵", 40 | "CrackBot **Police Service Here**" 41 | ] 42 | 43 | for i in animation_ttl: 44 | 45 | await asyncio.sleep(animation_interval) 46 | 47 | await event.edit(animation_chars[i % 12]) 48 | -------------------------------------------------------------------------------- /userbot/plugins/polls.py: -------------------------------------------------------------------------------- 1 | """Get Poll Info on non supported clients 2 | Syntax: .get_poll""" 3 | from telethon import events 4 | import asyncio 5 | from uniborg.util import admin_cmd 6 | 7 | 8 | @borg.on(admin_cmd(pattern="get_poll")) 9 | async def _(event): 10 | reply_message = await event.get_reply_message() 11 | if reply_message.media is None: 12 | await event.edit("Please reply to a media_type == @gPoll to view the questions and answers") 13 | elif reply_message.media.poll is None: 14 | await event.edit("Please reply to a media_type == @gPoll to view the questions and answers") 15 | else: 16 | media = reply_message.media 17 | poll = media.poll 18 | closed_status = poll.closed 19 | answers = poll.answers 20 | question = poll.question 21 | edit_caption = """Poll is Closed: {} 22 | Question: {} 23 | Answers: \n""".format(closed_status, question) 24 | if closed_status: 25 | results = media.results 26 | i = 0 27 | for result in results.results: 28 | edit_caption += "{}> {} {}\n".format(result.option, answers[i].text, result.voters) 29 | i += 1 30 | edit_caption += "Total Voters: {}".format(results.total_voters) 31 | else: 32 | for answer in answers: 33 | edit_caption += "{}> {}\n".format(answer.option, answer.text) 34 | await event.edit(edit_caption) 35 | -------------------------------------------------------------------------------- /userbot/plugins/poto.py: -------------------------------------------------------------------------------- 1 | """Type `.poto` for get **All profile pics of that User** 2 | \n Or type `.poto (number)` to get the **desired number of photo of a User** . 3 | """ 4 | 5 | 6 | 7 | import logging 8 | 9 | 10 | 11 | from userbot.utils import admin_cmd 12 | 13 | 14 | 15 | from telethon.tl.functions.photos import GetUserPhotosRequest 16 | 17 | from telethon.tl.functions.users import GetFullUserRequest 18 | 19 | from telethon.tl.types import MessageEntityMentionName 20 | 21 | from telethon.utils import get_input_location 22 | 23 | 24 | 25 | logger = logging.getLogger(__name__) 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | if 1 == 1: 34 | 35 | name = "Profile Photos" 36 | 37 | client = borg 38 | 39 | 40 | 41 | @borg.on(admin_cmd(pattern="poto(.*)")) 42 | 43 | async def potocmd(event): 44 | 45 | """Gets the profile photos of replied users, channels or chats""" 46 | 47 | id = "".join(event.raw_text.split(maxsplit=2)[1:]) 48 | 49 | user = await event.get_reply_message() 50 | 51 | chat = event.input_chat 52 | 53 | if user: 54 | 55 | photos = await event.client.get_profile_photos(user.sender) 56 | 57 | else: 58 | 59 | photos = await event.client.get_profile_photos(chat) 60 | 61 | if id.strip() == "": 62 | 63 | try: 64 | 65 | await event.client.send_file(event.chat_id, photos) 66 | 67 | except a: 68 | 69 | photo = await event.client.download_profile_photo(chat) 70 | 71 | await borg.send_file(event.chat_id, photo) 72 | 73 | else: 74 | 75 | try: 76 | 77 | id = int(id) 78 | 79 | if id <= 0: 80 | 81 | await event.edit("`ID number you entered is invalid`") 82 | 83 | return 84 | 85 | except: 86 | 87 | await event.edit("`Are you Comedy Me ?`") 88 | 89 | return 90 | 91 | if int(id) <= (len(photos)): 92 | 93 | send_photos = await event.client.download_media(photos[id - 1]) 94 | 95 | await borg.send_file(event.chat_id, send_photos) 96 | 97 | else: 98 | 99 | await event.edit("`No photo found of that Nigga , now u Die`") 100 | 101 | return 102 | -------------------------------------------------------------------------------- /userbot/plugins/power_tools.py: -------------------------------------------------------------------------------- 1 | """Restart or Terminate the bot from any chat 2 | Available Commands: 3 | .restartsys 4 | .shutdown""" 5 | # This Source Code Form is subject to the terms of the GNU 6 | # General Public License, v.3.0. If a copy of the GPL was not distributed with this 7 | # file, You can obtain one at https://www.gnu.org/licenses/gpl-3.0.en.html 8 | from telethon import events 9 | import asyncio 10 | import os 11 | import sys 12 | from uniborg.util import admin_cmd 13 | 14 | 15 | @borg.on(admin_cmd(pattern="restart")) 16 | async def _(event): 17 | if event.fwd_from: 18 | return 19 | # await asyncio.sleep(2) 20 | # await event.edit("Restarting [██░] ...\n`.ping` me or `.helpme` to check if I am online") 21 | # await asyncio.sleep(2) 22 | # await event.edit("Restarting [███]...\n`.ping` me or `.helpme` to check if I am online") 23 | # await asyncio.sleep(2) 24 | await event.edit("Restarted. `.ping` me or `.helpme` to check if I am online") 25 | await borg.disconnect() 26 | # https://archive.is/im3rt 27 | os.execl(sys.executable, sys.executable, *sys.argv) 28 | # You probably don't need it but whatever 29 | quit() 30 | 31 | 32 | @borg.on(admin_cmd(pattern="shutdown")) 33 | async def _(event): 34 | if event.fwd_from: 35 | return 36 | await event.edit("Turning off ...Manually turn me on later") 37 | await borg.disconnect() 38 | -------------------------------------------------------------------------------- /userbot/plugins/quickheal.py: -------------------------------------------------------------------------------- 1 | 2 | from telethon import events 3 | 4 | import asyncio 5 | 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | 10 | @borg.on(admin_cmd(pattern=r"quickheal")) 11 | 12 | async def _(event): 13 | 14 | if event.fwd_from: 15 | 16 | return 17 | 18 | animation_interval = 5 19 | 20 | animation_ttl = range(0, 11) 21 | 22 | input_str = event.pattern_match.group("Scanning") 23 | 24 | 25 | await event.edit(input_str) 26 | 27 | animation_chars = [ 28 | 29 | "`Downloading File..`", 30 | "`File Downloaded....`", 31 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 0%\n▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", 32 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 4%\n█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", 33 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 8%\n██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", 34 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 20%\n█████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", 35 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 36%\n█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", 36 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 52%\n█████████████▒▒▒▒▒▒▒▒▒▒▒▒ `", 37 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 84%\n█████████████████████▒▒▒▒ `", 38 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 100%\n█████████████████████████ `", 39 | "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nTask: 01 of 01 Files Scanned...\n\nReault: No Virus Found...`" 40 | ] 41 | 42 | for i in animation_ttl: 43 | 44 | await asyncio.sleep(animation_interval) 45 | 46 | await event.edit(animation_chars[i % 11]) 47 | 48 | -------------------------------------------------------------------------------- /userbot/plugins/quotes.py: -------------------------------------------------------------------------------- 1 | import random 2 | import requests 3 | from uniborg.util import admin_cmd 4 | 5 | @borg.on(admin_cmd(pattern="quote ?(.*)")) 6 | async def quote_search(event): 7 | if event.fwd_from: 8 | return 9 | await event.edit("Processing...") 10 | search_string = event.pattern_match.group(1) 11 | input_url = "https://bots.shrimadhavuk.me/Telegram/GoodReadsQuotesBot/?q={}".format(search_string) 12 | headers = {"USER-AGENT": "UniBorg"} 13 | try: 14 | response = requests.get(input_url, headers=headers).json() 15 | except: 16 | response = None 17 | if response is not None: 18 | result = random.choice(response).get("input_message_content").get("message_text") 19 | else: 20 | result = None 21 | if result: 22 | await event.edit(result.replace("", "`").replace("", "`")) 23 | else: 24 | await event.edit("Zero results found") 25 | -------------------------------------------------------------------------------- /userbot/plugins/quotly.py: -------------------------------------------------------------------------------- 1 | """QuotLy: Avaible commands: .q 2 | """ 3 | import datetime 4 | from telethon import events 5 | from telethon.errors.rpcerrorlist import YouBlockedUserError 6 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 7 | from userbot import bot, CMD_HELP 8 | from userbot.utils import admin_cmd 9 | 10 | #@register(outgoing=True, pattern="^.q(?: |$)(.*)") 11 | @borg.on(admin_cmd(pattern=r"q(?: |$)(.*)")) 12 | async def _(event): 13 | if event.fwd_from: 14 | return 15 | if not event.reply_to_msg_id: 16 | await event.edit("```Reply to any user message.```") 17 | return 18 | reply_message = await event.get_reply_message() 19 | if not reply_message.text: 20 | await event.edit("```Reply to text message```") 21 | return 22 | chat = "@QuotLyBot" 23 | sender = reply_message.sender 24 | if reply_message.sender.bot: 25 | await event.edit("```Reply to actual users message.```") 26 | return 27 | await event.edit("Making Its Quote...") 28 | async with bot.conversation(chat) as conv: 29 | try: 30 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=1031952739)) 31 | await bot.forward_messages(chat, reply_message) 32 | response = await response 33 | except YouBlockedUserError: 34 | await event.reply("```Please unblock @QuotLyBot and try again```") 35 | return 36 | if response.text.startswith("Hi!"): 37 | await event.edit("```Can you kindly disable your forward privacy settings for good?```") 38 | else: 39 | await event.delete() 40 | await bot.forward_messages(event.chat_id, response.message) 41 | -------------------------------------------------------------------------------- /userbot/plugins/rain.py: -------------------------------------------------------------------------------- 1 | #Originally created By KingMars ✅ Rain Sequence 2 {Updated} 2 | from telethon import events 3 | import asyncio 4 | from collections import deque 5 | 6 | 7 | @borg.on(events.NewMessage(pattern=r"\.km_rain2", outgoing=True)) 8 | async def _(event): 9 | if event.fwd_from: 10 | return 11 | deq = deque(list("☁️⛈Ř/~\İŇ🌬⚡🌪")) 12 | for _ in range(100): 13 | await asyncio.sleep(0.1) 14 | await event.edit("".join(deq)) 15 | deq.rotate(1) 16 | -------------------------------------------------------------------------------- /userbot/plugins/repeat.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | from asyncio import wait 3 | from userbot.utils import admin_cmd 4 | 5 | 6 | @borg.on(admin_cmd("repeat ?(.*)")) 7 | async def _(event): 8 | message = event.text[10:] 9 | count = int(event.text[8:10]) 10 | repmessage = message * count 11 | await wait([event.respond(repmessage)for i in range(count)]) 12 | await event.delete() 13 | -------------------------------------------------------------------------------- /userbot/plugins/sca.py: -------------------------------------------------------------------------------- 1 | """Send Chat Actions 2 | Syntax: .sca