Esempio n. 1
0
    if songs is None:
        await lyric.edit(f"Song **{artist} - {song}** not found!")
        return
    if len(songs.lyrics) > 4096:
        await lyric.edit("`Lyrics is too big, view the file to see it.`")
        with open("lyrics.txt", "w+") as f:
            f.write(f"Search query: \n{artist} - {song}\n\n{songs.lyrics}")
        await lyric.client.send_file(
            lyric.chat_id,
            "lyrics.txt",
            reply_to=lyric.id,
        )
        os.remove("lyrics.txt")
    else:
        await lyric.edit(
            f"**Search query**: \n`{artist} - {song}`\n\n```{songs.lyrics}```")
    return


CMD_HELP.update({
    "lyrics":
    ".lyrics song name \
    \n USAGE: searches a song lyrics and sends you if song name doesnt work try along with artisyt name"
    "**Usage:** .`glyrics <artist name> - <song name>`\n"
    "__note__: **-** is neccessary when searching the lyrics to divided artist and song \n"
    "Genius lyrics plugin \n"
    "get this value from https://genius.com/developers \n"
    "Add:-  GENIUS_API_TOKEN and token value in heroku app settings \n"
    "Lyrics Plugin Syntax: .lyrics <aritst name - song nane>"
})
Esempio n. 2
0
    counter = -30
    while True:
        shutil.copy(downloaded_file_name, photo)
        im = Image.open(photo)
        file_test = im.rotate(counter, expand=False).save(photo, "PNG")
        current_time = datetime.now().strftime("Let's Time Travel %H:%M ")
        img = Image.open(photo)
        drawn_text = ImageDraw.Draw(img)
        fnt = ImageFont.truetype(FONT_FILE_TO_USE, 30)
        drawn_text.text((95, 250), current_time, font=fnt, fill=(255, 255, 255))
        img.save(photo)
        file = await bot.upload_file(photo)  # pylint:disable=E0602
        try:
            await bot(
                functions.photos.UploadProfilePhotoRequest(file)  # pylint:disable=E0602
            )
            os.remove(photo)
            counter -= 30
            await asyncio.sleep(60)
        except:
            return


CMD_HELP.update(
    {
        "autopic": "**AutoPic**\
\n\n**Syntax : **`.autopic`\
\n**Usage :** Change your profile PIC With Time"
    }
)
Esempio n. 3
0
                        title=group_name,
                        about="Welcome to this Channel boss",
                        megagroup=False if type_of_group == "c" else True,
                    ))

                created_chat_id = r.chats[0].id

                result = await grop.client(
                    functions.messages.ExportChatInviteRequest(
                        peer=created_chat_id, ))

                await grop.edit(
                    "Your `{}` Group/Channel Has been made Boss!. Join [{}]({})"
                    .format(group_name, group_name, result.link))

            except Exception as e:  # pylint:disable=C0103,W0703

                await grop.edit(str(e))


CMD_HELP.update({
    "create":
    "**Create**\
\n\n**Syntax : **`.create g <group name>`\
\n**Usage :** Creates a private group with given name.\
\n\n**Syntax : **`.create b <group name>`\
\n**Usage :** Creates a private group with bot in it and given name.\
\n\n**Syntax : **`.create c <channel name>`\
\n**Usage :** Creates a channel with given name."
})
Esempio n. 4
0
    return results


async def scam(results, lim):

    single = opener.open(results["similar_images"]).read()
    decoded = single.decode("utf-8")

    imglinks = []
    counter = 0

    pattern = r"^,\[\"(.*[.png|.jpg|.jpeg])\",[0-9]+,[0-9]+\]$"
    oboi = re.findall(pattern, decoded, re.I | re.M)

    for imglink in oboi:
        counter += 2
        if not counter >= int(lim):
            imglinks.append(imglink)
        else:
            break

    return imglinks


CMD_HELP.update({
    "reverse":
    ".reverse\
        \nUsage: Reply to a pic/sticker to revers-search it on Google Images !!"
})
Esempio n. 5
0
from quote import quote

from fridaybot import CMD_HELP
from fridaybot.utils import admin_cmd


@friday.on(admin_cmd(pattern="qs (.*)"))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    result = quote(input_str, limit=3)
    sed = ""

    for quotes in result:
        sed += str(quotes["quote"]) + "\n\n"

    await event.edit(
        f"<b><u>Quotes Successfully Gathered for given word </b></u><code>{input_str}</code>\n\n\n<code>{sed}</code>",
        parse_mode="HTML",
    )


