Пример #1
0
async def _(event):
    help_plugs = event.pattern_match.group(1).lower()
    if help_plugs:
        if help_plugs in CmdHelp:
            await event.edit(f"Details For 🗡 {CmdHelp[help_plugs]}")
        else:
            await event.edit(
                f"Nothign Is Named as {help_plugs} `.help` to see valid plugs")
    else:
        help_string = ""
        for i in CmdHelp.values():
            help_string += f"`{str(i[0])}`, "
        help_string = help_string[:-2]
        await event.edit("`Are You Commedy Me?`!\n\n" f"{help_string}")
        await asyncio.sleep(2)
        await event.edit("`Specify A Plugin`")
Пример #2
0
    shortname = event.pattern_match["shortname"]
    try:
        try:
            remove_plugin(shortname)
        except BaseException:
            pass
        load_module(shortname)
        await event.edit(f"Successfully loaded `{shortname}`")
    except Exception as e:
        await event.edit(
            f"Sorry, could not load {shortname} because of the following error.\n{str(e)}"
        )


CmdHelp("core").add_command(
    "install", "<reply to a .py file>",
    "Installs the replied python file if suitable to userbot codes"
).add_command(
    "uninstall", "<plugin name>",
    "Uninstalls the given plugin from userbot. To get that again do .restart",
    "uninstall alive").add_command(
        "load", "<plugin name>", "Loades the unloaded plugin to your userbot",
        "load alive").add_command(
            "unload", "<plugin name>", "Unloads the plugin from your userbot",
            "unload alive").add_command(
                "send", "<file name>",
                "Sends the given file from your userbot server, if any.",
                "send alive").add_command(
                    "cmds", None,
                    "Gives out the list of modules in HellBot.").add()
Пример #3
0
    try:
        await hell.client.send_file(hell.chat_id,
                                    outputfile,
                                    force_document=False,
                                    reply_to=hellid)
    except Exception as e:
        return await hell.edit(f"`{e}`")
    await hell.delete()
    os.remove(outputfile)
    for files in (hellsticker, meme_file):
        if files and os.path.exists(files):
            os.remove(files)


CmdHelp("img_fun").add_command(
    "frame", "<reply to img>",
    "Makes a frame for your media file.").add_command(
        "zoom", "<reply to img> <range>",
        "Zooms in the replied media file").add_command(
            "gray", "<reply to img>",
            "Makes your media file to black and white").add_command(
                "flip", "<reply to img>",
                "Shows you the upside down image of the given media file"
            ).add_command(
                "mirror", "<reply to img>",
                "Shows you the reflection of the replied image or sticker"
            ).add_command(
                "solarize", "<reply to img>",
                "Let the sun Burn your replied image/sticker").add_command(
                    "invert", "<reply to img>",
                    "Inverts the color of replied media file").add()
Пример #4
0
async def square(event):
    input_str = float(event.pattern_match.group(1))
    output = input_str * input_str
    await event.edit(f"**Square of** `{input_str}`\n== `{output}`")


@shinchanbot.on(admin_cmd(pattern="cube ?(.*)"))
@shinchanbot.on(sudo_cmd(pattern="cube ?(.*)", allow_sudo=True))
async def cube(event):
    input_str = float(event.pattern_match.group(1))  # DANGEROUSJATT
    output = input_str * input_str * input_str
    await event.edit(f"**Cube of** `{input_str}`\n== `{output}`")


CmdHelp("maths").add_command(
  "cube", "<query>", "Gives the cube of given number"
).add_command(
  "square", "<query>", "Gives the square of given number"
).add_command(
  "cot", "<query>", "Gives the cot of given query"
).add_command(
  "sec", "<query>", "Gives the sec of given query"
).add_command(
  "cosec", "<query>", "Gives the cosec of given query"
).add_command(
  "tan", "<query>", "Gives the tan of given query"
).add_command(
  "sin", "<query>", "Gives the sin of given query"
).add_command(
  "cos", "<query>", "Gives the cos of given query"
).add()
Пример #5
0
CmdHelp("fed_bot").add_command(
    "fban", "<reply to a msg>",
    "Forwards the replied fban msg to all groups added in your Fed Database",
    "Click` [here](https://telegra.ph/file/ab848eb3a3b4b94dfc726.jpg) `for an example"
).add_command(
    "fsearch", "<grp id>",
    "Gives out the username and group's name of the given group id.(IF ADDED IN FBAN DATABASE)"
).add_command(
    "fgroups",
    "Gives out the list of group ids you have connected to fban database"
).add_command(
    "fremove", "<group id> or in a group",
    "Removes the group from your fban database."
).add_command(
    "fremove all", None, "Removes the group from your fban database."
).add_command(
    "fadd", None, "Adds the group in your fban database."
).add_command(
    "unfban", "<reply to msg>",
    "Forwards the replied` /unfban <id>/<usrname> `to all groups added in your fban database",
    "reply to a msg (/unfban id/username)").add_command(
        "newfed", "<newfed name>",
        "Makes a federation of Rose bot").add_command(
            "renamefed", "<new name>",
            "Renames the fed of Rose Bot").add_command(
                "fstat", "<username/id>",
                "Gets the fban stats of the user from rose bot federation"
            ).add_command("fedinfo", "<fed id>",
                          "Gives details of the given fed id").add()
