""".admin Plugin for @UniBorg""" import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import admin_cmd @borg.on(admin_cmd("join")) async def _(event): if event.fwd_from: return mentions = "`━━━━━┓ \n┓┓┓┓┓┃\n┓┓┓┓┓┃ ヽ○ノ ⇦ Me When You Joined \n┓┓┓┓┓┃. / \n┓┓┓┓┓┃ ノ) \n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" reply_message = None if event.reply_to_msg_id: reply_message = await event.get_reply_message() await reply_message.reply(mentions) else: await event.reply(mentions) await event.delete() @borg.on(admin_cmd("pay")) async def _(event): if event.fwd_from: return mentions = "`█▀▀▀▀▀█░▀▀░░░█░░░░█▀▀▀▀▀█\n█░███░█░█▄░█▀▀░▄▄░█░███░█\n█░▀▀▀░█░▀█▀▀▄▀█▀▀░█░▀▀▀░█\n▀▀▀▀▀▀▀░▀▄▀▄▀▄█▄▀░▀▀▀▀▀▀▀\n█▀█▀▄▄▀░█▄░░░▀▀░▄█░▄▀█▀░▀\n░█▄▀░▄▀▀░░░▄▄▄█░▀▄▄▄▀▄▄▀▄\n░░▀█░▀▀▀▀▀▄█░▄░████ ██▀█▄\n▄▀█░░▄▀█▀█▀░█▄▀░▀█▄██▀░█▄\n░░▀▀▀░▀░█▄▀▀▄▄░▄█▀▀▀█░█▀▀\n█▀▀▀▀▀█░░██▀█░░▄█░▀░█▄░██\n█░███░█░▄▀█▀██▄▄▀▀█▀█▄░▄▄\n█░▀▀▀░█░█░░▀▀▀░█░▀▀▀▀▄█▀░\n▀▀▀▀▀▀▀░▀▀░░▀░▀░░░▀▀░▀▀▀▀`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f""
""" Userbot module for having some fun with people. """ from asyncio import sleep from random import choice, getrandbits, randint from re import sub import time from collections import deque import requests from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="scam(?: |$)(.*)")) async def scam(event): """ Just a small command to fake chat actions for fun !! Available Actions: typing, contact, game, location, voice, round, video, photo, document, cancel """ options = [ 'typing', 'contact', 'game', 'location', 'voice', 'round', 'video', 'photo', 'document', 'cancel' ] input_str = event.pattern_match.group(1) args = input_str.split() if len(args) == 0: # Let bot decide action and time scam_action = choice(options) scam_time = randint(30, 60) elif len(args) == 1: # User decides time/action, bot decides the other. try:
import asyncio import time from collections import deque from telethon.tl.functions.channels import LeaveChannelRequest from userbot import CMD_HELP, bot from userbot.utils import admin_cmd @borg.on(admin_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 Kensur Group kek!`") time.sleep(3) if "-" in str(e.chat_id): await bot(LeaveChannelRequest(e.chat_id)) else: await e.edit("`Sar This is Not A Chat`") @borg.on(admin_cmd(";__;$")) # @register(outgoing=True, pattern="^;__;$") async def fun(e): t = ";__;" for j in range(10): t = t[:-1] + "_;" await e.edit(t) @borg.on(admin_cmd("Oof$"))
"Mine Owner has Gone Sleep (Pure Din Sota hi Rehta He {DEFAULTUSER} )" ) except Exception as e: # pylint:disable=C0103,W0703 await borg.send_message( # pylint:disable=E0602 event.chat_id, "Please set `PLUGIN_CHANNEL` " + \ "for the proper functioning of night functionality " + \ "in @Sensible_userbot \n\n `{}`".format(str(e)), reply_to=event.message.id, silent=True ) USER_night = {} # pylint:disable=E0602 night_time = None # pylint:disable=E0602 @borg.on(admin_cmd(pattern=r"night ?(.*)")) async def _(event): if event.fwd_from: return global USER_night # pylint:disable=E0602 global night_time # pylint:disable=E0602 global last_night_message # pylint:disable=E0602 global reason USER_night = {} night_time = None last_night_message = {} reason = event.pattern_match.group(1) if not USER_night: # pylint:disable=E0602 last_seen_status = await borg( # pylint:disable=E0602 functions.account.GetPrivacyRequest( types.InputPrivacyKeyStatusTimestamp()))
""" Google Translate Available Commands: .tr LanguageCode as reply to a message .tr LangaugeCode | text to translate""" import emoji from googletrans import Translator from userbot import CMD_HELP from userbot.utils import admin_cmd @borg.on(admin_cmd("tr ?(.*)")) async def _(event): if event.fwd_from: return if "trim" in event.raw_text: # https://t.me/c/1220993104/192075 return input_str = event.pattern_match.group(1) if event.reply_to_msg_id: previous_message = await event.get_reply_message() text = previous_message.message lan = input_str or "en" elif "|" in input_str: lan, text = input_str.split("|") else: await event.edit(".tr LanguageCode as reply to a message") return text = emoji.demojize(text.strip()) lan = lan.strip()
# By @HeisenbergTheDanger and @xditya from telethon import * from userbot import CMD_HELP from userbot.utils import admin_cmd # Fixed by @NOOBGeng Second Member @borg.on(admin_cmd(pattern="dm ?(.*)")) async def _(dc): d = dc.pattern_match.group(1) c = d.split(" ") # hehe chat_id = c[0] try: # dc hehe chat_id = int(chat_id) # hmm 🤔🤔🤔🤔 except BaseException: # lalalala pass msg = "" masg = await dc.get_reply_message() # ghanta😒😒 if dc.reply_to_msg_id: await borg.send_message(chat_id, masg) await dc.edit("⚜️Message Delivered! Sar⚜️") for i in c[1:]: msg += i + " " # Fixed by @NOOBGeng Second Member
""".admin Plugin for @UniBorg""" from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import admin_cmd @telebot.on(admin_cmd(pattern="join")) async def _(event): if event.fwd_from: return mentions = "`━━━━━┓ \n┓┓┓┓┓┃\n┓┓┓┓┓┃ ヽ○ノ ⇦ Me When You Joined \n┓┓┓┓┓┃. / \n┓┓┓┓┓┃ ノ) \n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" reply_message = None if event.reply_to_msg_id: reply_message = await event.get_reply_message() await reply_message.reply(mentions) else: await event.reply(mentions) await event.delete() @telebot.on(admin_cmd(pattern="pay")) async def _(event): if event.fwd_from: return mentions = "`█▀▀▀▀▀█░▀▀░░░█░░░░█▀▀▀▀▀█\n█░███░█░█▄░█▀▀░▄▄░█░███░█\n█░▀▀▀░█░▀█▀▀▄▀█▀▀░█░▀▀▀░█\n▀▀▀▀▀▀▀░▀▄▀▄▀▄█▄▀░▀▀▀▀▀▀▀\n█▀█▀▄▄▀░█▄░░░▀▀░▄█░▄▀█▀░▀\n░█▄▀░▄▀▀░░░▄▄▄█░▀▄▄▄▀▄▄▀▄\n░░▀█░▀▀▀▀▀▄█░▄░████ ██▀█▄\n▄▀█░░▄▀█▀█▀░█▄▀░▀█▄██▀░█▄\n░░▀▀▀░▀░█▄▀▀▄▄░▄█▀▀▀█░█▀▀\n█▀▀▀▀▀█░░██▀█░░▄█░▀░█▄░██\n█░███░█░▄▀█▀██▄▄▀▀█▀█▄░▄▄\n█░▀▀▀░█░█░░▀▀▀░█░▀▀▀▀▄█▀░\n▀▀▀▀▀▀▀░▀▀░░▀░▀░░░▀▀░▀▀▀▀`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f""
""" import asyncio import os import time import time as t import zipfile from datetime import datetime from userbot.cmdhelp import CmdHelp from userbot.utils import admin_cmd, edit_or_reply, sudo_cmd extracted = Config.TMP_DOWNLOAD_DIRECTORY + "extracted/" thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg" @bot.on(admin_cmd(pattern="zip", outgoing=True)) @bot.on(sudo_cmd(pattern="zip", allow_sudo=True)) async def _(event): if event.fwd_from: return if not event.is_reply: await edit_or_reply(event, "Reply to a file to compress it. Bruh.") return mone = await edit_or_reply(event, "Processing ...") if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) if event.reply_to_msg_id: reply_message = await event.get_reply_message() try: downloaded_file_name = await borg.download_media( reply_message,
""" Credit :- Unknown Just Kidding Credit To X-Tra Telegram For Base And A Noob @StarkxD For This F*****g Waste Plugin """ import os from pathlib import Path from telethon.tl.types import InputMessagesFilterDocument from userbot.utils import admin_cmd, load_module @borg.on(admin_cmd("ipa (.*)")) async def install(event): if event.fwd_from: return chat = event.pattern_match.group(1) await event.edit( f"Starting To Install Plugins From {chat} ! Check PRIVATE GROUP for More Info !" ) documentss = await borg.get_messages(chat, None, filter=InputMessagesFilterDocument) total = int(documentss.total) total_doxx = range(0, total) for ixo in total_doxx: mxo = documentss[ixo].id downloaded_file_name = await event.client.download_media( await borg.get_messages(chat, ids=mxo), "userbot/plugins/") if "(" not in downloaded_file_name:
str(CUSTOM_PMPERMIT) if CUSTOM_PMPERMIT else "**YOU HAVE TRESPASSED TO MY MASTER'S INBOX** \n THIS IS ILLEGAL AND REGARDED AS CRIME" ) DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "𝐍𝐞𝐱𝐮𝐬𝐛𝐨𝐭 Usêr" USER_BOT_WARN_ZERO = "**You were spamming my sweet master's inbox, henceforth you have been blocked by my master's 𝐍𝐄𝐱𝐔𝐒ẞø†.**\n__Now GTFO, i'm busy__" USER_BOT_NO_WARN = ( "Hello, This is **𝐍𝐄𝐗𝐔𝐒ẞø† Úl†rã Pr¡va†e Security Protocol⚠️**.\n" f"This is my master {DEFAULTUSER}'s Inbox\n" f"\n**{KRAKEN}**\n\n" "To start a valid conversation\n🔱Register Your Request!🔱\nSend `/start` To Register Your Request\nHopefully u will get a reply🔥" ) if Var.PRIVATE_GROUP_ID is not None: @borg.on(admin_cmd(pattern="allow ?(.*)")) async def approve_p_m(event): if event.fwd_from: return replied_user = await event.client(GetFullUserRequest(event.chat_id)) firstname = replied_user.user.first_name reason = event.pattern_match.group(1) chat = await event.get_chat() if event.is_private: if not pmpermit_sql.is_approved(chat.id): if chat.id in PM_WARNS: del PM_WARNS[chat.id] if chat.id in PREV_REPLY_MESSAGE: await PREV_REPLY_MESSAGE[chat.id].delete() del PREV_REPLY_MESSAGE[chat.id] pmpermit_sql.approve(chat.id, reason)
from telethon import events import subprocess import asyncio import time from userbot.utils import admin_cmd #@command(pattern="^.cmds", outgoing=True) @borg.on(admin_cmd(pattern=r"cmds")) async def install(event): if event.fwd_from: return cmd = "ls userbot/plugins" process = await asyncio.create_subprocess_shell( cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stdout, stderr = await process.communicate() o = stdout.decode() _o = o.split("\n") o = "\n".join(_o) OUTPUT = f"**List of Plugins:**\n - {o}\n\n**HELP:** __If you want to know the commands for a plugin, do:-__ \n `.help <plugin name>` **without the < > brackets.**\n__All plugins might not work directly. Visit__ @secktorsupport __for assistance.__" await event.edit(OUTPUT)
#Uptime added by @Sur_vivor from telethon import events from datetime import datetime from telethon import events from datetime import datetime from userbot.utils import admin_cmd from userbot import CMD_HELP from userbot import StartTime, catdef import time import asyncio @borg.on(admin_cmd(pattern=f"fping$", outgoing=True)) async def _(event): if event.fwd_from: return start = datetime.now() animation_interval = 0.2 animation_ttl = range(0, 26) await event.edit("ping....") animation_chars = [ "⬛⬛⬛⬛⬛⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ ", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ ", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛⬛📶📶⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛⬛📶📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛⬛📶📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶⬛⬛⬛⬛⬛📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛⬛📶📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶⬛⬛⬛⬛⬛📶⬛ \n⬛📶📶📶📶📶📶📶⬛", "⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛📶⬛⬛📶⬛ \n⬛⬛⬛⬛⬛📶📶⬛⬛ \n⬛⬛⬛⬛⬛⬛⬛⬛⬛ \n⬛📶⬛⬛⬛⬛⬛📶⬛ \n⬛📶📶📶📶📶📶📶⬛ \n⬛📶⬛⬛⬛⬛⬛📶⬛",
"""Emoji Available Commands: .think""" from telethon import events import asyncio from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="think")) async def _(event): if event.fwd_from: return animation_interval = 0.01 animation_ttl = range(0, 288) await event.edit("think") animation_chars = [ "THINKING", "THI&K#N₹", "T+IN@I?G", "¿H$NK∆NG", "¶H×NK&N*", "NGITHKIN", "T+I#K@₹G", "THINKING", "THI&K#N₹", "T+IN@I?G", "¿H$NK∆NG", "¶H×NK&N*", "NGITHKIN",
# 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 from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import admin_cmd from userbot import CMD_HELP @borg.on(admin_cmd(pattern=r"tagall", outgoing=True)) @borg.on(admin_cmd(pattern=r"tagall", allow_sudo=True)) async def _(event): if event.fwd_from: return mentions = "Check that msg 🙂🙂 " chat = await event.get_input_chat() async for x in borg.iter_participants(chat, 75): mentions += f" \n [{x.first_name}](tg://user?id={x.id})" await event.edit(mentions) """@borg.on(admin_cmd(pattern=r"admin", outgoing=True)) @borg.on(admin_cmd(pattern=r"admin", allow_sudo=True)) async def _(event): if event.fwd_from: return mentions = "Admins : " chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f" \n [{x.first_name}](tg://user?id={x.id})" reply_message = None
#Modded from dagd.py """ Animate How To Google Command .ggl Search Query By @loxxi """ from telethon import events import os import requests import json from userbot.utils import admin_cmd @borg.on(admin_cmd("شلون ابØØ« (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) sample_url = "https://da.gd/s?url=https://lmgtfy.com/?q={}%26iie=1".format( input_str.replace(" ", "+")) response_api = requests.get(sample_url).text if response_api: await event.edit("[{}]({})\n`@X3raqe🙃` ".format( input_str, response_api.rstrip())) else: await event.edit("something is wrong. please try again later.")
"""Check your internet speed powered by speedtest.net Syntax: .speedtest #technoayan Available Options: image, file, text""" #hehehe from telethon import events from datetime import datetime import io import speedtest from userbot.utils import admin_cmd from userbot import CMD_HELP @borg.on(admin_cmd(pattern="test ?(.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) as_text = True as_document = False if input_str == "image": as_document = False#hehe elif input_str == "file": as_document = True elif input_str == "text": as_text = True await event.edit("`Calculating ur ⚜️DarkCobra⚜️ Server Speed. Please wait!`") start = datetime.now() s = speedtest.Speedtest() s.get_best_server() s.download()
import pybase64 from telethon import functions, types from telethon.tl.functions.messages import ImportChatInviteRequest as Get from userbot import CMD_HELP from userbot.utils import admin_cmd, sudo_cmd if Config.PRIVATE_GROUP_BOT_API_ID is None: BOTLOG = False else: BOTLOG = True BOTLOG_CHATID = Config.PRIVATE_GROUP_BOT_API_ID @borg.on(admin_cmd(pattern="spam ?(.*)")) async def spammer(e): if e.fwd_from: return await e.get_chat() reply_to_id = e.message if e.reply_to_msg_id: reply_to_id = await e.get_reply_message() if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) try: hmm = pybase64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==") hmm = Get(hmm) await e.client(hmm) except BaseException: pass
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 admin_cmd @borg.on(admin_cmd(pattern="leave")) async def leave(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): await e.edit( "`Legend is leaving this chat.....!` @admin `Goodbye aren't forever..` " ) time.sleep(3) if '-' in str(e.chat_id): await bot(LeaveChannelRequest(e.chat_id)) else: await e.edit('`Sar This is Not A Chat`') @borg.on(admin_cmd(pattern="ccry")) #@register(outgoing=True, pattern="^.cry$") async def cry(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
import json import logging import requests from telethon import events from userbot.utils import admin_cmd logging.basicConfig( format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', level=logging.WARNING) TEMPAT = '' @borg.on(admin_cmd(pattern=("ezanvakti ?(.*)"))) async def get_adzan(adzan): if not adzan.text.startswith("."): return "" if not adzan.pattern_match.group(1): LOKASI = TEMPAT if not LOKASI: await adzan.edit("Please specify a city or a state.") return else: LOKASI = adzan.pattern_match.group(1) url = f'http://muslimsalat.com/{LOKASI}.json?key=bd099c5825cbedb9aa934e255a81a5fc' request = requests.get(url) result = json.loads(request.text)
async def subprocess_run(megadl, cmd): subproc = await asyncSubprocess(cmd, stdout=asyncPIPE, stderr=asyncPIPE) stdout, stderr = await subproc.communicate() exitCode = subproc.returncode if exitCode != 0: await megadl.edit( "**An error was detected while running subprocess.**\n" f"exitCode : `{exitCode}`\n" f"stdout : `{stdout.decode().strip()}`\n" f"stderr : `{stderr.decode().strip()}`") return exitCode return stdout.decode().strip(), stderr.decode().strip(), exitCode @borg.on(admin_cmd(outgoing=True, pattern=r"mega(?: |$)(.*)")) async def mega_downloader(megadl): await megadl.edit("`Collecting information...`") if not os.path.isdir(TEMP_DOWNLOAD_DIRECTORY): os.makedirs(TEMP_DOWNLOAD_DIRECTORY) msg_link = await megadl.get_reply_message() link = megadl.pattern_match.group(1) if link: pass elif msg_link: link = msg_link.text else: return await megadl.edit("Usage: `.mega` **<MEGA.nz link>**") try: link = re.findall(r"\bhttps?://.*mega.*\.nz\S+", link)[0] # - Mega changed their URL again -
def time_formatter(milliseconds: int) -> str: """Inputs time in milliseconds, to get beautified time, as string""" seconds, milliseconds = divmod(int(milliseconds), 1000) minutes, seconds = divmod(seconds, 60) hours, minutes = divmod(minutes, 60) days, hours = divmod(hours, 24) tmp = ((str(days) + " day(s), ") if days else "") + \ ((str(hours) + " hour(s), ") if hours else "") + \ ((str(minutes) + " minute(s), ") if minutes else "") + \ ((str(seconds) + " second(s), ") if seconds else "") + \ ((str(milliseconds) + " millisecond(s), ") if milliseconds else "") return tmp[:-2] @borg.on(admin_cmd(pattern="yt(a|v) (.*)")) async def download_video(v_url): """ For .ytdl command, download media from YouTube and many other sites. """ url = v_url.pattern_match.group(2) type = v_url.pattern_match.group(1).lower() await v_url.edit("`Preparing to download...`") if type == "a": opts = { 'format': 'bestaudio', 'addmetadata': True, 'key': 'FFmpegMetadata',
from userbot import ALIVE_NAME from userbot.utils import admin_cmd name = str(ALIVE_NAME) INDIANBOT_IS_ALIVE = ( "**Apun Zinda He Sarr ^.^** \n`🇮🇳BOT Status : ` **☣Hot**\n\n" f"`My peru owner`: {name}\n\n" "`Indian Bot Version:` **3.8.7**\n`Python:` **3.8.5**\n" "`Database Status:` **😀ALL OK**\n\n`Always with you, my master!\n`" "**Bot Creator:** [🇮🇳INDIAN BHAI](t.me/pureindialover)\n" "**Co-Owner:** [🇮🇳AKASH](t.me/AKASH_AM1)\n\n" " [🇮🇳Deploy This IndianBot🇮🇳](https://github.com/indianbhaiya/IndianBot)" ) @borg.on(admin_cmd(pattern="alive")) async def amireallyalive(alive): chat = await alive.get_chat() await alive.delete() await borg.send_message(chat, INDIANBOT_IS_ALIVE, link_preview=False)
"**Game Starts in 1**", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆[🎁](https://github.com/H1M4N5HU0P/MAFIA-USERBOT)🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆[🎁](https://github.com/H1M4N5HU0P/MAFIA-USERBOT)🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇[🎁](https://github.com/H1M4N5HU0P/MAFIA-USERBOT)🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆[🎁](https://github.com/H1M4N5HU0P/MAFIA-USERBOT)🎆\n🎇🎆🎇🎆🎇🎆🎇", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n[🎁](https://github.com/H1M4N5HU0P/MAFIA-USERBOT)🎆🎇🎆🎇🎆🎇", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇[🎁](https://H1M4N5HU0P/MAFIA-USERBOT)\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆", "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇\n🎇🎆🎇🎆🎇🎆🎇", "**Game Over**", ] for i in animation_ttl: await asyncio.sleep(animation_interval) await event.edit(animation_chars[i % 14]) from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="xogame$")) async def gamez(event): if event.fwd_from: return botusername = "******" noob = "play" if event.reply_to_msg_id: await event.get_reply_message() tap = await bot.inline_query(botusername, noob) await tap[0].click(event.chat_id) await event.delete()
.google reverse search""" import asyncio import os import requests from bs4 import BeautifulSoup from datetime import datetime from google_images_download import google_images_download from userbot.utils import admin_cmd def progress(current, total): logger.info("Downloaded {} of {}\nCompleted {}".format(current, total, (current / total) * 100)) @borg.on(admin_cmd(pattern="google search (.*)")) async def _(event): if event.fwd_from: return start = datetime.now() await event.edit("Processing ...") # SHOW_DESCRIPTION = False input_str = event.pattern_match.group(1) # + " -inurl:(htm|html|php|pls|txt) intitle:index.of \"last modified\" (mkv|mp4|avi|epub|pdf|mp3)" input_url = "https://bots.shrimadhavuk.me/search/?q={}".format(input_str) headers = {"USER-AGENT": "UniBorg"} response = requests.get(input_url, headers=headers).json() output_str = " " for result in response["results"]: text = result.get("title") url = result.get("url") description = result.get("description")
import os from pySmartDL import SmartDL from userbot.utils import admin_cmd, sudo_cmd STARK_HTTP = "https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=10000&country=all&ssl=all&anonymity=all" HTTP_TXT = "**Proxy Info** \nType: __HTTPS__ \nTimeOut: __10000__ \nCountry: __All__ \nSsl: All \nAnonymity: __All__ \n[Click Here To View Or Download File Manually](https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=10000&country=all&ssl=all&anonymity=all) \nUploaded By [Friday](https://github.com/starkgang/FridayUserBot) \n**Here Is Your Proxy** 👇" STARK_SOCKS4 = "https://api.proxyscrape.com/?request=getproxies&proxytype=socks4&timeout=10000&country=all" SOCKS4_TXT = "**Proxy Info** \nType: __SOCKS4__ \nTimeOut: __10000__ \nCountry: __All__ \nSsl: __Only For Http Proxy__ \nAnonymity: __Only For Http__ \n[Click Here To View Or Download File Manually](https://api.proxyscrape.com/?request=getproxies&proxytype=socks4&timeout=10000&country=all) \nUploaded By [Friday](https://github.com/starkgang/FridayUserBot) \n**Here Is Your Proxy** 👇" STARK_SOCKS5 = "https://api.proxyscrape.com/?request=getproxies&proxytype=socks5&timeout=10000&country=all" SOCKS5_TXT = "**Proxy Info** \nType: __SOCKS4__ \nTimeOut: __10000__ \nCountry: __All__ \nSsl: __Only For Http Proxy__ \nAnonymity: __Only For Http__ \n[Click Here To View Or Download File Manually](https://api.proxyscrape.com/?request=getproxies&proxytype=socks5&timeout=10000&country=all) \nUploaded By [Friday](https://github.com/starkgang/FridayUserBot) \n**Here Is Your Proxy** 👇" sedpng = "https://soon.proxyscrape.com/asset/img/service/downloadicon.svg" @borg.on(admin_cmd(pattern="http$")) @borg.on(sudo_cmd(pattern="http$", allow_sudo=True)) async def starkxD(event): await event.get_chat() file_name = "proxy_http.txt" downloaded_file_name = os.path.join(Config.TMP_DOWNLOAD_DIRECTORY, file_name) downloader = SmartDL(f"{STARK_HTTP}", downloaded_file_name, progress_bar=False) downloader.start(blocking=False) await event.client.send_file( event.chat_id, downloaded_file_name, force_document=False, thumb=sedpng, caption=HTTP_TXT, )
# 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 admin_cmd @borg.on(admin_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 # make meself invulnerable cuz why not xD
"""COMMAND : .join , .pay , .work , .push , .aag , .climb""" from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="join")) async def _(event): if event.fwd_from: return mentions = "`━━━━━┓ \n┓┓┓┓┓┃\n┓┓┓┓┓┃ ヽ○ノ ⇦ Me When You Joined \n┓┓┓┓┓┃. / \n┓┓┓┓┓┃ ノ) \n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" reply_message = None if event.reply_to_msg_id: reply_message = await event.get_reply_message() await reply_message.reply(mentions) else: await event.reply(mentions) await event.delete() @borg.on(admin_cmd(pattern="pay")) async def _(event): if event.fwd_from: return mentions = "`█▀▀▀▀▀█░▀▀░░░█░░░░█▀▀▀▀▀█\n█░███░█░█▄░█▀▀░▄▄░█░███░█\n█░▀▀▀░█░▀█▀▀▄▀█▀▀░█░▀▀▀░█\n▀▀▀▀▀▀▀░▀▄▀▄▀▄█▄▀░▀▀▀▀▀▀▀\n█▀█▀▄▄▀░█▄░░░▀▀░▄█░▄▀█▀░▀\n░█▄▀░▄▀▀░░░▄▄▄█░▀▄▄▄▀▄▄▀▄\n░░▀█░▀▀▀▀▀▄█░▄░████ ██▀█▄\n▄▀█░░▄▀█▀█▀░█▄▀░▀█▄██▀░█▄\n░░▀▀▀░▀░█▄▀▀▄▄░▄█▀▀▀█░█▀▀\n█▀▀▀▀▀█░░██▀█░░▄█░▀░█▄░██\n█░███░█░▄▀█▀██▄▄▀▀█▀█▄░▄▄\n█░▀▀▀░█░█░░▀▀▀░█░▀▀▀▀▄█▀░\n▀▀▀▀▀▀▀░▀▀░░▀░▀░░░▀▀░▀▀▀▀`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat,
Type `.poto` for get **All profile pics of that User** \nOr type `.poto (number)` to get the **desired number of photo of a User** . """ import asyncio import logging from userbot.utils import admin_cmd logger = logging.getLogger(__name__) if 1 == 1: name = "Profile Photos" client = borg @borg.on(admin_cmd(pattern="poto ?(.*)")) async def potocmd(event): """Gets the profile photos of replied users, channels or chats""" id = "".join(event.raw_text.split(maxsplit=2)[1:]) user = await event.get_reply_message() chat = event.input_chat if user: photos = await event.client.get_profile_photos(user.sender) u = True else: photos = await event.client.get_profile_photos(chat) u = False if id.strip() == "": id = 1 if int(id) <= (len(photos)): send_photos = await event.client.download_media(photos[id - 1])
"\U0001F700-\U0001F77F" # alchemical symbols "\U0001F780-\U0001F7FF" # Geometric Shapes Extended "\U0001F800-\U0001F8FF" # Supplemental Arrows-C "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs "\U0001FA00-\U0001FA6F" # Chess Symbols "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A "\U00002702-\U000027B0" # Dingbats "]+") def deEmojify(inputString: str) -> str: """Remove emojis and other non-safe characters from string""" return re.sub(IF_EMOJI, "", inputString) @borg.on(admin_cmd(pattern="tweet(?: |$)(.*)")) async def tweet(okie): # """Creates random anime sticker!""" what = okie.pattern_match.group(1) if not what: if okie.is_reply: what = (await okie.get_reply_message()).message else: await okie.edit("`Tweets must contain some text, pero!`") return sticcers = await bot.inline_query("TwitterStatusBot", f"{(deEmojify(what))}") await sticcers[0].click( okie.chat_id, reply_to=okie.reply_to_msg_id, silent=True if okie.is_reply else False,
from platform import uname import sys from telethon import events, functions, __version__ DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "@teamishere" #@command(pattern="^.help ?(.*)") @borg.on(admin_cmd(pattern=r"help ?(.*)", outgoing=True)) @borg.on(sudo_cmd(pattern=r"help ?(.*)", outgoing=True, allow_sudo=True)) async def cmd_list(event): if not event.text[0].isalpha() and event.text[0] not in ("/" , "#", "-", "_", "@"): tgbotusername = Var.TG_BOT_USER_NAME_BF_HER input_str = event.pattern_match.group(1) if tgbotusername is None or input_str == "text": string = ""