""" Life Pro Tips Syntax: .tip by @Deonnn """ from telethon import events import asyncio import os import sys import random from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern=r"tip$", outgoing=True)) async def _(event): if event.fwd_from: return await event.edit("Well, let me give you a life-pro tip... 😉") await asyncio.sleep(2) x=(random.randrange(1,87)) if x==1: await event.edit("`\"Before telling your landlord you're moving, ask them to fix anything broken that you're worried you might get charged for. They often will, and then when you move out they won't be able to take it out of your security deposit.\"`") if x==2: await event.edit("`\"Walking before solving a problem improves your creativity by an average of 60%.\"`") if x==3: await event.edit("`\"Wake up a little earlier than your alarm? Don’t go back to bed and wait for your alarm. Waking up naturally instead of to some sort of stimuli will help you get off to a better and healthier start to your day.\"`") if x==4: await event.edit("`\"Act like your future self is a real person. So when you see a chore that needs to be done, you can say \"I'll do this now to be nice to my future self\". Helps motivate to get things done because you're doing work for someone you want to help.\"`") if x==5: await event.edit("`\"Think of purchases as a percentage of your budget/account balance rather than their actual cost.\"`") if x==6:
"""Take screenshot of any website Syntax: .screenshot <Website URL>""" import io import traceback from datetime import datetime from selenium import webdriver from telethon import events from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern="screenshot (.*)")) async def _(event): if event.fwd_from: return if Config.GOOGLE_CHROME_BIN is None: await event.edit("need to install Google Chrome. Module Stopping.") return await event.edit("Processing ...weit") start = datetime.now() try: chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--ignore-certificate-errors') chrome_options.add_argument("--test-type") chrome_options.add_argument("--headless") # https://stackoverflow.com/a/53073789/4723940 chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') chrome_options.binary_location = Config.GOOGLE_CHROME_BIN
""" import aria2p from telethon import events import asyncio import os from userbot.utils import mbl_cmd cmd = "aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --max-connection-per-server=10 --rpc-max-request-size=1024M --seed-time=0.01 --min-split-size=10M --follow-torrent=mem --split=10 --daemon=true --allow-overwrite=true" EDIT_SLEEP_TIME_OUT = 5 aria2_is_running = os.system(cmd) aria2 = aria2p.API(aria2p.Client(host="http://localhost", port=6800, secret="")) @borg.on(mbl_cmd(pattern=r"magnet")) async def magnet_download(event): if event.fwd_from: return var = event.text var = var[8:] magnet_uri = var magnet_uri = magnet_uri.replace("`", "") logger.info(magnet_uri) try: #Add Magnet URI Into Queue download = aria2.add_magnet(magnet_uri) except Exception as e: logger.info(str(e)) await event.edit("Error :\n{}".format(str(e))) return
from telethon.tl.functions.messages import EditChatDefaultBannedRightsRequest from telethon.tl.types import ChatBannedRights from userbot import ALIVE_NAME from userbot import CMD_HELP from userbot.events import register, errors_handler from userbot.utils import mbl_cmd DEFAULTUSER = str( ALIVE_NAME) if ALIVE_NAME else "Set ALIVE_NAME in config vars in Heroku" #@register(outgoing=True, pattern=r"^.lock ?(.*)") @borg.on(mbl_cmd(pattern=r"lock ?(.*)")) @errors_handler async def locks(event): input_str = event.pattern_match.group(1).lower() peer_id = event.chat_id msg = None media = None sticker = None gif = None gamee = None ainline = None gpoll = None adduser = None cpin = None changeinfo = None if input_str == "msg": msg = True what = "messages" elif input_str == "media":
#plugin made by @helloji123bot #keep credits if you are gonna kang it lol,you noob ,stupid,madafucking,avengers_leader,the copy paster import asyncio from userbot.utils import mbl_cmd from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern="text (.*)")) async def _(event): name = event.pattern_match.group(1) if event.fwd_from: return animation_interval = 0.5 animation_ttl = range(192) animation_chars = [ f"🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓..**{name}**..🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n", f"😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎..**{name}**..😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n", f"🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓..**{name}**..🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n", f"😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎..**{name}**..😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n", f"🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓..**{name}**..🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n", f"😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎..**{name}**..😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n", f"🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓..**{name}**..🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n", f"😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎..**{name}**..😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n", f"🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓..**{name}**..🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n", f"😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎..**{name}**..😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n", f"🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓..**{name}**..🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n", f"😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎..**{name}**..😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n", f"🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓..**{name}**..🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n", f"😎🤓😎🤓😎🤓😎🤓😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎..**{name}**..😎🤓😎\n🤓😎🤓😎🤓😎🤓😎🤓😎🤓\n😎🤓😎🤓😎🤓😎🤓😎🤓😎\n",
#KANGED FROM FRIDAY USERBOT #CREDIT GOES TO RESPECTED OWNERS #THANK YOU MR.STARK import asyncio import os import wget from youtubesearchpython import SearchVideos from userbot import CMD_HELP from userbot.uniborgConfig import Config from userbot.utils import edit_or_reply, mbl_cmd @bot.on(mbl_cmd(pattern="ytmusic ?(.*)")) async def _(event): if event.fwd_from: return urlissed = event.pattern_match.group(1) myself_𐌑𐌀𐍂𐍃𐋏‿𐌑𐌄𐌋𐌋𐍈 = await edit_or_reply( event, f"`Getting {urlissed} From Youtube Servers. Please Wait.`" ) search = SearchVideos(f"{urlissed}", offset=1, mode="dict", max_results=1) mi = search.result() mio = mi["search_result"] mo = mio[0]["link"] thum = mio[0]["title"] HYMTKG = mio[0]["id"] thums = mio[0]["channel"] kekme = f"https://img.youtube.com/vi/{HYMTKG}/hqdefault.jpg"
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Command: .fpost word credit: @r4v4n4""" import string from telethon import events from telethon.tl import types from userbot.utils import mbl_cmd msg_cache = {} @borg.on(mbl_cmd(pattern=r"fpost\s+(.*)")) async def _(event): await event.delete() text = event.pattern_match.group(1) destination = await event.get_input_chat() for c in text.lower(): if c not in string.ascii_lowercase: continue if c not in msg_cache: async for msg in borg.iter_messages(None, search=c): if msg.raw_text.lower() == c and msg.media is None: msg_cache[c] = msg break await borg.forward_messages(destination, msg_cache[c])
from pySmartDL import SmartDL from telethon import events from telethon.tl.functions.channels import JoinChannelRequest from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError from telethon.tl.functions.account import UpdateNotifySettingsRequest from telethon.tl.functions.messages import ImportChatInviteRequest from userbot.utils import mbl_cmd @borg.on(mbl_cmd("phd ?(.*)")) async def _(event): if event.fwd_from: return d_link = event.pattern_match.group(1) bot = "@phsavebot" r = requests.get(d_link) soup = BeautifulSoup(r.content, 'html.parser')
stark = random.choice([txt6, txt7, txt8, txt9, txt10]) mac = random.choice([txt11, txt12, txt13, txt14, txt15, txt16]) serve = random.choice([txt17, txt18, txt19, txt20, txt21, txt22]) mental = random.choice([txt23, txt24, txt25, txt26, txt27, txt17]) pm = random.choice([txt28, txt29, txt30, txt23]) opeo = random.choice([ txt31, txt32, txt33, txt34, ]) hmm = random.choice([txt36, txt37, txt38, txt39, txt1, txt12, txt20]) water = random.choice([mac, serve, opeo, hmm, stark, pm]) @borg.on(mbl_cmd(pattern="hdiwali", outgoing=True)) async def hmm(event): await event.delete() x = random.randrange(1, 60) if x == 1: await borg.send_file(event.chat_id, file=img1, caption=txt1) if x == 2: await borg.send_file(event.chat_id, file=img2, caption=txt2) if x == 3: await borg.send_file(event.chat_id, file=img3, caption=txt3) if x == 4: await borg.send_file(event.chat_id, file=img4, caption=txt4) if x == 5: await borg.send_file(event.chat_id, file=img5, caption=txt5) if x == 6: await borg.send_file(event.chat_id, file=img6, caption=stark)
import asyncio, subprocess import time, re, io from userbot import bot, BOTLOG, BOTLOG_CHATID, CMD_HELP from telethon import events, functions, types from telethon.events import StopPropagation from telethon.tl.functions.messages import ExportChatInviteRequest from telethon.tl.functions.contacts import BlockRequest from telethon.tl.functions.channels import LeaveChannelRequest, CreateChannelRequest, DeleteMessagesRequest from collections import deque from telethon.tl.functions.users import GetFullUserRequest from userbot.events import register from userbot.utils import mbl_cmd @borg.on(mbl_cmd("leave$")) async def leave(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): await e.edit("`I iz Leaving dis Lol Group kek!`") time.sleep(3) if '-' in str(e.chat_id): await bot(LeaveChannelRequest(e.chat_id)) else: await e.edit('`But Boss! This is Not A Chat`') @borg.on(mbl_cmd(";__;$")) #@register(outgoing=True, pattern="^;__;$") async def fun(e): t = ";__;" for j in range(10): t = t[:-1] + "_;"
"""Pins the replied message Syntax: .cpin [LOUD]""" from telethon import events from telethon.tl import functions, types from userbot.utils import mbl_cmd @borg.on(mbl_cmd("cpin ?(.*)")) async def _(event): if event.fwd_from: return silent = True input_str = event.pattern_match.group(1) if input_str: silent = False if event.message.reply_to_msg_id is not None: message_id = event.message.reply_to_msg_id try: await borg( functions.messages.UpdatePinnedMessageRequest( event.chat_id, message_id, silent)) except Exception as e: await event.edit(str(e)) else: await event.delete() else: await event.edit( "Reply to a message to pin the message in this Channel.")
f = f.findall(pc) fy = "http://getwallpapers.com" + random.choice(f) print(fy) if not os.path.exists("f.ttf"): urllib.request.urlretrieve( "https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf", "f.ttf") urllib.request.urlretrieve(fy, "donottouch.jpg") @borg.on(mbl_cmd(pattern="gamerdp ?(.*)")) async def main(event): await event.edit( "**Starting Gamer Profile Pic...\n\nDone !!! Check Your DP" ) #Owner MarioDevs while True: await animepp() file = await event.client.upload_file("donottouch.jpg") await event.client(functions.photos.UploadProfilePhotoRequest(file)) os.system("rm -rf donottouch.jpg")
from telethon import events from userbot.utils import mbl_cmd from userbot import ALIVE_NAME, ALIVE_PIC from telethon.tl.types import ChannelParticipantsAdmins DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "MARSHMELLOW USER" MARSHMELLOW_VID = "https://telegra.ph/file/432b2b4eb57fa7c50c12b.mp4" if ALIVE_PIC is None: ALIVE_PIC = MARSHMELLOW_VID else: ALIVE_PIC = ALIVE_PIC pm_caption = "**тЬо MY BOT IS RUNNING SUCCESFULLY ЁЯСйтАНЁЯТ╗ CHECK YOURS тЬо**\n\n" pm_caption += "**тЬз IF YOU ARE BAD:** `THIS IS YOUR DAD`\n\n" pm_caption += "**тЬз ALIVE:** `110% ALIVE SIR`\n\n" pm_caption += "**тЬз CREATER OF MARSHMELLOW :** `@Mellowxd`\n\n" pm_caption += "рдЬрд▓реА рдХреЛ рдЖрдЧЁЯФе рдФрд░ рдмреВрдЭреА рдХреЛ рд░рд╛рдЦЁЯМл рдХрд╣рддреЗ рд╣реИ рдФрд░ рдЬрд┐рд╕рдХрд╛ рддреБрдоЁЯСЙ Status рдкреЭ рд░рд╣реЗ рд╣реЛ рдЙрд╕реЗ Status_KingЁЯСС рдХрд╣рддреЗ рд╣реИрдВ \n`" @borg.on(mbl_cmd(pattern=r"calive")) async def lol(alive): chat = await alive.get_chat() """ For .alive command, check if the bot is running. """ await borg.send_file(alive.chat_id, file=ALIVE_PIC, caption=pm_caption) await alive.delete()
# Plugin Made BY @Anonymous_Machinee # Use With Or Without Credit # Originally Made for Phantom Userbot # HAPPY DIWALI TO ALL from telethon import events import asyncio from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern="diwali")) async def _(event): if event.fwd_from: return animation_interval = 0.4 animation_ttl = range(0, 24) animation_chars = [ "❤️ **Happy Diwali** ❤️", "💚 **Happy Diwali** 💚", "💜 **Happy Diwali** 💜", "💖 **Happy Diwali** 💖", "💙 **Happy Diwali** 💙", "💛 **Happy Diwali** 💛", "💗 **Happy Diwali** 💗", "💓 **Happy Diwali** 💓", "❤️ **Happy Diwali** ❤️", "💚 **Happy Diwali** 💚", "💜 **Happy Diwali** 💜", "💖 **Happy Diwali** 💖", "💙 **Happy Diwali** 💙", "💛 **Happy Diwali** 💛",
#Added by @Sur_vivor import asyncio import random import re import time from random import choice, randint from collections import deque from telethon import events import requests from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import MessageEntityMentionName from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern=r"fp$")) async def facepalm(e): """ Facepalm 🤦♂ """ await e.edit("🤦♂") @borg.on(mbl_cmd(pattern=r"ggl (.*)")) async def let_me_google_that_for_you(lmgtfy_q): textx = await lmgtfy_q.get_reply_message() qry = lmgtfy_q.pattern_match.group(1) if qry: query = str(qry) elif textx: query = textx query = query.message query_encoded = query.replace(" ", "+") lfy_url = f"http://lmgtfy.com/?s=g&iie=1&q={query_encoded}"
send_media=None, send_stickers=None, send_gifs=None, send_games=None, send_inline=None, embed_links=None, ) MUTE_RIGHTS = ChatBannedRights(until_date=None, send_messages=True) UNMUTE_RIGHTS = ChatBannedRights(until_date=None, send_messages=False) # ================================================ #@register(outgoing=True, pattern="^.setgpic$") @borg.on(mbl_cmd(pattern=r"setgpic")) @errors_handler async def set_group_photo(gpic): """ For .setgpic command, changes the picture of a group """ if not gpic.is_group: await gpic.edit("`I don't think this is a group.`") return replymsg = await gpic.get_reply_message() chat = await gpic.get_chat() admin = chat.admin_rights creator = chat.creator photo = None if not admin and not creator: await gpic.edit(NO_ADMIN) return
from selenium.webdriver.support.ui import Select from selenium.webdriver.chrome.options import Options from selenium import webdriver from telethon import events from urllib.parse import quote_plus from urllib.error import HTTPError from time import sleep import asyncio import os import random from userbot.utils import mbl_cmd #@borg.on(events.NewMessage(pattern=r"\.karb ", outgoing=True)) @borg.on(mbl_cmd(pattern="karb")) async def carbon_api(e): RED = random.randint(0, 256) GREEN = random.randint(0, 256) BLUE = random.randint(0, 256) THEME = [ "3024-night", "a11y-dark", "blackboard", "base16-dark", "base16-light", "cobalt", "dracula", "duotone-dark", "hopscotch", "lucario",
import datetime import asyncio from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError from telethon.tl.functions.account import UpdateNotifySettingsRequest from telethon.tl.functions.messages import ImportChatInviteRequest from userbot.utils import mbl_cmd import time from userbot import ALIVE_NAME naam = str(ALIVE_NAME) bot = "@jarvisofficialsecuritybot" @borg.on(mbl_cmd("fedban ?(.*)")) async def _(event): if event.fwd_from: return sysarg = event.pattern_match.group(1) if sysarg == "": async with borg.conversation(bot) as conv: try: await conv.send_message("/start") response = await conv.get_response() await conv.send_message("/fban") audio = await conv.get_response() final = ("If you would like to know more about fban, use visit @jarvisofficialsecuritybot." , "") await borg.send_message(event.chat_id, audio.text) await event.delete() except YouBlockedUserError:
Kanged from Dark Cobra userbot thanks to hellboy atul and his team """ from PIL import Image import sys import os from userbot.utils import mbl_cmd from userbot import bot if not os.path.isdir("./dcobra/"): os.makedirs("./dcobra/") #made by @THE_B_LACK_HAT Some errors solved by Sh1vam @bot.on(mbl_cmd(pattern=r"cmask")) async def scan(event): path = "dcobra" kk = await event.edit("HeHe Lets give a Mask 🤪") reply = await event.get_reply_message() lol = await borg.download_media(reply.media, path) linc= event.text link=linc[7:] pic=linc[31:] import cv2 os.system('wget https://datreon.000webhostapp.com/haarcascade_frontalface_default.xml')
# This is a troll indeed ffs *facepalm* import asyncio from telethon import events from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import mbl_cmd from userbot import ALIVE_NAME @borg.on(mbl_cmd(pattern="gbun")) async def gbun(event): if event.fwd_from: return gbunVar = event.text gbunVar = gbunVar[6:] mentions = "`Warning!! User 𝙂𝘽𝘼𝙉𝙉𝙀𝘿 By Admin...\n`" no_reason = "__Reason: Potential spammer. __" await event.edit("**Summoning out le Gungnir ❗️⚜️☠️**") await asyncio.sleep(3.5) chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" reply_message = None if event.reply_to_msg_id: reply_message = await event.get_reply_message() replied_user = await event.client( GetFullUserRequest(reply_message.from_id)) firstname = replied_user.user.first_name usname = replied_user.user.username idd = reply_message.from_id
# took with permission # Thanks to @THE_B_LACK_HAT # Fixed and Edited by @danish_00 # Kang with credits else gay.. from telethon.tl.types import MessageMediaPhoto import os, urllib, requests, re, asyncio from userbot.utils import mbl_cmd Marshmallow = Config.DEEP_AI if Config.DEEP_AI else "quickstart-QUdJIGlzIGNvbWluZy4uLi4K" """ Deep_ai ={token} """ @bot.on(mbl_cmd(pattern="enc ?(.*)", outgoing=True)) #hehe async def _(event): reply = await event.get_reply_message() if not reply: return await event.edit("Reply to any image or non animated sticker !") input_str = event.pattern_match.group(1) mellow = input_str devent = await event.edit("yo let me downlaoad it....") media = await event.client.download_media(reply) if not media.endswith(("png", "jpg", "webp")): return await event.edit("Reply to any image or non animated sticker !") if input_str: devent = await event.edit("styling the image sar...")
"""Get Detailed info about any message Syntax: .json""" from telethon import events import io from userbot.utils import mbl_cmd @borg.on(mbl_cmd("json")) async def _(event): if event.fwd_from: return the_real_message = None reply_to_id = None if event.reply_to_msg_id: previous_message = await event.get_reply_message() the_real_message = previous_message.stringify() reply_to_id = event.reply_to_msg_id else: the_real_message = event.stringify() reply_to_id = event.message.id if len(the_real_message) > Config.MAX_MESSAGE_SIZE_LIMIT: with io.BytesIO(str.encode(the_real_message)) as out_file: out_file.name = "json.text" await borg.send_file(event.chat_id, out_file, force_document=True, allow_cache=False, reply_to=reply_to_id) await event.delete() else: await event.edit("`{}`".format(the_real_message))
Heroku = heroku3.from_key(Config.HEROKU_API_KEY) Heroku = heroku3.from_key(Var.HEROKU_API_KEY) heroku_api = "https://api.heroku.com" HEROKU_APP_NAME = Config.HEROKU_APP_NAME HEROKU_API_KEY = Config.HEROKU_API_KEY Heroku = heroku3.from_key(Var.HEROKU_API_KEY) heroku_api = "https://api.heroku.com" thumb_img_path = "./Resources/PicsArt_12-07-03.35.32.jpg" thumb = thumb_img_path @borg.on( mbl_cmd(pattern="(set|get|del) var(?: |$)(.*)(?: |$)([\s\S]*)", outgoing=True)) async def variable(var): """ Manage most of ConfigVars setting, set new var, get current var, or delete var... """ if Var.HEROKU_APP_NAME is not None: app = Heroku.app(Var.HEROKU_APP_NAME) else: return await var.edit("`[HEROKU]:" "\nPlease setup your` **HEROKU_APP_NAME**") exe = var.pattern_match.group(1) heroku_var = app.config() if exe == "get": await var.edit("`Getting information...`") await asyncio.sleep(1.5)
#Ported from Nana remix by @buddhhu #imported mbl_cmd for DC by @hellboi_atul import pygments, os, asyncio from pygments.lexers import Python3Lexer from pygments.formatters import ImageFormatter from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern="pcode ?(.*)")) async def coder_print(event): cmd = event.text a = await event.get_reply_message() coder = "" if len(cmd) > 7: coder = " ".join(cmd[7:]) elif event.reply_to_msg_id and len(cmd) == 6: coder = a.message elif len(cmd) == 6: await event.reply("`No text Given`") await asyncio.sleep(2) await event.delete() return pygments.highlight(f"{coder}", Python3Lexer(), ImageFormatter(font_name="DejaVu Sans Mono", line_numbers=True), "out.png") await event.client.send_file(event.chat_id, "out.png", force_document=False) await event.delete() os.remove('out.png')
format="[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s", level=logging.WARNING) def progress(current, total): logger.info("Downloaded {} of {}\nCompleted {}".format( current, total, (current / total) * 100)) DOGBIN_URL = "https://del.dog/" BOTLOG_CHATID = Config.PRIVATE_GROUP_BOT_API_ID BOTLOG = True @borg.on(mbl_cmd(pattern="paste ?(.*)")) async def _(event): if event.fwd_from: return start = datetime.now() if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) input_str = event.pattern_match.group(1) message = "SYNTAX: `.paste <long text to include>`" if input_str: message = input_str elif event.reply_to_msg_id: previous_message = await event.get_reply_message() if previous_message.media: downloaded_file_name = await borg.download_media( previous_message,
"""Enable Seen Counter in any message, Fix by @pureindialover to know how many users have seen your message Syntax: .fwd as reply to any message""" from telethon import events from telethon import sync from telethon.tl import types, functions from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern="frwd")) async def _(event): if event.fwd_from: return if Config.PLUGIN_CHANNEL is None: await event.edit( "Please set the required environment variable `PLUGIN_CHANNEL` for this plugin to work" ) return try: e = await borg.get_entity(Config.PLUGIN_CHANNEL) except Exception as e: await event.edit(str(e)) else: re_message = await event.get_reply_message() # https://t.me/telethonofftopic/78166 fwd_message = await borg.forward_messages(e, re_message, silent=True) await borg.forward_messages(event.chat_id, fwd_message) await fwd_message.delete() await event.delete()
edited by : @Hacker_The_Unknown | Noob # KANG wITH CREDIT """ from telethon import events import asyncio import os import sys import random from userbot.utils import mbl_cmd @borg.on(mbl_cmd(pattern=r"rdl")) async def _(event): if event.fwd_from: return await event.edit("Selecting the best riddle for you...") await asyncio.sleep(2) x = random.randrange(1, 60) if x == 1: await event.edit( '`"What has hands but can not clap?"`') if x == 2: await event.edit( '`"If an electric train is traveling south, which way is the smoke going?"`') if x == 3: await event.edit( '`"A monkey, a squirrel, and a bird are racing to the top of a coconut tree. Who will get the banana first, the monkey, the squirrel, or the bird?"`')
import datetime from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions.account import UpdateNotifySettingsRequest from userbot.utils import mbl_cmd @borg.on(mbl_cmd("sg ?(.*)")) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("```Reply to any user message.```") return reply_message = await event.get_reply_message() if not reply_message.text: await event.edit("```reply to text message```") return
""" Took from @HellBot_Offical made by @Kraken_The_BadASS """ from userbot.utils import mbl_cmd, edit_or_reply from var import Var @borg.on(mbl_cmd(pattern="xogame$")) async def gamez(event): if event.fwd_from: return botusername = "******" mellow = "play" if event.reply_to_msg_id: reply_to_id = await event.get_reply_message() tap = await bot.inline_query(botusername, mellow) await tap[0].click(event.chat_id) await event.delete()
"""Get Telegram Profile Picture and other information Syntax: .info @username""" import html from telethon.tl.functions.photos import GetUserPhotosRequest from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import MessageEntityMentionName from telethon.utils import get_input_location from userbot.utils import mbl_cmd @borg.on(mbl_cmd("info ?(.*)")) async def _(event): if event.fwd_from: return replied_user, error_i_a = await get_full_user(event) if replied_user is None: await event.edit(str(error_i_a)) return False replied_user_profile_photos = await borg(GetUserPhotosRequest( user_id=replied_user.user.id, offset=42, max_id=0, limit=80 )) replied_user_profile_photos_count = "NaN" try: replied_user_profile_photos_count = replied_user_profile_photos.count except AttributeError as e: pass