async def _(event): if event.fwd_from: return modules = "**List of available modules:**\n" MODULE.sort() prev = "1" for module in MODULE: if prev[0] != module[0]: modules += f"\n\n\t{module[0].upper()}\n\n" modules += f"ℹ️ ```{module}```\n" prev = module modules += "\n\n**Tip --> Use .help <module_name> for more info.**" await event.edit(modules)
Credits goes to @AvinashReddy3108 for creating this plugin edited to work on Uniborg by @Mayur_Karaniya this is a Hugh fix thanks to @SpEcHiDe and @devpatel_73 """ import asyncio import sys from os import environ, execle, path, remove from git import Repo from git.exc import GitCommandError, InvalidGitRepositoryError, NoSuchPathError from uniborg import MODULE from uniborg.util import admin_cmd MODULE.append("update") # ===============================Basic Constants============================= # UPSTREAM_REPO_URL is as same as below. # "https://github.com/prono69/PepeBot.git" UPSTREAM_REPO_URL = "https://github.com/prono69/PepeBot" # provide your HEROKU_API_KEY in place of this value. HEROKU_API_KEY = Config.HEROKU_API_KEY # provide your HEROKU_APP_NAME in place of this value. HEROKU_APP_NAME = Config.HEROKU_APP_NAME # ===============================Basic Constants============================= requirements_path = path.join( path.dirname(path.dirname(path.dirname(__file__))), "requirements.txt")
"get music from .music/.spotbot <music query> Credits https://t.me/By_Azade" import logging from uniborg.util import admin_cmd from uniborg import MODULE MODULE.append("song1") logging.basicConfig( format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', level=logging.WARNING) logger = logging.getLogger(__name__) @borg.on(admin_cmd(pattern="music ?(.*)")) # pylint:disable=E0602 async def music_find(event): if event.fwd_from: return music_name = event.pattern_match.group(1) msg = await event.get_reply_message() if music_name: await event.delete() song_result = await event.client.inline_query("deezermusicbot", music_name) await song_result[0].click(event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True) elif msg: await event.delete() song_result = await event.client.inline_query("deezermusicbot", msg.message)
# designed By @Krishna_Singhal in Userge. Ported to telethon by # @mrconfused and @sandy1709 import os from glitch_this import ImageGlitcher from PIL import Image from telethon import functions, types from uniborg import LOGS, MODULE, SYNTAX, runcmd, take_screen_shot from uniborg.util import admin_cmd MODULE.append("glitch") @borg.on(admin_cmd(pattern="(glitch|glitchs)(?: |$)(.*)")) async def glitch(cat): await cat.edit("```Glitching... 😁```") cmd = cat.pattern_match.group(1) catinput = cat.pattern_match.group(2) reply = await cat.get_reply_message() if not (reply and (reply.media)): await cat.edit("`Media not found...`") return if not os.path.isdir("./temp/"): os.mkdir("./temp/") catid = cat.reply_to_msg_id catsticker = await reply.download_media(file="./temp/") if not catsticker.endswith((".mp4", ".webp", ".tgs", ".png", ".jpg", ".jpeg")): os.remove(catsticker) await cat.edit("`Media not found`")
──「 **Danbooru Search** 」── -> `animu`(search string) or `aninsfw`(search nsfw string) Search images from Danbooru. """ import os import urllib from asyncio import sleep import requests from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd MODULE.append("nsfw") @borg.on(admin_cmd(pattern="ani(mu|nsfw) ?(.*)")) async def danbooru(message): await message.edit("`Processing…`") rating = "Explicit" if "nsfw" in message.pattern_match.group(1) else "Safe" search_query = message.pattern_match.group(2) params = { "limit": 1, "random": "true", "tags": f"Rating:{rating} {search_query}".strip(), }
# Inspired by Saitama Bot, credits - @kirito6969, @PhycoNinja13b # Thx to @DeletedUser420 from uniborg import SYNTAX, MODULE from telethon import events MODULE.append("weebify") normiefont = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' ] weebyfont = [ '卂', '乃', '匚', '刀', '乇', '下', '厶', '卄', '工', '丁', '长', '乚', '从', '𠘨', '口', '尸', '㔿', '尺', '丂', '丅', '凵', 'リ', '山', '乂', '丫', '乙' ] @borg.on(events.NewMessage(pattern="^.weeb(?: |$)(.*)")) async def weebify(event): args = event.pattern_match.group(1) if not args: get = await event.get_reply_message() args = get.text if not args: await event.edit("`What I am Supposed to Weebify U Dumb`") return string = ' '.join(args).lower() for normiecharacter in string: if normiecharacter in normiefont:
import asyncio import re from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd from userbot import AioHttp MODULE.append("animals") animal = r"([^.]*)$" ok_exts = ["jpg", "jpeg", "png"] animals_data = { "dog": {"url": "https://random.dog/woof.json", "key": "url"}, "cat": {"url": "http://aws.random.cat/meow", "key": "file"}, "panda": {"url": "https://some-random-api.ml/img/panda", "key": "link"}, "redpanda": {"url": "https://some-random-api.ml/img/red_panda", "key": "link"}, "bird": {"url": "https://some-random-api.ml/img/birb", "key": "link"}, "fox": {"url": "https://some-random-api.ml/img/fox", "key": "link"}, "koala": {"url": "https://some-random-api.ml/img/koala", "key": "link"}, } animals = [x for x in animals_data] async def prep_animal_image(animal_data): ext = "" image = None while ext not in ok_exts: data = await AioHttp().get_json(animal_data["url"]) image = data[animal_data["key"]]
"""PepeBot Module for Finding Songs""" from telethon import events import subprocess import asyncio from uniborg.util import admin_cmd from uniborg import MODULE, SYNTAX from telethon.errors.rpcerrorlist import YouBlockedUserError import glob import os MODULE.append("song") try: import subprocess except BaseException: os.system("pip install instantmusic") os.system("rm -rf *.mp3") def bruh(name): os.system("instantmusic -q -s " + name) @borg.on(admin_cmd(pattern="song(?: |$)(.*)")) async def _(event): if event.fwd_from: return cmd = event.pattern_match.group(1) reply_to_id = event.message.id if event.reply_to_msg_id:
"""Check if userbot alive or not . """ import time from userbot import StartTime, pepe, get_readable_time from uniborg.util import admin_cmd from telethon import version from platform import python_version from uniborg import MODULE MODULE.append("alive") @borg.on(admin_cmd(pattern="alive", allow_sudo=True)) async def amireallyalive(alive): reply_to_id = alive.message uptime = await get_readable_time((time.time() - StartTime)) if alive.reply_to_msg_id: reply_to_id = await alive.get_reply_message() output = f""" **✮PEPEBOT is Up and Running BSDK✮** 😴 __Lazy as a Sloth__ 😴 ✧ **System** : `Linux` ✧ **Uptime** : `{uptime}` ✧ **Telethon version** : `{version.__version__}` ✧ **Python Version** : `{python_version()}` ✧ **PepeBot Version** : `{pepe}` ✧ **Database** : `Functioning Normally` ✧ **My Master** : [NIKITA](https://t.me/kirito6969) **Pepe is always with you, my master!**
import asyncio import re import json import os import multiprocessing import errno import math import time from pySmartDL import SmartDL from urllib.error import HTTPError from uniborg import MODULE, SYNTAX from uniborg.util import humanbytes, time_formatter, admin_cmd TEMP_DOWNLOAD_DIRECTORY = Config.TMP_DOWNLOAD_DIRECTORY MODULE.append("mega_down") LOGS = logger 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
] \n`.dva`\n`.nsfw`\n`.cat`\n`.lewdn`\n`.why`\n`.gasm`\n`.ifu`\n`.fact`\n`.tcat` \n\nNSFW PLUGIN. BE AWARE 🔴 \n\n**DON'T EVEN TRY TO TO CHANGE CREDITS**' """ import os import nekos import requests from PIL import Image from uniborg import MODULE from uniborg.util import admin_cmd MODULE.append("nekos") @borg.on(admin_cmd(pattern="nk ?(.*)")) async def _(event): hmm = event.pattern_match.group(1) if not hmm: await event.edit("`Bruh.. What I am supposed to do!`") return await event.edit("`Processing...Nekos`") await event.delete() target = nekos.img(f"{hmm}") await event.client.send_file(event.chat_id, file=target, caption=f"{hmm}") @borg.on(admin_cmd(pattern="dva"))
"""QuotLy: Avaible commands: .qbot """ from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd from telethon import events MODULE.append("quotly") @borg.on(admin_cmd(pattern="qbot ?(.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) reply = await event.get_reply_message() if input_str: quote = input_str elif reply: quote = reply else: return bot = "@QuotLyBot" await event.edit(f"```Making a quote....```") async with borg.conversation(bot) as bot_conv: if True: #lazy indentation workaround xD if input_str: response = await silently_send_message(bot_conv, quote) elif reply: response = bot_conv.wait_event(events.NewMessage(incoming=True,from_users=1031952739)) await borg.forward_messages(bot, quote)
# Kanged from @Nitesh_XD import os import random import numpy as np from colour import Color from hachoir.metadata import extractMetadata from hachoir.parser import createParser from PIL import Image, ImageDraw, ImageFont from telethon.tl.types import DocumentAttributeFilename from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd, edit_or_reply MODULE.append("ascii") bground = "black" @bot.on(admin_cmd(pattern=r"(ascii|asciis)$", outgoing=True, allow_sudo=True)) async def ascii(event): if not event.reply_to_msg_id: await edit_or_reply(event, "`Reply to Any media..`") return reply_message = await event.get_reply_message() if not reply_message.media: await edit_or_reply(event, "`Reply to a image/sticker/video`") return a = await edit_or_reply(event, "`Downloading Media..`") if reply_message.photo:
from sql_helpers import google_drive_sql as helper from uniborg import ( G_DRIVE_CLIENT_ID, G_DRIVE_CLIENT_SECRET, G_DRIVE_DATA, G_DRIVE_FOLDER_ID, LOGS, MODULE, SYNTAX, CancelProcess, progress, ) from uniborg.util import admin_cmd, edit_or_reply, humanbytes, time_formatter MODULE.append("gdrive") BOTLOG_CHATID = Config.PRIVATE_GROUP_BOT_API_ID TMP_DOWNLOAD_DIRECTORY = Config.TMP_DOWNLOAD_DIRECTORY # =========================================================== # # STATIC # # =========================================================== # GOOGLE_AUTH_URI = "https://accounts.google.com/o/oauth2/auth" GOOGLE_TOKEN_URI = "https://oauth2.googleapis.com/token" SCOPES = [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.metadata", ] REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob" # =========================================================== # # STATIC CASE FOR G_DRIVE_FOLDER_ID IF VALUE IS URL # # =========================================================== #
# Ported from Userge by Alfiananda P.A import os from hachoir.metadata import extractMetadata from hachoir.parser import createParser from PIL import Image, ImageOps from telethon.tl.types import DocumentAttributeFilename from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd TEMP_DOWNLOAD_DIRECTORY = Config.TMP_DOWNLOAD_DIRECTORY Converted = TEMP_DOWNLOAD_DIRECTORY + "sticker.webp" MODULE.append("transform") @borg.on(admin_cmd(pattern=r"(mirror|flip|ghost|bw|poster)$")) async def transform(event): if not event.reply_to_msg_id: await event.edit("`Reply to Any media..`") return reply_message = await event.get_reply_message() if not reply_message.media: await event.edit("`Reply to a image/sticker`") return await event.edit("`Downloading Media..`") if reply_message.photo: transform = await bot.download_media( reply_message,
# credits to @mrconfused dont edit credits import asyncio from datetime import datetime from telethon.errors import BadRequestError from telethon.tl.functions.channels import EditBannedRequest from telethon.tl.types import ChatBannedRights, MessageEntityMentionName import sql_helpers.gban_sql_helper as gban_sql from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd from userbot import PEPE_ID from userbot.functions import admin_groups MODULE.append("gban") BANNED_RIGHTS = ChatBannedRights( until_date=None, view_messages=True, send_messages=True, send_media=True, send_stickers=True, send_gifs=True, send_games=True, send_inline=True, embed_links=True, ) UNBAN_RIGHTS = ChatBannedRights( until_date=None,
"""Chat Mute/Unmute plugin `.mutechat` \n`.unmutechat` """ from asyncio import sleep from sample_config import Config from uniborg.util import admin_cmd from uniborg import MODULE MODULE.append("chatmute") @borg.on(admin_cmd(pattern="unmutechat")) async def unmute_chat(unm_e): """ For .unmutechat command, unmute a muted chat. """ try: from sql_helpers.keep_read_sql import unkread except AttributeError: await unm_e.edit('`Running on Non-SQL Mode!`') return unkread(str(unm_e.chat_id)) await unm_e.edit("```Unmuted this chat Successfully```") await sleep(2) await unm_e.delete() @borg.on(admin_cmd(pattern="mutechat")) async def mute_chat(mute_e): """ For .mutechat command, mute any chat. """ try: from sql_helpers.keep_read_sql import kread except AttributeError:
\n\n#LazyAF_Geng rocks.. 🔥 """ import asyncio import datetime import html import textwrap import bs4 import requests from jikanpy import Jikan from jikanpy.exceptions import APIException from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd MODULE.append("animelist") jikan = Jikan() @borg.on(admin_cmd(pattern="anime ?(.*)")) async def anime(event): query = event.pattern_match.group(1) reply = await event.get_reply_message() await event.edit("`Searching Anime...`") if query: pass elif reply: query = reply.text else: await event.edit("`Brah.. What I am supposed to search ?`")
`.tt` <query>\n `.ts` <query or reply>\n `.movie torrentz2.eu|idop.se` <query> """ import asyncio from datetime import datetime import cfscrape # https://github.com/Anorov/cloudflare-scrape import requests from bs4 import BeautifulSoup as bs from uniborg import MODULE from uniborg.util import admin_cmd, humanbytes MODULE.append("torrents") def dogbin(magnets): counter = 0 urls = [] while counter != len(magnets): message = magnets[counter] url = "https://del.dog/documents" r = requests.post(url, data=message.encode("UTF-8")).json() url = f"https://del.dog/{r['key']}" urls.append(url) counter += 1 return urls
""" `Credits` @amnd33p Modified by @mrconfused """ import io import traceback from datetime import datetime import requests from selenium import webdriver from validators.url import url from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd, edit_or_reply MODULE.append("screenshot") @bot.on(admin_cmd(pattern="ss (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return if Config.CHROME_BIN is None: await edit_or_reply(event, "Need to install Google Chrome. Module Stopping.") return catevent = await edit_or_reply(event, "`Processing ...`") start = datetime.now() try: chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--ignore-certificate-errors")
# Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module containing hash and encode/decode commands. \nPorted By- [NIKITA](https://t.me/kirito6969) #LazyAF_Geng 🔥 """ from subprocess import PIPE from subprocess import run as runapp import pybase64 from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd MODULE.append("hash") @borg.on(admin_cmd(pattern="hash ?(.*)")) async def gethash(hash_q): """ For .hash command, find the md5, sha1, sha256, sha512 of the string. """ hashtxt_ = hash_q.pattern_match.group(1) if not hashtxt_: get = await hash_q.get_reply_message() hashtxt_ = get.text else: await hash_q.edit("Brah.. Gib me Something") return hashtxt = open("hashdis.txt", "w+") hashtxt.write(hashtxt_)
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module containing commands related to android""" import re from requests import get from bs4 import BeautifulSoup from uniborg import MODULE, SYNTAX from uniborg.util import admin_cmd MODULE.append("android") GITHUB = 'https://github.com' DEVICES_DATA = 'https://raw.githubusercontent.com/androidtrackers/' \ 'certified-android-devices/master/devices.json' @borg.on(admin_cmd(pattern="magisk ?(.*)")) async def magisk(request): """ magisk latest releases """ magisk_dict = { "Stable": "https://raw.githubusercontent.com/topjohnwu/magisk_files/master/stable.json", "Beta": "https://raw.githubusercontent.com/topjohnwu/magisk_files/master/beta.json", "Canary (Release)": "https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/release.json", "Canary (Debug)": "https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/debug.json"
# For UniBorg # By Priyam Kalra # Syntax (.syntax <module_name>) from telethon import events from uniborg.util import admin_cmd import asyncio from telethon.tl import functions, types from uniborg import SYNTAX, MODULE MODULE.append("syntax") @borg.on(admin_cmd(pattern="help ?(.*)")) async def _(event): if event.fwd_from: return module = event.pattern_match.group(1) if module: if module in SYNTAX: await event.edit(SYNTAX[module]) else: await event.edit("Please specify a valid module.") else: await event.edit( "Please specify a module.\n**Tip: Get a list of all modules using .modules**" )
# Imported from ppe-remix for PepeBot import os import random from uniborg.util import admin_cmd from userbot import deEmojify from uniborg import MODULE, SYNTAX MODULE.append("waifu") senpais = [37, 38, 48, 55] @borg.on(admin_cmd(pattern="waifu(?: |$)(.*)")) async def waifu(animu): text = animu.pattern_match.group(1) if not text: if animu.is_reply: text = (await animu.get_reply_message()).message else: await animu.answer("`No text given, hence the waifu ran away.`") return animus = [20, 32, 33, 40, 41, 42, 58] sticcers = await animu.client.inline_query( "stickerizerbot", f"#{random.choice(animus)}{(deEmojify(text))}") await sticcers[0].click(animu.chat_id, reply_to=animu.reply_to_msg_id, silent=True if animu.is_reply else False, hide_via=True) await animu.delete()
`.mind` `.tweet` `.carry` `.ph`""" import os from asyncio import sleep import requests from html_telegraph_poster.upload_images import upload_image from PIL import Image from uniborg import MODULE, deEmojify, phss from uniborg.util import admin_cmd, edit_or_reply MODULE.append("tweet") async def get_user_from_event(event): if event.reply_to_msg_id: previous_message = await event.get_reply_message() user_obj = await event.client.get_entity(previous_message.from_id) return user_obj async def purge(): try: os.system("rm -rf *.png") os.system("rm -rf *.webp") except OSError: pass
from telethon.errors.rpcerrorlist import YouBlockedUserError from uniborg.util import admin_cmd from uniborg import MODULE, SYNTAX naam = "NIKITA" nom = " You" bot = "@indianaibot" bluebot = "@EASY12DEVIL_BOT" freebot = "@freeusersbot" MODULE.append("javifi") @borg.on(admin_cmd(pattern="jav ?(.*)")) async def _(event): if event.fwd_from: return sysarg = event.pattern_match.group(1) if sysarg == "h": async with borg.conversation(bot) as conv: try: await conv.send_message("/start") response = await conv.get_response() await conv.send_message("/hello") audio = await conv.get_response() await borg.send_file( event.chat_id, audio, caption="➡️**TO BOSS : **" + naam +
# Written by @HeisenbergTheDanger (Keep credits else gay) """BROADCAST plugin for PepeBot `.bforward` `.bsend` `.badd` `.brm` `.listchannels` `.search`""" import asyncio from uniborg.util import admin_cmd from telethon.tl.types import (InputMediaUploadedPhoto) from sql_helpers.ghdb_sql import in_channels, add_channel, rm_channel, get_all_channels from uniborg import MODULE MODULE.append("broadcast") logs_id = Config.PM_LOGGR_BOT_API_ID @borg.on(admin_cmd(pattern="bforward ?(.*)")) async def forw(event): if event.fwd_from: return if not event.is_reply: await event.edit("`Reply to a message to broadcast.`") return channels = get_all_channels() await event.edit("`Forwarding...`") error_count = 0 sent_count = 0 if event.reply_to_msg_id:
# By Priyam Kalra # Based on the note module made by RaphielGang (https://da.gd/X4Mnf) """Syntax: `.seb <notename> .get <notename> .clear <notename> .cleanall .rmbotnotes` """ from sql_helpers.global_variables_sql import LOGGER from sql_helpers.notes_sql import get_notes, rm_note, add_note, rm_all_notes from uniborg.util import admin_cmd import time from uniborg import MODULE, SYNTAX MODULE.append("notes") @borg.on(admin_cmd(pattern="notes ?(.*)")) async def _(svd): if svd.fwd_from: return notes = get_notes(svd.chat_id) message = "```There are no saved notes in this chat.```" if notes: message = "**Notes saved in this chat:** \n\n" for note in notes: message = message + "🔸 " + note.keyword + "\n" await svd.edit(message)