Esempio n. 1
0
๏ปฟ"""Auto Profile Updation Commands
.autoname"""
import asyncio
import time

from telethon.errors import FloodWaitError
from telethon.tl import functions
from uniborg.util import pearl_on_cmd, edit_or_reply, sudo_cmd
from pearl import CMD_HELP
from pearl import ALIVE_NAME

DEL_TIME_OUT = 60
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Black Pearl"


@pearl.on(pearl_on_cmd(pattern="autoname"))  # pylint:disable=E0602
@pearl.on(sudo_cmd(pattern="autoname", allow_sudo=True))
async def _(event):
    sed = await edit_or_reply(event, "`Starting AutoName Please Wait`")
    if event.fwd_from:
        return

    while True:

        DM = time.strftime("%d-%m-%y")

        HM = time.strftime("%H:%M")

        name = f"๐Ÿ•’{HM} โš“{DEFAULTUSER}โš“ ๐Ÿ“…{DM}"

        logger.info(name)
Esempio n. 2
0
from uniborg.util import pearl_on_cmd


@pearl.on(pearl_on_cmd(pattern="tagall"))
async def _(event):
    if event.fwd_from:
        return
    mentions = "@tagall"
    chat = await event.get_input_chat()
    async for x in borg.iter_participants(chat, 100):
        mentions += f"[\u2063](tg://user?id={x.id})"
    await event.reply(mentions)
    await event.delete()
Esempio n. 3
0
PM_IMG = Config.ALIVE_IMAGE
pm_caption = "โžข **BLACK PEARL IS:** SAILING\n\n"
pm_caption += "โœชเผบ โ”€โ”€โ€ขโ—ˆโ€ขโ”€โ”€โ”€โ€ขโ—ˆโ€ขโ”€โ”€เผปโœช\n"
pm_caption += "โžข **SYSTEMS STATS**\n"
pm_caption += "โžข **Telethon Version:** `1.15.0` \n"
pm_caption += "โžข **Python:** `3.7.4` \n"
pm_caption += f"โžข **Uptime** : `{uptime}` \n"
pm_caption += "โžข **Database Status:**  `Functional`\n"
pm_caption += "โžข **Current Branch** : `master`\n"
pm_caption += f"โžข **Version** : `1.0`\n"
pm_caption += f"โžข **My Captian** : {DEFAULTUSER} \n"
pm_caption += "โžข **Heroku Database** : `AWS - WORKS LIKE A CHARM`\n"
pm_caption += "โžข **License** : [GNU General Public License v3.0](github.com/PEARLGANG/BlackPearl/blob/main/LICENSE)\n"
pm_caption += "โžข **Copyright** : By [Github](GitHub.com/PEARLGANG)\n"
pm_caption += "โžข **Check Stats By Doing** `.stat`. \n"
pm_caption += "โœชเผบ โ”€โ”€โ€ขโ—ˆโ€ขโ”€โ”€โ”€โ€ขโ—ˆโ€ขโ”€โ”€เผปโœช\n\n"
pm_caption += "โžข **[Deploy Black Pearl](https://heroku.com/deploy?template=https://github.com/PEARLGANG/BlackPearl)** \n"


@pearl.on(pearl_on_cmd(pattern=r"alive"))
@pearl.on(sudo_cmd(pattern=r"alive", allow_sudo=True))
async def pearl(alive):
    await alive.get_chat()
    """ For .alive command, check if the bot is running.  """
    await borg.send_file(alive.chat_id, PM_IMG, caption=pm_caption)
    await alive.delete()


CMD_HELP.update(
    {"alive": "`.alive`\nUsage - Check if Black Pearl is working."})
Esempio n. 4
0
"""Profile Updation Commands
.pbio <Bio>
.pname <Name>
.ppic"""
import os

from telethon.tl import functions
from uniborg.util import pearl_on_cmd


@pearl.on(pearl_on_cmd(pattern="pbio (.*)"))  # pylint:disable=E0602
async def _(event):
    if event.fwd_from:
        return
    bio = event.pattern_match.group(1)
    try:
        await borg(
            functions.account.UpdateProfileRequest(about=bio)  # pylint:disable=E0602
        )
        await event.edit("Succesfully changed my profile bio")
    except Exception as e:  # pylint:disable=C0103,W0703
        await event.edit(str(e))


