Exemple #1
0
# credits to @mrconfused
import io
import sys
import traceback

from userbot import CMD_HELP
from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="calc (.*)"))
@bot.on(sudo_cmd(pattern="calc (.*)", allow_sudo=True))
async def _(car):
    if car.fwd_from:
        return
    cmd = car.text.split(" ", maxsplit=1)[1]
    event = await edit_or_reply(car, "Calculating ...")
    old_stderr = sys.stderr
    old_stdout = sys.stdout
    redirected_output = sys.stdout = io.StringIO()
    redirected_error = sys.stderr = io.StringIO()
    stdout, stderr, exc = None, None, None
    san = f"print({cmd})"
    try:
        await aexec(san, event)
    except Exception:
        exc = traceback.format_exc()
    stdout = redirected_output.getvalue()
    stderr = redirected_error.getvalue()
    sys.stdout = old_stdout
    sys.stderr = old_stderr
Exemple #2
0
"""Emoji
Available Commands:
.wahack
by © Thunder God Raiden

"""


import asyncio

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply


@bot.on(admin_cmd(pattern=f"wahack", outgoing=True))
@bot.on(sudo_cmd(pattern=f"wahack", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 2
    animation_ttl = range(0, 15)
    # input_str = event.pattern_match.group(1)
    # if input_str == "wahack":
    await edit_or_reply(event, "wahack..")

    animation_chars = [
        "Looking for WhatsApp databases in targeted person...",
        " User online: True\nTelegram access: True\nRead Storage: True ",
        "Hacking... 0%\n[░░░░░░░░░░░░░░░░░░░░]\n`Looking for WhatsApp...`\nETA: 0m, 20s",
        "Hacking... 11.07%\n[██░░░░░░░░░░░░░░░░░░]\n`Looking for WhatsApp...`\nETA: 0m, 18s",
        "Hacking... 20.63%\n[███░░░░░░░░░░░░░░░░░]\n`Found folder C:/WhatsApp`\nETA: 0m, 16s",
        "Hacking... 34.42%\n[█████░░░░░░░░░░░░░░░]\n`Found folder C:/WhatsApp`\nETA: 0m, 14s",
Exemple #3
0
import io
import os
import time
from asyncio import create_subprocess_exec as asyncrunapp
from asyncio.subprocess import PIPE as asyncPIPE

from darkbot.utils import admin_cmd
from userbot.cmdhelp import CmdHelp

if not os.path.isdir("./SAVED"):
    os.makedirs("./SAVED")
if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
    os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)


@borg.on(admin_cmd(outgoing=True, pattern="pips(?: |$)(.*)"))
async def pipcheck(pip):
    pipmodule = pip.pattern_match.group(1)
    if pipmodule:
        await pip.edit("`Searching . . .`")
        pipc = await asyncrunapp(
            "pip3",
            "search",
            pipmodule,
            stdout=asyncPIPE,
            stderr=asyncPIPE,
        )

        stdout, stderr = await pipc.communicate()
        pipout = str(stdout.decode().strip()) + str(stderr.decode().strip())
Exemple #4
0
"""Thakn You @pureindialover
"""
import asyncio

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp
from userbot.plugins.sql_helper.mute_sql import is_muted, mute, unmute


@bot.on(admin_cmd(pattern="mute ?(\d+)?", outgoing=True))
@bot.on(sudo_cmd(pattern="mute ?(\d+)?", allow_sudo=True))
async def startmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await edit_or_reply(event, "Shut The Fukk Up!!!!!")
        await asyncio.sleep(3)
        private = True
    if any([
            x in event.raw_text for x in (
                "/mute",
                "!mute",
                "amute",
                "bmute",
                "cmute",
                "dmute",
                "emute",
                "fmute",
                "gmute",
                "hmute",
Exemple #5
0
from telethon import events, utils
from telethon.tl import types
from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp
from userbot.plugins.sql_helper.filter_sql import get_filter, add_filter, remove_filter, get_all_filters, remove_all_filters

DELETE_TIMEOUT = 0
TYPE_TEXT = 0
TYPE_PHOTO = 1
TYPE_DOCUMENT = 2

global last_triggered_filters
last_triggered_filters = {}  # pylint:disable=E0602


@bot.on(admin_cmd(incoming=True))
async def on_snip(event):
    global last_triggered_filters
    name = event.raw_text
    if event.chat_id in last_triggered_filters:
        if name in last_triggered_filters[event.chat_id]:
            # avoid userbot spam
            # "I demand rights for us bots, we are equal to you humans." -Henri Koivuneva (t.me/UserbotTesting/2698)
            return False
    snips = get_all_filters(event.chat_id)
    if snips:
        for snip in snips:
            pattern = r"( |^|[^\w])" + re.escape(snip.keyword) + r"( |$|[^\w])"
            if re.search(pattern, name, flags=re.IGNORECASE):
                if snip.snip_type == TYPE_PHOTO:
                    media = types.InputPhoto(int(snip.media_id),
Exemple #6
0
# 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.0/.
"""WikiPedia.ORG
Syntax: .wikipedia Query"""

import wikipedia
from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="wikipedia (.*)"))
@bot.on(sudo_cmd(pattern="wikipedia (.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    await edit_or_reply(event, "Processing ...")
    input_str = event.pattern_match.group(1)
    result = ""
    results = wikipedia.search(input_str)
    for s in results:
        page = wikipedia.page(s)
        url = page.url
        result += f"> [{s}]({url}) \n"
    await edit_or_reply(
        event, "WikiPedia **Search**: {} \n\n **Result**: \n\n{}".format(
            input_str, result))


CmdHelp("wikipedia").add_command(
    "wikipedia", "<query>", "Searches for the query from Wikipedia").add()
import io
import os
import time

from telethon import events

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp

if not os.path.isdir("./SAVED"):
    os.makedirs("./SAVED")
if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
    os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)


@bot.on(admin_cmd(pattern="ls ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="ls ?(.*)", allow_sudo=True))
async def lst(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    if input_str:
        msg = "📂 **Files in {} :**\n".format(input_str)
        files = os.listdir(input_str)
    else:
        msg = "📂 **Files in Current Directory :**\n"
        files = os.listdir(os.getcwd())
    for file in files:
        msg += "📑 `{}`\n".format(file)
    if len(msg) <= Config.MAX_MESSAGE_SIZE_LIMIT:
        await edit_or_reply(event, msg)
Exemple #8
0
# PLUGIN MADE BY DANGEROUSJATT
# KEEP CREDIT
# MADE FOR HELLBOT
# BY TEAM HELLBOT
# NOW IN darkbot
import math

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply

from userbot import CmdHelp
from userbot import bot as darkbot


@darkbot.on(admin_cmd(pattern="sin ?(.*)"))
@darkbot.on(sudo_cmd(pattern="sin ?(.*)", allow_sudo=True))
async def findsin(event):
    input_str = int(event.pattern_match.group(1))
    output = math.sin(input_str)
    await event.edit(f"**Value of Sin** `{input_str}`\n== `{output}`")


@darkbot.on(admin_cmd(pattern="cos ?(.*)"))
@darkbot.on(sudo_cmd(pattern="cos ?(.*)", allow_sudo=True))
async def find_cos(event):
    input_str = int(event.pattern_match.group(1))
    output = math.cos(input_str)
    await event.edit(f"**Value of Cos** `{input_str}`\n== `{output}`")


@darkbot.on(admin_cmd(pattern="tan ?(.*)"))
@darkbot.on(sudo_cmd(pattern="tan ?(.*)", allow_sudo=True))
Exemple #9
0
    rnd = random.randint(0, len(PACK) - 1)
    pack = PACK[rnd]
    pc = requests.get("http://getwallpapers.com/collection/" + pack).text
    f = re.compile("/\w+/full.+.jpg")
    f = f.findall(pc)
    fy = "http://getwallpapers.com" + random.choice(f)
    print(fy)
    if not os.path.exists("f.ttf"):
        urllib.request.urlretrieve(
            "https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf",
            "f.ttf",
        )
    urllib.request.urlretrieve(fy, "donottouch.jpg")


@bot.on(admin_cmd(pattern="ppr ?(.*)", outgoing=True))
async def main(event):
    await event.edit(
        "**Starting Profile Pic Runner by @darkbot_Support ..**"
    )  # Owner @Kraken_The_BadASS
    while True:
        try:
            await animepp()
            file = await event.client.upload_file("donottouch.jpg")
            await event.client(
                functions.photos.DeletePhotosRequest(
                    await event.client.get_profile_photos("me", limit=1)
                )
            )
            await event.client(functions.photos.UploadProfilePhotoRequest(file))
            os.system("rm -rf donottouch.jpg")
Exemple #10
0
import asyncio

from userbot import CMD_HELP
from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp

@bot.on(admin_cmd(pattern=f"quickheal$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"quickheal$", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 5
    animation_ttl = range(11)
    event = await edit_or_reply(event, "quickheal")
    animation_chars = [
        "`Downloading File..`",
        "`File Downloaded....`",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 0%\n▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 4%\n█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 8%\n██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 20%\n█████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 36%\n█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 52%\n█████████████▒▒▒▒▒▒▒▒▒▒▒▒ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 84%\n█████████████████████▒▒▒▒ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 100%\n█████████████████████████ `",
        "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nTask: 01 of 01 Files Scanned...\n\nResult: No Virus Found...`",
    ]
    for i in animation_ttl:
        await asyncio.sleep(animation_interval)
        await event.edit(animation_chars[i % 11])
Exemple #11
0
import time

from telethon.events import NewMessage
from telethon.tl.custom import Dialog
from telethon.tl.types import Channel, Chat, User

from userbot import CMD_HELP
from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="stats$"))
@bot.on(sudo_cmd(pattern="stats$", allow_sudo=True))
async def stats(
    event: NewMessage.Event,
) -> None:  # pylint: disable = R0912, R0914, R0915
    """Command to get stats about the account"""
    dark = await edit_or_reply(event, "`Collecting stats...`")
    start_time = time.time()
    private_chats = 0
    bots = 0
    groups = 0
    broadcast_channels = 0
    admin_in_groups = 0
    creator_in_groups = 0
    admin_in_broadcast_channels = 0
    creator_in_channels = 0
    unread_mentions = 0
    unread = 0
    dialog: Dialog
    async for dialog in event.client.iter_dialogs():
Exemple #12
0
# PLUGIN MADE BY @H1M4N5HU0P FOR darkbot
# KEEP CREDITS ELSE GAY

import random, re
from darkbot.utils import admin_cmd
import asyncio
from telethon import events


@borg.on(admin_cmd(pattern="hklove", outgoing=True))
async def _(event):
    await event.edit(
        "❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘❤😘"
    )
    await asyncio.sleep(1)
    await event.edit(
        "🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘🧡😘"
    )
    await asyncio.sleep(1)
    await event.edit(
        "💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘💛😘"
    )
    await asyncio.sleep(1)
    await event.edit(
        "💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘💚😘"
    )
    await asyncio.sleep(1)
    await event.edit(
        "💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘💙😘"
    )
    await asyncio.sleep(1)
Exemple #13
0
from telethon.errors.rpcerrorlist import MessageTooLongError
from telethon.tl.functions.channels import (
    GetFullChannelRequest,
    GetParticipantsRequest,
    LeaveChannelRequest,
)
from telethon.tl.functions.messages import GetFullChatRequest, GetHistoryRequest
from telethon.tl.types import ChannelParticipantsAdmins, MessageActionChannelMigrateFrom
from telethon.utils import get_input_location

from userbot import CMD_HELP
from darkbot.utils import admin_cmd, errors_handler, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="chatinfo(?: |$)(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="chatinfo(?: |$)(.*)", allow_sudo=True))
async def info(event):
    if event.fwd_from:
        return
    await edit_or_reply(event, "`Analysing the chat...`")
    chat = await get_chatinfo(event)
    caption = await fetch_info(chat, event)
    try:
        await edit_or_reply(event, caption, parse_mode="html")
    except Exception as e:
        print("Exception:", e)
        await edit_or_reply(event, "`An unexpected error has occurred.`")
    return

Exemple #14
0
from telethon.tl.types import (
    ChannelParticipantAdmin,
    ChannelParticipantCreator,
    ChannelParticipantsAdmins,
    ChannelParticipantsBots,
)
from telethon.utils import pack_bot_file_id

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp

@bot.on(admin_cmd(pattern="get_admins ?(.*)"))
@bot.on(sudo_cmd(pattern="get_admins ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    mentions = "**⚜️ Admins in this Group ⚜️**: \n"
    reply_message = None
    if event.reply_to_msg_id:
        reply_message = await event.get_reply_message()
    input_str = event.pattern_match.group(1)
    to_write_chat = await event.get_input_chat()
    chat = None
    if input_str:
        mentions_heading = "Admins in {} Group: \n".format(input_str)
        mentions = mentions_heading
        try:
            chat = await event.client.get_entity(input_str)
        except Exception as e:
            await edit_or_reply(event, str(e))
            return None
Exemple #15
0
import asyncio

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply


@bot.on(admin_cmd(pattern="unoob$", outgoing=True))
@bot.on(sudo_cmd(pattern="unoob$", allow_sudo=True))
async def _(event):

    if event.fwd_from:

        return

    animation_interval = 0.5

    animation_ttl = range(0, 9)

    await edit_or_reply(event, "You Noob")

    animation_chars = [
        "EvErYbOdY",
        "iZ",
        "BiGGeSt",
        "NoOoB",
        "uNtiL",
        "YoU",
        "aRriVe",
        "😈",
        "EvErYbOdY iZ BiGGeSt NoOoB uNtiL YoU aRriVe 😈",
    ]
Exemple #16
0
from telethon.tl import functions
from telethon.tl.types import (
    ChannelParticipantsKicked,
    ChatBannedRights,
    UserStatusEmpty,
    UserStatusLastMonth,
    UserStatusLastWeek,
    UserStatusOffline,
    UserStatusOnline,
    UserStatusRecently,
)
from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern=r"unbanall ?(.*)"))
@bot.on(sudo_cmd(pattern=r"unbanall ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    if input_str:
        logger.info("TODO: Not yet Implemented")
    else:
        if event.is_private:
            return False
        await edit_or_reply(event, "Searching Participant Lists.")
        p = 0
        async for i in borg.iter_participants(event.chat_id,
                                              filter=ChannelParticipantsKicked,
                                              aggressive=True):
Exemple #17
0
    )


async def add_frame(imagefile, endname, x, color):
    image = Image.open(imagefile)
    inverted_image = PIL.ImageOps.expand(image, border=x, fill=color)
    inverted_image.save(endname)


async def crop(imagefile, endname, x):
    image = Image.open(imagefile)
    inverted_image = PIL.ImageOps.crop(image, border=x)
    inverted_image.save(endname)


@darkbot.on(admin_cmd(pattern="invert$", outgoing=True))
@darkbot.on(sudo_cmd(pattern="invert$", allow_sudo=True))
async def memes(dark):
    if dark.fwd_from:
        return
    reply = await dark.get_reply_message()
    if not (reply and (reply.media)):
        await edit_or_reply(dark, "`Reply to supported Media...`")
        return
    darkid = dark.reply_to_msg_id
    if not os.path.isdir("./temp/"):
        os.mkdir("./temp/")
    dark = await edit_or_reply(dark, "`Fetching media data`")
    from telethon.tl.functions.messages import ImportChatInviteRequest as Get

    await asyncio.sleep(2)
Exemple #18
0
def progress(current, total):
    logger.info(
        "Downloaded {} of {}\nCompleted {}".format(
            current, total, (current / total) * 100
        )
    )


DOGBIN_URL = "https://del.dog/"

BOTLOG_CHATID = Config.PRIVATE_GROUP_BOT_API_ID
BOTLOG = True


@bot.on(admin_cmd(pattern="paste ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="paste ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    start = datetime.now()
    if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
        os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
    input_str = event.pattern_match.group(1)
    message = "SYNTAX: `.paste <long text to include>`"
    if input_str:
        message = input_str
    elif event.reply_to_msg_id:
        previous_message = await event.get_reply_message()
        if previous_message.media:
            downloaded_file_name = await borg.download_media(
Exemple #19
0
import os
import random
import textwrap

from PIL import Image, ImageDraw, ImageFont
from telethon.tl.types import InputMessagesFilterDocument

from userbot import bot
from userbot.helpers.functions import deEmojify
from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp

# RegEx by https://t.me/c/1220993104/50065


@bot.on(admin_cmd(pattern="waifu(?: |$)(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="waifu(?: |$)(.*)", allow_sudo=True))
async def waifu(animu):
    # """Creates random anime sticker!"""

    text = animu.pattern_match.group(1)
    if not text:
        if animu.is_reply:
            text = (await animu.get_reply_message()).message
        else:
            await animu.edit("`You haven't written any article, Waifu is going away.`")
            return
    animus = [1, 3, 7, 9, 13, 22, 34, 35, 36, 37, 43, 44, 45, 52, 53, 55]
    sticcers = await bot.inline_query(
        "stickerizerbot", f"#{random.choice(animus)}{(deEmojify(text))}"
    )
Exemple #20
0
# Credit To @Kraken_The_BadASS . Keep credit if you are going to edit it. Join @HellBot_Official

import asyncio

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="test ?(.*)"))
@bot.on(sudo_cmd(pattern="test ?(.*)", allow_sudo=True))
async def _(event):
    if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@",
                                                             "!"):

        await edit_or_reply(event, "`Testing darkbot`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing darkbot.`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing darkbot..`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing darkbot...`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing darkbot....`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing darkbot.....`")
        await asyncio.sleep(2)
        await edit_or_reply(event, "__Testing Successful__")
        await asyncio.sleep(2)
        await edit_or_reply(event, "`Generating Output`\nPlease wait")
        await asyncio.sleep(2)
        await edit_or_reply(event, "__Output Generated Successfully__")
Exemple #21
0
.shutdown"""
# This Source Code Form is subject to the terms of the GNU
# General Public License, v.3.0. If a copy of the GPL was not distributed with this
# file, You can obtain one at https://www.gnu.org/licenses/gpl-3.0.en.html
import os
import sys
import asyncio
from os import execl
from time import sleep

from darkbot.utils import admin_cmd
from userbot.cmdhelp import CmdHelp
from userbot import HEROKU_APP, bot


@bot.on(admin_cmd(pattern="restart"))
async def _(event):
    if event.fwd_from:
        return
    await event.edit(
        "Restarting **[ ░░░ ]** ...\nType `.ping` or `.help` to check if I am working 🙂"
    )
    await event.edit(
        "Restarting **[ █░░ ]** ...\nType `.ping` or `.help` to check if I am working 🙂"
    )
    await event.edit(
        "Restarting **[ ██░ ]** ...\nType `.ping` or `.help` to check if I am working 🙂"
    )
    await event.edit(
        "Restarting **[ ███ ]** ...\nType `.ping` or `.help` to check if I am working 🙂"
    )
Exemple #22
0
from userbot.google_imgs import googleimagesdownload
from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.Config import Config


async def reply_id(event):
    reply_to_id = None
    if event.sender_id in Config.SUDO_USERS:
        reply_to_id = event.id
    if event.reply_to_msg_id:
        reply_to_id = event.reply_to_msg_id
    return reply_to_id


@bot.on(admin_cmd(pattern=r"img(?: |$)(\d*)? ?(.*)"))
@bot.on(sudo_cmd(pattern=r"img(?: |$)(\d*)? ?(.*)", allow_sudo=True))
async def img_sampler(event):
    if event.fwd_from:
        return
    reply_to_id = await reply_id(event)
    if event.is_reply and not event.pattern_match.group(2):
        query = await event.get_reply_message()
        query = str(query.message)
    else:
        query = str(event.pattern_match.group(2))
    if not query:
        return await edit_or_reply(
            event, "Reply to a message or pass a query to search!")
    cat = await edit_or_reply(event, "`Processing...`")
    if event.pattern_match.group(1) != "":
Exemple #23
0
# Path to token json file, it should be in same directory as script
G_DRIVE_TOKEN_FILE = Var.TEMP_DOWNLOAD_DIRECTORY + "/auth_token.txt"
# Copy your credentials from the APIs Console
CLIENT_ID = Var.G_DRIVE_CLIENT_ID
CLIENT_SECRET = Var.G_DRIVE_CLIENT_SECRET
# Check https://developers.google.com/drive/scopes for all available scopes
OAUTH_SCOPE = "https://www.googleapis.com/auth/drive.file"
# Redirect URI for installed apps, can be left as is
REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"
parent_id = Var.GDRIVE_FOLDER_ID
G_DRIVE_DIR_MIME_TYPE = "application/vnd.google-apps.folder"


# @command(pattern="^.ugdrive ?(.*)")
@bot.on(admin_cmd(pattern=r"ugdrive ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern=r"ugdrive ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    mone = await edit_or_reply(event, "Processing ...")
    if CLIENT_ID is None or CLIENT_SECRET is None:
        await mone.edit(
            "This module requires credentials from https://da.gd/so63O. Aborting!"
        )
        return False
    input_str = event.pattern_match.group(1)
    if not os.path.isdir(Var.TEMP_DOWNLOAD_DIRECTORY):
        os.makedirs(Var.TEMP_DOWNLOAD_DIRECTORY)
    required_file_name = None
    start = datetime.now()
"""File Converter
.convert mp3 """

import asyncio
import os
import time
from datetime import datetime

from darkbot.utils import admin_cmd, progress, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="tomp3 (.*)"))
@bot.on(sudo_cmd(pattern="tomp3 (.*)"))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    reply_message = await event.get_reply_message()
    if reply_message is None:
        await edit_or_reply(
            event,
            "reply to a media to use the `nfc` operation.\nInspired by @FileConverterBot"
        )
        return
    await edit_or_reply(event, "trying to download media file, to my local")
    try:
        start = datetime.now()
        c_time = time.time()
        downloaded_file_name = await borg.download_media(
            reply_message,
Exemple #25
0
import io
import os
import random
import textwrap

from PIL import Image, ImageDraw, ImageFont
from telethon.tl.types import InputMessagesFilterDocument

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply


@bot.on(admin_cmd(pattern="text (.*)"))
@bot.on(sudo_cmd(pattern="text (.*)", allow_sudo=True))
async def sticklet(event):
    R = random.randint(0, 256)
    G = random.randint(0, 256)
    B = random.randint(0, 256)

    # get the input text
    # the text on which we would like to do the magic on
    sticktext = event.pattern_match.group(1)

    # delete the userbot command,
    await event.delete()

    # https://docs.python.org/3/library/textwrap.html#textwrap.wrap
    sticktext = textwrap.wrap(sticktext, width=10)
    # converts back the list to a string
    sticktext = "\n".join(sticktext)

    image = Image.new("RGBA", (512, 512), (255, 255, 255, 0))
Exemple #26
0
# PLUGIN MADE BY @H1M4N5HU0P FOR darkbot
# KEEP CREDITS ELSE GAY

import random, re
from darkbot.utils import admin_cmd
import asyncio
from telethon import events


@borg.on(admin_cmd(pattern="iloveyou ?(.*)"))
async def _(event):
    if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@",
                                                             "!"):
        await event.edit("""😘😘😘😘😘😘😘😘
😘😘😘😘😘😘😘😘
             😘😘😘
             😘😘😘
             😘😘😘
             😘😘😘
             😘😘😘
             😘😘😘
             😘😘😘
             😘😘😘 
             😘😘😘
😘😘😘😘😘😘😘😘
😘😘😘😘😘😘😘😘\n


😘😘
😘😘
😘😘
Exemple #27
0
async def animeppwall():
    rnd = random.randint(0, len(COLLECTION_STRING9) - 1)
    pack = COLLECTION_STRING9[rnd]
    pc = requests.get("http://getwallpapers.com/collection/" + pack).text
    f = re.compile(r"/\w+/full.+.jpg")
    f = f.findall(pc)
    fy = "http://getwallpapers.com" + random.choice(f)
    if not os.path.exists("f.ttf"):
        urllib.request.urlretrieve(
            "https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf",
            "f.ttf",
        )
    urllib.request.urlretrieve(fy, "donottouch.jpg")


@bot.on(admin_cmd(pattern="batmandp$"))
async def main(event):
    if event.fwd_from:
        return
    await event.edit("Actibated Batman Dp\nEnjoy 💜")
    while True:
        await animeppbat()
        file = await event.client.upload_file("donottouch.jpg")
        await event.client(
            functions.photos.DeletePhotosRequest(
                await event.client.get_profile_photos("me", limit=1)))
        await event.client(functions.photos.UploadProfilePhotoRequest(file))
        os.system("rm -rf donottouch.jpg")
        await asyncio.sleep(600)  # Edit this to your required needs

Exemple #28
0
from userbot import BOTLOG, BOTLOG_CHATID, bot
from userbot.Config import Config
from darkbot.utils import admin_cmd, register
from userbot.cmdhelp import CmdHelp

logging.basicConfig(
    format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
    level=logging.WARN)

NO_PM_LOG_USERS = []

BOTLOG = True
BOTLOG_CHATID = Config.PM_LOGGR_BOT_API_ID


@bot.on(admin_cmd(pattern=r"save(?: |$)([\s\S]*)", outgoing=True))
async def log(log_text):
    """ For .log command, forwards a message or the command argument to the bot logs group """
    if BOTLOG:
        if log_text.reply_to_msg_id:
            reply_msg = await log_text.get_reply_message()
            await reply_msg.forward_to(BOTLOG_CHATID)
        elif log_text.pattern_match.group(1):
            user = f"#LOG / Chat ID: {log_text.chat_id}\n\n"
            textx = user + log_text.pattern_match.group(1)
            await bot.send_message(BOTLOG_CHATID, textx)
        else:
            await log_text.edit("`What am I supposed to save?`")
            return
        await log_text.edit("`Saved Successfully`")
    else:
Exemple #29
0
"""Available Commands:
.mf"""

import asyncio

from telethon import functions

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern=r"dc"))  # pylint:disable=E0602
@bot.on(sudo_cmd(pattern=r"dc", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    result = await borg(functions.help.GetNearestDcRequest())  # pylint:disable=E0602
    await edit_or_reply(event, result.stringify())


@bot.on(admin_cmd(pattern=r"config"))  # pylint:disable=E0602
@bot.on(sudo_cmd(pattern=r"config", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    result = await borg(functions.help.GetConfigRequest())  # pylint:disable=E0602
    result = result.stringify()
    logger.info(result)  # pylint:disable=E0602
    await event.edit("""Telethon UserBot powered by @darkbot_Support""")

Exemple #30
0
import asyncio
import json
import re

import aiohttp
from bs4 import BeautifulSoup
from telethon.utils import get_inner_text

from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp

logger.info(Config.OPEN_LOAD_LOGIN)
# https://t.me/RoseSupport/33801


@borg.on(admin_cmd(pattern="rl"))
async def _(event):
    if event.fwd_from:
        return
    current_message_text = event.raw_text
    cmt = current_message_text.split(" ")
    reply_message = await event.get_reply_message()
    if len(cmt) > 1:
        list_of_urls = cmt[1:]
    else:
        list_of_urls = get_inner_text(reply_message.message,
                                      reply_message.entities)
    converted_links = ""
    if len(list_of_urls) > 0:
        converted_links += "Trying to generate IP specific link\n"
        for a_url in list_of_urls: