コード例 #1
0
ファイル: autoname.py プロジェクト: darkwavez/BlackPearl
"""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)
コード例 #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()
コード例 #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."})
コード例 #4
0
ファイル: profile.py プロジェクト: darkwavez/BlackPearl
"""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 = ""
コード例 #5
0
ファイル: calladmin.py プロジェクト: darkwavez/BlackPearl
""".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."
})
コード例 #6
0
ファイル: lol.py プロジェクト: darkwavez/BlackPearl
"""
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:
コード例 #7
0
ファイル: test.py プロジェクト: darkwavez/BlackPearl
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!")
コード例 #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
コード例 #9
0
ファイル: fun.py プロジェクト: darkwavez/BlackPearl
    "`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
コード例 #10
0
ファイル: typing.py プロジェクト: darkwavez/BlackPearl
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:
コード例 #11
0
ファイル: polls.py プロジェクト: darkwavez/BlackPearl
"""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:
コード例 #12
0
ファイル: coinflip.py プロジェクト: darkwavez/BlackPearl
"""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:
コード例 #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💦💦💦💦`"
    )
コード例 #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)",
コード例 #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 !!`")