Пример #1
0
async def _(event):
    if event.fwd_from:
        return
    modules = "💫  **List of available modules in PhoeniX**\n"
    MODULE_LIST.sort()
    prev = "1"
    num = 0
    for module in MODULE_LIST:
        num += 1
        if prev[0] != module[0]:
            modules += f"\n\t{module[0].upper()}\n"
        modules += f"-  ```{module}```\n"
        prev = module
    modules += f"\n\n__Number of modules loaded:__ {num}\n**Tip:** Use .syntax <module_name> for more info."
    await event.edit(modules)
Пример #2
0
# Pirated from Priyam's The TG Bot 2.0
# A clean and beautiful alternative to .help
# Syntax (.syntax <module_name>)
from telethon import events
from userbot.utils import admin_cmd
import asyncio
from telethon.tl import functions, types
from sql.global_variables_sql import SYNTAX, MODULE_LIST


MODULE_LIST.append("syntax")

@borg.on(admin_cmd(pattern="syntax ?(.*)"))
async def _(event):
        if event.fwd_from:
            return
        module = event.pattern_match.group(1)
        if module:
            if module in SYNTAX:
                await event.edit(SYNTAX[module])
            else:
                await event.edit("Please specify a valid module.")
        else:
            await event.edit("Please specify a module.\n**Tip: Get a list of all modules using .modules**")
Пример #3
0
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module containing commands related to android"""

from sql.global_variables_sql import SYNTAX, MODULE_LIST
from telethon import events
import re
from requests import get
from bs4 import BeautifulSoup

from userbot import CMD_HELP
from userbot.utils import register

MODULE_LIST.append("android")

GITHUB = 'https://github.com'
DEVICES_DATA = 'https://raw.githubusercontent.com/androidtrackers/' \
               'certified-android-devices/master/devices.json'


@borg.on(events.NewMessage(pattern=r"\.magisk", outgoing=True))
async def magisk(event):
    if event.fwd_from:
        return
    """ magisk latest releases """
    magisk_dict = {
        "Stable":
        "https://raw.githubusercontent.com/topjohnwu/magisk_files/master/stable.json",
        "Beta":
Пример #4
0
            "`Hacking.. 35%\n█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `",
            "`Hacking... 43%\n███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `",
            "`modifying INFORMATION... 52%\n█████████████▒▒▒▒▒▒▒▒▒▒▒▒ `",
            "`MODIFYING information... 58%\n███████████████▒▒▒▒▒▒▒▒▒▒ `",
            "`modifying INFORMATION... 69%\n█████████████████▒▒▒▒▒▒▒▒ `",
            "`Adding Modules... 84%\n█████████████████████▒▒▒▒ `",
            "`Adding Finishing Touches... 98%\n████████████████████████▒`",
            "`HACKED... 100%\n█████████████████████████ `",
            "`Your Telegram Account Hacked Successfully...`\n__Your userbot will now start spamming everywhere...__\n\n**Pay 25$ To** @TechyNewbie **Or delete and re-deploy your userbot to remove this hack.**"
        ]

        for i in animation_ttl:

            await asyncio.sleep(animation_interval)

            await event.edit(animation_chars[i % 21])


MODULE_LIST.append("hack")

SYNTAX.update({
    "hack":
    "\
**Special Prank module for Hacking**\
\n\n• ```.hack``` (as a reply to message)\
\nUsage: __Hacks the Telegram account of the targeted user.__\
\n\n• ```.gmailhack``` (as a reply to message)\
\nUsage: __Hacks the Google account of the targeted user.__\
"
})
Пример #5
0
@errors_handler
async def selfdestruct(destroy):
    """ 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,
                                          "Self-destructed successfully")


MODULE_LIST.append("purge")
MODULE_LIST.append("self_destruct")

