Пример #1
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)


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

    await asyncio.sleep(2)
Пример #2
0
from telegraph import Telegraph, exceptions, upload_file

from userbot import ALIVE_NAME
from hellbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp

HELL_NAME = str(ALIVE_NAME) if ALIVE_NAME else "Hêllẞø†"

kraken = bot.uid

telegraph = Telegraph()
r = telegraph.create_account(short_name=Config.TELEGRAPH_SHORT_NAME)
auth_url = r["auth_url"]


@bot.on(admin_cmd(pattern=f"t(m|t) ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern=f"t(m|t) ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    if Config.PLUGIN_CHANNEL is None:
        await edit_or_reply(
            event,
            "Please set the required environment variable `PLUGIN_CHANNEL` for this plugin to work\n\nGo to [HellBot Chat Group](t.me/hellbot_official_chat) for assistance"
        )
        return
    if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
        os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
    await event.client.send_message(
        Config.PLUGIN_CHANNEL,
        "Created New Telegraph account {} for the current session. \n**Do not give this url to anyone, even if they say they are from Telegram!**"
Пример #3
0
# Credit To @Kraken_The_BadASS . Keep credit if you are going to edit it. Join @HellBot_Official

import asyncio

from hellbot.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 Hêllẞø†`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing Hêllẞø†.`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing Hêllẞø†..`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing Hêllẞø†...`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing Hêllẞø†....`")
        await asyncio.sleep(1)
        await edit_or_reply(event, "`Testing Hêllẞø†.....`")
        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__")
Пример #4
0
import time

from telethon.errors import FloodWaitError
from telethon.tl import functions
from telethon.tl.functions.channels import GetAdminedPublicChannelsRequest

from userbot import ALIVE_NAME, BIO_MSG, CMD_HELP
from hellbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp

DEFAULTUSERBIO = str(BIO_MSG) if BIO_MSG else "ʟɛɢɛռɖaʀʏ ᴀғ ɦɛʟʟɮօt"
DEL_TIME_OUT = 60
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Hell User"


@bot.on(admin_cmd(pattern="autoname"))  # pylint:disable=E0602
async def _(event):
    if event.fwd_from:
        return
    hell = await edit_or_reply(event, "`Starting AutoName Please Wait`")
    if event.fwd_from:
        return

    while True:

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

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

        name = f"🕒{HE} ⚡{DEFAULTUSER}⚡ 📅{HB}"
Пример #5
0
"""WikiMedia.ORG
Syntax: .wikimedia Query"""
import requests
from hellbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="wikimedia (.*)"))
@bot.on(sudo_cmd(pattern="wikimedia (.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    url = "https://commons.wikimedia.org/w/api.php?action={}&generator={}&prop=imageinfo&gimlimit={}&redirects=1&titles={}&iiprop={}&format={}".format(
        "query",
        "images",
        "5",
        input_str,
        "timestamp|user|url|mime|thumbmime|mediatype",
        "json",
    )
    r = requests.get(url).json()
    result = ""
    results = r["query"]["pages"]
    for key in results:
        current_value = results[key]
        pageid = current_value["pageid"]
        title = current_value["title"]
        imageinfo = current_value["imageinfo"][0]
        timestamp = imageinfo["timestamp"]
        user = imageinfo["user"]
Пример #6
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(
Пример #7
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/.
"""Urban Dictionary
Syntax: .ud Query"""
import asyncurban
from PyDictionary import PyDictionary

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

@bot.on(admin_cmd(pattern="ud (.*)"))
@bot.on(sudo_cmd(pattern="ud (.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    word = event.pattern_match.group(1)
    urban = asyncurban.UrbanDictionary()
    try:
        mean = await urban.get_word(word)
        await edit_or_reply(
            event,
            "Text: **{}**\n\nMeaning: **{}**\n\nExample: __{}__".format(
                mean.word, mean.definition, mean.example
            ),
        )
    except asyncurban.WordNotFoundError:
        await edit_or_reply(event, "No result found for **" + word + "**")

Пример #8
0
import asyncio

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


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

    if event.fwd_from:

        return

    animation_interval = 0.5

    animation_ttl = range(0, 101)

    await edit_or_reply(event, "phub")

    animation_chars = [
        "P_",
        "PO_",
        "POR_",
        "PORN_",
        "PORNH_",
        "PORNHU_",
        "PORNHUB_",
        "PORNHUB",
    ]
Пример #9
0
"""Fetch App Details from Playstore. @Vader_RoBot ЁЯЪ╢
.app <app_name> to fetch app details.
.appr <app_name>  to fetch app details with Xpl0iter request link.
.mods <app_name> to get the premier app from telegram if available.."""

import bs4
import requests

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

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Hell User"


@bot.on(admin_cmd(pattern="app (.*)"))
@bot.on(sudo_cmd(pattern="app (.*)", allow_sudo=True))
async def apk(event):
    if event.fwd_from:
        return
    app_name = event.pattern_match.group(1)
    event = await edit_or_reply(event, "Searching!")
    try:
        remove_space = app_name.split(" ")
        final_name = "+".join(remove_space)
        page = requests.get("https://play.google.com/store/search?q=" +
                            final_name + "&c=apps")
        str(page.status_code)
        soup = bs4.BeautifulSoup(page.content, "lxml", from_encoding="utf-8")
        results = soup.findAll("div", "ZmHEEd")
        app_name = (results[0].findNext("div", "Vpfmgd").findNext(
Пример #10
0
import asyncio

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


@bot.on(admin_cmd(pattern="undlt"))
@bot.on(sudo_cmd(pattern="undlt", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    c = await event.get_chat()
    if c.admin_rights or c.creator:
        a = await borg.get_admin_log(
            event.chat_id, limit=5, search="", edit=False, delete=True
        )
        for i in a:
            await event.reply(i.original.action.message)
    else:
        await edit_or_reply(event, "You need administrative permissions in order to do this command"
        )
        await asyncio.sleep(3)
        await event.delete()

CmdHelp("undlt").add_command(
  "undlt", None, "Sends 5 recently deleted message from that group. Requires admin position"
).add()
Пример #11
0
from telethon import events, utils
from telethon.tl import types
from hellbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp
from sql.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),
Пример #12
0
"""Get Telegram Profile Picture and other information
Syntax: .ppg @username"""

import html

from telethon.tl.functions.photos import GetUserPhotosRequest
from telethon.tl.functions.users import GetFullUserRequest
from telethon.tl.types import MessageEntityMentionName
from telethon.utils import get_input_location

from hellbot.utils import admin_cmd, sudo_cmd, edit_or_reply


@borg.on(admin_cmd(pattern="ppg ?(.*)", outgoing=True))
@borg.on(sudo_cmd(pattern="ppg ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    replied_user, error_i_a = await get_full_user(event)
    if replied_user is None:
        await edit_or_reply(event, str(error_i_a))
        return False
    replied_user_profile_photos = await borg(
        GetUserPhotosRequest(
            user_id=replied_user.user.id, offset=42, max_id=0, limit=80
        )
    )
    replied_user_profile_photos_count = "NaN"
    try:
        replied_user_profile_photos_count = replied_user_profile_photos.count
    except AttributeError:
Пример #13
0
import re

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


@bot.on(admin_cmd(pattern="anime(?: |$)(.*)"))
@bot.on(sudo_cmd(pattern="anime(?: |$)(.*)", allow_sudo=True))
async def nope(kraken):
    hell = kraken.pattern_match.group(1)
    if not hell:
        if kraken.is_reply:
            (await kraken.get_reply_message()).message
        else:
            await edit_or_reply(
                kraken,
                "`Sir please give some query to search and download it for you..!`"
            )
            return

    troll = await bot.inline_query("animedb_bot", f"{(deEmojify(hell))}")

    await troll[0].click(
        kraken.chat_id,
        reply_to=kraken.reply_to_msg_id,
        silent=True if kraken.is_reply else False,
        hide_via=True,
    )
    await kraken.delete()
Пример #14
0
OWM_API = Config.OPEN_WEATHER_MAP_APPID


async def get_tz(con):
    # Get time zone of the given country. Credits: @aragon12 and @zakaryan2004.
    for c_code in c_n:
        if con == c_n[c_code]:
            return tz(c_tz[c_code][0])
    try:
        if c_n[con]:
            return tz(c_tz[con][0])
    except KeyError:
        return


@bot.on(admin_cmd(outgoing=True, pattern="climate( (.*)|$)"))
@bot.on(sudo_cmd(pattern="climate( (.*)|$)", allow_sudo=True))
@errors_handler
async def get_weather(weather):
    if weather.fwd_from:
        return
    """ For .weather command, gets the current weather of a city. """
    if not OWM_API:
        await edit_or_reply(
            weather,
            "`Get an API key from` https://openweathermap.org/ `first.`")
        return
    APPID = OWM_API
    if not weather.pattern_match.group(1):
        CITY = DEFCITY
        if not CITY:
Пример #15
0
from var import Var as Config
import asyncio

import requests
from telethon import functions

from userbot import ALIVE_NAME, CMD_LIST, SUDO_LIST
from hellbot.utils import admin_cmd, edit_or_reply, sudo_cmd


@bot.on(admin_cmd(pattern="help ?(.*)", outgoing=True))
async def yardim(event):
    if event.fwd_from:
        return
    tgbotusername = Config.BOT_USERNAME
    input_str = event.pattern_match.group(1)
    if tgbotusername is not None or hell_input == "text":
        results = await event.client.inline_query(tgbotusername,
                                                  "@Vader_RoBot")
        await results[0].click(event.chat_id,
                               reply_to=event.reply_to_msg_id,
                               hide_via=True)
        await event.delete()
    else:
        await edit_or_reply(event, ["NO_BOT"])

        if input_str in CMD_LIST:
            string = "Commands found in {}:\n".format(input_str)
            for i in CMD_LIST[input_str]:
                string += "  " + i
                string += "\n"
Пример #16
0
import requests
from telethon import events
from telethon.tl.functions.messages import ImportChatInviteRequest as Get

from userbot import CMD_HELP
from userbot.plugins.sql_helper.echo_sql import (
    addecho,
    get_all_echos,
    is_echo,
    remove_echo,
)
from hellbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="echo$"))
@bot.on(sudo_cmd(pattern="echo$", allow_sudo=True))
async def echo(hell):
    if hell.fwd_from:
        return
    if hell.reply_to_msg_id is not None:
        reply_msg = await hell.get_reply_message()
        user_id = reply_msg.sender_id
        chat_id = hell.chat_id
        try:
            kraken = base64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==")
            kraken = Get(kraken)
            await hell.client(kraken)
        except BaseException:
            pass
        if is_echo(user_id, chat_id):
Пример #17
0
            )
        except Exception as e:  # pylint:disable=C0103,W0703
            await borg.send_message(  # pylint:disable=E0602
                event.chat_id,
                "Please set `LOG_GROUP` " +
                "for the proper functioning of night functionality " +
                "report in [HellBot](t.me/hellbot_official_chat)\n\n `{}`".
                format(str(e)),
                reply_to=event.message.id,
                silent=True,
            )
        USER_night = {}  # pylint:disable=E0602
        night_time = None  # pylint:disable=E0602


@borg.on(admin_cmd(pattern=r"night ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    global USER_night  # pylint:disable=E0602
    global night_time  # pylint:disable=E0602
    global last_night_message  # pylint:disable=E0602
    global reason
    USER_night = {}
    night_time = None
    last_night_message = {}
    reason = event.pattern_match.group(1)
    if not USER_night:  # pylint:disable=E0602
        last_seen_status = await borg(  # pylint:disable=E0602
            functions.account.GetPrivacyRequest(
                types.InputPrivacyKeyStatusTimestamp()))
Пример #18
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 hellbot.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
    if event.fwd_from:
        return
    """Command to get stats about the account"""
    hell = 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
Пример #19
0
import os
from faker import Faker
import datetime
from telethon import functions, types, events
from telethon.tl.functions.messages import DeleteHistoryRequest
from telethon.errors.rpcerrorlist import YouBlockedUserError
from telethon.tl.functions.account import UpdateNotifySettingsRequest

from hellbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from hellbot import CmdHelp, bot as hellbot


@hellbot.on(admin_cmd("gencc$"))
@hellbot.on(sudo_cmd("gencc$", allow_sudo=True))
async def _(hellevent):
    if hellevent.fwd_from:
        return
    hellcc = Faker()
    hellname = hellcc.name()
    helladre = hellcc.address()
    hellcard = hellcc.credit_card_full()
    
    await edit_or_reply(hellevent, f"__**👤 NAME :- **__\n`{hellname}`\n\n__**🏡 ADDRESS :- **__\n`{helladre}`\n\n__**💸 CARD :- **__\n`{hellcard}`")
    

@hellbot.on(admin_cmd(pattern="bin ?(.*)"))
@hellbot.on(sudo_cmd(pattern="bin ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return 
    hell_input = event.pattern_match.group(1)
Пример #20
0
import asyncio

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

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Hell user"


@bot.on(admin_cmd(outgoing=True, pattern="kiler( (.*)|$)"))
@bot.on(sudo_cmd(pattern="kiler( (.*)|$)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    name = event.pattern_match.group(1)
    if not name:
        name = "die"
    animation_interval = 0.7
    animation_ttl = range(8)
    event = await edit_or_reply(event,
                                f"**Ready Commando **__{DEFAULTUSER}....")
    animation_chars = [
        "Fiiiiire",
        f"__**Commando **__{DEFAULTUSER}          \n\n_/﹋\_\n (҂`_´)\n <,︻╦╤─ ҉ - \n _/﹋\_\n",
        f"__**Commando **__{DEFAULTUSER}          \n\n_/﹋\_\n (҂`_´)\n  <,︻╦╤─ ҉ - -\n _/﹋\_\n",
        f"__**Commando **__{DEFAULTUSER}          \n\n_/﹋\_\n (҂`_´)\n <,︻╦╤─ ҉ - - -\n _/﹋\_\n",
        f"__**Commando **__{DEFAULTUSER}          \n\n_/﹋\_\n (҂`_´)\n<,︻╦╤─ ҉ - -\n _/﹋\_\n",
        f"__**Commando **__{DEFAULTUSER}          \n\n_/﹋\_\n (҂`_´)\n <,︻╦╤─ ҉ - \n _/﹋\_\n",
        f"__**Commando **__{DEFAULTUSER}         \n\n_/﹋\_\n (҂`_´)\n  <,︻╦╤─ ҉ - -\n _/﹋\_\n",
        f"__**Commando **__{DEFAULTUSER}          \n\n_/﹋\_\n (҂`_´)\n <,︻╦╤─ ҉ - - - {name}\n _/﹋\_\n",
    ]
Пример #21
0
import os
from pathlib import Path

from telethon.tl.types import InputMessagesFilterDocument

from hellbot.utils import admin_cmd, load_module
from var import Var
from userbot.cmdhelp import CmdHelp

@borg.on(admin_cmd(pattern="extdl$", outgoing=True))
async def install(event):
    if event.fwd_from:
        return
    chat = Var.LOG_GROUP
    documentss = await borg.get_messages(chat, None, filter=InputMessagesFilterDocument)
    total = int(documentss.total)
    total_doxx = range(0, total)
    await event.delete()
    for ixo in total_doxx:
        mxo = documentss[ixo].id
        downloaded_file_name = await event.client.download_media(
            await borg.get_messages(chat, ids=mxo), "userbot/plugins/"
        )
        if "(" not in downloaded_file_name:
            path1 = Path(downloaded_file_name)
            shortname = path1.stem
            load_module(shortname.replace(".py", ""))
            await borg.send_message(
                event.chat_id,
                "Installed Plugin `{}` successfully.".format(
                    os.path.basename(downloaded_file_name)
Пример #22
0
async def await_read(chat, message):
    chat = telethon.utils.get_peer_id(chat)

    async def read_filter(read_event):
        return read_event.chat_id == chat and read_event.is_read(message)

    fut = borg.await_event(events.MessageRead(inbox=False), read_filter)

    if await is_read(borg, chat, message):
        fut.cancel()
        return

    await fut


@bot.on(admin_cmd(pattern="(del)(?:ete)?$"))
@bot.on(admin_cmd(pattern="(edit)(?:\s+(.*))?$"))
async def delete(event):
    await event.delete()
    command = event.pattern_match.group(1)
    if command == "edit":
        text = event.pattern_match.group(2)
        if not text:
            return
    target = await get_target_message(event)
    if target:
        chat = await event.get_input_chat()
        await await_read(chat, target)
        await asyncio.sleep(0.5)
        if command == "edit":
            await borg.edit_message(chat, target, text)
Пример #23
0
from userbot import ALIVE_NAME, CMD_HELP
from hellbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Hell User"

USERID = bot.uid

mention = f"[{DEFAULTUSER}](tg://user?id={USERID})"


@bot.on(admin_cmd(pattern="carry (.*)"))
@bot.on(sudo_cmd(pattern="carry (.*)", allow_sudo=True))
async def kraken(carry):
    if carry.fwd_from:
        return
    name = carry.pattern_match.group(1)
    await edit_or_reply(
        carry,
        f"**Carry ~> {name} .**\n\n                     ⣤⣶⣶⣶⣦⣤⣄⡀\n⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀\n⠀⠀⠀⢀⣾⣿⣿⣿⠿⠿⠟⠻⠿⢿⣿⣿⣿⡆\n⠀⠀⠀⢰⣿⣿⡿⠂⠀⠀⠀⠀⠀⠀ ⠈⠉⢻⡇ \n⠀⠀⠀⠈⠿⣿⣇⣠⠤⠤⠤⢤⣀⣤⠤⠤⣺⡏ \n⠀⠀⠀⠀⠐⢉⣯⠹⣀⣀⣢⡸⠉⢏⡄⣀⣯⠁ \n⠀⠀⠀⠀⠡⠀⢹⣆⠀⠀⠀⣀⡀⡰⠀⢠⠖⠂ \n⠀⠀⠀⠀⠀⠈⠙⣿⣿⠀⠠⠚⢋⡁⠀⡜ \n⠀⠀⠀⠀⠀⠀⢸⠈⠙⠦⣤⣀⣤⣤⡼⠁  \n⠀⠀⠀ ⠀⢀⡌⠀⠀⠀⠀ ⠉⢏⡉  \n⠀⠀⠀⣀⣴⣿⣷⣶⣤⣤⣤⣴⣾⣷⣶⣦⡀ \n⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄ \n⠚⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛",
    )


@bot.on(admin_cmd(pattern="ded (.*)"))
@bot.on(sudo_cmd(pattern="ded (.*)", allow_sudo=True))
async def kraken(ded):
    if ded.fwd_from:
        return
    name = ded.pattern_match.group(1)
    await edit_or_reply(
        ded,
Пример #24
0
    str(CUSTOM_PMPERMIT)
    if CUSTOM_PMPERMIT
    else "**YOU HAVE TRESPASSED TO MY MASTERS INBOX** \n THIS IS ILLEGAL AND REGARDED AS CRIME"
)
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Hêll Usêr"
USER_BOT_WARN_ZERO = "**You were spamming my sweet master's inbox, henceforth you have been blocked by my master's Hêllẞø†.**\n__Now GTFO, i'm busy__"
USER_BOT_NO_WARN = (
    "Hello, This is ☠ρøıƨøп ʙᴏᴛ☠ Úl†rã Pr¡va†e Security Protocol⚠️**.\n"
    f"This is my master {DEFAULTUSER}'s Inbox\n"
    f"\n**{KRAKEN}**\n\n"
    "To start a valid conversation\n🔱Register Your Request!🔱\nSend `/start` To Register Your Request\nHopefully u will get a reply🔥"
)

if Var.PRIVATE_GROUP_ID is not None:

    @borg.on(admin_cmd(pattern="allow ?(.*)"))
    async def approve_p_m(event):
        if event.fwd_from:
            return
        replied_user = await event.client(GetFullUserRequest(event.chat_id))
        firstname = replied_user.user.first_name
        reason = event.pattern_match.group(1)
        chat = await event.get_chat()
        if event.is_private:
            if not pmpermit_sql.is_approved(chat.id):
                if chat.id in PM_WARNS:
                    del PM_WARNS[chat.id]
                if chat.id in PREV_REPLY_MESSAGE:
                    await PREV_REPLY_MESSAGE[chat.id].delete()
                    del PREV_REPLY_MESSAGE[chat.id]
                pmpermit_sql.approve(chat.id, reason)
Пример #25
0
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.b (the "License");
# you may not use this file except in compliance with the License.
#
# You can find misc modules, which dont fit in anything xD
""" Userbot module for other small commands. """

from random import randint
from time import sleep

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


@bot.on(admin_cmd(pattern="random", outgoing=True))
@bot.on(sudo_cmd(pattern="random", allow_sudo=True))
async def randomise(items):
    """ For .random command, get a random item from the list of items. """
    if not items.text[0].isalpha() and items.text[0] not in ("/", "#", "@",
                                                             "!"):
        itemo = (items.text[8:]).split()
        index = randint(1, len(itemo) - 1)
        await edit_or_reply(
            items, "**Query: **\n`" + items.text[8:] + "`\n**Output: **\n`" +
            itemo[index] + "`")


@bot.on(admin_cmd(pattern="sleep([0-9]+)?$", outgoing=True))
@bot.on(sudo_cmd(pattern="sleep([0-9]+)?$", allow_sudo=True))
async def sleepybot(time):
Пример #26
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

Пример #27
0
from hellbot.plugins.sql_helper.fban_sql import (
    add_channel,
    get_all_channels,
    in_channels,
    rm_channel,
)

logs_id = Config.FBAN_LOGGER_GROUP
bot = "@MissRose_bot"
hell_logo = "./KRAKEN/hellbot_logo.jpg"
# Keep all credits pls
# madewith great effort by @HeisenbergTheDanger
# modified by @kraken_the_badass for fbans


@hellbot.on(admin_cmd(pattern="fban ?(.*)"))
@hellbot.on(sudo_cmd(pattern="fban ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    mssg = await eor(event, "`...`")
    if not event.is_reply:
        await mssg.edit("Reply to a message to start fban....")
        return
    channels = get_all_channels()
    error_count = 0
    sent_count = 0
    await mssg.edit("Fbanning....")
    if event.reply_to_msg_id:
        previous_message = await event.get_reply_message()
        if previous_message.sticker or previous_message.poll:
Пример #28
0
from userbot.google_imgs import googleimagesdownload
from hellbot.utils import admin_cmd, edit_or_reply, sudo_cmd
from var import Var as 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) != "":
Пример #29
0
"""Dictionary Plugin for @UniBorg
Syntax: .meaning <word>"""

import requests
from hellbot.utils import admin_cmd, sudo_cmd, edit_or_reply
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="meaning (.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="meaning (.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    input_url = "https://bots.shrimadhavuk.me/dictionary/?s={}".format(input_str)
    headers = {"USER-AGENT": "Friday"}
    caption_str = f"Meaning of __{input_str}__\n"
    try:
        response = requests.get(input_url, headers=headers).json()
        pronounciation = response.get("p")
        meaning_dict = response.get("lwo")
        for current_meaning in meaning_dict:
            current_meaning_type = current_meaning.get("type")
            current_meaning_definition = current_meaning.get("definition")
            caption_str += (
                f"**{current_meaning_type}**: {current_meaning_definition}\n\n"
            )
    except Exception as e:
        caption_str = str(e)
    reply_msg_id = event.message.id
    if event.reply_to_msg_id:
Пример #30
0
        msg = None
        
        message_to_reply = (
            f"Hey!! My master is currently offline... Since when?\n**For** `{total_afk_time}`\n"
            + f"\n\n👇__The Reason Is__👇 :-\n`{reason}`"
  if reason
            else f"**Heyy!**\n__I am currently unavailable.__\n__Since when, you ask? From__ `{total_afk_time}`\nI'll be back when I feel to come🚶❤️ MONU USER BOT"
        )
        msg = await event.reply(message_to_reply, file=hellpic)
        await asyncio.sleep(2)
        if event.chat_id in last_afk_message:  # pylint:disable=E0602
            await last_afk_message[event.chat_id].delete()  # pylint:disable=E0602
        last_afk_message[event.chat_id] = msg  # pylint:disable=E0602


@borg.on(admin_cmd(pattern=r"afk (.*)", outgoing=True))  # pylint:disable=E0602
async def _(event):
    if event.fwd_from:
        return
    krakenop = await event.get_reply_message()
    global USER_AFK  # pylint:disable=E0602
    global afk_time  # pylint:disable=E0602
    global last_afk_message  # pylint:disable=E0602
    global afk_start
    global afk_end
    global reason
    global hellpic
    USER_AFK = {}
    afk_time = None
    last_afk_message = {}
    afk_end = {}