Ejemplo n.º 1
0
# instant block
NEEDIT = os.environ.get("INSTANT_BLOCK", None)
if NEEDIT == "on":

    @thunderbot.on(events.NewMessage(incoming=True))
    async def on_new_private_message(event):
        event.message.message
        event.message.media
        event.message.id
        event.message.to_id
        chat_id = event.chat_id
        sender = await borg.get_entity(chat_id)
        if chat_id == borg.uid:
            return
        if sender.bot:
            return
        if sender.verified:
            return
        if not pmpermit_sql.is_approved(chat_id):
            await borg(functions.contacts.BlockRequest(chat_id))


CMD_HELP.update({
    "pmsecurity":
    ".approve/.a\nUse - Approve PM\
        \n\n.disapprove/.da\nUse - DisApprove PM\
        \n\n.listapproved\nUse - Get all approved PMs.\
        \n\nSet var PMPERMIT_PIC for custom PMPic, CUSTOM_PMPERMIT for custom text, PMSECURITY <on/off> to enable/disable, INSTANT_BLOCK <on/off>."
})
Ejemplo n.º 2
0
    max_days = 7
    command_to_exec = [
        "curl",
        "-F",
        "files=@" + filebase,
        "-H",
        "Transfer-Encoding: chunked",
        "-H",
        "Up-User-ID: IZfFbjUcgoo3Ao3m",
        url,
    ]
    try:
        logger.info(command_to_exec)
        t_response = subprocess.check_output(command_to_exec,
                                             stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as exc:
        logger.info("Status : FAIL", exc.returncode, exc.output)
        await eor(event, exc.output.decode("UTF-8"))
        return
    else:
        logger.info(t_response)
        t_response_arry = "https://up.labstack.com/api/v1/links/{}/receive".format(
            r2json["code"])
    await eor(event,
              t_response_arry + "\nMax Days:" + str(max_days),
              link_preview=False)


CMD_HELP.update(
    {"labstack": ".labstack <reply to media>\nUse - Upload to labstack."})
Ejemplo n.º 3
0
        time %= 60
        s = time
        endtime = ""
        if d > 0:
            endtime += f"{d}d {h}h {m}m {s}s"
        else:
            if h > 0:
                endtime += f"{h}h {m}m {s}s"
            else:
                endtime += f"{m}m {s}s" if m > 0 else f"{s}s"
    current_message = event.message.message
    if "afk" not in current_message and "on" in USER_AFK:
        s***e = await event.client.send_message(
            event.chat_id,
            f"`I'm back!\nWas afk for {endtime}`",
        )
        USER_AFK = {}
        afk_time = None
        await asyncio.sleep(5)
        await s***e.delete()
        if BOTLOG:
            await event.client.send_message(
                Var.PRIVATE_GROUP_ID,
                f"#AFK \n`AFK - Disabled\nAFK for {endtime}`")


CMD_HELP.update({
    "afk":
    "➟ `.afk` <optional reason>\nUse - Sets your status to AwayFromKeyboard (AFK)!"
})
Ejemplo n.º 4
0
            mode = "📱 "
        elif path.endswith((".py")):
            mode = "🐍 "
        else:
            mode = "📄 "
        time.ctime(os.path.getctime(path))
        time2 = time.ctime(os.path.getmtime(path))
        time3 = time.ctime(os.path.getatime(path))
        msg += f"**Location :** `{path}`\n"
        msg += f"**Icon :** `{mode}`\n"
        msg += f"**Size :** `{humanbytes(size)}`\n"
        msg += f"**Last Modified Time:** `{time2}`\n"
        msg += f"**Last Accessed Time:** `{time3}`"

    if len(msg) > MAX_MESSAGE_SIZE_LIMIT:
        with io.BytesIO(str.encode(msg)) as out_file:
            out_file.name = "ls.txt"
            await event.client.send_file(
                event.chat_id,
                out_file,
                force_document=True,
                allow_cache=False,
                caption=path,
            )
            await event.delete()
    else:
        await eor(event, msg)


CMD_HELP.update({"file": ".ls <directory>" "\nUsage: A Simple File Manager."})
Ejemplo n.º 5
0
        name = b["name"]
        company = b["company"]
        blog = b["blog"]
        location = b["location"]
        bio = b["bio"]
        created_at = b["created_at"]
        await thunderbot.send_file(
            event.chat_id,
            caption="""Name: [{}]({})
Type: {}
Company: {}
Blog: {}
Location: {}
Bio: {}
Profile Created: {}""".format(name, html_url, gh_type, company, blog, location,
                              bio, created_at),
            file=avatar_url,
            force_document=False,
            allow_cache=False,
            reply_to=event,
        )
        await event.delete()
    else:
        await eor(event, "`{}`: {}".format(input_str, r.text))


CMD_HELP.update({
    "github":
    ".github <username>\nUse - Get info of that user's github profile."
})
Ejemplo n.º 6
0
    """ For .sd command, make seflf-destructable messages. """
    message = destroy.text
    counter = int(message[4:6])
    text = str(destroy.text[6:])
    await destroy.delete()
    smsg = await destroy.client.send_message(destroy.chat_id, text)
    await sleep(counter)
    await smsg.delete()
    if BOTLOG:
        await destroy.client.send_message(BOTLOG_CHATID,
                                          "sd query done successfully")


CMD_HELP.update({
    "purge":
    ".purge\
        \nUsage: Purges all messages starting from the reply."
})

CMD_HELP.update({
    "purgeme":
    ".purgeme <x>\
        \nUsage: Deletes x amount of your latest messages."
})

CMD_HELP.update({"del": ".del\
\nUsage: Deletes the message you replied to."})

CMD_HELP.update({
    "edit":
    ".edit <newmessage>\
Ejemplo n.º 7
0
        "letter": "letters",
        "allig": "alligator",
        "dotm": "dotmatrix",
        "bubble": "bubble",
        "bulb": "bulbhead",
        "digi": "digital",
    }
    input_str = event.pattern_match.group(1)
    if "|" in input_str:
        text, cmd = input_str.split("|", maxsplit=1)
    elif input_str is not None:
        cmd = None
        text = input_str
    else:
        await eor(event, "Please add some text to figlet")
        return
    if cmd is not None:
        try:
            font = CMD_FIG[cmd]
        except KeyError:
            await eor(event, "Invalid selected font.")
            return
        result = pyfiglet.figlet_format(text, font=font)
    else:
        result = pyfiglet.figlet_format(text)
    await event.respond("‌‌‎`{}`".format(result))
    await event.delete()


CMD_HELP.update({"figlet": ".figlet <text>\nUse - Figlets it."})
Ejemplo n.º 8
0
Archivo: img.py Proyecto: iTenz1/iTenz1
        lim = lim[0]
        lim = lim.replace("lim=", "")
        query = query.replace("lim=" + lim[0], "")
    except IndexError:
        lim = 5
    response = googleimagesdownload()

    # creating list of arguments
    arguments = {
        "keywords": query,
        "limit": lim,
        "format": "jpg",
        "no_directory": "no_directory",
    }

    # passing the arguments to the function
    paths = response.download(arguments)
    lst = paths[0][query]
    await event.client.send_file(
        await event.client.get_input_entity(event.chat_id), lst)
    shutil.rmtree(os.path.dirname(os.path.abspath(lst[0])))
    await event.delete()


CMD_HELP.update({
    "img":
    "**img**\
\n\n**Syntax : **`.img <your query>`\
\n**Usage :** Sends images."
})
Ejemplo n.º 9
0
    await event.delete()


@thunderbot.on(admin_cmd(pattern="botungban ?(.*)"))
@thunderbot.on(sudo_cmd(pattern="botungban ?(.*)", allow_sudo=True))
async def _(event):
    if Config.G_BAN_LOGGER_GROUP is None:
        await eor(
            event,
            "Make a group, add all your sudo bots and paste it's id in ENV VAR (G_BAN_LOGGER_GROUP) for this module to work.",
        )
        return
    if event.fwd_from:
        return
    reason = event.pattern_match.group(1)
    if event.reply_to_msg_id:
        r = await event.get_reply_message()
        r_from_id = r.from_id
        await borg.send_message(
            Config.G_BAN_LOGGER_GROUP,
            "/ungban [user](tg://user?id={}) {}".format(r_from_id, reason),
        )
    await event.delete()


CMD_HELP.update({
    "gban_bots":
    ".botgban <reply to user/userid/username> <reason>\nUse - Gban in all bots you are sudo.\
        \n\n.botungban <reply to user/userid/username>\nUse - Ungban from all bots."
})
Ejemplo n.º 10
0
        await event.edit(
            f"No Results Found For: {country}!\n😵Please Try Again After Sometime."
        )


def format_integer(number, thousand_separator="."):
    def reverse(string):
        string = "".join(reversed(string))
        return string

    s = reverse(str(number))
    count = 0
    result = ""
    for char in s:
        count = count + 1
        if count % 3 == 0:
            if len(s) == count:
                result = char + result
            else:
                result = thousand_separator + char + result
        else:
            result = char + result
    return result


CMD_HELP.update({
    "coronavirus":
    ".coronavirus <country>"
    "\nUsage: Get information about Coronavirus in requested country.\n"
})
Ejemplo n.º 11
0
        evaluation = stdout
    else:
        evaluation = "Success"

    final_output = "__⚡️__ **EVAL**\n`{}` \n\n __⚡️__ **OUTPUT**: \n`{}` \n".format(
        cmd, evaluation
    )

    if len(final_output) > Config.MAX_MESSAGE_SIZE_LIMIT:
        with io.BytesIO(str.encode(final_output)) as out_file:
            out_file.name = "eval.text"
            await borg.send_file(
                event.chat_id,
                out_file,
                force_document=True,
                allow_cache=False,
                caption=cmd,
                reply_to=reply_to_id,
            )
            await event.delete()
    else:
        await event.edit(final_output)


async def aexec(code, event):
    exec(f"async def __aexec(event): " + "".join(f"\n {l}" for l in code.split("\n")))
    return await locals()["__aexec"](event)


CMD_HELP.update({"eval": ".eval <code>\nUse - Evaluates the Python code."})
Ejemplo n.º 12
0
from thunderbot import CMD_HELP


@thunderbot.on(admin_cmd(pattern=r"echo (.*)"))
@thunderbot.on(sudo_cmd(pattern=r"echo ( .*)", allow_sudo=True))
async def _(event):
    bxt = Var.TG_BOT_USER_NAME_BF_HER
    try:
        tex = str(event.text[6:])
        await tgbot.send_message(event.chat_id, tex)
        await event.delete()
    except BaseException:
        await event.client.send_message(event.chat_id,
                                        f"Please add @{bxt} here first!")
        await event.delete()


CMD_HELP.update({
    "echo":
    ".echo <mssg>\nUse - Echoes the message you send via your bot. You must add it to this chat first."
})
Ejemplo n.º 13
0
from thunderbot import CMD_HELP
from thunderbot.utils import admin_cmd


@thunderbot.on(admin_cmd(pattern=r"shout", outgoing=True))
@thunderbot.on(sudo_cmd(pattern=r"shout", allow_sudo=True))
async def shout(args):
    if args.fwd_from:
        return
    else:
        msg = "```"
        messagestr = args.text
        messagestr = messagestr[7:]
        text = " ".join(messagestr)
        result = []
        result.append(" ".join([s for s in text]))
        for pos, symbol in enumerate(text[1:]):
            result.append(symbol + " " + "  " * pos + symbol)
        result = list("\n".join(result))
        result[0] = text[0]
        result = "".join(result)
        msg = "\n" + result
        await eor(args, "`" + msg + "`")


CMD_HELP.update(
    {"shout": ".shout <message>\nUse - Shout the message word-by-word."})
Ejemplo n.º 14
0
  
import os
import sys
from thunderbot import CMD_HELP, CMD_HNDLR
from thunderbot.utils import admin_cmd


@thunderbot.on(admin_cmd(pattern="update"))
async def _(event):
    if event.fwd_from:
        return
    await event.edit(
        f" ⚡️⚡️**Updating Your Thunderuserbot**⚡️⚡️ ... \n\nPlease Wait Until It Starts Again✅\nFor More, Get Help From [Here](https://t.me/thunderuserbot) "
    )
    await thunderbot.disconnect()
    os.execl(sys.executable, sys.executable, *sys.argv)
    quit()

CMD_HELP.update(
    {
        "update": "`.update`\nUse - Updates Your Thunderuserbot."
    }
)
Ejemplo n.º 15
0
"""
Available Commands:
.update
"""

import asyncio
from telethon import events
from thunderbot import CMD_HELP
from thunderbot.utils import admin_cmd


@thunderbot.on(admin_cmd("update"))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 0.1
    animation_ttl = range(0, 2)
    await event.edit("⚡️Thunderuserbot⚡️")
    animation_chars = [
        "⚡️@thunderuserbot⚡️",
        "⚡️**Restart Your Dynos To Automatically Update Your Thunderuserbots**⚡️\nFor More, Get Help From [Here](https://t.me/thunderuserbot)"
    ]

    for i in animation_ttl:

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


CMD_HELP.update({"update": ".update\nUse - Update Your Thunderuserbot."})
Ejemplo n.º 16
0
        app_details = "<a href='"+app_icon+"'>📲&#8203;</a>"

        app_details += " <b>"+app_name+"</b>"

        app_details += "\n\n<code>Developer :</code> <a href='"+app_dev_link+"'>"+app_dev+"</a>"

        app_details += "\n<code>Rating :</code> "+app_rating.replace("Rated ", "⭐ ").replace(" out of ", "/").replace(" stars", "", 1).replace(" stars", "⭐ ").replace("five", "5")

        app_details += "\n<code>Features :</code> <a href='"+app_link+"'>View in Play Store</a>"

        app_details += "\n\n<b>Download : </b> <a href='https://t.me/thunderuserbot'>Request_Here by typing #request</a>"

        app_details += "\n\n===> @thunderuserbot <==="

        await e.edit(app_details, link_preview = True, parse_mode = 'HTML')

    except IndexError:

        await e.edit("No result found in search. Please enter **Valid app name**")

    except Exception as err:

        await e.edit("Exception Occured:- "+str(err))


CMD_HELP.update(
    {
        "app": "➟ `.app <app_name> or .appr <appname> \nUse - To fetch app details"
    }
)
Ejemplo n.º 17
0
            is_ban_able = False
            rights = types.ChatBannedRights(until_date=None,
                                            view_messages=True)
            added_users = event.action_message.action.users
            for user_id in added_users:
                user_obj = await borg.get_entity(user_id)
                if user_obj.bot:
                    is_ban_able = True
                    try:
                        await borg(
                            functions.channels.EditBannedRequest(
                                event.chat_id, user_obj, rights))
                    except Exception as e:
                        await event.reply(
                            "I don't seem to have ADMIN permission here. \n`{}`"
                            .format(str(e)))
                        update_lock(event.chat_id, "bots", False)
                        break
            if Config.G_BAN_LOGGER_GROUP is not None and is_ban_able:
                ban_reason_msg = await event.reply(
                    "!warn [user](tg://user?id={}) Please Do Not Add BOTs to this chat."
                    .format(users_added_by))


CMD_HELP.update({
    "locks":
    ".lock\nUse - Get all lock types.\
        \n\n.unlock\n Use - Unlock.\
        \n\n.currentenabledlocks\nUse - Active Locks."
})
Ejemplo n.º 18
0
from thunderbot import CMD_HELP
from thunderbot.utils import admin_cmd


@thunderbot.on(admin_cmd(pattern="pmto ?(.*)"))
async def pmto(event):
    a = event.pattern_match.group(1)
    b = a.split(" ")
    chat_id = b[0]
    try:
        chat_id = int(chat_id)
    except BaseException:
        pass
    msg = ""
    for i in b[1:]:
        msg += i + " "
    if msg == "":
        return
    try:
        await borg.send_message(chat_id, msg)
        await event.edit("Message sent!")
    except BaseException:
        await event.edit("Something went wrong.")


CMD_HELP.update({"pmto": ".pmto <username> <message>"})
Ejemplo n.º 19
0
    """ For .google command, do a Google search. """
    match = q_event.pattern_match.group(1)
    thundrgang = await eor(q_event, "Searching for `{}`".format(match))
    page = findall(r"page=\d+", match)
    try:
        page = page[0]
        page = page.replace("page=", "")
        match = match.replace("page=" + page[0], "")
    except IndexError:
        page = 1
    search_args = (str(match), int(page))
    gsearch = GoogleSearch()
    gresults = await gsearch.async_search(*search_args)
    res = ""
    for i in range(len(gresults["links"])):
        try:
            thundrgangtitle = gresults["titles"][i]
            thundrganglink = gresults["links"][i]
            thundrgangdescrp = gresults["descriptions"][i]
            res += f"[{thundrgangtitle}]({thundrganglink})\n`{thundrgangdescrp}`\n\n"
        except IndexError:
            break
    await thundrgang.edit(
        "**GᴏᴏɢʟᴇSᴇᴀʀᴄʜ**\n__Qᴜᴇʀʏ:__\n `{}` \n\n**Rᴇsᴜʟᴛs:**\n {}".format(
            match, res),
        link_preview=False,
    )


CMD_HELP.update({"google": ".go <query>\nUse - Search the query on Google"})
Ejemplo n.º 20
0
Archivo: gps.py Proyecto: iTenz1/iTenz1
@thunderbot.on(admin_cmd(pattern="gps ?(.*)"))
@thunderbot.on(sudo_cmd(pattern="gps ?(.*)", allow_sudo=True))
async def gps(event):
    if event.fwd_from:
        return
    reply_to_id = event.message
    if event.reply_to_msg_id:
        reply_to_id = await event.get_reply_message()
    input_str = event.pattern_match.group(1)

    if not input_str:
        return await eor(event, "Please give me a location to find.")

    await eor(event, "Finding...")

    geolocator = Nominatim(user_agent="thunderbot")
    geoloc = geolocator.geocode(input_str)

    if geoloc:
        lon = geoloc.longitude
        lat = geoloc.latitude
        await reply_to_id.reply(input_str,
                                file=types.InputMediaGeoPoint(
                                    types.InputGeoPoint(lat, lon)))
        await event.delete()
    else:
        await eor(event, "Sorry, no results found")


CMD_HELP.update({"gps": ".gps <location>\nUse - Gps location on map."})
Ejemplo n.º 21
0
            else:
                In = True

        elif In:
            tempFedId += x

    await event.edit(f"UnFbaning in {len(fedList)} feds.")
    try:
        await thunderbot.send_message(chat, f"/start")
    except BaseException:
        await event.edit("MASSFBAN_GROUP_ID is incorrect.")
        return
    await asyncio.sleep(5)
    for fed in fedList:
        await thunderbot.send_message(chat, f"/joinfed {fed}")
        await asyncio.sleep(5)
        await thunderbot.send_message(chat, f"/unfban {FBAN}")
        await asyncio.sleep(5)
    await event.edit(f"Massunfban Completed. Affected {len(fedList)} feds.\n#THUNDER")



CMD_HELP.update(
    {
        "massfban": ".massfban <username/userid> <reason>\
        \n**Usage**: Mass-Ban in all feds you are admin in.\
        \nSet `ALL_FEDS fedid1|fedid2` in heroku vars to exclude those feds.\
        \nSet var `MASSFBAN_GROUP_ID` Get it from rose by replying /id in the group,Where you want to do all massfbans."
    }
)
Ejemplo n.º 22
0
    dir = "./temp/"
    try:
        os.makedirs("./temp/")
    except BaseException:
        pass
    channel_username = event.text
    channel_username = channel_username[7:]

    print(channel_username)
    await eor(event, "Downloading All Media From this Channel.")
    msgs = await borg.get_messages(channel_username, limit=3000)
    with open("log.txt", "w") as f:
        f.write(str(msgs))
    for msg in msgs:
        if msg.media is not None:
            await borg.download_media(msg, dir)
    ps = subprocess.Popen(("ls", "temp"), stdout=subprocess.PIPE)
    output = subprocess.check_output(("wc", "-l"), stdin=ps.stdout)
    ps.wait()
    output = str(output)
    output = output.replace("b'", "")
    output = output.replace("\n'", "")
    await eor(event, "Downloaded " + output + " files.")


CMD_HELP.update({
    "channel_alldownload":
    ".getc\nUse - Download all media from channel.\
        \n\n.geta \nUse - Download all audio from channel."
})
Ejemplo n.º 23
0
    except IndexError:
        inp = "🌎 📱 ❤️"
    u, t, g, o, s, n = inp.split(), '🗑', '<(^_^ <)', '(> ^_^)>', '⠀ ', '\n'
    h = [(u[0], u[1], u[2]), (u[0], u[1], ''), (u[0], '', '')]
    for something in reversed([
            y for y in ([
                ''.join(x)
                for x in (f + (s, g, s + s * f.count(''), t),
                          f + (g, s * 2 + s * f.count(''), t),
                          f[:i] + (o, f[i], s * 2 + s * f.count(''), t),
                          f[:i] + (s + s * f.count(''), o, f[i], s, t),
                          f[:i] + (s * 2 + s * f.count(''), o, f[i], t),
                          f[:i] + (s * 3 + s * f.count(''), o, t),
                          f[:i] + (s * 3 + s * f.count(''), g, t))
            ] for i, f in enumerate(reversed(h)))
    ]):
        for something_else in something:
            await asyncio.sleep(0.3)
            try:
                await message.edit(something_else)
            except errors.MessageIdInvalidError:
                return


CMD_HELP.update({
    "dump":
    "**Dump**\
\n\n**Syntax : **`.dump`\
\n**Usage :** Dumps The World."
})
Ejemplo n.º 24
0
    if event.is_private:
        await eor(event, "`.invite` users to a chat, not to a Private Message")
    else:
        logger.info(to_add_users)
        if not event.is_channel and event.is_group:
            # https://lonamiwebs.github.io/Telethon/methods/messages/add_chat_user.html
            for user_id in to_add_users.split(" "):
                try:
                    await borg(
                        functions.messages.AddChatUserRequest(
                            chat_id=event.chat_id,
                            user_id=user_id,
                            fwd_limit=1000000))
                except Exception as e:
                    await event.reply(str(e))
            await eor(event, "Invited Successfully")
        else:
            # https://lonamiwebs.github.io/Telethon/methods/channels/invite_to_channel.html
            for user_id in to_add_users.split(" "):
                try:
                    await borg(
                        functions.channels.InviteToChannelRequest(
                            channel=event.chat_id, users=[user_id]))
                except Exception as e:
                    await event.reply(str(e))
            await eor(event,
                      "ThunderUserbot has invited the user to the chat.")


CMD_HELP.update({"invite": ".invite <username>\nUse - Add user to the chat."})
Ejemplo n.º 25
0
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await eor(
            event,
            "Please reply to a user or add their into the command to ungmute them.",
        )
    event.chat_id
    if not is_muted(userid, "gmute"):
        return await eor(event, "This user is not gmuted")
    try:
        unmute(userid, "gmute")
    except Exception as e:
        await eor(event, "Error occured!\nError is " + str(e))
    else:
        await eor(event, "Successfully ungmuted that person")


@command(incoming=True)
async def watcher(event):
    if is_muted(event.sender_id, "gmute"):
        await event.delete()


CMD_HELP.update({
    "gmute":
    ".gmute <reply to user>\nUse - Globally mute the person.\
        \n\n.ungmute <reply to user>\nUse - Globally UnMute the person."
})
Ejemplo n.º 26
0
    elif "|" in input_str:
        lan, text = input_str.split("|")
    else:
        await x.edit(
            f"`{CMD_HNDLR}tr LanguageCode` as reply to a message.\nLanguage codes can be found [here](https://t.me/thunderuserbot/40)",
        )
        return
    text = emoji.demojize(text.strip())
    lan = lan.strip()
    translator = Translator()
    try:
        translated = translator.translate(text, dest=lan)
        after_tr_text = translated.text
        output_str = """
**⚡️Translated⚡️**
**{} to {}**
`{}`""".format(translated.src, lan, after_tr_text)
        await x.edit(output_str)
    except Exception as exc:
        await x.edit(f"Error\n `{str(exc)}`")


CMD_HELP.update({
    "translate":
    ".tr <LanguageCode> <reply to a message>\
        \nUse - Translate the replied text\
        \n\n.tr <LangaugeCode> | <text to translate>\
        \nUse - Translate the given text.\
        \n\nLanguage codes can be found [here](https://t.me/thunderuserbot/40)."
})
Ejemplo n.º 27
0
                for i in a:
                    if "country_of_origin" in i["href"]:
                        mov_country.append(i.text)
                    elif "primary_language" in i["href"]:
                        mov_language.append(i.text)
        if soup.findAll("div", "ratingValue"):
            for r in soup.findAll("div", "ratingValue"):
                mov_rating = r.strong["title"]
        else:
            mov_rating = "Not available"
        await abcd.edit(
            "<a href=" + poster + ">&#8203;</a>"
            "<b>🎗️Title : </b><code>" + mov_title + "</code>\n<code>" +
            mov_details + "</code>\n<b>🥇Rating : </b><code>" + mov_rating +
            "</code>\n<b>🌐Country : </b><code>" + mov_country[0] +
            "</code>\n<b>🙇Language : </b><code>" + mov_language[0] +
            "</code>\n<b>🗣️Director : </b><code>" + director +
            "</code>\n<b>✍️Writer : </b><code>" + writer +
            "</code>\n<b>🌠Stars : </b><code>" + stars +
            "</code>\n<b>🚀IMDB Url : </b>" + mov_link +
            "\n<b>🎁Story Line : </b>" + story_line,
            link_preview=True,
            parse_mode="HTML",
        )
    except IndexError:
        await abcd.edit("Please enter a **Valid movie name** ")


CMD_HELP.update(
    {"imdb": "imdb <movie name>\nUse - Get imdb info about that movie."})
Ejemplo n.º 28
0
            "https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf",
            "f.ttf",
        )

    urllib.request.urlretrieve(fy, "donottouch.jpg")


@thunderbot.on(admin_cmd(pattern="waifupic ?(.*)"))
async def main(event):

    await event.edit(
        "**Starting Anime or Waifu or Manga Picture...\n\nDone !!! Selecting Randomly A Waifu Pic For You. Thanks to [ThunderUserbot](https://t.me/thunderuserbot)**"
    )

    while True:

        await animepp()

        file = await event.client.upload_file("donottouch.jpg")

        await event.client(functions.photos.UploadProfilePhotoRequest(file))

        os.system("rm -rf donottouch.jpg")

        await asyncio.sleep(600)  # Edit this to your required needs


CMD_HELP.update(
    {"waifudp": "➟ `.waifupic`\nSelects Randomly A Waifu Pic And Sets As Your Profile Picture.."}
)
Ejemplo n.º 29
0
        "This User has no Username")
    user_bio = "This User has no About" if not user_bio else user_bio

    if user_id != (await event.client.get_me()).id:
        common_chat = replied_user.common_chats_count
    else:
        common_chat = "Why are you interested in me? I wouldn't marry you "
        common_chat += "It's me Dumbo."

    caption = "<u><b>Userinfo Fetched From Thundergang Database</b></u>\n\n"
    caption += f"⚡️ <b>First Name</b>: <code>{first_name}</code> \n"
    caption += f"⚡️ <b>Last Name</b>: <code>{last_name}</code> \n"
    caption += f"⚡️ <b>Username</b>: <code>{username}</code> \n"
    caption += f"⚡️ <b>Is It A Bot</b>: <code>{is_bot}</code> \n"
    caption += f"⚡️ <b>Restricted</b>: <code>{restricted}</code> \n"
    caption += f"⚡️ <b>Verified By Telegram</b>: <code>{verified}</code> \n"
    caption += f"⚡️ <b>ID</b>: <code>{user_id}</code> \n"
    caption += f"⚡️ <b>Bio</b>: <code>{user_bio}</code> \n\n"
    caption += f"⚡️ <b>Number of Display Pictures</b>: <code>{replied_user_profile_photos_count}</code> \n"
    caption += f"\n⚡️ <b>Common Groups</b>: <code>{common_chat} </code>\n\n"
    caption += f"⚡️ <b>Permanent Link</b>: "
    caption += f'<a href="tg://user?id={user_id}">{first_name}</a>'

    return caption