Пример #6
0
    shortname = event.pattern_match["shortname"]
    try:
        try:
            remove_plugin(shortname)
        except BaseException:
            pass
        load_module(shortname)
        await event.edit(f"Successfully loaded `{shortname}`")
    except Exception as e:
        await event.edit(
            f"Sorry, could not load {shortname} because of the following error.\n{str(e)}"
        )


CmdHelp("core").add_command(
    "install", "<reply to a .py file>",
    "Installs the replied python file if suitable to userbot codes. (TEMPORARILY DISABLED AS HACKERS MAKE YOU INSTALL SOME PLUGINS AND GET YOUR DATA)"
).add_command(
    "uninstall", "<plugin name>",
    "Uninstalls the given plugin from userbot. To get that again do .restart",
    "uninstall alive").add_command(
        "load", "<plugin name>", "Loades the unloaded plugin to your userbot",
        "load alive").add_command(
            "unload", "<plugin name>", "Unloads the plugin from your userbot",
            "unload alive").add_command(
                "send", "<file name>",
                "Sends the given file from your userbot server, if any.",
                "send alive").add_command(
                    "cmds", None,
                    "Gives out the list of modules in HellBot.").add()
Пример #7
0
    chat = "@DeezLoadBot"
    async with bot.conversation(chat) as conv:
        try:
            msg_start = await conv.send_message("/start")
            response = await conv.get_response()
            r = await conv.get_response()
            msg = await conv.send_message(d_link)
            details = await conv.get_response()
            song = await conv.get_response()
            """ - don't spam notif - """
            await bot.send_read_acknowledge(conv.chat_id)
        except YouBlockedUserError:
            await Deezlod.edit("**Error:** `unblock` @DeezLoadBot `and retry!`"
                               )
            return
        await bot.send_file(Deezlod.chat_id, song, caption=details.text)
        await Deezlod.client.delete_messages(
            conv.chat_id,
            [msg_start.id, response.id, r.id, msg.id, details.id, song.id])
        await Deezlod.delete()


from userbot.cmdhelp import CmdHelp

CmdHelp("gaana").add_command("spd", None,
                             "for searching songs from spotify").add_command(
                                 "dzd", None,
                                 "download music from deezer").add_command(
                                     "filext", None,
                                     "<.deezload spotify/deezerlink>").add()
Пример #8
0
from userbot import CmdHelp
from userbot.utils import admin_cmd


@borg.on(admin_cmd(pattern="copy"))
async def _(event):
    if event.fwd_from:
        return
    if event.reply_to_msg_id:
        previous_message = await event.get_reply_message()
        the_real_message = previous_message.text
        event.reply_to_msg_id
        the_real_message = the_real_message.replace("*", "*")
        the_real_message = the_real_message.replace("_", "_")
        await event.edit(the_real_message)
    else:
        await event.edit(".copy Reply to a  message to copy and paste")


CmdHelp("copy").add_command(
    "copy", "<Reply To User>", " To Copy Message").add_info(
        "Its Help U to Copy Message and auto send").add_warning(
            "Harmless Module✅").add_type("Official").add()
Пример #9
0
        return
    await eor(LEGENDevent, "Checking...")
    async with LEGENDevent.client.conversation(chat) as conv:
        try:
            response1 = conv.wait_event(
                events.NewMessage(incoming=True, from_users=461843263))
            response2 = conv.wait_event(
                events.NewMessage(incoming=True, from_users=461843263))
            response3 = conv.wait_event(
                events.NewMessage(incoming=True, from_users=461843263))
            await conv.send_message("/search_id {}".format(victim))
            response1 = await response1
            response2 = await response2
            response3 = await response3
        except YouBlockedUserError:
            await LEGENDevent.reply("Please unblock ( @Sangmatainfo_bot ) ")
            return
        if response1.text.startswith("No records found"):
            await eor(LEGENDevent, "User never changed his Username...")
        else:
            await LEGENDevent.delete()
            await LEGENDevent.client.send_message(LEGENDevent.chat_id,
                                                  response3.message)


CmdHelp("history").add_command(
    "history", "<reply to a user>",
    "Fetches the name history of replied user.").add_command(
        "unh", "<reply to user>",
        "Fetches the Username History of replied users.").add()