SYNTAX.update({
    "purge":
    "\
**A paragraph from Dictionary for purge module**\
\n\n• `.purge`\
\nUsage: Purges all messages starting from the reply.\
\n\n• `.purgeme <no of your messages>`\
\nUsage: Deletes specified no of your latest messages.\
\n\n• `.del`\
\nUsage: Deletes the message you replied to.\
\n\n• `.edit <newmessage>`\
\nUsage: Replace your last message with <newmessage>.\
"
Пример #6
0
            os.remove(downloaded_file_name)
        else:
            message = previous_message.message
    else:
        message = "SYNTAX: `.iffuci <long text to include>`"
    url = "https://www.iffuci.tk/documents"
    r = requests.post(url, data=message.encode("UTF-8")).json()
    url = f"https://iffuci.tk/{r['key']}"
    end = datetime.now()
    ms = (end - start).seconds
    if r["isUrl"]:
        nurl = f"https://iffuci.tk/v/{r['key']}"
        await event.edit(
            "code is pasted to {} in {} seconds. GoTo Original URL: {}".format(
                url, ms, nurl))
    else:
        await event.edit("code is pasted to {} in {} seconds".format(url, ms))


MODULE_LIST.append("iffuci")
SYNTAX.update({
    "iffuci":
    "\
**IFFUCI is website to store long codes as links.**\
\nThis is a very useful module.\
\n\n• `.iffuci <text>\
\nUsage: __Limit for the text is like infinity. This module will give you a link on which your text is stored.__\
\n\nUseful for storing large changelogs or important codes. But don't delete the link.\
"
})
Пример #7
0
# By Priyam Kalra
# Use .syntax emoji/reactions/ascii to know all commands
from telethon import events
from userbot.utils import admin_cmd
import asyncio
from telethon.tl import functions, types
from sql.global_variables_sql import SYNTAX, MODULE_LIST

MODULE_LIST.append("reactions")
MODULE_LIST.append("emojis")
MODULE_LIST.append("ascii")

emojis = {
    "yee":
    "ツ",
    "happy":
    "(ʘ‿ʘ)",
    "veryhappy":
    "=͟͟͞͞٩(๑☉ᴗ☉)੭ु⁾⁾",
    "amazed":
    "ヾ(o✪‿✪o)シ",
    "crying":
    "༎ຶ︵༎ຶ",
    "dicc":
    "╰U╯☜(◉ɷ◉ )",
    "fek":
    "╰U╯\n(‿ˠ‿)",
    "ded":
    "✖‿✖",
    "sad":
    "⊙︿⊙",
Пример #8
0
        await event.edit("EVERyBOdy")
        await asyncio.sleep(0.3)
        await event.edit("iZ")
        await asyncio.sleep(0.2)
        await event.edit("GangSTur")
        await asyncio.sleep(0.5)
        await event.edit("UNtIL ")
        await asyncio.sleep(0.2)
        await event.edit("I")
        await asyncio.sleep(0.3)
        await event.edit("ArRivE")
        await asyncio.sleep(0.3)
        await event.edit("🔥🔥🔥")
        await asyncio.sleep(0.3)
        await event.edit("EVERyBOdy iZ GangSTur UNtIL I ArRivE 🔥🔥🔥")


MODULE_LIST.append("pro_noob")

SYNTAX.update({
    "pro_noob":
    "\
**Available commands in pro_noob**\
\n\n`.younoob`\
\n`.menoob`\
\n`.youpro`\
\n`.mepro`\
\n`.gangasta`\
"
})
Пример #9
0

@command(pattern="^.clearfilter (.*)")
async def on_snip_delete(event):
    name = event.pattern_match.group(1)
    remove_filter(event.chat_id, name)
    await event.edit(f"filter {name} deleted successfully")


@command(pattern="^.clearallfilters$")
async def on_all_snip_delete(event):
    remove_all_filters(event.chat_id)
    await event.edit(f"filters **in current chat** deleted successfully")


MODULE_LIST.append("filters")
SYNTAX.update({
    "filters":
    "\
**Requested Module --> Filters**\
\n\n• `.savefilter`\
\nUsage: __Saves a filter in the current chat__\
\n\n• `.listfilters`\
\nUsage: __Lists all the filters in the current chat.__\
\n\n• `.clearfilter`\
\nUsage: __Removes a filter in the current chat.__\
\n\n• `.clearallfilters`\
\nUsage: __Removes all the filters in the current chat.__\
"
})
Пример #10
0
    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)


MODULE_LIST.append("evaluate")
SYNTAX.update({
    "evaluate":
    "\
**Requested Module --> Evaluate Python Code**\
\n\n• `.evaluate` <python code>\
\nUsage: __Evaluates a python code for syntax errors and gives a detail of the error.__\
"
})
Пример #11
0

async def get_user_from_id(user, event):
    if isinstance(user, str):
        user = int(user)

    try:
        user_obj = await event.client.get_entity(user)
    except (TypeError, ValueError) as err:
        await event.edit(str(err))
        return None

    return user_obj


MODULE_LIST.append("admin")
SYNTAX.update({
    "admin":
    "\
**Detailed usage of Function(s) in Admin module -->**\
\n\n• `.promote <username/reply> <custom rank (optional)>`\
\nUsage: __Provides admin rights to the person in the chat.__\
\n\n• `.demote <username/reply>`\
\nUsage: __Revokes the person's admin permissions in the chat.__\
\n\n• `.ban <username/reply> <reason (optional)>`\
\nUsage: __Bans the person off your chat.__\
\n\n• `.unban <username/reply>`\
\nUsage: __Removes the ban from the person in the chat.__\
\n\n• `.mute <username/reply> <reason (optional)>`\
\nUsage: __Mutes the person in the chat, works on admins too.__\
\n\n• `.unmute <username/reply>`\
Пример #12
0
                    user_object = await event.client.get_entity(input_str)
                    user_id = user_object.id
                    replied_user = await event.client(GetFullUserRequest(user_id))
                    return replied_user, None
                except Exception as e:
                    return None, e
        elif event.is_private:
            try:
                user_id = event.chat_id
                replied_user = await event.client(GetFullUserRequest(user_id))
                return replied_user, None
            except Exception as e:
                return None, e
        else:
            try:
                user_object = await event.client.get_entity(int(input_str))
                user_id = user_object.id
                replied_user = await event.client(GetFullUserRequest(user_id))
                return replied_user, None
            except Exception as e:
                return None, e

MODULE_LIST.append("about user")
SYNTAX.update({
    "about_user": "******"
})
Пример #13
0
                    afk_since = wday.strftime('%A')
            elif hours > 1:
                afk_since = f"`{int(hours)}h{int(minutes)}m` **ago**"
            elif minutes > 0:
                afk_since = f"`{int(minutes)}m{int(seconds)}s` **ago**"
            else:
                afk_since = f"`{int(seconds)}s` **ago**"
        msg = None
        message_to_reply = f"__Master__ {BOSS} __is AFK Right Now.__ Since when, you ask? `{total_afk_time}` Exactly :P" + \
            f"\n\nWhen will I be back? ~~Soon~~ __Whenever I feel like it__**( ಠ ʖ̯ ಠ)**\n**REASON**: {reason}" \
            if reason \
            else f"**Heya!**\n__Master__ {BOSS} __is currently unavailable. Since when, you ask? For {total_afk_time} I guess.__\n\nWhen will I be back? ~~Soon~~ __Whenever I feel like it__**( ಠ ʖ̯ ಠ)**  "
        msg = await event.reply(message_to_reply)
        await asyncio.sleep(5)
        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


MODULE_LIST.append("afk")

SYNTAX.update({
    "afk": "\
**Requested Module --> AFK (Away from Keyboard)**\
\n\n• `afk`\
\nUsage: __You are AFK. Everyone who tag you or PM you automatically gets a reply informing that you are AFK__\
\n\n• `afk <reason>\
\nUsage: __Same as .afk but also tells the reason__\
"
})
Пример #14
0
            await borg.forward_messages(chat, reply_message)
            response = await response
        except YouBlockedUserError:
            await event.reply(
                "```Please unblock @sangmatainfo_bot and try again```")
            return
        if response.text.startswith("Forward"):
            await event.edit(
                "```can you kindly disable your forward privacy settings for good?```"
            )
        else:
            if response.text.startswith("Select"):
                await event.edit(
                    "`Please go to` @DrWebBot `and select your language.`")
            else:
                await event.edit(
                    f"**Antivirus scan was completed. I got dem final results.**\n {response.message.message}"
                )


MODULE_LIST.append("antivirus")

SYNTAX.update({
    "antivirus":
    "\
**Requested Module --> Antivirus**\
\n\n `.scan <while replying to a file>`\
\nUsage: __Scans the replied message (file) for viruses.__\
"
})
Пример #15
0
        await v_url.delete()
    elif video:
        await v_url.edit(f"`Preparing to upload video:`\
        \n**{ytdl_data['title']}**\
        \nby *{ytdl_data['uploader']}*")
        await v_url.client.send_file(
            v_url.chat_id,
            f"{ytdl_data['id']}.mp4",
            supports_streaming=True,
            caption=ytdl_data['title'],
            progress_callback=lambda d, t: asyncio.get_event_loop(
            ).create_task(
                progress(d, t, v_url, c_time, "Uploading..",
                         f"{ytdl_data['title']}.mp4")))
        os.remove(f"{ytdl_data['id']}.mp4")
        await v_url.delete()
        

MODULE_LIST.append("youtube_dl")

SYNTAX.update({
    "youtube_dl": "\
**Requested Module --> YouTube Downloader**\
\n\n`.ytv <link>`\
\nUsage: Downloads YouTube video (with audio)\
\n\n`.yta <link>`\
\nUsage: Downloads audio only\
"
})

Пример #16
0
    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.2)
            try:
                await message.edit(something_else)
            except MessageIdInvalidError:
                return


MODULE_LIST.append("dustbin")
SYNTAX.update({
    "dustbin":
    "\
**Requested Module --> Dump into Dustbin**\
\n\n• `.bin`\
\nUsage: __Dump food into the bin.__\
"
})
Пример #17
0
        return
    start = datetime.now()
    await event.edit("Pong!")
    end = datetime.now()
    ms = (end - start).microseconds / 1000
    await event.edit("Pong!\n{}".format(ms))


@command(pattern="^.alive")
async def _(event):
    if event.fwd_from:
        return
    start = datetime.now()
    await event.edit("Yeah!")
    end = datetime.now()
    await event.edit("Yeah! 👍🏻 I'm Alive 🍻")


MODULE_LIST.append("ping")

SYNTAX.update({
    "ping":
    "\
**Checks if PhoeniX is working or not!!**\
\n\n  `.ping`\
\nUsage: __Ping-Pong!!__\
\n\n `.alive`\
\nUsage: __Same as .ping__\
"
})
Пример #18
0
            "`\"A comma is a short pause, a coma is a long pause.\"`")

    if x == 95:

        await event.edit(
            "`\"Someday you will either not wake up or not go to sleep.\"`")

    if x == 96:

        await event.edit(
            "`\"Bermuda Triangle might be the exit portal of this simulation.\"`"
        )

    if x == 97:

        await event.edit(
            "`\"If we put solar panels above parking lots, then our cars wouldn't get hot and we would have a lot of clean energy.\"`"
        )


MODULE_LIST.append("logical things")

SYNTAX.update({
    "logical things":
    "\
**Let's thinks about random logic(s) with the logic module**\
\n\n• `.logic`\
\nUsage: __Brings out a random logical sentence.__\
"
})
Пример #19
0

def useragent():
    """
    useragent random setter
    """
    useragents = BeautifulSoup(
        requests.get(
            'https://developers.whatismybrowser.com/'
            'useragents/explore/operating_system_name/android/').content,
        'lxml').findAll('td', {'class': 'useragent'})
    user_agent = choice(useragents)
    return user_agent.text


MODULE_LIST.append("direct_link")

SYNTAX.update({
    "direct_link":
    "\
**Requested Module --> Direct Link Generator**\
\n\n• `.direct <url>`\
\nUsage: __Generate direct download link from supported URL(s)__\
\n\nSupported websites:\
\nGoogle Drive\
\nMEGA.nz\
\nCloud Mail\
\nYandex.Disk\
\nAFH\
\nZippyShare\
\nMediaFire\
Пример #20
0
# Exclusive for PhoeniX Userbot.
# By @Techy05 (DON'T REMOVE THESE LINES)
## Don't modify this module

from sql.global_variables_sql import SYNTAX, MODULE_LIST, SOLUTION, ERROR_LIST

MODULE_LIST.append("errors")
SYNTAX.update({
    "errors":
    "\
**Getting errors/problems while using PhoeniX? Or a module isn't working?**\
\nDon't worry, Let's fix them\
\n\n• `.errors`\
\nUsage: __Shows the list of known errors in Userbots__\
\n\n• `.solution <error_name>`\
\nUsage: __Shows the solution for the requested error/problem__\
"
})

ERROR_LIST.append("updater not working")
SOLUTION.update({
    "updater not working":
    "\
**So, you're having problems with updater. PhoeniX Service will fix it.**\
\n\nERROR: `Unfortunately, the directory /app does not seem to be a git repository.`\
\nSolution: __Use “.update now” and check again if it works.__\
\n__If it still doesn't work, then use “.chl” once.__\
\n\nERROR: `[UPDATER]: Looks like you are using your own custom branch (master). in that case, Updater is unable to identify which branch is to be merged. please checkout to any official branch`\
\nSolution: __Delete PhoeniX repo from your account. Refork__ [PhoeniX](https://github.com/Techy05/PhoeniX). __Then Manual Deploy from Heroku to fix__\
\nIf you use custom fork, then please don't mess with branches.\
"
Пример #21
0
            "Looking for Guilty.",
            "Looking for Guilty..",
            "Looking for Guilty...",
            "Getting F.I.R..",
            "Getting F.I.R...",
            "**!!Guilty Arrested!!**",
            "**!! Guilty Arrested !!**",
            "__user BANNED from TELEGRAM__",
            "__USER banned FROM telegram__",
            "__user BANNED from TELEGRAM__",
            f"***JUSTICE***\n\nPolice has arrested [{firstname}](tg://user?id={idd})!"
        ]

        for i in animation_ttl:

            await asyncio.sleep(animation_interval)

            await event.edit(animation_chars[i % 37])


MODULE_LIST.append("police")

SYNTAX.update({
    "police": "\
**Requested Module --> police**\
\n\n`.police`\
\nUsage: Call police, make an FIR. Police will arrest the guilty.\
"
})

Пример #22
0
            return
        await ups.edit('`Successfully Updated!\n'
                       'Restarting, please wait...`')
    else:
        # Classic Updater, pretty straightforward.
        try:
            ups_rem.pull(ac_br)
        except GitCommandError:
            repo.git.reset("--hard", "FETCH_HEAD")
        reqs_upgrade = await update_requirements()
        await ups.edit('`Successfully Updated!\n'
                       'Bot is restarting... Wait for a second!`')
        # Spin a new instance of bot
        args = [sys.executable, "-m", "userbot"]
        execle(sys.executable, *args, environ)
        return


MODULE_LIST.append("PhoeniX Updater")

SYNTAX.update({
    "PhoeniX Updater":
    "\
**PhoeniX Updater**\
\n\n• `.update`\
\nUsage: __Checks for OTA update.__\
\n\n• `.update now`\
\nUsage: __Downloads and Installs the OTA update.__\
"
})
Пример #23
0
    # await event.edit("Restarting [███]...\n`.ping` or `.alive` to check if I am alive after a lil bit.")
    # await asyncio.sleep(2)
    await event.edit(
        "Restarted. Use `.ping` or `.alive` to check if I am alive")
    await borg.disconnect()
    # https://archive.is/im3rt
    os.execl(sys.executable, sys.executable, *sys.argv)
    # You probably don't need it but whatever
    quit()


@borg.on(admin_cmd("shutdown"))
async def _(event):
    if event.fwd_from:
        return
    await event.edit("Turning off ...Manually turn me on later")
    await borg.disconnect()


MODULE_LIST.append("PhoeniX Tools")
SYNTAX.update({
    "PhoeniX Tools":
    "\
**Requested Module --> PhoeniX Developer Tools**\
\n\n• `.restart`\
\nUsage: __Restarts the bot. Takes 2 mins__\
\n\n• `.shutdown`\
\nUsage: __Shut downs the bot.__\
"
})
Пример #24
0
        try:
            response = conv.wait_event(
                events.NewMessage(incoming=True, from_users=1124136160))
            await event.client.forward_messages(chat, reply_message)
            response = await response
        except YouBlockedUserError:
            await event.reply(
                "```Please unblock me (@NovelCoronaBot) u N***a```")
            return
        if response.text.startswith("Country"):
            await event.edit(
                "Something Went Wrong Check [This Post](https://t.me/TechnoAyanBoT/22?single)"
            )
        else:
            await event.delete()
            await event.client.send_message(event.chat_id, response.message)


MODULE_LIST.append("corona_virus")

SYNTAX.update({
    "corona_virus":
    "\
**Get current Corona Virus stats for any country**\
\n\n• `.covid <country name>`\
\n\n• `.corona <as a reply to country name>`\
\n__Usage: First send the name of the country. Then reply__ `.corona` __to the message.__\
\n\nFirst letter of the country name must be capital!!\
"
})
Пример #25
0
            "Telegram HQ: `Hello This is Telegram HQ. Who is this?`\n\nmpSinGH: `Yo this is` @HawkEyesMohak",
            "Telegram HQ: `Oh Hello Peru Sir!! I Know You Are The Creator Of The Awesome PhoeniX Userbot. How May I Help You?`",
            f"Telegram HQ: `Oh Hello Peru Sir!! I Know You Are The Creator Of The Awesome PhoeniX Userbot. How May I Help You?`\n\nmpSinGH: `Hello Sir, Please Ban` {BOSS}'s `Telegram Account.`",    
            "Telegram HQ: `May I Know What Did He Do?`",
            "Telegram HQ: `May I Know What Did He Do?`\n\nmpSinGH: `He tried to use the forbidden .call command and tried connecting to DarkWEB`",
            "Telegram HQ: `OMG!!! I'll Make Sure That Guy Account Will Get Banned From Telegram Within 24Hrs.`",
            "Telegram HQ: `OMG!!! I'll Make Sure That Guy Account Will Get Banned From Telegram Within 24Hrs.`\n\nmpSinGH: `Thanks, See You Later Brah.`",
            "Telegram HQ: `Please Don't Thank Sir. It's Our Duty To Ban These Guys. Thanks For Reporting Him`",
            "Telegram HQ: `Please Don't Thank Sir. It's Our Duty To Ban These Guys. Thanks For Reporting Him`\n\nmpSinGH: `Okay! See you later`",
            "Telegram HQ: `Sure Sur. TC Bye Bye :)`",
            "`Private Call Disconnected.`",
            f"{BOSS}'s **account will get banned in 24 Hours**",
            f"{BOSS}'s **account will get banned in 24 Hours**\n\n__Contact__ @HawkEyesMohak __to free up your account.__"
        ]

        for i in animation_ttl:

            await asyncio.sleep(animation_interval)

            await event.edit(animation_chars[i % 22])

MODULE_LIST.append("call")
SYNTAX.update({
    "call": "\
**Requested Module --> Private Call**\
\n\n• `.call`\
\nUsage: __Places a Private Call to the forbidden DarkWEB__\
"
})
            
Пример #26
0
    AppMinutes = math.floor(AppQuotaUsed % 60)

    await asyncio.sleep(1.5)

    return await dyno.edit(
        "**Dyno Usage**:\n\n"
        f" -> `Dyno usage for`  **{Var.HEROKU_APP_NAME}**:\n"
        f"     •  `{AppHours}`**h**  `{AppMinutes}`**m**  "
        f"**|**  [`{AppPercentage}`**%**]"
        "\n\n"
        " -> `Dyno hours quota remaining this month`:\n"
        f"     •  `{hours}`**h**  `{minutes}`**m**  "
        f"**|**  [`{percentage}`**%**]")


MODULE_LIST.append("heroku")


@command(pattern="^.syntax heroku")
async def info(event):
    await borg.send_message(
        event.chat_id,
        "**Info for Module to Manage Heroku:**\n\n`.usage`\nUsage:__Check your heroku dyno hours status.__\n\n`.set var <NEW VAR> <VALUE>`\nUsage: __add new variable or update existing value variable__\n**!!! WARNING !!!, after setting a variable the bot will restart.**\n\n`.get var or .get var <VAR>`\nUsage: __get your existing varibles, use it only on your private group!__\n**This returns all of your private information, please be cautious...**\n\n`.del var <VAR>`\nUsage: __delete existing variable__\n**!!! WARNING !!!, after deleting variable the bot will restarted**"
    )
    await event.delete()


def prettyjson(obj, indent=2, maxlinelength=80):
    """Renders JSON content with indentation and line splits/concatenations to fit maxlinelength.
    Only dicts, lists and basic types are supported"""
Пример #27
0
# Exclusive module for PhoeniX
# By @Techy05
# You should use this module without proper credits
# Syntax (.solution <error_name>)
from telethon import events
from userbot.utils import admin_cmd
import asyncio
from telethon.tl import functions, types
from sql.global_variables_sql import SYNTAX, MODULE_LIST, ERROR, ERROR_LIST

MODULE_LIST.append("solution")


@borg.on(admin_cmd(pattern="solution ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    err = event.pattern_match.group(1)
    if err:
        if err in ERROR:
            await event.edit(ERROR[err])
        else:
            await event.edit(
                "No information for this error yet!\n**Tip: Get a list of all errors using .errors**"
            )
    else:
        await event.edit(
            "Please specify an error.\n**Tip: Get a list of all errors using .errors**"
        )
Пример #28
0
        color_name = driver.find_element_by_xpath(
            '/html/body/div[1]/main/div[2]/div[2]/div[1]/div[1]/div/span[2]/input'
        ).get_attribute('value')
        await e.edit("`Done...\n100%`")
        file = './carbon.png'
        await e.edit("`Uploading..`")
        await e.client.send_file(
            e.chat_id,
            file,
            caption=
            "<< `Here's your carbon!` \n **Carbonised by** @PhoeniX_UserBOT.>>\n**Colour Scheme: **`{}`"
            .format(color_name),
            force_document=True,
            reply_to=e.message.reply_to_msg_id,
        )
        os.remove('./Anubis.png')
        driver.quit()
        # Removing carbon.png after uploading
        await e.delete()  # Deleting msg


MODULE_LIST.append("carbon")
SYNTAX.update({
    "carbon":
    "\
**Requested Module --> Carbon**\
ヾ• `.carbon <text>`\
\nUsage: __Carbonises text into a picture. Check it out__\
"
})
Пример #29
0
# For UniBorg
# By Priyam Kalra
# Syntax (.rmota <device_model>)
from sql.global_variables_sql import SYNTAX, MODULE_LIST
from telethon import events
from telethon.tl import functions, types
from uniborg.util import admin_cmd

MODULE_LIST.append("rmota")


@borg.on(admin_cmd(pattern="rmota ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    if input_str:
        if input_str.startswith("RM") or input_str.startswith("CPH"):
            model = input_str
        else:
            await event.edit("**ERROR: Please enter a valid device model name!**")
            return
    else:
        await event.edit("**ERROR: Please enter a valid device model name!**")
        return
    bot = "@realmeupdaterbot"
    await event.edit(f"```Looking for latest OTA for {model}...```")

    async with borg.conversation(bot) as bot_conv:
        if True:
            response = await silently_send_message(bot_conv, "/start")