@pearl.on(pearl_on_cmd(pattern="pname ((.|\n)*)"))  # pylint:disable=E0602,W0703
async def _(event):
    if event.fwd_from:
        return
    names = event.pattern_match.group(1)
    first_name = names
    last_name = ""
Esempio n. 5
0
""".admin Plugin """
from telethon.tl.types import ChannelParticipantsAdmins
from uniborg.util import pearl_on_cmd
from pearl import CMD_HELP


@pearl.on(pearl_on_cmd(pattern="admins"))
async def _(event):
    if event.fwd_from:
        return
    mentions = "@admin: **Spam Spotted**"
    chat = await event.get_input_chat()
    async for x in borg.iter_participants(chat,
                                          filter=ChannelParticipantsAdmins):
        mentions += f"[\u2063](tg://user?id={x.id})"
    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()


CMD_HELP.update({
    "calladmin":
    ".admins\nUsage : use this plugin to mention all the admins in a group."
})
Esempio n. 6
0
"""
Pulls Up A Random string.
cmd: .lol
"""
import asyncio
import random

from uniborg.util import pearl_on_cmd


@pearl.on(pearl_on_cmd(pattern=r"lol"))
async def _(event):

    if event.fwd_from:

        return

    await event.edit("Typing...")

    await asyncio.sleep(2)

    x = random.randrange(1, 28)
    if x == 1:
        await event.edit(";l;;o;;l;")
    if x == 2:
        await event.edit("lloll")
    if x == 3:
        await event.edit(";l;o;l;")
    if x == 4:
        await event.edit("lo/;l")
    if x == 5:
Esempio n. 7
0
from uniborg.util import pearl_on_cmd


@pearl.on(pearl_on_cmd(pattern=r"test"))
async def test(event):
    if event.fwd_from:
        return
    await event.edit("Black Pearl Is Sailing At Full Speed!")
Esempio n. 8
0
from datetime import datetime

from telethon.tl.types import Channel, Chat, User
from uniborg.util import pearl_on_cmd

from pearl import bot


@bot.on(pearl_on_cmd(pattern=r"stats"))
async def _(event):
    if event.fwd_from:
        return
    start = datetime.now()
    u = 0
    g = 0
    c = 0
    bc = 0
    b = 0
    dialogs = await bot.get_dialogs(limit=None, ignore_migrated=True)
    for d in dialogs:
        currrent_entity = d.entity
        if type(currrent_entity) is User:
            if currrent_entity.bot:
                b += 1
            else:
                u += 1
        elif type(currrent_entity) is Chat:
            g += 1
        elif type(currrent_entity) is Channel:
            if currrent_entity.broadcast:
                bc += 1
Esempio n. 9
0
    "`You should try sleeping forever.`",
    "`Pick up a gun and shoot yourself.`",
    "`Try bathing with Hydrochloric Acid instead of water.`",
    "`Go Green! Stop inhaling Oxygen.`",
    "`God was searching for you. You should leave to meet him.`",
    "`You should Volunteer for target in an firing range.`",
    "`Try playing catch and throw with RDX its fun.`",
    "`People like you are the reason we have middle fingers.`",
    "`When your mom dropped you off at the school, she got a ticket for littering.`",
    "`Youรขโ‚ฌโ„ขre so ugly that when you cry, the tears roll down the back of your headรขโ‚ฌยฆjust to avoid your face.`",
    "`If youรขโ‚ฌโ„ขre talking behind my back then youรขโ‚ฌโ„ขre in a perfect position to kiss my a**!.`",
]
# ===========================================


