├── .deepsource.toml ├── .gitignore ├── .gitlab-ci.yml ├── DARK COBRA ├── Dark Cobra ├── Dockerfile ├── Fonts ├── 1942.ttf ├── DisposableDroidBB_bld.ttf └── digital.ttf ├── LICENSE ├── Procfile ├── README.md ├── Resources ├── IMG_20201005_150245_168.jpg └── StylishFOnts.py ├── _config.yml ├── app.json ├── haarcascade_frontalface_default.xml ├── heroku.yml ├── heroku_config.py ├── requirements.txt ├── runtime.txt ├── start.py ├── string_session.py ├── telesetup.py ├── userbot ├── DARKCOBRA ├── __init__.py ├── __main__.py ├── events.py ├── functions │ ├── dcfunction.py │ └── funts.py ├── google_imgs.py ├── helper │ └── functions.py ├── helpers │ ├── 2 │ ├── exceptions.py │ ├── progress.py │ └── styles │ │ ├── 3 │ │ ├── 1942.ttf │ │ ├── DIGIT.ttf │ │ ├── DisposableDroidBB_bld.ttf │ │ ├── digital.ttf │ │ ├── fun.py │ │ ├── impact.ttf │ │ └── italic.ttf ├── plugins │ ├── HBD.py │ ├── README.md │ ├── __init__.py │ ├── _core.py │ ├── _helper.py │ ├── _inlinebot.py │ ├── acc_profile.py │ ├── adduser.py │ ├── admin.py │ ├── afk.py │ ├── alien.py │ ├── alive.py │ ├── allban.py │ ├── animation1.py │ ├── animation2.py │ ├── animation3.py │ ├── anime.py │ ├── antiflood.py │ ├── app.py │ ├── art.py │ ├── assistant │ │ ├── __init__.py │ │ ├── adminbot.py │ │ ├── bot_alive.py │ │ ├── id_bot.py │ │ ├── main_assistant.py │ │ ├── notes.py │ │ ├── ping.py │ │ ├── purge.py │ │ └── translator.py │ ├── audio.py │ ├── auto_pic.py │ ├── auto_profile.py │ ├── awake.py │ ├── ban.py │ ├── barcode.py │ ├── bigoof.py │ ├── bin.py │ ├── blacklist.py │ ├── bots.py │ ├── calculator.py │ ├── calendar.py │ ├── call.py │ ├── calladmin.py │ ├── carbon.py │ ├── carbonRGB.py │ ├── card.py │ ├── cb3.py │ ├── chain.py │ ├── chandrayan.py │ ├── channel_download.py │ ├── climate.py │ ├── clock.py │ ├── clone.py │ ├── cmds.py │ ├── cobra.py │ ├── coinflip.py │ ├── congratulations.py │ ├── conversationqt.py │ ├── converttomp3.py │ ├── copy.py │ ├── corona.py │ ├── create.py │ ├── ctg.py │ ├── currency.py │ ├── customs.py │ ├── dagd.py │ ├── dcinlinedex.py │ ├── decide.py │ ├── deploy.py │ ├── diceandart.py │ ├── dictionary.py │ ├── direct_link.py │ ├── direct_links.py │ ├── directlink.py │ ├── diwali.py │ ├── dm.py │ ├── dns.py │ ├── download.py │ ├── download_upload.py │ ├── duckduckgo.py │ ├── dumpster.py │ ├── echo.py │ ├── edits.py │ ├── elautopfp.py │ ├── emojis.py │ ├── engsongs.py │ ├── eval.py │ ├── evernote.py │ ├── exec.py │ ├── execmod.py │ ├── extdl.py │ ├── extra.py │ ├── extra1.py │ ├── extranotes.py │ ├── eye.py │ ├── facts.py │ ├── fastdownload.py │ ├── fedstats.py │ ├── feks.py │ ├── ff_mpeg.py │ ├── figlet.py │ ├── fileconverter.py │ ├── fileext.py │ ├── filemanager.py │ ├── files.py │ ├── filetoimage.py │ ├── filters.py │ ├── finalgot.py │ ├── fixreply.py │ ├── fleaveme.py │ ├── flood.py │ ├── fpost.py │ ├── frybot.py │ ├── ftext.py │ ├── fuck.py │ ├── fulgali.py │ ├── fun.py │ ├── funmirrors.py │ ├── fwd.py │ ├── gDrive.py │ ├── games.py │ ├── gangasta.py │ ├── gban_gmute.py │ ├── gdrive_download.py │ ├── gdrivenew.py │ ├── get_admin.py │ ├── get_bot.py │ ├── get_id.py │ ├── gif.py │ ├── giftextdc.py │ ├── git.py │ ├── gitcommit.py │ ├── github.py │ ├── github_upload.py │ ├── giveaway.py │ ├── gizoogle.py │ ├── globelmute.py │ ├── google.py │ ├── got_memes.py │ ├── got_thoughts.py │ ├── gprod.py │ ├── gps.py │ ├── grab.py │ ├── greetings.py │ ├── groupdata.py │ ├── grs.py │ ├── gulli.py │ ├── hack.py │ ├── harrypoter.py │ ├── hash.py │ ├── helpersender.py │ ├── heroku.py │ ├── howtogoogle.py │ ├── hpfestivals.py │ ├── hyperlink.py │ ├── hypnotis.py │ ├── iffuci.py │ ├── ifsc.py │ ├── imagefun1.py │ ├── imagefun2.py │ ├── imagefun3.py │ ├── imagefun4.py │ ├── images.py │ ├── imdb.py │ ├── img.py │ ├── imgenc.py │ ├── imgsearch.py │ ├── information.py │ ├── invite.py │ ├── inviteall.py │ ├── iptools.py │ ├── jainder.py │ ├── jarvisfedban.py │ ├── javifi.py │ ├── jokes.py │ ├── json.py │ ├── karbon.py │ ├── kill.py │ ├── kk.py │ ├── labstack.py │ ├── lastfm.py │ ├── letmeabuse.py │ ├── letmesearch.py │ ├── link.py │ ├── linkpreview.py │ ├── list.py │ ├── load.py │ ├── load_all.py │ ├── locks.py │ ├── logic.py │ ├── lovestory.py │ ├── lucky.py │ ├── lul.py │ ├── lydia.py │ ├── lyrics.py │ ├── mafk.py │ ├── markdown.py │ ├── mashup.py │ ├── mask.py │ ├── meaning.py │ ├── mega.py │ ├── meme.py │ ├── memequote.py │ ├── memes.py │ ├── memes2.py │ ├── memify.py │ ├── mention.py │ ├── mirrorace.py │ ├── misc.py │ ├── moon.py │ ├── moon2.py │ ├── mp3converter.py │ ├── mtn.py │ ├── music.py │ ├── mute.py │ ├── muth.py │ ├── myfuns.py │ ├── mystatus.py │ ├── nakal.py │ ├── ncode.py │ ├── new.py │ ├── newyear.py │ ├── night.py │ ├── ninja.py │ ├── noice.py │ ├── np.py │ ├── ocr.py │ ├── ok.py │ ├── on.py │ ├── os.py │ ├── owm.py │ ├── owner.py │ ├── padmin.py │ ├── pastebin.py │ ├── pat.py │ ├── pcode.py │ ├── phd.py │ ├── phonecontrol.py │ ├── pin_message.py │ ├── ping.py │ ├── plane.py │ ├── plugin_info.py │ ├── pm_logger.py │ ├── pmpermit.py │ ├── pmpermit_menu.py │ ├── pokedex.py │ ├── polls.py │ ├── porn.py │ ├── poto.py │ ├── power_tools.py │ ├── ppg.py │ ├── pps │ ├── prankpromote.py │ ├── pro_advice.py │ ├── pro_nub.py │ ├── purge.py │ ├── purnhub_download.py │ ├── qbot.py │ ├── qr_code.py │ ├── quickheal.py │ ├── quit.py │ ├── quotes.py │ ├── rain.py │ ├── randomownsticker.py │ ├── randomsticker.py │ ├── rapecat.py │ ├── rapetrain.py │ ├── rapidleech.py │ ├── react.py │ ├── removebg.py │ ├── rename.py │ ├── repeat.py │ ├── reverse.py │ ├── reverseimg.py │ ├── rose_fed.py │ ├── rotate.py │ ├── roundv.py │ ├── sangmata.py │ ├── sca.py │ ├── schd.py │ ├── scramble.py │ ├── screenshot.py │ ├── sed.py │ ├── selfdestruct.py │ ├── shouts.py │ ├── sing.py │ ├── sizeresize.py │ ├── skeedy.py │ ├── slap.py │ ├── snake.py │ ├── snip.py │ ├── solarsystem.py │ ├── something.py │ ├── songs.py │ ├── spam.py │ ├── spotify_deezer_downloader.py │ ├── spotifyname.py │ ├── sql_helper │ │ ├── DS_Store │ │ ├── __init__.py │ │ ├── antiflood_sql.py │ │ ├── blacklist_assistant.py │ │ ├── blacklist_sql.py │ │ ├── botusers_sql.py │ │ ├── echo_sql.py │ │ ├── filter_sql.py │ │ ├── gban_sql_helper.py │ │ ├── ghdb_sql.py │ │ ├── globals.py │ │ ├── gmute_sql.py │ │ ├── idadder_sql.py │ │ ├── locks_sql.py │ │ ├── mute_sql.py │ │ ├── no_log_pms_sql.py │ │ ├── notes_sql.py │ │ ├── pmpermit_sql.py │ │ ├── snips_sql.py │ │ └── welcome_sql.py │ ├── sqlsender.py │ ├── status.py │ ├── stickcreater.py │ ├── stickerchat.py │ ├── stickers.py │ ├── sticklet.py │ ├── stylishfont.py │ ├── superstar.py │ ├── switch.py │ ├── sys.py │ ├── tag.py │ ├── tagall.py │ ├── telegraph.py │ ├── terminal.py │ ├── test.py │ ├── thanos.py │ ├── theri.py │ ├── think.py │ ├── thoghts_of_life.py │ ├── thumbnail.py │ ├── tiktok.py │ ├── time.py │ ├── timepass.py │ ├── torrent.py │ ├── torrentz.py │ ├── translate.py │ ├── ttf.py │ ├── tweet.py │ ├── typing.py │ ├── ukinti.py │ ├── undlt.py │ ├── uninstall.py │ ├── updater.py │ ├── upload.py │ ├── upload_dl.py │ ├── urbandictionary.py │ ├── userinfo.py │ ├── userlist.py │ ├── utube.py │ ├── vsong.py │ ├── vss.py │ ├── warnbun.py │ ├── watch.py │ ├── weather.py │ ├── webshot.py │ ├── webupload.py │ ├── weebify.py │ ├── welcome.py │ ├── who.py │ ├── whois.py │ ├── wikipedia.py │ ├── wtf.py │ ├── wttr.py │ ├── xkcd.py │ ├── xmas.py │ ├── xtools.py │ ├── ytdl.py │ ├── zinda │ └── zombies.py ├── tweet.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 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | CheckUserBotWorking: 2 | script: 3 | - echo "Nothing" 4 | -------------------------------------------------------------------------------- /DARK COBRA: -------------------------------------------------------------------------------- 1 | @Dark_cobra_support 2 | -------------------------------------------------------------------------------- /Dark Cobra: -------------------------------------------------------------------------------- 1 | @Dark_cobra_support 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.9.2-slim-buster 2 | 3 | 4 | RUN mkdir /app 5 | RUN chmod 777 /app 6 | WORKDIR /app 7 | 8 | RUN apt -qq update 9 | ENV DEBIAN_FRONTEND=noninteractive 10 | ENV TZ=Asia/Kolkata 11 | RUN apt update && apt upgrade -y && apt install --no-install-recommends -y \ 12 | debian-keyring \ 13 | debian-archive-keyring \ 14 | bash \ 15 | curl \ 16 | git \ 17 | util-linux \ 18 | libffi-dev \ 19 | libjpeg-dev \ 20 | liblzma-dev\ 21 | libjpeg62-turbo-dev \ 22 | libwebp-dev \ 23 | linux-headers-amd64 \ 24 | musl-dev \ 25 | musl \ 26 | neofetch \ 27 | python3-lxml \ 28 | postgresql \ 29 | postgresql-client \ 30 | libpq-dev \ 31 | libcurl4-openssl-dev \ 32 | libxml2-dev \ 33 | libxslt1-dev \ 34 | openssl \ 35 | pv \ 36 | jq \ 37 | wget \ 38 | python3-dev \ 39 | libreadline-dev \ 40 | libyaml-dev \ 41 | zlib1g \ 42 | ffmpeg \ 43 | libssl-dev \ 44 | libgconf-2-4 \ 45 | libxi6 \ 46 | zlib1g-dev \ 47 | xvfb \ 48 | unzip \ 49 | make \ 50 | libopus0 \ 51 | libopus-dev \ 52 | gcc 53 | RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ 54 | dpkg -i ./google-chrome-stable_current_amd64.deb; apt -fqqy install && \ 55 | rm ./google-chrome-stable_current_amd64.deb 56 | RUN wget -O chromedriver.zip http://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \ 57 | unzip chromedriver.zip chromedriver -d /usr/bin/ && \ 58 | rm chromedriver.zip 59 | COPY start.py . 60 | COPY requirements.txt . 61 | RUN pip3 install --upgrade pip && pip3 install --no-cache-dir -r requirements.txt 62 | CMD ["python3","start.py"] 63 | -------------------------------------------------------------------------------- /Fonts/1942.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/Fonts/1942.ttf -------------------------------------------------------------------------------- /Fonts/DisposableDroidBB_bld.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/Fonts/DisposableDroidBB_bld.ttf -------------------------------------------------------------------------------- /Fonts/digital.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/Fonts/digital.ttf -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | userbot: python -m userbot 2 | -------------------------------------------------------------------------------- /Resources/IMG_20201005_150245_168.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/Resources/IMG_20201005_150245_168.jpg -------------------------------------------------------------------------------- /Resources/StylishFOnts.py: -------------------------------------------------------------------------------- 1 | #Kang karne aaye ho😂😂 Karlo Kang ji bharke 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | #Saala Meowdharchod 12 | 13 | 14 | 15 | 16 | #CHutiyapa karte ho 17 | 18 | 19 | 20 | 21 | #Nikal gemdu aumrat kahiki 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | #Warna GBAN milega Bhosadike 31 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /heroku.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | darkcobra: Dockerfile 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Pillow>=5.3.0 2 | PyGithub 3 | moviepy 4 | aiofiles 5 | vcam 6 | pokedex.py 7 | backports.lzma 8 | spotdl 9 | aiohttp 10 | pygments 11 | appdirs 12 | async_generator 13 | beautifulsoup4 14 | bs4 15 | bwb==3.0.0 16 | cfscrape 17 | coffeehouse 18 | cowpy 19 | cryptg 20 | dnspython 21 | emoji==0.6.0 22 | faker 23 | gTTS-token>=1.1.3 24 | gTTS>=2.0.1 25 | gitpython 26 | glitch_this 27 | google-api-python-client==1.8.0 28 | google-auth-oauthlib 29 | google_images_download>=2.8.0 30 | googletrans==3.1.0a0 31 | google 32 | geopy 33 | gsearch 34 | hachoir 35 | heroku3 36 | httplib2 37 | humanize 38 | justwatch 39 | keyboard 40 | lottie 41 | lyrics_extractor 42 | lxml 43 | oauth2client 44 | opencv-python--headless 45 | patool 46 | psutil 47 | psycopg2-binary 48 | pygame 49 | PyLyrics 50 | pySmartDL 51 | pybase64>=0.4.0 52 | pyfiglet 53 | pylast 54 | pymongo 55 | python-barcode 56 | python-dotenv 57 | python-magic 58 | pytube>=9.5.1 59 | pytz 60 | qrcode 61 | regex 62 | requests>=2.18.4 63 | scipy 64 | scapy 65 | search-engine-parser>=0.4.2 66 | selenium 67 | speedtest-cli>=2.0.2 68 | spotify_token 69 | sqlalchemy>=1.2 70 | telegraph 71 | urbandict>=0.5 72 | validators 73 | wikipedia>=1.4.0 74 | youtube_dl>=2020.11.26 75 | youtube_search 76 | youtube-search-python==1.3.2 77 | covid 78 | tswift 79 | telethon==1.19.0 80 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.9.2 2 | -------------------------------------------------------------------------------- /start.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | from logging import DEBUG, INFO, basicConfig, getLogger, warning 4 | basicConfig(format="[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s", level=INFO) 5 | LOGS = getLogger("Helper") 6 | os.system("git clone https://github.com/DARK-COBRA/DARKCOBRA darkcobra") 7 | os.chdir("darkcobra") 8 | process = subprocess.Popen( 9 | ["python3", "-m", "userbot"], 10 | stdout=subprocess.PIPE, 11 | stderr=subprocess.STDOUT,) 12 | out, er = process.communicate() 13 | if er: 14 | LOGS.warning(er.decode()) 15 | print("::::::::::::::") 16 | if out: 17 | LOGS.info(out.decode()) 18 | -------------------------------------------------------------------------------- /string_session.py: -------------------------------------------------------------------------------- 1 | print( 2 | "ㅤ\nㅤ\n\n\n\nㅤ\n┈┈┏━╮╭━┓┈╭━━━━━━╮\n┈┈┃┏┗┛┓┃╭┫ⓞⓘⓝⓚ ┃\n┈┈╰┓▋▋┏╯╯╰━━━━━━╯\n┈╭━┻╮╲┗━━━━╮╭╮┈\n┈┃▎▎┃╲╲╲╲╲╲┣━╯┈\n┈╰━┳┻▅╯╲╲╲╲┃┈┈┈\n┈┈┈╰━┳┓┏┳┓┏╯┈┈┈\n┈┈┈┈┈┗┻┛┗┻┛┈┈" 3 | ) 4 | print("\n\n\n\n\nHello sir!!, I'm Here To Help u to Generate Telethon String Session") 5 | print("\n\nDarkCobra UserBot") 6 | 7 | print("\n\nProperly Fill APP_ID ,HASH and Number.\n") 8 | 9 | from telethon.sync import TelegramClient 10 | from telethon.sessions import StringSession 11 | APP_ID = int(input("Enter APP ID here: ")) 12 | API_HASH = input("Enter API HASH here: ") 13 | with TelegramClient(StringSession(), APP_ID, API_HASH) as hehe: 14 | dcsession = hehe.session.save() 15 | dcobra = hehe.send_message( 16 | "me", 17 | f"`{dcsession}`\n\n**Your DarkCobra String Session Here Sir😁😎😎\nClick on above Code to Copy it\n\nFor Support Join** @Dark_Cobra_Support_Group" 18 | ) 19 | 20 | print("\n\n############################\n") 21 | print( 22 | "check your Telegram Saved Messages For Ur New String String Session 😂😂 or see below. ") 23 | 24 | print("\n############################\n") 25 | 26 | 27 | print(f"{dcsession}") 28 | 29 | Print(" ") 30 | -------------------------------------------------------------------------------- /telesetup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # (c) https://t.me/TelethonChat/37677 3 | # This Source Code Form is subject to the terms of the GNU 4 | # General Public License, v.3.0. If a copy of the GPL was not distributed with this 5 | # file, You can obtain one at https://www.gnu.org/licenses/gpl-3.0.en.html. 6 | 7 | from telethon.sync import TelegramClient 8 | from telethon.sessions import StringSession 9 | 10 | print("""Please go-to my.telegram.org 11 | Login using your Telegram account 12 | Click on API Development Tools 13 | Create a new application, by entering the required details""") 14 | APP_ID = int(input("Enter APP ID here: ")) 15 | API_HASH = input("Enter API HASH here: ") 16 | 17 | with TelegramClient(StringSession(), APP_ID, API_HASH) as client: 18 | print(client.session.save()) 19 | -------------------------------------------------------------------------------- /userbot/DARKCOBRA: -------------------------------------------------------------------------------- 1 | @Dark_cobra_support 2 | 3 | 4 | #Ab kya hua Bencho... Kya chahiye tereko yaha..ab kya ye bhi kang krega..???! 5 | -------------------------------------------------------------------------------- /userbot/functions/dcfunction.py: -------------------------------------------------------------------------------- 1 | import random 2 | import string 3 | 4 | 5 | # String Finder 6 | def dc_finder(s, first, last): 7 | try: 8 | start = s.index(first) + len(first) 9 | end = s.index(last, start) 10 | return s[start:end] 11 | except ValueError: 12 | return "" 13 | 14 | 15 | # Id Generator 16 | def id_generator(size=64, chars=string.ascii_uppercase + string.digits): 17 | return "".join(random.choice(chars) for _ in range(size)) 18 | -------------------------------------------------------------------------------- /userbot/helpers/2: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /userbot/helpers/exceptions.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2020 Adek Maulana 2 | # 3 | # SPDX-License-Identifier: GPL-3.0-or-later 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | 17 | 18 | class CancelProcess(Exception): 19 | """ 20 | Cancel Process 21 | """ 22 | -------------------------------------------------------------------------------- /userbot/helpers/styles/1942.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/userbot/helpers/styles/1942.ttf -------------------------------------------------------------------------------- /userbot/helpers/styles/3: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /userbot/helpers/styles/DIGIT.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/userbot/helpers/styles/DIGIT.ttf -------------------------------------------------------------------------------- /userbot/helpers/styles/DisposableDroidBB_bld.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/userbot/helpers/styles/DisposableDroidBB_bld.ttf -------------------------------------------------------------------------------- /userbot/helpers/styles/digital.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/userbot/helpers/styles/digital.ttf -------------------------------------------------------------------------------- /userbot/helpers/styles/fun.py: -------------------------------------------------------------------------------- 1 | from userbot.functions.funts import DC_STYLE as DC_FONT_STYLE 2 | from userbot.functions.funts import DARKFONTS as DCFONTS 3 | from userbot.functions.funts import SIMPLESTDC as SIMPLEDC 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | #Kanger 14 | 15 | 16 | #tEri maa ki chut 17 | 18 | 19 | 20 | #useless 21 | -------------------------------------------------------------------------------- /userbot/helpers/styles/impact.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/userbot/helpers/styles/impact.ttf -------------------------------------------------------------------------------- /userbot/helpers/styles/italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DARK-COBRA/DARKCOBRA/72318ea80eb3599832a8b4ed84adb7aa627789cd/userbot/helpers/styles/italic.ttf -------------------------------------------------------------------------------- /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/__init__.py: -------------------------------------------------------------------------------- 1 | from userbot import darkdef 2 | from ..helper import functions as dcdef 3 | #USELESS 4 | darkmusic = darkdef.darkmusic 5 | darkmusicvideo = darkdef.darkmusicvideo 6 | 7 | -------------------------------------------------------------------------------- /userbot/plugins/_inlinebot.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | 4 | 5 | Waaah Bc Waaah 6 | 7 | Aao ye bhi loot lo bhosdiwalo.. 8 | 9 | Yahi karo bes tum 😒😒😒😒😒 10 | 11 | 12 | 13 | 😑😑😑😑😑😑😑🙃🙃🙃🙃🙃🙃😒😒😒😒😒😒😒🤦🏻‍♂️🤦🏻‍♂️ 14 | 15 | 16 | 17 | delete kr diya h _inline 18 | 19 | usko alag se install krna padta h beta 20 | 21 | 😎😎😎😎😎 22 | 23 | 24 | """ 25 | 26 | 27 | 28 | #gtfo 29 | 30 | #getlost 31 | 32 | #TEAM DC 33 | 34 | #special plugin for Kangers.. 35 | 36 | # Bhaag bhosdike 37 | -------------------------------------------------------------------------------- /userbot/plugins/adduser.py: -------------------------------------------------------------------------------- 1 | """Add the user(s) to the current chat 2 | Syntax: .edd """ 3 | 4 | from telethon import functions 5 | from userbot.utils import admin_cmd 6 | from userbot import CMD_HELP 7 | 8 | @borg.on(admin_cmd(pattern="edd ?(.*)")) 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("`.add` users to a chat, don't use this in PM") 15 | else: 16 | logger.info(to_add_users) 17 | if not event.is_channel and event.is_group: 18 | for user_id in to_add_users.split(" "): 19 | try: 20 | await borg(functions.messages.AddChatUserRequest( 21 | chat_id=event.chat_id, 22 | user_id=user_id, 23 | fwd_limit=1000000 24 | )) 25 | except Exception as e: 26 | await event.reply(str(e)) 27 | await event.edit("Added Successfully") 28 | else: 29 | for user_id in to_add_users.split(" "): 30 | try: 31 | await borg(functions.channels.InviteToChannelRequest( 32 | channel=event.chat_id, 33 | users=[user_id] 34 | )) 35 | except Exception as e: 36 | await event.reply(str(e)) 37 | await event.edit("ADDED the user to the chat successfully.") 38 | CMD_HELP.update( 39 | { 40 | "adduser": 41 | ".edd " 42 | "\nAdd the username in the grp/channel where u type." 43 | }) 44 | -------------------------------------------------------------------------------- /userbot/plugins/alien.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | import math 4 | from vcam import vcam,meshGen 5 | import sys 6 | import os 7 | from userbot.utils import admin_cmd 8 | from userbot import bot 9 | if not os.path.isdir("./dco/"): 10 | os.makedirs("./dco/") 11 | 12 | @bot.on(admin_cmd(pattern=r"alien")) 13 | async def fun_mirror(event): 14 | path = "dck" 15 | reply = await event.get_reply_message() 16 | lol = await borg.download_media(reply.media, path) 17 | file_name = "mirror.jpg" 18 | hehe = path + "/" + file_name 19 | img = cv2.imread(lol) 20 | H,W = img.shape[:2] 21 | fps = 30 22 | c1 = vcam(H=H,W=W) 23 | plane = meshGen(H,W) 24 | plane.Z += 20*np.sin(2*np.pi*((plane.X-plane.W/4.0)/plane.W)) + 20*np.sin(2*np.pi*((plane.Y-plane.H/4.0)/plane.H)) 25 | pts3d = plane.getPlane() 26 | pts2d = c1.project(pts3d) 27 | map_x,map_y = c1.getMaps(pts2d) 28 | output = cv2.remap(img,map_x,map_y,interpolation=cv2.INTER_LINEAR,borderMode=0) 29 | output = cv2.flip(output,1) 30 | out1 = cv2.resize(output,(700,350)) 31 | cv2.imwrite(file_name,out1) 32 | await borg.send_file(event.chat_id, file_name) 33 | for files in (hehe, lol): 34 | if files and os.path.exists(files): 35 | os.remove(files) 36 | hoi = await event.delete() 37 | -------------------------------------------------------------------------------- /userbot/plugins/allban.py: -------------------------------------------------------------------------------- 1 | #originally created by @danish_00 2 | 3 | #team cobra 4 | from asyncio import sleep 5 | from telethon.tl.types import ChatBannedRights, ChannelParticipantsAdmins, ChatAdminRights 6 | from telethon.tl.functions.channels import EditBannedRequest 7 | from userbot.utils import admin_cmd 8 | from userbot import bot 9 | 10 | 11 | @bot.on(admin_cmd(pattern=r"allban", outgoing=True)) 12 | async def testing(event): 13 | nikal = await event.get_chat() 14 | chutiya = await event.client.get_me() 15 | admin = nikal.admin_rights 16 | creator = nikal.creator 17 | if not admin and not creator: 18 | await event.edit(" U Don't have sufficient permission 🧐 u noob 😑😑") 19 | return 20 | await event.edit("Doing Nothing 🙃🙂")#Kang with Credits 21 | # for Dark_Cobra 22 | everyone = await event.client.get_participants(event.chat_id) 23 | for user in everyone: 24 | if user.id == chutiya.id: 25 | pass 26 | try: 27 | await event.client(EditBannedRequest(event.chat_id, int(user.id), ChatBannedRights(until_date=None,view_messages=True))) 28 | except Exception as e: 29 | await event.edit(str(e)) 30 | await sleep(.5) 31 | await event.edit("Nothing Happend here🙃🙂") 32 | -------------------------------------------------------------------------------- /userbot/plugins/assistant/__init__.py: -------------------------------------------------------------------------------- 1 | # DarkCobra Assistant 2 | -------------------------------------------------------------------------------- /userbot/plugins/assistant/bot_alive.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | 3 | from userbot import ALIVE_NAME, bot 4 | 5 | DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Unknown" 6 | PM_IMG = "https://telegra.ph/file/22e70478bd48568451a1f.jpg" 7 | pm_caption = "➥ **ASSISTANT IS:** `ONLINE`\n\n" 8 | pm_caption += "➥ **SYSTEMS STATS**\n" 9 | pm_caption += "➥ **Telethon Version:** `1.15.0` \n" 10 | pm_caption += "➥ **Python:** `3.8.6` \n" 11 | pm_caption += "➥ **Database Status:** `Functional`\n" 12 | pm_caption += "➥ **Current Branch** : `master`\n" 13 | pm_caption += f"➥ **Version** : `2.0`\n" 14 | pm_caption += f"➥ **My Boss** : {DEFAULTUSER} \n" 15 | pm_caption += "➥ **Heroku Database** : `AWS - Working Properly`\n\n" 16 | pm_caption += "➥ **License** : [GNU General Public License v3.0](github.com/DARK-COBRA/DARKCOBRA/blob/master/LICENSE)\n" 17 | pm_caption += "➥ **Copyright** : By [DarkCobra](https://t.me/Dark_cobra_support_group)\n" 18 | pm_caption += "[Assistant By DarkCobra](https://t.me/Dark_cobra_support_group)" 19 | 20 | # only Owner Can Use it 21 | @tgbot.on(events.NewMessage(pattern="^/alive", func=lambda e: e.sender_id == bot.uid)) 22 | async def _(event): 23 | await tgbot.send_file(event.chat_id, PM_IMG, caption=pm_caption) 24 | -------------------------------------------------------------------------------- /userbot/plugins/assistant/id_bot.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | from telethon.utils import pack_bot_file_id 3 | from userbot import bot 4 | 5 | @tgbot.on(events.NewMessage(pattern="^/id")) 6 | async def _(event): 7 | if event.reply_to_msg_id: 8 | await event.get_input_chat() 9 | r_msg = await event.get_reply_message() 10 | if r_msg.media: 11 | bot_api_file_id = pack_bot_file_id(r_msg.media) 12 | await tgbot.send_message( 13 | event.chat_id, 14 | "Current Chat ID: `{}`\nFrom User ID: `{}`\nBot API File ID: `{}`".format( 15 | str(event.chat_id), str(r_msg.sender_id), bot_api_file_id 16 | ), 17 | ) 18 | else: 19 | await tgbot.send_message( 20 | event.chat_id, 21 | "Current Chat ID: `{}`\nFrom User ID: `{}`".format( 22 | str(event.chat_id), str(r_msg.sender_id) 23 | ), 24 | ) 25 | else: 26 | await tgbot.send_message( 27 | event.chat_id, "Current Chat ID: `{}`".format(str(event.chat_id)) 28 | ) 29 | -------------------------------------------------------------------------------- /userbot/plugins/assistant/ping.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) Midhun KM 2 | # 3 | # Please Don't Kang Without Credits 4 | # A Plugin For Assistant Bot 5 | # x0x 6 | 7 | import time 8 | from datetime import datetime 9 | 10 | from telethon import events 11 | 12 | from userbot import Lastupdate, bot 13 | 14 | 15 | def get_readable_time(seconds: int) -> str: 16 | count = 0 17 | ping_time = "" 18 | time_list = [] 19 | time_suffix_list = ["s", "m", "h", "days"] 20 | 21 | while count < 4: 22 | count += 1 23 | if count < 3: 24 | remainder, result = divmod(seconds, 60) 25 | else: 26 | remainder, result = divmod(seconds, 24) 27 | if seconds == 0 and remainder == 0: 28 | break 29 | time_list.append(int(result)) 30 | seconds = int(remainder) 31 | 32 | for x in range(len(time_list)): 33 | time_list[x] = str(time_list[x]) + time_suffix_list[x] 34 | if len(time_list) == 4: 35 | ping_time += time_list.pop() + ", " 36 | 37 | time_list.reverse() 38 | ping_time += ":".join(time_list) 39 | 40 | return ping_time 41 | 42 | 43 | @tgbot.on(events.NewMessage(pattern="^/ping", func=lambda e: e.sender_id == bot.uid)) 44 | async def _(event): 45 | start = datetime.now() 46 | end = datetime.now() 47 | ms = (end - start).microseconds / 1000 48 | uptime = get_readable_time((time.time() - Lastupdate)) 49 | await tgbot.send_message( 50 | event.chat_id, 51 | f"**╔═══╗╔══╗╔═╗─╔╗╔═══╗\n║╔═╗║╚╣─╝║║╚╗║║║╔═╗║\n║╚═╝║─║║─║╔╗╚╝║║║─╚╝\n║╔══╝─║║─║║╚╗║║║║╔═╗\n║║───╔╣─╗║║─║║║║╚╩═║\n╚╝───╚══╝╚╝─╚═╝╚═══╝**\n ➲ `{ms}` \n ➲ `{uptime}`", 52 | ) 53 | -------------------------------------------------------------------------------- /userbot/plugins/assistant/translator.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) Midhun KM 2 | # 3 | # Please Don't Kang Without Credits 4 | # A Plugin For Assistant Bot 5 | # x0x 6 | 7 | import emoji 8 | from googletrans import Translator 9 | from telethon import events 10 | 11 | 12 | @tgbot.on(events.NewMessage(pattern="^/tr ?(.*)")) 13 | async def _(event): 14 | input_str = event.pattern_match.group(1) 15 | if event.reply_to_msg_id: 16 | previous_message = await event.get_reply_message() 17 | text = previous_message.message 18 | lan = input_str or "en" 19 | elif "|" in input_str: 20 | lan, text = input_str.split("|") 21 | else: 22 | await tgbot.send_message( 23 | event.chat_id, "`.tr LanguageCode` as reply to a message" 24 | ) 25 | return 26 | text = emoji.demojize(text.strip()) 27 | lan = lan.strip() 28 | translator = Translator() 29 | translated = translator.translate(text, dest=lan) 30 | after_tr_text = translated.text 31 | output_str = ( 32 | f"**Translated By DarkCobra Assistant Bot** \n" 33 | f"From {translated.src} to {lan} \n{after_tr_text}" 34 | ) 35 | try: 36 | await tgbot.send_message(event.chat_id, output_str) 37 | except Exception: 38 | await tgbot.send_message(event.chat_id, "Something Went Wrong 🤔") 39 | -------------------------------------------------------------------------------- /userbot/plugins/awake.py: -------------------------------------------------------------------------------- 1 | 2 | """Check if userbot awake or not . 3 | 4 | """ 5 | import os 6 | import asyncio 7 | from telethon import events 8 | from telethon.tl.types import ChannelParticipantsAdmins 9 | from userbot import ALIVE_NAME, CMD_HELP 10 | from userbot.utils import admin_cmd 11 | from telethon import version 12 | from math import ceil 13 | import json 14 | import random 15 | import re 16 | from telethon import events, errors, custom 17 | import io 18 | from platform import python_version, uname 19 | 20 | ALIVE_PIC = Config.ALIVE_PHOTTO 21 | if ALIVE_PIC is None: 22 | ALIVE_PIC = "https://telegra.ph/file/8458f16bebf2b7f73baa8.jpg" 23 | 24 | 25 | DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Set ALIVE_NAME in config vars in Heroku" 26 | 27 | ALIVE_MESSAGE = Config.ALIVE_MSG 28 | if ALIVE_MESSAGE is None: 29 | ALIVE_MESSAGE = "**🔱DARK COBRA IS Awake🔱 \n\n\n**" 30 | ALIVE_MESSAGE += "`My Bot Status \n\n\n`" 31 | ALIVE_MESSAGE += f"`Telethon: TELETHON-1.19.0 \n\n`" 32 | ALIVE_MESSAGE += f"`Python: PYTHON-3.8.5 \n\n`" 33 | ALIVE_MESSAGE += "`I'll Be With You Master Till My Dyno Ends!!☠ \n\n`" 34 | ALIVE_MESSAGE += f"`Support Channel` : @Dark_cobra_support \n\n" 35 | ALIVE_MESSAGE += f"`MY BOSS🤗`: {DEFAULTUSER} \n\n " 36 | 37 | 38 | #@command(outgoing=True, pattern="^.awake$") 39 | @borg.on(admin_cmd(pattern=r"awake")) 40 | async def amireallyalive(awake): 41 | """ For .awake command, check if the bot is running. """ 42 | await awake.delete() 43 | await borg.send_file(awake.chat_id, ALIVE_PIC,caption=ALIVE_MESSAGE) 44 | -------------------------------------------------------------------------------- /userbot/plugins/bigoof.py: -------------------------------------------------------------------------------- 1 | """Available Commands: 2 | .bigoof 3 | Credits to @TeleBotHelp 4 | 5 | TeleBot 6 | """ 7 | 8 | # Main Credits Goes to @T3b0N3 9 | # He Worked Very Hard to do this, So Please Respect Him!! 10 | from telethon import events 11 | 12 | import asyncio 13 | 14 | from userbot.utils import admin_cmd 15 | 16 | @borg.on(admin_cmd("bigoof")) 17 | async def _(event): 18 | if event.fwd_from: 19 | return 20 | animation_interval = 0.1 21 | animation_ttl = range(0,36) 22 | #input_str = event.pattern_match.group(1) 23 | # if input_str == "nope": 24 | await event.edit("┏━━━┓╋╋╋╋┏━━━┓ \n┃┏━┓┃╋╋╋╋┃┏━┓┃ \n┃┃╋┃┣┓┏┓┏┫┃╋┃┃ \n┃┃╋┃┃┗┛┗┛┃┃╋┃┃ \n┃┗━┛┣┓┏┓┏┫┗━┛┃ \n┗━━━┛┗┛┗┛┗━━━┛") 25 | animation_chars = [ 26 | "╭━━━╮╱╱╱╭━╮ \n┃╭━╮┃╱╱╱┃╭╯ \n┃┃╱┃┣━━┳╯╰╮ \n┃┃╱┃┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃┃┃ \n╰━━━┻━━╯╰╯ ", 27 | "╭━━━╮╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃┃┃ \n ╰━━━┻━━┻━━╯╰╯", 28 | "╭━━━╮╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━╯╰╯", 29 | "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━╯╰╯", 30 | "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━┻━━╯╰╯", 31 | "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━╯╰╯", 32 | "╭━━━╮╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━╯╰╯" 33 | ] 34 | 35 | 36 | for i in animation_ttl: 37 | 38 | await asyncio.sleep(animation_interval) 39 | await event.edit(animation_chars[i % 40]) 40 | -------------------------------------------------------------------------------- /userbot/plugins/calculator.py: -------------------------------------------------------------------------------- 1 | # Oh really?! Thanks to the real owner... 2 | from telethon import events, errors, functions, types 3 | import inspect 4 | import traceback 5 | import asyncio 6 | import sys 7 | import io 8 | from userbot.utils import admin_cmd 9 | from userbot import CMD_HELP 10 | 11 | @borg.on(admin_cmd(pattern="calc")) 12 | async def _(event): 13 | if event.fwd_from or event.via_bot_id: 14 | return 15 | await event.edit("Lemme calculate🤔 ...") 16 | cmd = event.text.split(" ", maxsplit=1)[1] 17 | reply_to_id = event.message.id 18 | if event.reply_to_msg_id: 19 | reply_to_id = event.reply_to_msg_id 20 | 21 | san = f"print({cmd})" 22 | old_stderr = sys.stderr 23 | old_stdout = sys.stdout 24 | redirected_output = sys.stdout = io.StringIO() 25 | redirected_error = sys.stderr = io.StringIO() 26 | stdout, stderr, exc = None, None, None 27 | try: 28 | await aexec(san, event) 29 | except Exception: 30 | exc = traceback.format_exc() 31 | stdout = redirected_output.getvalue() 32 | stderr = redirected_error.getvalue() 33 | sys.stdout = old_stdout 34 | sys.stderr = old_stderr 35 | 36 | evaluation = "" 37 | if exc: 38 | evaluation = exc 39 | elif stderr: 40 | evaluation = stderr 41 | elif stdout: 42 | evaluation = stdout 43 | else: 44 | evaluation = "Som3thing went rong" 45 | 46 | final_output = "**EQUATION**: `{}` \n\n **SOLUTION**: \n`{}` \n".format(cmd, evaluation) 47 | await event.edit(final_output) 48 | 49 | async def aexec(code, event): 50 | exec( 51 | f'async def __aexec(event): ' + 52 | ''.join(f'\n {l}' for l in code.split('\n')) 53 | ) 54 | return await locals()['__aexec'](event) 55 | 56 | CMD_HELP.update({"calculator": "`.calc` your equation :\ 57 | \nUSAGE: solves the given maths equation by bodmass rule. " 58 | }) 59 | -------------------------------------------------------------------------------- /userbot/plugins/calendar.py: -------------------------------------------------------------------------------- 1 | """Malayalam Calendar plugin for @UniBorg 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 | from userbot import CMD_HELP 10 | 11 | 12 | @borg.on(admin_cmd(pattern="calendar (.*)")) 13 | async def _(event): 14 | if event.fwd_from: 15 | return 16 | start = datetime.now() 17 | input_str = event.pattern_match.group(1) 18 | input_sgra = input_str.split(".") 19 | if len(input_sgra) == 3: 20 | yyyy = input_sgra[0] 21 | mm = input_sgra[1] 22 | dd = input_sgra[2] 23 | required_url = "https://calendar.kollavarsham.org/api/years/{}/months/{}/days/{}?lang={}".format(yyyy, mm, dd, "en") 24 | headers = {"Accept": "application/json"} 25 | response_content = requests.get(required_url, headers=headers).json() 26 | a = "" 27 | if "error" not in response_content: 28 | current_date_detail_arraays = response_content["months"][0]["days"][0] 29 | a = json.dumps(current_date_detail_arraays, sort_keys=True, indent=4) 30 | else: 31 | a = response_content["error"] 32 | await event.edit(str(a)) 33 | else: 34 | await event.edit("SYNTAX: .calendar YYYY.MM.DD") 35 | end = datetime.now() 36 | ms = (end - start).seconds 37 | CMD_HELP.update( 38 | { 39 | "calendar": 40 | ".calendar YYYY.MM.DD " 41 | "\nshow calendar" 42 | }) 43 | -------------------------------------------------------------------------------- /userbot/plugins/call.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .emoji shrug 6 | 7 | .emoji apple 8 | 9 | .emoji :/ 10 | 11 | .emoji -_-""" 12 | 13 | from telethon import events 14 | 15 | import asyncio 16 | from userbot.utils import admin_cmd 17 | 18 | 19 | 20 | 21 | @borg.on(admin_cmd(pattern=r"call")) 22 | 23 | async def _(event): 24 | 25 | if event.fwd_from: 26 | 27 | return 28 | 29 | animation_interval = 3 30 | 31 | animation_ttl = range(0, 18) 32 | 33 | # input_str = event.pattern_match.group(1) 34 | 35 | # if input_str == "call": 36 | 37 | await event.edit("Calling") 38 | 39 | animation_chars = [ 40 | 41 | "`Connecting To Telegram Headquarters...`", 42 | "`Call Connected.`", 43 | "`Telegram: Hello This is Telegram HQ. Who is this?`", 44 | "`Me: Yo this is` @[DARK_COBRA_SUPPORT](t.me/Dark_cobra_support) ,`Please Connect me to my idiot bro,Ayush Durov`", 45 | "`User Authorised.`", 46 | "`Calling Pavel Durov` `At +916969696969`", 47 | "`Private Call Connected...`", 48 | "`Me: Hello Sir, Please Ban This Telegram Account.`", 49 | "`Pavel: May I Know Who Is This?`", 50 | "`Me: Yo Brah, itz me` ", 51 | "`Pavel: OMG!!! Long time no see, Wassup Brother...\nI'll Make Sure That Guy Account Will Get Banned Within 24Hrs.`", 52 | "`Me: Thanks, See You Later Brah.`", 53 | "`Pavel: Please Don't Thank Brah, Telegram Is Our's. Just Gimme A Call When You Become Free.`", 54 | "`Me: Is There Any Issue/Emergency???`", 55 | "`Pavel: Yes Sir, There Is A Bug In Telegram v69.6.9.\nI Am Not Able To Fix It. If Possible, Please Help Fix The Bug.`", 56 | "`Me: Send Me The App On My Telegram Account, I Will Fix The Bug & Send You.`", 57 | "`Pavel: Sure Sur \nTC Bye Bye ;)`", 58 | "`Private Call Disconnected.`" 59 | ] 60 | 61 | for i in animation_ttl: 62 | 63 | await asyncio.sleep(animation_interval) 64 | 65 | await event.edit(animation_chars[i % 18]) 66 | -------------------------------------------------------------------------------- /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/card.py: -------------------------------------------------------------------------------- 1 | # Original By 2 | # @THE_B_LACK_HAT 3 | # @danish_00 4 | # For #Cobra 5 | # 6 | # Card Generator 7 | ############################## 8 | from faker import Faker as dc 9 | from userbot.utils import admin_cmd as hehe 10 | from userbot import bot as cobra 11 | @cobra.on(hehe("card")) 12 | async def _cobra(dark): 13 | cyber = dc() 14 | killer = cyber.name() 15 | kali = cyber.address() 16 | danish = cyber.credit_card_full() 17 | await dark.edit(f"ℕ𝕒𝕞𝕖:-\n`{killer}`\n\n𝔸𝕕𝕕𝕣𝕖𝕤𝕤:-\n`{kali}`\n\nℂ𝕒𝕣𝕕:-\n`{danish}`") -------------------------------------------------------------------------------- /userbot/plugins/cb3.py: -------------------------------------------------------------------------------- 1 | import os 2 | #MADE BY SHIVAM DONT KANG 3 | import cv2 4 | from userbot import CMD_HELP 5 | #MADE BY SHIVAM DONT KANG 6 | #MADE BY SHIVAM DONT KANG 7 | from telegraph import upload_file 8 | from telethon.tl.types import MessageMediaPhoto 9 | from userbot.utils import admin_cmd 10 | from userbot import bot 11 | from userbot import bot as borg 12 | import os , shutil 13 | sedpath = "./s_h_i_v_a_m_Javes/" 14 | if not os.path.isdir(sedpath): 15 | os.makedirs(sedpath) 16 | @borg.on(admin_cmd(pattern=r"cblur")) 17 | async def hom(event): 18 | if not event.reply_to_msg_id: 19 | await event.reply("Reply to any Image.") 20 | return 21 | await event.delete() 22 | sed = await event.get_reply_message() 23 | linc = event.text 24 | links=linc[7:] 25 | kaboom,kabum=links.split(",") 26 | 27 | if isinstance(sed.media, MessageMediaPhoto): 28 | img = await borg.download_media(sed.media, sedpath) 29 | elif "image" in sed.media.document.mime_type.split("/"): 30 | img = await borg.download_media(sed.media, sedpath) 31 | else: 32 | await event.edit("Reply To Image") 33 | return 34 | sh_1_vam=(int(kaboom),int(kabum)) 35 | #image=cv2.imshow(window_name, image) 36 | spath = img 37 | image = cv2.imread(spath) 38 | image = cv2.blur(image, sh_1_vam) 39 | cv2.imwrite("s_h_i_v_a_m_s.jpg", image) 40 | #await borg.send_file(event.chat_id,"s_h_i_v_a_m.png") 41 | #await event.client.send_file(event.chat_id, "s_h_i_v_a_m.png", force_document=True, reply_to=event.reply_to_msg_id) 42 | await event.client.send_file(event.chat_id, "s_h_i_v_a_m_s.jpg", force_document=False, reply_to=event.reply_to_msg_id) 43 | shutil.rmtree(sedpath) 44 | os.remove("s_h_i_v_a_m_s.jpg") 45 | -------------------------------------------------------------------------------- /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 | from userbot import CMD_HELP 9 | 10 | @borg.on(admin_cmd(pattern="chain")) 11 | async def _(event): 12 | await event.edit("Counting...") 13 | count = -1 14 | message = event.message 15 | while message: 16 | reply = await message.get_reply_message() 17 | if reply is None: 18 | await borg(SaveDraftRequest( 19 | await event.get_input_chat(), 20 | "", 21 | reply_to_msg_id=message.id 22 | )) 23 | message = reply 24 | count += 1 25 | await event.edit(f"Chain length: {count}") 26 | 27 | 28 | CMD_HELP.update( 29 | { 30 | "chain": 31 | ".chain " 32 | "\nCount the chain length means the reply-reply how many times 😂😂" 33 | }) 34 | -------------------------------------------------------------------------------- /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/cmds.py: -------------------------------------------------------------------------------- 1 | # Made by @AP_XD (Team Cobra) 2 | import asyncio 3 | import io 4 | import requests 5 | from userbot.utils import admin_cmd 6 | from userbot import CMD_HELP 7 | 8 | 9 | # @command(pattern="^.cmds", outgoing=True) 10 | @borg.on(admin_cmd(pattern=r"cmds")) 11 | async def install(event): 12 | if event.fwd_from: 13 | return 14 | reply_to_id = event.message.id 15 | if event.reply_to_msg_id: 16 | reply_to_id = event.reply_to_msg_id 17 | cmd = "ls userbot/plugins" 18 | process = await asyncio.create_subprocess_shell( 19 | cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE 20 | ) 21 | stdout, stderr = await process.communicate() 22 | o = stdout.decode() 23 | _o = o.split("\n") 24 | o = "\n".join(_o) 25 | 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 modules might not work directly. Visit__ @DARK_COBRA_SUPPORT __for assistance.__" 26 | data = OUTPUT 27 | key = ( 28 | requests.post("https://nekobin.com/api/documents", json={"content": data}) 29 | .json() 30 | .get("result") 31 | .get("key") 32 | ) 33 | url2 = f"https://nekobin.com/{key}" 34 | raw2 = f"https://nekobin.com/raw/{key}" 35 | hehe = f"**ls userbot/plugins**.\nPasted to [Nekobin]({url2}) Raw: [View Raw]({raw2}) " 36 | if len(OUTPUT) > 69: 37 | with io.BytesIO(str.encode(OUTPUT)) as out_file: 38 | out_file.name = "cmd_list.text" 39 | await bot.send_file( 40 | event.chat_id, 41 | out_file, 42 | force_document=True, 43 | allow_cache=False, 44 | caption=hehe, 45 | reply_to=reply_to_id, 46 | ) 47 | await event.delete() 48 | await event.edit(OUTPUT) 49 | 50 | 51 | CMD_HELP.update( 52 | {"command_list": ".cmds\nUsage - Extracts all the plugins of this userbot in a link.."} 53 | ) 54 | -------------------------------------------------------------------------------- /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/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/copy.py: -------------------------------------------------------------------------------- 1 | 2 | from telethon import events 3 | from uniborg.util import admin_cmd 4 | from userbot import CMD_HELP 5 | 6 | @borg.on(admin_cmd(pattern="copy")) 7 | async def _(event): 8 | if event.fwd_from: 9 | return 10 | if event.reply_to_msg_id: 11 | previous_message = await event.get_reply_message() 12 | the_real_message = previous_message.text 13 | reply_to_id = event.reply_to_msg_id 14 | the_real_message = the_real_message.replace("*", "*") 15 | the_real_message = the_real_message.replace("_", "_") 16 | await event.edit(the_real_message) 17 | else: 18 | await event.edit("Reply to a message .copy to copy nd paste ") 19 | 20 | CMD_HELP.update( 21 | { 22 | "copy": 23 | ".copy " 24 | "\nCopy that text nd redeliver it" 25 | }) 26 | -------------------------------------------------------------------------------- /userbot/plugins/corona.py: -------------------------------------------------------------------------------- 1 | from covid import Covid 2 | 3 | from userbot.utils import admin_cmd 4 | 5 | from userbot import CMD_HELP 6 | 7 | @borg.on(admin_cmd(pattern="corona (.*)")) 8 | 9 | async def _(event): 10 | 11 | covid = Covid() 12 | 13 | data = covid.get_data() 14 | 15 | country = event.pattern_match.group(1) 16 | 17 | country_data = get_country_data(country, data) 18 | 19 | output_text = "" 20 | 21 | for name, value in country_data.items(): 22 | 23 | output_text += "`{}`: `{}`\n".format(str(name), str(value)) 24 | 25 | await event.edit("**CoronaVirus Info in {}**:\n\n{}".format(country.capitalize(), output_text)) 26 | 27 | 28 | 29 | def get_country_data(country, world): 30 | 31 | for country_data in world: 32 | 33 | if country_data["country"].lower() == country.lower(): 34 | 35 | return country_data 36 | 37 | return {"Status": "No information yet about this country!"} 38 | 39 | CMD_HELP.update( 40 | { 41 | "corona": ".corona (country name)" 42 | 43 | 44 | } 45 | ) 46 | 47 | 48 | -------------------------------------------------------------------------------- /userbot/plugins/ctg.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/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/dagd.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/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/deploy.py: -------------------------------------------------------------------------------- 1 | 2 | from telethon import events 3 | 4 | import asyncio 5 | 6 | from uniborg.util import admin_cmd 7 | from userbot import CMD_HELP 8 | from userbot import AUTONAME 9 | 10 | 11 | DEFAULTUSER = str(AUTONAME) if AUTONAME else "DARK-COBRA" 12 | 13 | @borg.on(admin_cmd(pattern=r"deploy")) 14 | 15 | async def _(event): 16 | 17 | if event.fwd_from: 18 | 19 | return 20 | 21 | animation_interval = 10 22 | 23 | animation_ttl = range(0, 12) 24 | 25 | # input_str = event.pattern_match.group(1) 26 | 27 | 28 | 29 | await event.edit("Deploying...") 30 | 31 | animation_chars = [ 32 | 33 | "**Heroku Connecting To Latest Github Build (Hellboi-atul/DARK COBRA)**", 34 | "**Build started by user** **{DEFAULTUSER}**", 35 | "**Deploy** `535a74f0` **by user** **{MY BOSS}**", 36 | "**Restarting Heroku Server...**", 37 | "**State changed from up to starting**", 38 | "**Stopping all processes with SIGTERM**", 39 | "**Process exited with** `status 143`", 40 | "**Starting process with command** `python3 -m stdborg`", 41 | "**State changed from starting to up**", 42 | "__INFO:DARKCOBRA:Logged in as 557667062__", 43 | "__INFO:DARKCOBRA:Successfully loaded all plugins__", 44 | "**Build Succeeded**" 45 | 46 | ] 47 | 48 | for i in animation_ttl: 49 | 50 | await asyncio.sleep(animation_interval) 51 | 52 | await event.edit(animation_chars[i % 12]) 53 | 54 | 55 | 56 | CMD_HELP.update( 57 | { 58 | "deploy": ".deploy" 59 | "\nUsage show fake animation of deploy " 60 | } 61 | ) 62 | -------------------------------------------------------------------------------- /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/dm.py: -------------------------------------------------------------------------------- 1 | # By @HeisenbergTheDanger and @xditya 2 | 3 | import os 4 | import re 5 | from telethon import * 6 | from userbot import bot 7 | from userbot.utils import admin_cmd 8 | from userbot import CMD_HELP 9 | #Fixed by @NOOBGeng Second Member 10 | @borg.on(admin_cmd(pattern="dm ?(.*)")) 11 | async def _(dc): 12 | 13 | d = dc.pattern_match.group(1) 14 | 15 | c = d.split(" ")#hehe 16 | 17 | chat_id = c[0] 18 | try: #dc hehe 19 | chat_id = int(chat_id) 20 | #hmm 🤔🤔🤔🤔 21 | except BaseException:#lalalala 22 | 23 | pass 24 | 25 | msg = "" 26 | masg = await dc.get_reply_message() #ghanta😒😒 27 | if dc.reply_to_msg_id: 28 | await borg.send_message(chat_id, masg) 29 | await dc.edit("⚜️Message Delivered! Sar⚜️") 30 | for i in c[1:]: 31 | msg += i + " "#Fixed by @NOOBGeng Second Member 32 | if msg == "":#hoho 33 | return 34 | try: 35 | await borg.send_message(chat_id, msg) 36 | await dc.edit("`⚜️Message Delivered!⚜️`") 37 | except BaseException:#hmmmmmmmmm🤔🤔 38 | await dc.edit(".dm (username) (text)") 39 | 40 | CMD_HELP.update({"dm": ".dm (username) (text)\n or\n .dm (username)(reply to msg)\n it'll forward the replyed msg"}) 41 | -------------------------------------------------------------------------------- /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("shorten (.*)")) 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("Your shortened URL:- {} ".format(response_api)) 36 | else: 37 | await event.edit("something w3nt 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/edits.py: -------------------------------------------------------------------------------- 1 | # Got it from @userbotjunks 2 | # All in one code. 3 | 4 | """ 5 | Available Commands: 6 | .tlol 7 | .lol 8 | .heart 9 | .candy 10 | .nothappy""" 11 | 12 | from telethon import events 13 | import asyncio 14 | from collections import deque 15 | from uniborg.util import admin_cmd 16 | 17 | @borg.on(admin_cmd(pattern=r"candy")) 18 | async def _(event): 19 | if event.fwd_from: 20 | return 21 | deq = deque(list("🍦🍧🍩🍪🎂🍰🧁🍫🍬🍭")) 22 | for _ in range(20): 23 | await asyncio.sleep(1) 24 | await event.edit("".join(deq)) 25 | deq.rotate(1) 26 | 27 | @borg.on(admin_cmd(pattern=r"nothappy")) 28 | async def _(event): 29 | if event.fwd_from: 30 | return 31 | deq = deque(list("😁☹️😁☹️😁☹️😁")) 32 | for _ in range(20): 33 | await asyncio.sleep(1) 34 | await event.edit("".join(deq)) 35 | deq.rotate(1) 36 | 37 | @borg.on(admin_cmd(pattern=r"heart")) 38 | async def _(event): 39 | if event.fwd_from: 40 | return 41 | deq = deque(list("❤️🧡💛💚💙💜🖤")) 42 | for _ in range(20): 43 | await asyncio.sleep(1) 44 | await event.edit("".join(deq)) 45 | deq.rotate(1) 46 | 47 | @borg.on(admin_cmd(pattern=r"ethink")) 48 | async def _(event): 49 | if event.fwd_from: 50 | return 51 | deq = deque(list("🤔🧐🤨🤔🧐🤨")) 52 | for _ in range(20): 53 | await asyncio.sleep(1) 54 | await event.edit("".join(deq)) 55 | deq.rotate(1) 56 | 57 | @borg.on(admin_cmd(pattern=r"lol")) 58 | async def _(event): 59 | if event.fwd_from: 60 | return 61 | deq = deque(list("😂🤣😂🤣😂🤣")) 62 | for _ in range(20): 63 | await asyncio.sleep(1) 64 | await event.edit("".join(deq)) 65 | deq.rotate(1) 66 | 67 | -------------------------------------------------------------------------------- /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/evernote.py: -------------------------------------------------------------------------------- 1 | from telethon import events 2 | import asyncio 3 | import os 4 | import sys 5 | 6 | @borg.on(events.NewMessage(pattern=r"^.note (.*)", outgoing=True)) 7 | async def test(event): 8 | if event.fwd_from: 9 | return 10 | uwu = event.pattern_match.group(1) 11 | await event.edit("Added note to Evernote".format(uwu)) 12 | await borg.send_message("@ifttt", "#note {}".format(uwu)) 13 | -------------------------------------------------------------------------------- /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/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/filetoimage.py: -------------------------------------------------------------------------------- 1 | """COMMAND : .ftoimg 2 | here file must be in image file """ 3 | from io import BytesIO 4 | from userbot import utils 5 | import asyncio 6 | from telethon import types 7 | from telethon.errors import PhotoInvalidDimensionsError 8 | from telethon.tl.functions.messages import SendMediaRequest 9 | 10 | 11 | 12 | 13 | @borg.on(utils.admin_cmd(pattern=r"filetoimage")) 14 | async def on_file_to_photo(event): 15 | await event.edit("processing.....") 16 | await asyncio.sleep(2) 17 | target = await event.get_reply_message() 18 | try: 19 | image = target.media.document 20 | except AttributeError: 21 | return 22 | if not image.mime_type.startswith('image/'): 23 | return # This isn't an image 24 | if image.mime_type == 'image/webp': 25 | return # Telegram doesn't let you directly send stickers as photos 26 | if image.size > 10 * 1024 * 1024: 27 | return # We'd get PhotoSaveFileInvalidError otherwise 28 | 29 | file = await borg.download_media(target, file=BytesIO()) 30 | file.seek(0) 31 | img = await borg.upload_file(file) 32 | img.name = 'image.png' 33 | 34 | try: 35 | await borg(SendMediaRequest( 36 | peer=await event.get_input_chat(), 37 | media=types.InputMediaUploadedPhoto(img), 38 | message=target.message, 39 | entities=target.entities, 40 | reply_to_msg_id=target.id 41 | )) 42 | except PhotoInvalidDimensionsError: 43 | return 44 | -------------------------------------------------------------------------------- /userbot/plugins/finalgot.py: -------------------------------------------------------------------------------- 1 | # BY @STARKTM1 2 | from telethon import events 3 | import asyncio 4 | import random 5 | 6 | @borg.on(events.NewMessage(pattern=r"\.snow", outgoing=True)) 7 | async def _(event): 8 | if event.fwd_from: 9 | return 10 | await event.edit("Hmm...") 11 | await asyncio.sleep(1) 12 | x=(random.randrange(1,11)) 13 | if x==1: 14 | await event.edit("Never forget what you are. The rest of the world will not.Wear it like armor,\n and it can never be used to hurt you.") 15 | if x==2: 16 | await event.edit("There is only one thing we say to death: **Not today.**") 17 | if x==3: 18 | await event.edit("If you think this has a happy ending, you haven’t been **paying attention**.") 19 | if x==4: 20 | await event.edit("Chaos isn’t a pit. Chaos is a ladder.") 21 | if x==5: 22 | await event.edit("You know nothing, **Jon Snow**") 23 | if x==6: 24 | await event.edit("**Winter** is coming.") 25 | if x==7: 26 | await event.edit("When you play the **game of thrones**, you win or you die.") 27 | if x==8: 28 | await event.edit("I'm not going to **stop** the wheel, I'm going to **break** the wheel.") 29 | if x==9: 30 | await event.edit("When people ask you what happened here, tell them the **North remembers**. Tell them winter came for **House Frey**.") 31 | if x==10: 32 | await event.edit("When the snows fall and the white winds blow,\n the lone wolf dies, but the pack **survives**.") 33 | -------------------------------------------------------------------------------- /userbot/plugins/fixreply.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 | import asyncio 5 | 6 | from telethon import events 7 | 8 | 9 | _last_messages = {} 10 | 11 | 12 | @borg.on(events.NewMessage(outgoing=True)) 13 | async def _(event): 14 | _last_messages[event.chat_id] = event.message 15 | 16 | 17 | @borg.on(events.NewMessage(pattern=r"\.(fix)?reply", outgoing=True)) 18 | async def _(event): 19 | if not event.is_reply or event.chat_id not in _last_messages: 20 | return 21 | 22 | message = _last_messages[event.chat_id] 23 | chat = await event.get_input_chat() 24 | await asyncio.wait([ 25 | borg.delete_messages(chat, [event.id, message.id]), 26 | borg.send_message(chat, message, reply_to=event.reply_to_msg_id) 27 | ]) 28 | -------------------------------------------------------------------------------- /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/flood.py: -------------------------------------------------------------------------------- 1 | """COMMAND : .floodwarn""" 2 | 3 | from telethon import events 4 | import asyncio 5 | from collections import deque 6 | 7 | 8 | @borg.on(events.NewMessage(pattern=r".floodwarn", outgoing=True)) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | deq = deque(list("💙💛💓💔💘💕💜💚💝💞💟")) 13 | for _ in range(100000000): 14 | await asyncio.sleep(0.1) 15 | await event.edit("".join(deq)) 16 | deq.rotate(1) 17 | 18 | -------------------------------------------------------------------------------- /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 | credit: @r4v4n4""" 6 | 7 | import string 8 | 9 | from telethon import events 10 | from telethon.tl import types 11 | from userbot.utils import admin_cmd 12 | 13 | msg_cache = {} 14 | 15 | 16 | @borg.on(admin_cmd(pattern=r"fpost\s+(.*)")) 17 | async def _(event): 18 | await event.delete() 19 | text = event.pattern_match.group(1) 20 | destination = await event.get_input_chat() 21 | 22 | for c in text.lower(): 23 | if c not in string.ascii_lowercase: 24 | continue 25 | if c not in msg_cache: 26 | async for msg in borg.iter_messages(None, search=c): 27 | if msg.raw_text.lower() == c and msg.media is None: 28 | msg_cache[c] = msg 29 | break 30 | await borg.forward_messages(destination, msg_cache[c]) 31 | -------------------------------------------------------------------------------- /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("deepfry ?(.*)")) 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/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/games.py: -------------------------------------------------------------------------------- 1 | # Plugin made by @hellboi_atul for DARK COBRA.. 2 | # You can use this..but don't edit/remove these comment lines.. 3 | # This module is for playing tik tak toe game.. 4 | # So wahi...Enjoy 5 | 6 | import re 7 | import random 8 | from userbot import bot 9 | from userbot.utils import admin_cmd 10 | 11 | IF_EMOJI = re.compile( 12 | "[" 13 | "\U0001F1E0-\U0001F1FF" # flags (iOS) 14 | "\U0001F300-\U0001F5FF" # symbols & pictographs 15 | "\U0001F600-\U0001F64F" # emoticons 16 | "\U0001F680-\U0001F6FF" # transport & map symbols 17 | "\U0001F700-\U0001F77F" # alchemical symbols 18 | "\U0001F780-\U0001F7FF" # Geometric Shapes Extended 19 | "\U0001F800-\U0001F8FF" # Supplemental Arrows-C 20 | "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs 21 | "\U0001FA00-\U0001FA6F" # Chess Symbols 22 | "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A 23 | "\U00002702-\U000027B0" # Dingbats 24 | "]+") 25 | 26 | def deEmojify(inputString: str) -> str: 27 | """Remove emojis and other non-safe characters from string""" 28 | return re.sub(IF_EMOJI, '', inputString) 29 | 30 | 31 | @borg.on(admin_cmd(pattern="playxo(?: |$)(.*)")) 32 | 33 | async def nope(doit): 34 | ok = doit.pattern_match.group(1) 35 | if not ok: 36 | if doit.is_reply: 37 | what = (await doit.get_reply_message()).message 38 | 39 | return 40 | xoxoxo = await bot.inline_query( 41 | "xobot", f"{(deEmojify(ok))}") 42 | await xoxoxo[0].click(doit.chat_id, 43 | reply_to=doit.reply_to_msg_id, 44 | silent=True if doit.is_reply else False, 45 | hide_via=True) 46 | await doit.delete() 47 | 48 | 49 | -------------------------------------------------------------------------------- /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/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.sender_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.sender_id))) 20 | else: 21 | await event.edit("Current Chat ID: `{}`".format(str(event.chat_id))) 22 | -------------------------------------------------------------------------------- /userbot/plugins/gif.py: -------------------------------------------------------------------------------- 1 | # Kang with credits.. 2 | # Team DC 3 | from PIL import Image 4 | import sys 5 | import os 6 | from userbot.utils import admin_cmd 7 | from userbot import bot 8 | import moviepy.editor as m 9 | 10 | if not os.path.isdir("./dcpath/"): 11 | os.makedirs("./dcpath/") 12 | 13 | 14 | @bot.on(admin_cmd(pattern="gif ?(.*)")) 15 | async def gifs(event): 16 | get = event.pattern_match.group(1) 17 | if not get: 18 | await event.edit("`.gif `") 19 | return 20 | gifs = await bot.inline_query("gif", f"{get}") 21 | await gifs[0].click(event.chat.id, reply_to=event.reply_to_msg_id, silent=True ,hide_via=True) 22 | await event.delete() 23 | 24 | 25 | 26 | #made by @THE_B_LACK_HAT #team DC 27 | @bot.on(admin_cmd(pattern=r"vtog")) 28 | async def vtog(event): 29 | path = "viddck" 30 | reply = await event.get_reply_message() 31 | lol = await borg.download_media(reply.media, path) 32 | file_name = "dc.gif" 33 | clip = (m.VideoFileClip(lol).subclip((4.3),(5.8)).resize(0.3)) 34 | clip.write_gif(file_name) 35 | hehe = path + "/" + file_name 36 | await borg.send_file(event.chat_id, file_name) 37 | for files in (hehe, lol): 38 | if files and os.path.exists(files): 39 | os.remove(files) 40 | hoi = await event.delete() 41 | -------------------------------------------------------------------------------- /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/DARK-COBRA/DARKCOBRA", 30 | 31 | "https://github.com/DARK-COBRA/DARKCOBRA" 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/grab.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 userbot.utils import admin_cmd 7 | 8 | @borg.on(admin_cmd("grab ?(.*)")) 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 = "@ThemerBot" 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=864838521)) 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("Hi"): 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) 37 | -------------------------------------------------------------------------------- /userbot/plugins/greetings.py: -------------------------------------------------------------------------------- 1 | from userbot.utils import admin_cmd 2 | 3 | 4 | 5 | 6 | @borg.on(admin_cmd(pattern="gnt$")) 7 | async def gn(event): 8 | await event.edit("。♥。・゚♡゚・。♥。・。・。・。♥。・\n╱╱╱╱╱╱╱╭╮╱╱╱╭╮╱╭╮╭╮\n╭━┳━┳━┳╯┃╭━┳╋╋━┫╰┫╰╮\n┃╋┃╋┃╋┃╋┃┃┃┃┃┃╋┃┃┃╭┫\n┣╮┣━┻━┻━╯╰┻━┻╋╮┣┻┻━╯\n╰━╯╱╱╱╱╱╱╱╱╱╱╰━╯\n。♥。・゚♡゚・。♥° ♥。・゚♡゚・") 9 | 10 | 11 | @borg.on(admin_cmd(pattern="gmg$")) 12 | async def gm(event): 13 | await event.edit("。♥。・゚♡゚・。♥。・。・。・。♥。・。♥。・゚♡゚・\n╱╱╱╱╱╱╱╭╮╱╱╱╱╱╱╱╱╱╱╭╮\n╭━┳━┳━┳╯┃╭━━┳━┳┳┳━┳╋╋━┳┳━╮\n┃╋┃╋┃╋┃╋┃┃┃┃┃╋┃╭┫┃┃┃┃┃┃┃╋┃\n┣╮┣━┻━┻━╯╰┻┻┻━┻╯╰┻━┻┻┻━╋╮┃\n╰━╯╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰━╯\n。♥。・゚♡゚・。♥。・。・。・。♥。・。♥。・゚♡゚・") 14 | -------------------------------------------------------------------------------- /userbot/plugins/gulli.py: -------------------------------------------------------------------------------- 1 | # gali plugin By DARK COBRA 2 | """Emoji 3 | Available Commands: 4 | .gulli""" 5 | 6 | from telethon import events 7 | 8 | import asyncio 9 | 10 | from userbot.utils import admin_cmd 11 | 12 | @borg.on(admin_cmd("gulli")) 13 | async def _(event): 14 | if event.fwd_from: 15 | return 16 | animation_interval = 2 17 | animation_ttl = range(0,36) 18 | #input_str = event.pattern_match.group(1) 19 | # if input_str == "gulli": 20 | await event.edit("Starting..") 21 | animation_chars = [ 22 | "OK", 23 | "SUNN MADERCHOD", 24 | "TERI MAA KA BHOSDA", 25 | "BEHEN K LUND", 26 | "TERI MAA KA DUD", 27 | "MERA LAWDA LELE TU AGAR CHAIYE TOH", 28 | "GAANDU", 29 | "CHUTIYA", 30 | "TERI MAA KI CHUT PE JCB CHADHAA DUNGA", 31 | "SAMJHAA LAWDE", 32 | "YA DU TERE GAAND ME TAPAA TAP😂", 33 | "TERI BEHEN MERA ROZ LETI HAI", 34 | "TERI GF K SAATH MMS BANAA CHUKA HU🙈🤣🤣", 35 | "TU CHUTIYA TERA KHANDAAN CHUTIYA", 36 | "Yeahhhhhh", 37 | "AUR KITNA BOLU BEY MANN BHAR GAYA MERA🤣", 38 | "Ab nikal ja jaake chkko k saath hilaa", 39 | "😂😂😂🤣🤣" 40 | ] 41 | 42 | for i in animation_ttl: 43 | 44 | await asyncio.sleep(animation_interval) 45 | await event.edit(animation_chars[i % 18]) 46 | -------------------------------------------------------------------------------- /userbot/plugins/helpersender.py: -------------------------------------------------------------------------------- 1 | from userbot import * 2 | from telethon import events 3 | from userbot.events import * 4 | from telethon import functions, types 5 | from telethon.tl.types import InputMessagesFilterDocument 6 | from userbot.utils import command, remove_plugin, load_module 7 | from pathlib import Path 8 | from userbot import LOAD_PLUG 9 | from datetime import datetime 10 | DELETE_TIMEOUT = 5 11 | import sys, asyncio, traceback, os, importlib 12 | import userbot.utils 13 | from userbot.utils import * 14 | from userbot import CMD_HELP 15 | @borg.on(admin_cmd(pattern="sqlsend (?P\w+)$")) 16 | async def send(event): 17 | if event.fwd_from: 18 | return 19 | message_id = event.message.id 20 | input_str = event.pattern_match["shortname"] 21 | the_plugin_file = "./userbot/helper//{}.py".format(input_str) 22 | start = datetime.now() 23 | await event.client.send_file( # pylint:disable=E0602 24 | event.chat_id, 25 | the_plugin_file, 26 | force_document=True, 27 | allow_cache=False, 28 | reply_to=message_id 29 | ) 30 | end = datetime.now() 31 | time_taken_in_ms = (end - start).seconds 32 | await event.edit("Uploaded {} in {} seconds".format(input_str, time_taken_in_ms)) 33 | await asyncio.sleep(DELETE_TIMEOUT) 34 | await event.delete() 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | CMD_HELP.update({ 46 | "helpersender": 47 | ".hlpsend \ 48 | \nUsage: send the l helper\ 49 | \n\n``\ 50 | \n****\ 51 | " 52 | }) -------------------------------------------------------------------------------- /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/hpfestivals.py: -------------------------------------------------------------------------------- 1 | # Plugin made by Dark cobra 2 | # For Dark cobra 3 | # Made by Shivam Patel(Team Cobra) 4 | # Kang with credits.. 5 | import random 6 | from userbot import CMD_HELP 7 | from userbot.events import register 8 | from userbot.utils import admin_cmd 9 | from telethon import events, types, functions, utils 10 | 11 | 12 | 13 | import asyncio 14 | def choser(cmd, pack, blacklist={}): 15 | docs = None 16 | 17 | @borg.on(events.NewMessage(pattern=rf'\.{cmd}', outgoing=True)) 18 | async def handler(event): 19 | 20 | if event.fwd_from: 21 | return 22 | animation_interval = 2 23 | animation_ttl = range(0,8) 24 | nonlocal docs 25 | 26 | for i in animation_ttl: 27 | 28 | await asyncio.sleep(animation_interval) 29 | if docs is None: 30 | docs = [ 31 | utils.get_input_document(x) 32 | for x in (await borg(functions.messages.GetStickerSetRequest(types.InputStickerSetShortName(pack)))).documents 33 | ] 34 | 35 | await event.respond(file=random.choice(docs)) 36 | 37 | choser('hpdiwali', 'a929138153_by_Shivam_Patel_1_anim') 38 | choser('hpchristmas', 'HappChristmas') 39 | choser('hpnewyear', 'Happy_New_Year_To_All') 40 | -------------------------------------------------------------------------------- /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/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/images.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/img.py: -------------------------------------------------------------------------------- 1 | 2 | """Download & Upload Images on Telegram\n 3 | 4 | Syntax: `.img ` or `.img (replied message)` 5 | 6 | \n Upgraded and Google Image Error Fixed 7 | 8 | """ 9 | 10 | 11 | 12 | from userbot.google_imgs import googleimagesdownload 13 | 14 | import os 15 | 16 | import shutil 17 | 18 | from re import findall 19 | 20 | from userbot.utils import admin_cmd 21 | 22 | 23 | 24 | 25 | 26 | @borg.on(admin_cmd(pattern="img ?(.*)")) 27 | 28 | async def img_sampler(event): 29 | 30 | await event.edit("`Processing...`") 31 | 32 | reply = await event.get_reply_message() 33 | 34 | if event.pattern_match.group(1): 35 | 36 | query = event.pattern_match.group(1) 37 | 38 | elif reply: 39 | 40 | query = reply.message 41 | 42 | else: 43 | 44 | await event.edit("`um, mind mentioning what I actually need to search for ;_;`") 45 | 46 | return 47 | 48 | 49 | 50 | lim = findall(r"lim=\d+", query) 51 | 52 | # lim = event.pattern_match.group(1) 53 | 54 | try: 55 | 56 | lim = lim[0] 57 | 58 | lim = lim.replace("lim=", "") 59 | 60 | query = query.replace("lim=" + lim[0], "") 61 | 62 | except IndexError: 63 | 64 | lim = 5 65 | 66 | response = googleimagesdownload() 67 | 68 | 69 | 70 | # creating list of arguments 71 | 72 | arguments = { 73 | 74 | "keywords": query, 75 | 76 | "limit": lim, 77 | 78 | "format": "jpg", 79 | 80 | "no_directory": "no_directory" 81 | 82 | } 83 | 84 | 85 | 86 | # passing the arguments to the function 87 | 88 | paths = response.download(arguments) 89 | 90 | lst = paths[0][query] 91 | 92 | await event.client.send_file(await event.client.get_input_entity(event.chat_id), lst) 93 | 94 | shutil.rmtree(os.path.dirname(os.path.abspath(lst[0]))) 95 | 96 | await event.delete() 97 | -------------------------------------------------------------------------------- /userbot/plugins/invite.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/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/kk.py: -------------------------------------------------------------------------------- 1 | """command: .kk""" 2 | """By @Grandpaa_please """ 3 | 4 | from telethon import events 5 | import random 6 | import logging 7 | from userbot.utils import admin_cmd 8 | 9 | @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) 10 | async def _(event): 11 | input_str = event.pattern_match.group(1) 12 | if input_str == "kk": 13 | r = random.randint(0, 3) 14 | logger.debug(r) 15 | if r == 0: 16 | await event.edit("┏━━━┓\n┃┏━━┛\n┃┗━━┓\n┃┏━━┛\n┃┃\n┗┛") 17 | else: 18 | r == 1 19 | await event.edit("╭━━━╮\n┃╭━━╯\n┃╰━━╮\n┃╭━━╯\n┃┃\n╰╯") 20 | -------------------------------------------------------------------------------- /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/linkpreview.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 userbot.utils 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/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/load_all.py: -------------------------------------------------------------------------------- 1 | # Ported to DC(DARK COBRA) by @hellboi_atul 2 | # please give credits if you wanna kang this.. 3 | 4 | from telethon.tl.types import InputMessagesFilterDocument 5 | from ..utils import remove_plugin, load_module, admin_cmd 6 | from pathlib import Path 7 | import userbot.utils 8 | import os 9 | 10 | @borg.on(admin_cmd(pattern=r"installall$")) 11 | async def install(event): 12 | if event.fwd_from: 13 | return 14 | documentss = await event.client.get_messages(event.chat_id, None ,search='.py', filter=InputMessagesFilterDocument) 15 | total = int(documentss.total) 16 | total_doxx = range(0, total) 17 | b = await event.client.send_message(event.chat_id, f"**Installing {total} plugins...**\n`This msg will be deleted after the installation gets completed`") 18 | text = "**Installing...**\n\n" 19 | a = await event.client.send_message(event.chat_id, text) 20 | if total == 0: 21 | await a.edit("**No plugins..what am I supposed to install.**") 22 | await event.delete() 23 | return 24 | for ixo in total_doxx: 25 | mxo = documentss[ixo].id 26 | downloaded_file_name = await event.client.download_media(await event.client.get_messages(event.chat_id, ids=mxo), "userbot/plugins/") 27 | if "(" not in downloaded_file_name: 28 | path1 = Path(downloaded_file_name) 29 | shortname = path1.stem 30 | try: 31 | load_module(shortname.replace(".py", "")) 32 | text += f"**• Installed all** `{(os.path.basename(downloaded_file_name))}` **successfully.**\n" 33 | except: 34 | text += f"**• Error, can't Install🚶🏻🚶🏻** `{(os.path.basename(downloaded_file_name))}`\n" 35 | else: 36 | text += f"**🚀 Plugin** `{(os.path.basename(downloaded_file_name))}` **already installed.**\n" 37 | await a.edit(f"{text}\n**Installed every plugin from the given chat.**") 38 | await event.delete() 39 | await b.delete() 40 | -------------------------------------------------------------------------------- /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 | "Abee aur kitna dekhoge be besharmi ki bhi hadd hoti hai..,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 @hellboi_atul 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⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜", 37 | "⬛⬜⬜⬜⬜\n👇⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜", 38 | "⬛⬛⬜⬜⬜\n⬜👇⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜", 39 | "⬛⬛⬛⬜⬜\n⬜⬜👇⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜", 40 | "⬛⬛⬛⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜", 41 | "⬛⬛⬛⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜", 42 | "⬛⬛⬛⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜", 43 | "⬛⬛⬛⬛⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜\n⬜⬜⬜⬜⬜", 44 | "⬛⬛⬛⬛⬜\n⬜⬜⬜👇⬜\n⬜⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 45 | "⬛⬛⬛⬜⬜\n⬜⬜👇⬜⬜\n⬜⬜[🎁](/hellboi-atul/hellboi-atul)⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 46 | "⬛⬛⬜⬜⬜\n⬜👇⬜⬜⬜\n⬜[🎁](/hellboi-atul/hellboi-atul)⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 47 | "⬛⬜⬜⬜⬜\n👇⬜⬜⬜⬜\n[🎁](/hellboi-atul/hellboi-atul)⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 48 | "⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜", 49 | "⬜⬜⬜⬜\n⬜⬜⬜⬜\n⬜⬜⬜⬜\n⬜⬜⬜⬜", 50 | "⬜⬜⬜\n⬜⬜⬜\n⬜⬜⬜", 51 | "⬜⬜\n⬜⬜", 52 | "[🎁👈🏻Ye le gift](/hellboi-atul/hellboi-atul)" 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/lul.py: -------------------------------------------------------------------------------- 1 | # (c) @UniBorg 2 | 3 | from telethon import events 4 | import asyncio 5 | from collections import deque 6 | from uniborg.util import admin_cmd 7 | 8 | @borg.on(admin_cmd(pattern=r"lul")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | deq = deque(list("😂🤣😂🤣😂🤣")) 13 | for _ in range(999): 14 | await asyncio.sleep(0.1) 15 | await event.edit("".join(deq)) 16 | deq.rotate(1) -------------------------------------------------------------------------------- /userbot/plugins/lyrics.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | # original by @danish_00 4 | # with Noob @programmingerror 5 | # Team Cobra 6 | # Keep Credits 7 | 8 | 9 | from lyrics_extractor import SongLyrics as sl 10 | import random, re 11 | from userbot import bot, CMD_HELP 12 | from userbot.utils import admin_cmd 13 | 14 | 15 | @bot.on(admin_cmd(pattern=r"lyrics ?(.*)")) 16 | async def original(event): 17 | if not event.pattern_match.group(1): 18 | await event.edit("give query to search.") 19 | return 20 | noob = event.pattern_match.group(1) 21 | await event.edit('```Getting lyrics..```') 22 | dc=(random.randrange(1,3)) 23 | if dc==1: 24 | danish = "AIzaSyAyDBsY3WRtB5YPC6aB_w8JAy6ZdXNc6FU" 25 | if dc==2: 26 | danish = "AIzaSyBF0zxLlYlPMp9xwMQqVKCQRq8DgdrLXsg" 27 | if dc==3: 28 | danish = "AIzaSyDdOKnwnPwVIQ_lbH5sYE4FoXjAKIQV0DQ" 29 | extract_lyrics = sl( f"{danish}", "15b9fb6193efd5d90") 30 | sh1vm = extract_lyrics.get_lyrics(f"{noob}") 31 | a7ul = sh1vm['lyrics'] 32 | await event.client.send_message(event.chat_id, a7ul , reply_to=event.reply_to_msg_id) 33 | await event.delete() 34 | 35 | -------------------------------------------------------------------------------- /userbot/plugins/mashup.py: -------------------------------------------------------------------------------- 1 | #created by @Mr_Hops 2 | """video meme mashup: Avaible commands: .mash 3 | """ 4 | 5 | 6 | import datetime 7 | from telethon import events 8 | from telethon.errors.rpcerrorlist import YouBlockedUserError 9 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 10 | from userbot.utils import admin_cmd 11 | 12 | 13 | @borg.on(admin_cmd(pattern="mash ?(.*)")) 14 | async def _(event): 15 | if event.fwd_from: 16 | return 17 | input_str = event.pattern_match.group(1) 18 | reply_message = await event.get_reply_message() 19 | chat = "@vixtbot" 20 | await event.edit("```Checking...```") 21 | async with event.client.conversation(chat) as conv: 22 | try: 23 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=285336877)) 24 | await event.client.send_message(chat, "{}".format(input_str)) 25 | response = await response 26 | except YouBlockedUserError: 27 | await event.reply("```Unblock @vixtbot```") 28 | return 29 | if response.text.startswith("I can't find that"): 30 | await event.edit("😐") 31 | else: 32 | await event.delete() 33 | await event.client.send_message(event.chat_id, response.message) 34 | -------------------------------------------------------------------------------- /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: .meaning """ 3 | 4 | import requests 5 | from telethon import events 6 | from uniborg.util import admin_cmd 7 | 8 | 9 | @borg.on(admin_cmd(pattern="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": "Friday"} 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.sender_id 17 | else: 18 | replied_user = previous_message.sender_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/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/moon2.py: -------------------------------------------------------------------------------- 1 | # (c) @UniBorg 2 | 3 | from telethon import events 4 | import asyncio 5 | from collections import deque 6 | from uniborg.util import admin_cmd 7 | 8 | @borg.on(admin_cmd(pattern=r"moon", outgoing=True)) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | deq = deque(list("🌗🌘🌑🌒🌓🌔🌕🌖")) 13 | for _ in range(32): 14 | await asyncio.sleep(0.1) 15 | await event.edit("".join(deq)) 16 | deq.rotate(1) 17 | 18 | -------------------------------------------------------------------------------- /userbot/plugins/mtn.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | Available Commands: 3 | .mtn""" 4 | 5 | from telethon import events 6 | 7 | import asyncio 8 | 9 | from uniborg.util import admin_cmd 10 | 11 | 12 | 13 | @borg.on(admin_cmd(pattern=r"mtn")) 14 | 15 | async def _(event): 16 | 17 | if event.fwd_from: 18 | 19 | return 20 | 21 | animation_interval = 1 22 | 23 | animation_ttl = range(0, 19) 24 | 25 | # input_str = event.pattern_match.group(1) 26 | 27 | # if input_str == "mtn": 28 | 29 | await event.edit("mtn") 30 | 31 | animation_chars = [ 32 | 33 | "`Connecting To MTN NG ....`", 34 | "`█ ▇ ▆ ▅ ▄ ▂ ▁`", 35 | "`▒ ▇ ▆ ▅ ▄ ▂ ▁`", 36 | "`▒ ▒ ▆ ▅ ▄ ▂ ▁`", 37 | "`▒ ▒ ▒ ▅ ▄ ▂ ▁`", 38 | "`▒ ▒ ▒ ▒ ▄ ▂ ▁`", 39 | "`▒ ▒ ▒ ▒ ▒ ▂ ▁`", 40 | "`▒ ▒ ▒ ▒ ▒ ▒ ▁`", 41 | "`▒ ▒ ▒ ▒ ▒ ▒ ▒`", 42 | "*Optimising Network...*", 43 | "`▒ ▒ ▒ ▒ ▒ ▒ ▒`", 44 | "`▁ ▒ ▒ ▒ ▒ ▒ ▒`", 45 | "`▁ ▂ ▒ ▒ ▒ ▒ ▒`", 46 | "`▁ ▂ ▄ ▒ ▒ ▒ ▒`", 47 | "`▁ ▂ ▄ ▅ ▒ ▒ ▒`", 48 | "`▁ ▂ ▄ ▅ ▆ ▒ ▒`", 49 | "`▁ ▂ ▄ ▅ ▆ ▇ ▒`", 50 | "`▁ ▂ ▄ ▅ ▆ ▇ █`", 51 | "**MTN Network Boosted....**" 52 | 53 | ] 54 | 55 | for i in animation_ttl: 56 | 57 | await asyncio.sleep(animation_interval) 58 | 59 | await event.edit(animation_chars[i % 19]) 60 | -------------------------------------------------------------------------------- /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/ncode.py: -------------------------------------------------------------------------------- 1 | # Credits @buddhhu 2 | #This software is a part of https://github.com/buddhhu/Plus 3 | # Ported to DC by @hellboi_atul 4 | 5 | import pygments, os, asyncio 6 | from pygments.lexers import Python3Lexer 7 | from pygments.formatters import ImageFormatter 8 | from userbot.utils import admin_cmd 9 | 10 | @borg.on(admin_cmd(pattern="ncode ?(.*)")) 11 | async def coder_print(event): 12 | a = await event.client.download_media(await event.get_reply_message(), Var.TEMP_DOWNLOAD_DIRECTORY) 13 | s = open(a, 'r') 14 | c = s.read() 15 | s.close() 16 | pygments.highlight(f"{c}", Python3Lexer(), ImageFormatter(font_name="DejaVu Sans Mono", line_numbers=True), "out.png") 17 | res = await event.client.send_message(event.chat_id, "**Pasting this code on my page pls weit🤓...**", reply_to=event.reply_to_msg_id) 18 | await event.client.send_file(event.chat_id, "out.png", force_document=True, reply_to=event.reply_to_msg_id) 19 | await event.client.send_file(event.chat_id, "out.png", force_document=False, reply_to=event.reply_to_msg_id) 20 | await res.delete() 21 | await event.delete() 22 | os.remove(a) 23 | os.remove('out.png') 24 | -------------------------------------------------------------------------------- /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()).sender_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/owner.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .owner""" 6 | 7 | from telethon import events 8 | 9 | import asyncio 10 | 11 | 12 | 13 | 14 | 15 | @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) 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, 6) 26 | 27 | input_str = event.pattern_match.group(1) 28 | 29 | if input_str == "owner": 30 | 31 | await event.edit(input_str) 32 | 33 | animation_chars = [ 34 | 35 | "⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬜⬛⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬛⬛⬛⬛⬛", 36 | "⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬛⬛⬛⬛⬛", 37 | "⬛⬛⬛⬛⬛⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬛⬜⬜⬛⬛\n⬛⬛⬛⬛⬛⬛", 38 | "⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬛⬛⬛⬛⬛", 39 | "⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬛⬛⬛⬛⬛", 40 | "⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬜⬛⬛⬜⬛\n⬛⬛⬛⬛⬛⬛" 41 | 42 | ] 43 | 44 | for i in animation_ttl: 45 | 46 | await asyncio.sleep(animation_interval) 47 | 48 | await event.edit(animation_chars[i % 6]) 49 | -------------------------------------------------------------------------------- /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 | "**pRoMooTeD SuCcEsSfUlLy bY: @pureindialover**" 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/pat.py: -------------------------------------------------------------------------------- 1 | """ 2 | HeadPat Module for Userbot (http://headp.at) 3 | cmd:- .pat username or reply to msg 4 | By:- git: jaskaranSM tg: @Zero_cool7870 5 | 6 | 7 | 8 | 9 | """ 10 | 11 | 12 | 13 | 14 | from userbot.utils import admin_cmd 15 | from random import choice 16 | from urllib import parse 17 | from os import remove 18 | import requests 19 | import asyncio 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | BASE_URL = "https://headp.at/pats/{}" 29 | PAT_IMAGE = "pat.jpg" 30 | 31 | 32 | 33 | 34 | @borg.on(admin_cmd(pattern="pat ?(.*)", outgoing =True)) 35 | async def lastfm(event): 36 | if event.fwd_from: 37 | return 38 | username = event.pattern_match.group(1) 39 | if not username and not event.reply_to_msg_id: 40 | await event.edit("`Reply to a message or provide username`") 41 | return 42 | 43 | 44 | 45 | 46 | resp = requests.get("http://headp.at/js/pats.json") 47 | pats = resp.json() 48 | pat = BASE_URL.format(parse.quote(choice(pats))) 49 | await event.delete() 50 | with open(PAT_IMAGE,'wb') as f: 51 | f.write(requests.get(pat).content) 52 | if username: 53 | await borg.send_file(event.chat_id,PAT_IMAGE,caption=username) 54 | else: 55 | await borg.send_file(event.chat_id,PAT_IMAGE,reply_to=event.reply_to_msg_id) 56 | remove(PAT_IMAGE) -------------------------------------------------------------------------------- /userbot/plugins/pcode.py: -------------------------------------------------------------------------------- 1 | #Ported from Nana remix by @buddhhu 2 | #imported admin_cmd for DC by @hellboi_atul 3 | import pygments, os, asyncio 4 | from pygments.lexers import Python3Lexer 5 | from pygments.formatters import ImageFormatter 6 | from userbot.utils import admin_cmd 7 | 8 | @borg.on(admin_cmd(pattern="pcode ?(.*)")) 9 | async def coder_print(event): 10 | cmd = event.text 11 | a = await event.get_reply_message() 12 | coder = "" 13 | if len(cmd) > 7: 14 | coder = " ".join(cmd[7:]) 15 | elif event.reply_to_msg_id and len(cmd) == 6: 16 | coder = a.message 17 | elif len(cmd) == 6: 18 | await event.reply("`No text Given`") 19 | await asyncio.sleep(2) 20 | await event.delete() 21 | return 22 | pygments.highlight(f"{coder}", Python3Lexer(), ImageFormatter(font_name="DejaVu Sans Mono", line_numbers=True), "out.png") 23 | await event.client.send_file(event.chat_id, "out.png", force_document=False) 24 | await event.delete() 25 | os.remove('out.png') 26 | -------------------------------------------------------------------------------- /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/plane.py: -------------------------------------------------------------------------------- 1 | #By STARKTM1 2 | from telethon import events 3 | import asyncio 4 | import os 5 | import sys 6 | from uniborg.util import admin_cmd 7 | 8 | @borg.on(admin_cmd(pattern=r"plane")) 9 | async def _(event): 10 | if event.fwd_from: 11 | return 12 | 13 | 14 | await event.edit("✈-------------") 15 | await asyncio.sleep(1) 16 | await event.edit("-✈------------") 17 | await asyncio.sleep(1) 18 | await event.edit("--✈-----------") 19 | await asyncio.sleep(1) 20 | await event.edit("---✈----------") 21 | await asyncio.sleep(1) 22 | await event.edit("----✈---------") 23 | await asyncio.sleep(1) 24 | await event.edit("-----✈--------") 25 | await asyncio.sleep(1) 26 | await event.edit("------✈-------") 27 | await asyncio.sleep(1) 28 | await event.edit("-------✈------") 29 | await asyncio.sleep(1) 30 | await event.edit("--------✈-----") 31 | await asyncio.sleep(1) 32 | await event.edit("---------✈----") 33 | await asyncio.sleep(1) 34 | await event.edit("----------✈---") 35 | await asyncio.sleep(1) 36 | await event.edit("-----------✈--") 37 | await asyncio.sleep(1) 38 | await event.edit("------------✈-") 39 | await asyncio.sleep(1) 40 | await event.edit("-------------✈") 41 | await asyncio.sleep(5) 42 | await event.delete() 43 | 44 | -------------------------------------------------------------------------------- /userbot/plugins/plugin_info.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2019 The Raphielscape Company LLC. 2 | # 3 | # Licensed under the Raphielscape Public License, Version 1.c (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # 6 | """ Userbot plugin_info command """ 7 | 8 | from userbot import CMD_HELP 9 | from userbot.utils import admin_cmd 10 | 11 | @borg.on(admin_cmd(outgoing=True, pattern="plinfo(?: |$)(.*)")) 12 | async def info(event): 13 | """ For .plinfo command,""" 14 | args = event.pattern_match.group(1).lower() 15 | if args: 16 | if args in CMD_HELP: 17 | await event.edit(str(CMD_HELP[args])) 18 | else: 19 | await event.edit("Maybe the command help or plugin info has not been set or the plugin is invalid...") 20 | else: 21 | await event.edit("Please specify which plugin do you want help for !!\ 22 | \nUsage: .pinfo ") 23 | string = "" 24 | for i in CMD_HELP: 25 | string += "`" + str(i) 26 | string += "`\n" 27 | await event.reply(string) 28 | -------------------------------------------------------------------------------- /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/qbot.py: -------------------------------------------------------------------------------- 1 | #port to DARK COBRA by @hellboi-atul 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 | @borg.on(admin_cmd(pattern=r"qbot")) 11 | async def _(event): 12 | if event.fwd_from: 13 | return 14 | if not event.reply_to_msg_id: 15 | await event.edit("```Reply to any user message.```") 16 | return 17 | reply_message = await event.get_reply_message() 18 | 19 | chat = "@QuotLyBot" 20 | sender = reply_message.sender 21 | 22 | await event.edit("```Making a Quote```") 23 | async with bot.conversation(chat) as conv: 24 | try: 25 | response = conv.wait_event(events.NewMessage(incoming=True,from_users=1031952739)) 26 | await bot.forward_messages(chat, reply_message) 27 | response = await response 28 | except YouBlockedUserError: 29 | await event.reply("```Please unblock @QuotLyBot and try again```") 30 | return 31 | if response.text.startswith("Hi!"): 32 | await event.edit("```Can you kindly disable your forward privacy settings for good?```") 33 | else: 34 | await event.delete() 35 | await event.client.send_file(event.chat_id, response.message , reply_to=reply_message) 36 | -------------------------------------------------------------------------------- /userbot/plugins/quit.py: -------------------------------------------------------------------------------- 1 | 2 | """ 3 | .quit 4 | """ 5 | from telethon.tl.functions.channels import LeaveChannelRequest 6 | from userbot.utils import admin_cmd 7 | import time 8 | 9 | @borg.on(admin_cmd("quit", outgoing=True)) 10 | async def leave(e): 11 | if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): 12 | await e.edit("`I am leaving this chat😒..koi ni hai yaha apna I hate you all🙄..huh!!`") 13 | time.sleep(3) 14 | if '-' in str(e.chat_id): 15 | await borg(LeaveChannelRequest(e.chat_id)) 16 | else: 17 | await e.edit('`Mere pyaare boss ye chat nahi hai..thoda soch samajh kar command dijiye..🤥`') 18 | -------------------------------------------------------------------------------- /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/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/randomownsticker.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 | """ Command: .dab , .brain 6 | 7 | credit: lejend @r4v4n4""" 8 | 9 | import random 10 | 11 | from telethon import events, types, functions, utils 12 | 13 | 14 | def choser(cmd, pack, blacklist={}): 15 | docs = None 16 | @borg.on(events.NewMessage(pattern=rf'\.{cmd}', outgoing=True)) 17 | async def handler(event): 18 | await event.delete() 19 | 20 | nonlocal docs 21 | if docs is None: 22 | docs = [ 23 | utils.get_input_document(x) 24 | for x in (await borg(functions.messages.GetStickerSetRequest(types.InputStickerSetShortName(pack)))).documents 25 | if x.id not in blacklist 26 | ] 27 | 28 | await event.respond(file=random.choice(docs)) 29 | 30 | 31 | choser('rstic', 'Jayu_ke_locker_me') 32 | choser('rastic', 'Jayu_ke_adult_stickers') 33 | choser('ranastic', 'Jayu_Adult_Animated') 34 | choser('ranstic', 'Jayu_Animated', { 35 | 1653974154589768377, 36 | 1653974154589768312, 37 | 1653974154589767857, 38 | 1653974154589768311, 39 | 1653974154589767816, 40 | 1653974154589767939, 41 | 1653974154589767944, 42 | 1653974154589767912, 43 | 1653974154589767911, 44 | 1653974154589767910, 45 | 1653974154589767909, 46 | 1653974154589767863, 47 | 1653974154589767852, 48 | 1653974154589768677 49 | }) 50 | -------------------------------------------------------------------------------- /userbot/plugins/randomsticker.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 | """ Command: .dab , .brain 6 | 7 | credit: lejend @r4v4n4""" 8 | 9 | import random 10 | 11 | from telethon import events, types, functions, utils 12 | 13 | 14 | def choser(cmd, pack, blacklist={}): 15 | docs = None 16 | @borg.on(events.NewMessage(pattern=rf'\.{cmd}', outgoing=True)) 17 | async def handler(event): 18 | await event.delete() 19 | 20 | nonlocal docs 21 | if docs is None: 22 | docs = [ 23 | utils.get_input_document(x) 24 | for x in (await borg(functions.messages.GetStickerSetRequest(types.InputStickerSetShortName(pack)))).documents 25 | if x.id not in blacklist 26 | ] 27 | 28 | await event.respond(file=random.choice(docs)) 29 | 30 | 31 | choser('brain', 'supermind') 32 | choser('dab', 'DabOnHaters', { 33 | 1653974154589768377, 34 | 1653974154589768312, 35 | 1653974154589767857, 36 | 1653974154589768311, 37 | 1653974154589767816, 38 | 1653974154589767939, 39 | 1653974154589767944, 40 | 1653974154589767912, 41 | 1653974154589767911, 42 | 1653974154589767910, 43 | 1653974154589767909, 44 | 1653974154589767863, 45 | 1653974154589767852, 46 | 1653974154589768677 47 | }) 48 | -------------------------------------------------------------------------------- /userbot/plugins/rapecat.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .rapecat 6 | 7 | build by legend @r4v4n4 , if u edit it then u r gay... 8 | edited by @TECHOPS_recompiled""" 9 | from telethon import events 10 | 11 | import asyncio 12 | 13 | 14 | 15 | 16 | 17 | @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) 18 | 19 | async def _(event): 20 | 21 | if event.fwd_from: 22 | 23 | return 24 | 25 | animation_interval = 0.2 26 | 27 | animation_ttl = range(0, 27) 28 | 29 | input_str = event.pattern_match.group(1) 30 | 31 | if input_str == "rapecat": 32 | 33 | await event.edit(input_str) 34 | 35 | animation_chars = [ 36 | 37 | "**r**", 38 | "**ra**", 39 | "**rap**", 40 | "**rape**", 41 | "**rape_**", 42 | "**rape_c*", 43 | "**rape_ca**", 44 | "**rape_cat**", 45 | "**ape_cat🐅**", 46 | "**pe_cat🐅🐈**", 47 | "**e_cat🐅🐈🐈**", 48 | "**_cat🐅🐈🐈🐈**", 49 | "**cat🐅🐈🐈🐈🐈**", 50 | "**at🐅🐈🐈🐈🐈🐈**", 51 | "**t🐅🐈🐈🐈🐈🐈🐈**", 52 | "🐅🐈🐈🐈🐈🐈🐈🐈", 53 | "🐅🐈🐈🐈🐈🐈🐈🐈🐈", 54 | "🐅🐈🐈🐈🐈🐈🐈🐈🐈🐈", 55 | "🐈🐈🐈🐈🐈🐈🐈🐈", 56 | "🐈🐈🐈🐈🐈🐈🐈", 57 | "🐈🐈🐈🐈🐈🐈", 58 | "🐈🐈🐈🐈🐈", 59 | "🐈🐈🐈🐈", 60 | "🐈🐈🐈", 61 | "🐈🐈", 62 | "🐈", 63 | "🐅", 64 | "**rApEd**" 65 | ] 66 | 67 | for i in animation_ttl: 68 | 69 | await asyncio.sleep(animation_interval) 70 | 71 | await event.edit(animation_chars[i % 30]) 72 | -------------------------------------------------------------------------------- /userbot/plugins/rapetrain.py: -------------------------------------------------------------------------------- 1 | """Emoji 2 | 3 | Available Commands: 4 | 5 | .repe 6 | 7 | kk...""" 8 | 9 | from telethon import events 10 | 11 | import asyncio 12 | 13 | 14 | 15 | 16 | 17 | @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) 18 | 19 | async def _(event): 20 | 21 | if event.fwd_from: 22 | 23 | return 24 | 25 | animation_interval = 0.2 26 | 27 | animation_ttl = range(0, 30) 28 | 29 | input_str = event.pattern_match.group(1) 30 | 31 | if input_str == "repe": 32 | 33 | await event.edit(input_str) 34 | 35 | animation_chars = [ 36 | 37 | "**r**", 38 | "**ra**", 39 | "**rap**", 40 | "**rape**", 41 | "**rape_**", 42 | "**rape_t**", 43 | "**rape_tr**", 44 | "**rape_tra**", 45 | "**rape_trai**", 46 | "**rape_train**", 47 | "**ape_train🚅**", 48 | "**pe_train🚅🚃🚃**", 49 | "**e_train🚅🚃🚃🚃**", 50 | "**_train🚅🚃🚃🚃🚃**", 51 | "**train🚅🚃🚃🚃🚃🚃**", 52 | "**rain🚅🚃🚃🚃🚃🚃🚃**", 53 | "**ain🚅🚃🚃🚃🚃🚃🚃🚃**", 54 | "**in🚅🚃🚃🚃🚃🚃🚃🚃🚃**", 55 | "**n🚅🚃🚃🚃🚃🚃🚃🚃🚃🚃**", 56 | "🚅🚃🚃🚃🚃🚃🚃🚃🚃🚃", 57 | "🚃🚃🚃🚃🚃🚃🚃🚃🚃", 58 | "🚃🚃🚃🚃🚃🚃🚃🚃", 59 | "🚃🚃🚃🚃🚃🚃🚃", 60 | "🚃🚃🚃🚃🚃🚃", 61 | "🚃🚃🚃🚃🚃", 62 | "🚃🚃🚃🚃", 63 | "🚃🚃🚃", 64 | "🚃🚃", 65 | "🚃", 66 | "**RApED**" 67 | ] 68 | 69 | for i in animation_ttl: 70 | 71 | await asyncio.sleep(animation_interval) 72 | 73 | await event.edit(animation_chars[i % 30]) 74 | -------------------------------------------------------------------------------- /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/rose_fed.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import asyncio 3 | from telethon import events 4 | from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError 5 | from telethon.tl.functions.account import UpdateNotifySettingsRequest 6 | from telethon.tl.functions.messages import ImportChatInviteRequest 7 | from userbot.utils import admin_cmd 8 | import time 9 | from userbot import ALIVE_NAME 10 | 11 | naam = str(ALIVE_NAME) 12 | 13 | bot = "@Missrose_bot" 14 | 15 | @borg.on(admin_cmd("createfed ?(.*)")) 16 | async def _(event): 17 | if event.fwd_from: 18 | return 19 | sysarg = event.pattern_match.group(1) 20 | if sysarg == "": 21 | async with borg.conversation(bot) as conv: 22 | try: 23 | await conv.send_message("/start") 24 | response = await conv.get_response() 25 | await conv.send_message("/newfed DARK-COBRA Federation") 26 | audio = await conv.get_response() 27 | final = ("If you would like to know more about ROSE BOT federation, please visit @Missrose_bot." , "") 28 | await borg.send_message(event.chat_id, audio.text) 29 | await event.delete() 30 | except YouBlockedUserError: 31 | await event.edit("**Error:** `unblock` @Missrose_bot `and retry!") 32 | 33 | -------------------------------------------------------------------------------- /userbot/plugins/rotate.py: -------------------------------------------------------------------------------- 1 | import os 2 | #MADE BY SHIVAM DONT KANG 3 | import cv2 4 | from userbot import CMD_HELP 5 | #MADE BY SHIVAM DONT KANG 6 | #MADE BY SHIVAM DONT KANG 7 | from telethon.tl.types import MessageMediaPhoto 8 | from userbot.utils import admin_cmd 9 | from userbot import bot 10 | from userbot import bot as borg 11 | import os , shutil 12 | 13 | from PIL import Image 14 | sedpath = "./s_h_1_v_a_m/" 15 | if not os.path.isdir(sedpath): 16 | os.makedirs(sedpath) 17 | @borg.on(admin_cmd(pattern=r"rotate")) 18 | async def hmm(event): 19 | s=event.text 20 | h=s[8:] 21 | if not event.reply_to_msg_id: 22 | await event.reply("Reply to any Image.") 23 | return 24 | await event.delete() 25 | sed = await event.get_reply_message() 26 | if isinstance(sed.media, MessageMediaPhoto): 27 | img = await borg.download_media(sed.media, sedpath) 28 | elif "image" in sed.media.document.mime_type.split("/"): 29 | img = await borg.download_media(sed.media, sedpath) 30 | else: 31 | await event.edit("Reply To Image") 32 | return 33 | window_name = 'Made By Shivam' 34 | img = Image.open(img) 35 | rotate_img= img.rotate(int(h)) 36 | rotate_img.save("s_h_1_v_a_m_s.png") 37 | await event.client.send_file(event.chat_id, "s_h_1_v_a_m_s.png", force_document=False, reply_to=event.reply_to_msg_id) 38 | shutil.rmtree(sedpath) 39 | os.remove("s_h_1_v_a_m_s.png") 40 | -------------------------------------------------------------------------------- /userbot/plugins/sca.py: -------------------------------------------------------------------------------- 1 | """Send Chat Actions 2 | Syntax: .sca