CMD_HELP.update({
    "quotes":
    "**Quotes**\
\n\n**Syntax : **`.qs <text>`\
\n**Usage :** Automatically gets quotes for given plugin."
})
Esempio n. 6
0
        return
    for teamz in all_fed:
        try:
            await borg.send_message(chnnl_grp, "/joinfed " + teamz.feds)
            await asyncio.sleep(2)
            await borg.send_message(chnnl_grp, "/unfban " + lol_s)
            await asyncio.sleep(5)
        except:
            errors += 1
    await event.edit(
        f"**Un-Fban Completed** \nTotal Sucess : `{len_feds - errors}` \nTotal Errors : `{errors}` \nTotal Fed Len : `{len_feds}`"
    )


CMD_HELP.update({
    "fed_ban":
    "**Fed Ban**\
\n\n**Syntax : **`.fadd <fed-id>`\
\n**Usage :** Adds The Given Fed In Fban database.\
\n\n**Syntax : **`.fadd all`\
\n**Usage :** Adds All The Feds In The Database Where You Are Admin.\
\n\n**Syntax : **`.frm <fed-id>`\
\n**Usage :** Removes The Given Fed From The Fban database.\
\n**Example :** `.frm add`\
\n**Note** :** Removes All The Feds From The Database.\
\n**Example :** `.fban <username/User-ID>`\
\n**Note** :** FBans The User.\
\n**Example :** `.unfban <username/User-ID>`\
\n**Note** :** UnFbans The User."
})
Esempio n. 7
0

@friday.on(friday_on_cmd(pattern="frwd"))
async def _(event):
    if event.fwd_from:
        return
    if Config.PRIVATE_GROUP_ID is None:
        await event.edit(
            "Please set the required environment variable `PRIVATE_GROUP_ID` for this plugin to work"
        )
        return
    try:
        e = await borg.get_entity(Config.PRIVATE_GROUP_ID)
    except Exception as e:
        await event.edit(str(e))
    else:
        re_message = await event.get_reply_message()
        # https://t.me/telethonofftopic/78166
        fwd_message = await borg.forward_messages(e, re_message, silent=True)
        await borg.forward_messages(event.chat_id, fwd_message)
        await fwd_message.delete()
        await event.delete()


CMD_HELP.update({
    "fwd":
    "**Fwd**\
\n\n**Syntax : **`.frwd <reply to a message>`\
\n**Usage :** Enable Seen Counter in any message."
})
Esempio n. 8
0
@friday.on(friday_on_cmd(pattern=r"gdbye$"))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 2
    animation_ttl = range(0, 11)

    await event.edit("Thanks for contacting me..\n I'm Going to leave now...")
    animation_chars = [
        "**Bye  🙏\n Ending this chat 😒**",
        "**I'm leaving this chat now  🙏**",
        "You can again contact me anytime you like",
        "**Have a Good Day.. **",
        "Many thanks for chatting with me.. 🙏\n I'm Leaving this chat now..😜 \n Have a good day..\n\n✌️ **LEFT THE CHAT** ✌️",
    ]
    for i in animation_ttl:
        await asyncio.sleep(animation_interval)
        await event.edit(animation_chars[i % 11])


CMD_HELP.update({
    "greetings":
    ".gdn \
\nUsage: Say Good Night \n\n .gdm \
\nUsage: Say Good Morning \n\n .gnt \
\nUsage: A random Good night text \n\n .gmt \
\nUsage: A random Good Morning text \n\n .stysafe \
\nUsage: Say #StaySafe \n\n .gdbye \
\nUsage: Better way to say Good Bye"
})
Esempio n. 9
0
from uniborg.util import friday_on_cmd

from fridaybot import CMD_HELP


@friday.on(friday_on_cmd(pattern=r"gaali"))
async def test(event):
    if event.fwd_from:
        return
    await event.edit(
        "`Main roz teri behno ki banjar chut me apna lawda daalke andar haryali lata tha magar aaj unke ke baare me sunke mujhe bhut afsos huwa ki unko ab bada loudha chahye ab mera balatkaaari lawda lagataar 4 ghante tk apne muh me kon rakhega vo teri behne hi thi jo apni kaali magar rasilli chut mere saamne khol deti aur zameen pe naagin ki tarah rengne lgti thi jaise ki kisine unki chut pe naariyal tod diya ho vo b bada wala mumbai ka naariyal..apni chennal maa ko b nhi bhej rahe mere paas to main kaixe tum logo se vaada karu ki main teri maa chodd dungaw ab agar tun sach me chahta hai ki main tum dono k mc ki chut me dhammal karu to mera lawda apne muh me rakho aur kaho Sameer hamare sage papa hain Aur agar tb b tjhe apni maa ki kaali chut mere saamne nahi rakhi to tumhare ghar me ghuske tumhari maa ka balatkaar kar dungaw jaixe delhi me huwa tha ab teri chudi hui kuttiyo ki tarah apni gaand hilaate hue mere aage kalapna mt ni to tumhari fatti bhoxdi me 100 ched karunga!`"
    )