Пример #10
0
import asyncio

from userbot import CmdHelp, bot
from userbot.cmdhelp import CmdHelp
from userbot.utils import admin_cmd, sudo_cmd

CmdHelp("detail").add_command("detailed", None,
                              "help to get detail of plugin").add()


@bot.on(sudo_cmd(pattern="detailed ?(.*)", allow_sudo=True))
@bot.on(admin_cmd(pattern="detailed ?(.*)"))
async def _(event):
    help_plugs = event.pattern_match.group(1).lower()
    if help_plugs:
        if help_plugs in CmdHelp:
            await event.edit(f"Details For 🗡 {CmdHelp[help_plugs]}")
        else:
            await event.edit(
                f"Nothign Is Named as {help_plugs} `.help` to see valid plugs")
    else:
        help_string = ""
        for i in CmdHelp.values():
            help_string += f"`{str(i[0])}`, "
        help_string = help_string[:-2]
        await event.edit("`Are You Commedy Me?`!\n\n" f"{help_string}")
        await asyncio.sleep(2)
        await event.edit("`Specify A Plugin`")
Пример #11
0
        a = "🌺"
    b = giveVar[7:8]
    if not b:
        b = "✨"
    await event.edit(
        f"{b}{a}{b}{b}{a}{b}{a}{b}{b}{b}{b}{a}{a}{a}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{b}{b}{b}{b}{a}{b}{b}{a}{b}\n{b}{a}{a}{a}{a}{b}{a}{b}{b}{b}{b}{a}{b}{b}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{b}{b}{b}{b}{a}{b}{b}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{a}{a}{a}{b}{a}{a}{a}{a}{b}"
    )


@borg.on(admin_cmd(pattern=r"byes ?(.*)"))
async def bye(event):
    giveVar = event.text
    a = giveVar[5:6]
    if not a:
        a = "✨"
    b = giveVar[7:8]
    if not b:
        b = "🌺"
    await event.edit(
        f"╭━━┳╮╱╱╭┳━━━╮\n┃╭╮┃╰╮╭╯┃╭━━╯\n┃╰╯╰╮ {a}╭┫╰━━╮\n┃╭{b}╮┣╮╭╯┃╭━━╯\n┃╰{b}╯┃┃┃╱┃╰━━╮\n╰━━━╯╰╯╱╰━━━╯\n                              Lêɠêɳ̃dẞø†"
    )


CmdHelp("emotes").add_command(
    "hi <emoji>", None, "Try it yourself").add_command(
        "gws <emoji>", None, "Try it yourself").add_command(
            "hlo1 <emoji>", None, "Try it yourself").add_command(
                "his <emoji>", None,
                "Try it yourself").add_command("bye <emoji>", None,
                                               "Try it yourself").add()
Пример #12
0
    chat = "@carol5_bot"
    await event.edit(f"Trying to generate CC from the given bin `{hell_input}`"
                     )
    async with event.client.conversation(chat) as conv:
        try:
            response = conv.wait_event(
                events.NewMessage(incoming=True, from_users=1247032902))
            await event.client.send_message(chat, f"/gen {hell_input}")
            response = await response
        except YouBlockedUserError:
            await event.reply("Please Unblock @carol5_bot")
            return
        else:
            await event.delete()
            await event.client.send_message(event.chat_id, response.message)


CmdHelp("carder").add_command(
    "gencc", None, "Generates fake cc...").add_command(
        "ccheck", "<query>",
        "Checks that the given cc is live or not").add_command(
            "iban", "<query>",
            "Checks that the given IBAN ID is live or not").add_command(
                "key", "<query>",
                "Checks the status of probided key").add_command(
                    "vbv", "<query>",
                    "Checks the vbv status of given card").add_command(
                        "bin", "<query>",
                        "Checks that the given bin is valid or not"
                    ).add_command("ccbin", "<bin>",
                                  "Generates CC from the given bin.").add()
Пример #13
0
CmdHelp("img_fun").add_command(
    "frame", "<reply to img>",
    "Makes a frame for your media file.").add_command(
        "zoom", "<reply to img> <range>",
        "Zooms in the replied media file").add_command(
            "gray", "<reply to img>",
            "Makes your media file to black and white").add_command(
                "flip", "<reply to img>",
                "Shows you the upside down image of the given media file"
            ).add_command(
                "mirror",
                "<reply to img>",
                "Shows you the reflection of the replied image or sticker",
            ).add_command(
                "solarize", "<reply to img>",
                "Let the sun Burn your replied image/sticker").add_command(
                    "invert", "<reply to img>",
                    "Inverts the color of replied media file").add_command(
                        "trig", None, "🇮🇳🇮🇳🇮🇳"
                    ).add_command("wst", None, "Reply to image").add_command(
                        "grey", None, "Reply to image"
                    ).add_command("blur", None, "Reply To image").add_command(
                        "glass", None, "Use and see").add_command(
                            "ytc", None, "Use a d See").add_command(
                                "inter", None, "Use and see").add_command(
                                    "bright", None, "Use And See").add_command(
                                        "blrpl", None,
                                        "Use And See").add_command(
                                            "bloom",
                                            "set var DOWNLOAD_PFP_URL_CLOCK",
                                            "Use and See").add_type(
                                                "Addons").add()
