Example #1
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`\
"
})
Example #2
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.__\
"
})
Example #3
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.__\
"
})
Example #4
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!!\
"
})
Example #5
0
        await event.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 event.edit(reply)


SYNTAX.update({
    "android":
    "\
**Requested module --> Android**\
\n\n```.magisk```\
\nUsage: Get 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.\
"
})
Example #6
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.\
"
Example #7
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.__\
"
})
Example #8
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__\
"
})
Example #9
0
    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\
\nSourceForge\
\nOSDN\
\nGitHub\
"
})
Example #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.__\
"
})
Example #11
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.__\
"
})
Example #12
0
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>`\
\nUsage: __Removes the person from the muted list.__\
\n\n• `.gmute <username/reply> <reason (optional)>`\
\nUsage: __Mutes the person in all groups you have in common with them.__\
\n\n• `.ungmute <username/reply>`\
\nUsage: __Reply someone's message with .ungmute to remove them from the gmuted list.__\
\n\n• `.kick`\
\nUsage: __Kick a particular member__\
\n\n• `.kickme`\
\nUsage: __Kicks yourself from the group__\
\n\n• `.delusers`\
\nUsage: __Searches for deleted accounts in a group. Use .delusers clean to remove deleted accounts from the group.__\
\n\n• `.admins`\
\nUsage: __Retrieves a list of admins in the chat.__\
\n\n• `.users or .users <name of member>`\
\nUsage: __Retrieves all (or queried) users in the chat.__\
\n\n• `.setgppic <reply to image>`\
\nUsage: __Changes the group's display picture.__\
"
})
Example #13
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": "******"
})
Example #14
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__\
"
})
Example #15
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.__\
"
})
Example #16
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.\
"
})

Example #17
0
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    try:
        req_ascii = ascii[str(input_str)]
        await event.edit(req_ascii)
    except KeyError:
        await event.edit("ASCII art not found!")


SYNTAX.update({
    "reactions":
    "\
**Requested Module --> reactions**\
\n\n**Detailed usage of fuction(s):**\
\nUsage: Just some funny little animations ;)\
\n\n__List of reactions:__\
\n• `.oof`\
\n• `.sed`\
\n• `.hek`\
"
})

SYNTAX.update({
    "emojis":
    f"\
**Requested Module --> emojis**\
\n\n**Detailed usage of fuction(s):**\
\n\n• .emo `<emoji_name>`\
\nUsage: __Prints the target emoji.__\
\n\nList of included emoji(s):\
\n{unpacked_emojis}\
Example #18
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.__\
"
})
Example #19
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.\
"
})
Example #20
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__\
"
})
            
Example #21
0
    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>.\
"
})

SYNTAX.update({
    "self_destruct":
    "\
**A message that can self-destruct**\
\n\n• `.sd <time> <message>`\
\n\n__Usage: Creates a message that selfdestructs in specified seconds.__\
\nMaximum time: 100.\
"
Example #22
0
                return
        else:
            await message.edit(NO_HEROKU_APP_CFGD)
    else:
        await message.edit("No heroku api key found in `HEROKU_API_KEY` var")
        

def generate_change_log(git_repo, diff_marker):
    out_put_str = ""
    d_form = "%d/%m/%y"
    for repo_change in git_repo.iter_commits(diff_marker):
        out_put_str += f"•[{repo_change.committed_datetime.strftime(d_form)}]: {repo_change.summary} <{repo_change.author}>\n"
    return out_put_str

async def deploy_start(tgbot, message, refspec, remote):
    await message.edit(RESTARTING_APP)
    await message.edit("Updating and Deploying [X-tra-Telegram](https://dashboard.heroku.com/apps/techynewbiebot/deploy) Master branch. This usually takes 5 minutes.\n\nIf bot doesn't work, then check [LOGS](https://dashboard.heroku.com/apps/techynewbiebot/logs)")
    await remote.push(refspec=refspec)
    await tgbot.disconnect()
    os.execl(sys.executable, sys.executable, *sys.argv)

MODULE_LIST.append("PhoeniX Updater")

SYNTAX.update({
    "PhoeniX Updater": "\
**PhoeniX Updater**\
\n\n• `.update`\
\nUsage: __Downloads and Installs the OTA update.__\
"
})
Example #23
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.__\
"
})
Example #24
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\
"
})

Example #25
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__\
"
})
Example #26
0
    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")
            if not response.text.startswith("Hey!"):
                await event.edit(f"{response.text}")
                return
            response = await silently_send_message(bot_conv, f"/GetLatestOTA {model}")
            if response.text.startswith("There"):
                await event.edit(f"{response.text}")
                return
            await event.edit(response.text)


async def silently_send_message(conv, text):
    await conv.send_message(text)
    response = await conv.get_response()
    await conv.mark_read(message=response)
    return response


SYNTAX.update({
    "rmota": "\
**Requested Module --> rmota**\
\n\n**Detailed usage of fuction(s):**\
\n\n• ```.rmota <device_model>```\
\nUsage: __Returns latest update info for specified device.__\nUses @Realme_3ProBot to get update information.\
"
})