CMD_HELP.update({
    "extranotes":
    "**Extranotes**\
\n\n**Syntax : **`.gaali`\
\n**Usage :** abuse someone with this wonderful plugin."
})
Esempio n. 10
0
            response = conv.wait_event(
                events.NewMessage(incoming=True, from_users=185693644))
            await borg.forward_messages(chat, reply_message)
            response = await response
        except YouBlockedUserError:
            await event.reply(
                "```Please unblock @UrbanDictionaryBot and try again```")
            return
        if response.text.startswith("Hello,"):
            await event.edit(
                "```can you kindly disable your forward privacy settings for good?```"
            )
        else:
            await event.edit(f"{response.message.message}")


CMD_HELP.update({
    "sangmata":
    "**Sangmata**\
\n\n**Syntax : **`.sg <reply to someone's message>`\
\n**Usage :** gets name history of the person.\
\n\n**Syntax : **`.fakemail <reply to someone's message>`\
\n**Usage :** Gets you fake email to use.\
\n\n**Syntax : **`.ub <reply to a link>`\
\n**Usage :** Download from given link and uploades in telegram.\
\n\n**Syntax : **`.gid <reply to someone's message>`\
\n**Usage :** gets id and info of the person.\
\n\n**Syntax : **`.urban <reply to text>`\
\n**Usage :** Gets you meaning of replyed text."
})
Esempio n. 11
0
    uptime = get_readable_time((time.time() - Lastupdate))
    repo = Repo()
    py_v = sys.version_info[0]
    branch_name = repo.active_branch.name
    pm_caption = (
        "➥ **FRIDAY IS:** `ONLINE`\n\n"
        "➥ **SYSTEMS STATS**\n"
        f"➥ **Telethon Version:** `{tv}` \n"
        f"➥ **Python:** `{py_v}` \n"
        f"➥ **Uptime** : `{uptime}` \n"
        "➥ **Database Status:**  `Functional`\n"
        f"➥ **Current Branch** : `{branch_name}`\n"
        f"➥ **Version** : `6.5`\n"
        f"➥ **My Boss** : {DEFAULTUSER} \n"
        "➥ **Heroku Database** : `AWS - Working Properly`\n\n"
        "➥ **License** : [GNU General Public License v3.0](github.com/StarkGang/FridayUserbot/blob/master/LICENSE)\n"
        "➥ **Copyright** : By [StarkGang@Github](GitHub.com/StarkGang)\n"
        "➥ **Check Stats By Doing** `.stat`. \n\n"
        "[🇮🇳 Deploy FridayUserbot 🇮🇳](https://telegra.ph/FRIDAY-06-15)")

    await borg.send_file(alive.chat_id, PM_IMG, caption=pm_caption)
    await alive.delete()


CMD_HELP.update({
    "alive":
    "**ALive**\
\n\n**Syntax : **`.alive`\
\n**Usage :** Check if UserBot is Alive"
})
Esempio n. 12
0
        KeyValueItem("restricted", Code(user.restricted)),
        KeyValueItem("restriction_reason", Code(user.restriction_reason)),
        KeyValueItem("deleted", Code(user.deleted)),
        KeyValueItem("verified", Code(user.verified)),
        KeyValueItem("min", Code(user.min)),
        KeyValueItem("lang_code", Code(user.lang_code)),
    )

    return Section(
        title,
        general if show_general else None,
        misc if show_misc else None,
        bot if show_bot else None,
    )


CMD_HELP.update({
    "android":
    "`.u(ser) [options] (username|id)`"
    "Or, in response to a message"
    "`.u(ser) [options]`"
    "Options:"
    "`.id`: Show only the user's ID"
    "`.general`: Show general user info"
    "`.bot`: Show bot related info"
    "`.misc`: Show miscelanious info"
    "`.all`: Show all info (overrides other options)"
    "`.mention`: Inline mention the user"
    "`.forward`: Follow forwarded message"
})