Пример #14
0

@bot.on(admin_cmd("bigoofs"))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 0.1
    animation_ttl = range(0, 36)
    # input_str = event.pattern_match.group(1)
    # if input_str == "nope":
    await event.edit(
        "┏━━━┓╋╋╋╋┏━━━┓ \n┃┏━┓┃╋╋╋╋┃┏━┓┃ \n┃┃╋┃┣┓┏┓┏┫┃╋┃┃ \n┃┃╋┃┃┗┛┗┛┃┃╋┃┃ \n┃┗━┛┣┓┏┓┏┫┗━┛┃ \n┗━━━┛┗┛┗┛┗━━━┛"
    )
    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╰━━━┻━━┻━━┻━━╯╰╯",
    ]

    for i in animation_ttl:

        await asyncio.sleep(animation_interval)
        await event.edit(animation_chars[i % 40])


CmdHelp("bigoofs").add_command("bigoofs", "None", "Use And See").add()
Пример #15
0
import os

import requests

from LEGENDBOT.utils import admin_cmd, sudo_cmd
from userbot import CmdHelp


@bot.on(admin_cmd(pattern="picgen"))
@bot.on(sudo_cmd(pattern="picgen", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return

    url = "https://thispersondoesnotexist.com/image"
    response = requests.get(url)
    await event.edit("`Creating a fake face...`")
    if response.status_code == 200:
        with open("LEGENDBOT.jpg", "wb") as f:
            f.write(response.content)

    captin = f"Fake Image By LEGENDBOT."
    fole = "LEGENDBOT.jpg"
    await borg.send_file(event.chat_id, fole, caption=captin)
    await event.delete()
    os.system("rm /root/userbot/LEGENDBOT.jpg ")


CmdHelp("fakeimg").add_command("picgen", None, "Fake Pic Generation").add()
Пример #16
0
    if len(c) > 4095:
        await a.edit("`word limit of telegram is exceded!!! aborting...`")
    else:
        await event.client.send_message(event.chat_id, f"```{c}```")
        await a.delete()
    os.remove(b)


@hellbot.on(admin_cmd(pattern="repack ?(.*)", outgoing=True))
@hellbot.on(sudo_cmd(pattern="repack ?(.*)", allow_sudo=True))
async def _(event):
    a = await event.get_reply_message()
    input_str = event.pattern_match.group(1)
    b = open(input_str, "w")
    b.write(str(a.message))
    b.close()
    a = await edit_or_reply(event, f"Packing into `{input_str}`")
    await asyncio.sleep(2)
    await a.edit(f"Uploading `{input_str}`")
    await asyncio.sleep(2)
    await event.client.send_file(event.chat_id, input_str)
    await a.delete()
    os.remove(input_str)


CmdHelp("packer").add_command(
    "unpack", "<reply to a file>",
    "Read contents of file and send as a telegram message.").add_command(
        "repack", "<reply to text> <filename . extension>",
        "Packs the text and sends as a file of given extension",
        "<reply to text> example.py").add()
Пример #17
0
    input_str = event.pattern_match.group(1)
    input_sgra = input_str.split(".")
    if len(input_sgra) == 3:
        yyyy = input_sgra[0]
        mm = input_sgra[1]
        dd = input_sgra[2]
        required_url = "https://calendar.kollavarsham.org/api/years/{}/months/{}/days/{}?lang={}".format(
            yyyy, mm, dd, "en")
        headers = {"Accept": "application/json"}
        response_content = requests.get(required_url, headers=headers).json()
        a = ""
        if "error" not in response_content:
            current_date_detail_arraays = response_content["months"][0][
                "days"][0]
            a = json.dumps(current_date_detail_arraays,
                           sort_keys=True,
                           indent=4)
        else:
            a = response_content["error"]
        await event.edit(str(a))
    else:
        await event.edit("SYNTAX: .calendar YYYY.MM.DD")
    end = datetime.now()
    (end - start).seconds


CmdHelp("calendar").add_command(
    "calender", None, ".calender YYYY.MM.DD To Show Calender").add_info(
        "use .command with format of date YYYY.MM.DD").add_warning(
            "Harmless Module✅").add_type("Official").add()