CMD_HELP.update({
    "info":
    ".info <id/reply to mssg>\nUse - Fetchs out user details from thundergang database and shows results."
})
Ejemplo n.º 30
0
    url = get(f'https://dl.twrp.me/{device}/')
    if url.status_code == 404:
        reply = f"`Couldn't find twrp downloads for {device}!`\n"
        await request.edit(reply)
        return
    page = BeautifulSoup(url.content, 'lxml')
    download = page.find('table').find('tr').find('a')
    dl_link = f"https://dl.twrp.me{download['href']}"
    dl_file = download.text
    size = page.find("span", {"class": "filesize"}).text
    date = page.find("em").text.strip()
    reply = f'**Latest TWRP for {device}:**\n' \
        f'[{dl_file}]({dl_link}) - __{size}__\n' \
        f'**Updated:** __{date}__\n'
    await request.edit(reply)


CMD_HELP.update({
    "android":
    ".magisk\
\nGet latest Magisk releases\
\n\n.device <codename>\
\nUsage: Get info about android device codename or model.\
\n\n.codename <brand> <device>\
\nUsage: Search for android device codename.\
\n\n.specs <brand> <device>\
\nUsage: Get device specifications info.\
\n\n.twrp <codename>\
\nUsage: Get latest twrp download for android device."
})