@pearl.on(pearl_on_cmd(pattern="run ?(.*)"))
@pearl.on(sudo_cmd(pattern="run ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    bro = random.randint(0, len(RUNSREACTS) - 1)
    event.pattern_match.group(1)
    reply_text = RUNSREACTS[bro]
    await edit_or_reply(event, reply_text)


@pearl.on(pearl_on_cmd(pattern="metoo ?(.*)"))
@pearl.on(sudo_cmd(pattern="metoo ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
Esempio n. 10
0
import asyncio

from uniborg.util import pearl_on_cmd


@pearl.on(pearl_on_cmd(pattern="type (.*)"))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    shiiinabot = "\u2060"
    for i in range(601):
        shiiinabot += "\u2060"
    try:
        await event.edit(shiiinabot)
    except Exception as e:
        logger.warn(str(e))
    typing_symbol = "|"
    DELAY_BETWEEN_EDITS = 0.3
    previous_text = ""
    await event.edit(typing_symbol)
    await asyncio.sleep(DELAY_BETWEEN_EDITS)
    for character in input_str:
        previous_text = previous_text + "" + character
        typing_text = previous_text + "" + typing_symbol
        try:
            await event.edit(typing_text)
        except Exception as e:
            logger.warn(str(e))
        await asyncio.sleep(DELAY_BETWEEN_EDITS)
        try:
Esempio n. 11
0
"""Get Poll Info on non supported clients
Syntax: poll"""
from uniborg.util import pearl_on_cmd


@pearl.on(pearl_on_cmd(pattern="poll"))
async def _(event):
    reply_message = await event.get_reply_message()
    if reply_message.media is None:
        await event.edit(
            "Please reply to a media_type == @gPoll to view the questions and answers"
        )
    elif reply_message.media.poll is None:
        await event.edit(
            "Please reply to a media_type == @gPoll to view the questions and answers"
        )
    else:
        media = reply_message.media
        poll = media.poll
        closed_status = poll.closed
        answers = poll.answers
        question = poll.question
        edit_caption = """Poll is Closed: {}
Question: {}
Answers: \n""".format(
            closed_status, question
        )
        if closed_status:
            results = media.results
            i = 0
            for result in results.results:
Esempio n. 12
0
"""Syntax: .coinflip [optional_choice]"""
import random

from uniborg.util import pearl_on_cmd
from pearl import CMD_HELP

@pearl.on(pearl_on_cmd(pattern="coin ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    r = random.randint(1, 100)
    input_str = event.pattern_match.group(1)
    if input_str:
        input_str = input_str.lower()
    if r % 2 == 1:
        if input_str == "Heads":
            await event.edit("The coin landed on: **Heads**. \n K You Win .")
        elif input_str == "Tails":
            await event.edit(
                "The coin landed on: **Heads**. \n Sed Laife, You weren't correct, try again ..."
            )
        else:
            await event.edit("The coin landed on: **Heads**.")
    elif r % 2 == 0:
        if input_str == "Tails":
            await event.edit("The coin landed on: **Tails**. \n K You Win.")
        elif input_str == "Heads":
            await event.edit(
                "The coin landed on: **Tails**. \n Sed Laife, You weren't correct, try again ..."
            )
        else:
Esempio n. 13
0
from uniborg.util import pearl_on_cmd


@pearl.on(pearl_on_cmd(pattern=r"gaali"))
async def test(event):
    if event.fwd_from:
        return
    await event.edit(
        "`teri behen ko๐Ÿ˜ƒ๐Ÿ˜ƒMera lunddd mil jai ๐Ÿคฅ๐Ÿคฅ... Tere Gand Me Panaah Mil Jaye,๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆUska Gand Maru๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ To Gand Tabah Ho Jaye,๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•Raaz Chhupane Ke Liye Tu Mujhse Hi Gand Marwaye,๐Ÿคฃ๐Ÿ˜‚๐Ÿคฃ๐Ÿ˜‚๐ŸคฃAur Marwate -Marwate ๐Ÿ˜ด๐Ÿ˜ด๐Ÿ˜žFana Ho Jeyeโ€ฆ!๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃsale bhosdiwale๐Ÿ™„๐Ÿ™„๐Ÿ™„ teri behen ko๐Ÿ˜ƒ๐Ÿ˜ƒMera lunddd mil jai ๐Ÿคฅ๐Ÿคฅ... Tere Gand Me Panaah Mil Jaye,๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆUska Gand Maru๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ To Gand Tabah Ho Jaye,๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•Raaz Chhupane Ke Liye Tu Mujhse Hi Gand Marwaye,๐Ÿคฃ๐Ÿ˜‚๐Ÿคฃ๐Ÿ˜‚๐ŸคฃAur Marwate -Marwate ๐Ÿ˜ด๐Ÿ˜ด๐Ÿ˜žFana Ho Jeyeโ€ฆ!๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃsale bhosdiwale๐Ÿ™„๐Ÿ™„๐Ÿ™„ teri behen ko๐Ÿ˜ƒ๐Ÿ˜ƒMera lunddd mil jai ๐Ÿคฅ๐Ÿคฅ... Tere Gand Me Panaah Mil Jaye,๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆUska Gand Maru๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ To Gand Tabah Ho Jaye,๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•Raaz Chhupane Ke Liye Tu Mujhse Hi Gand Marwaye,๐Ÿคฃ๐Ÿ˜‚๐Ÿคฃ๐Ÿ˜‚๐ŸคฃAur Marwate -Marwate ๐Ÿ˜ด๐Ÿ˜ด๐Ÿ˜žFana Ho Jeyeโ€ฆ!๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃsale sasti randi k bacche๐Ÿ™„๐Ÿ™„๐Ÿ™„ teri behen ko๐Ÿ˜ƒ๐Ÿ˜ƒMera lunddd mil jai ๐Ÿคฅ๐Ÿคฅ... Tere Gand Me Panaah Mil Jaye,๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆ๐Ÿ™ˆUska Gand Maru๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ To Gand Tabah Ho Jaye,๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•๐Ÿ–•Raaz Chhupane Ke Liye Tu Mujhse Hi Gand Marwaye,๐Ÿคฃ๐Ÿ˜‚๐Ÿคฃ๐Ÿ˜‚๐ŸคฃAur Marwate -Marwate ๐Ÿ˜ด๐Ÿ˜ด๐Ÿ˜žFana Ho Jeyeโ€ฆ!๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜›๐Ÿ˜‚๐Ÿคฃ๐Ÿคฃ๐Ÿ˜ˆ๐’†œโ˜…ๅฝกเผบ( โ‚ฎษ†โฑคโ‚ณ เธฟโ‚ณโ‚ณโ‚ฑ {ึ„ษจศถวŸสษจ}เผบ๐’†œโ˜…ๅฝก๐Ÿ˜ˆ๐Ÿ”ฑ TERI MAA KO ITNA CHODA KI WO MAR GYI AUR USKA ANTIM SANSKAR VI NHI HO PAYA APNI MAMI MT CHUDAO BETE AB APNI MOSI KO VEJO USHE CHODUNGA TERI MAA KA CHUT MAI JCB SE KADAR DUNGA RANDI KE BACHE SUWAR KI OLAD BEHENCHOD KI GAND SALE TAATI KE PAIDAIS TERE GAND MAI YESA LODA MARUNGA NA KAHI GAND DENE LAKYAK NHI RAHEGA๐Ÿ”ฅ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ TERI BEHEN KI GAND MAI APNA MOTHA SA HATORA GUSAUNGA NA MAAJA AAGYEGA๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ๐Ÿ’ฆ`"
    )
Esempio n. 14
0
"""Emoji
Available Commands:
.hack"""

from telethon import events

import asyncio
from uniborg.util import pearl_on_cmd
from telethon.tl.functions.users import GetFullUserRequest
from uniborg.util import edit_or_reply



@pearl.on(pearl_on_cmd(pattern=r"hack"))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 2
    animation_ttl = range(0, 11)
    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
        useri_d = event.sender_id
        if useri_d == "" :
            await event.edit("This is My Master\nI can't hack my master's Account\n**How dare you trying to hack my master's account nigger!**\n\n__Your account has been hacked! Pay 69$ to my master__ @riderprovider2op __to release your account__")
        else:
            await event.edit("Hacking..")
            animation_chars = [
            "`Hacking... 0%\nโ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’ `\n\n\n  TERMINAL:\nDownloading Bruteforce-Telegram-0.1.tar.gz (9.3 kB)",
Esempio n. 15
0
    "chucks",
    "hurls",
]

HIT = [
    "hits",
    "whacks",
    "slaps",
    "smacks",
    "bashes",
]

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Black Pearl"


@pearl.on(pearl_on_cmd(pattern="slap ?(.*)"))
async def who(event):
    if event.fwd_from:
        return
    replied_user = await get_user(event)
    caption = await slap(replied_user, event)
    message_id_to_reply = event.message.reply_to_msg_id

    if not message_id_to_reply:
        message_id_to_reply = None

    try:
        await event.edit(caption)

    except:
        await event.edit("`Can't slap this nibba !!`")