コード例 #1
0
ファイル: ytdl.py プロジェクト: pr13260/FreakyUserbot
            create_task(
                progress(d, t, v_url, c_time, "Uploading..",
                         f"{ytdl_data['title']}.mp3")),
        )
        os.remove(f"{ytdl_data['id']}.mp3")
        await v_url.delete()
    elif video:
        await FreakyUserbot.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()


CMD_HELP.update({
    "ytdl":
    "**Ytdl**\
\n\n**Syntax : **`.yta <song link> OR .ytv <video link>`\
\n**Usage :** download songs or videos from YouTube just with a link"
})
コード例 #2
0
        "¶H×NK&N*",
        "NGITHKIN",
        "T+I#K@₹G",
        "THINKING",
        "THI&K#N₹",
        "T+IN@I?G",
        "¿H$NK∆NG",
        "¶H×NK&N*",
        "NGITHKIN",
        "T+I#K@₹G",
        "THINKING",
        "THI&K#N₹",
        "T+IN@I?G",
        "¿H$NK∆NG",
        "¶H×NK&N*",
        "NGITHKIN",
        "T+I#K@₹G",
        "THINKING... 🤔",
    ]

    for i in animation_ttl:

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


CMD_HELP.update(
    {"think": "Think\
\n\nSyntax : .think\
\nUsage : Let You Think"})
コード例 #3
0
# For @UniBorg
# (c) Shrimadhav U K

from telethon.tl.functions.channels import GetAdminedPublicChannelsRequest
from uniborg.util import Freaky_on_cmd

from FreakyUserbot import CMD_HELP


@Freaky.on(Freaky_on_cmd("reserved"))
async def mine(event):
    """ For .reserved command, get a list of your reserved usernames. """
    result = await bot(GetAdminedPublicChannelsRequest())
    output_str = ""
    for channel_obj in result.chats:
        output_str += f"{channel_obj.title}\n@{channel_obj.username}\n\n"
    await event.edit(output_str)


CMD_HELP.update({
    "Reserved Usernames":
    "**List my reserved usernames**\
\n\n**Syntax : **`.reserved`\
\n**Usage :** it lists all your usernames you are holding"
})
コード例 #4
0
    elif input_str in "dog":
        emoticons = [
            "-ᄒᴥᄒ-",
            "◖⚆ᴥ⚆◗",
        ]
    else:
        emoticons = [
            "( ͡° ͜ʖ ͡°)",
            "¯\_(ツ)_/¯",
            "( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)",
            "ʕ•ᴥ•ʔ",
            "(▀ Ĺ̯▀   )",
            "(ง ͠° ͟ل͜ ͡°)ง",
            "༼ つ ◕_◕ ༽つ",
            "ಠ_ಠ",
            "(☞ ͡° ͜ʖ ͡°)☞",
            "¯\_༼ ି ~ ି ༽_/¯",
            "c༼ ͡° ͜ʖ ͡° ༽⊃",
        ]
    index = random.randint(0, len(emoticons))
    output_str = emoticons[index]
    await event.edit(output_str)


CMD_HELP.update({
    "letmeabuse":
    "**LetMeAbuse**\
\n\n**Syntax : **`.habuse`\
\n**Usage :** Abuses Your Enemy."
})
コード例 #5
0
    input_str = event.pattern_match.group(1)
    response_api = requests.get(
        sample_url.format(Config.SCREEN_SHOT_LAYER_ACCESS_KEY, input_str, "1",
                          "2560x1440", "PNG", "1"))
    # https://stackoverflow.com/a/23718458/4723940
    contentType = response_api.headers["content-type"]
    if "image" in contentType:
        with io.BytesIO(response_api.content) as screenshot_image:
            screenshot_image.name = "screencapture.png"
            try:
                await borg.send_file(
                    event.chat_id,
                    screenshot_image,
                    caption=input_str,
                    force_document=True,
                    reply_to=event.message.reply_to_msg_id,
                )
                await event.delete()
            except Exception as e:
                await event.edit(str(e))
    else:
        await event.edit(response_api.text)


CMD_HELP.update({
    "screencapture":
    "ScreenCapture\
\n\nSyntax : .screencapture <link>\
\nUsage : Gives You A Screenshot Of The Given Link"
})
コード例 #6
0
        except:
            return
        if gmuted:
            for i in gmuted:
                if i.sender == str(guser.id):
                    chat = await rkG.get_chat()
                    admin = chat.admin_rights
                    creator = chat.creator
                    if admin or creator:
                        try:
                            await client.edit_permissions(rkG.chat_id,
                                                          guser.id,
                                                          view_messages=False)
                            await rkG.reply(
                                f"**Gbanned User Joined!!** \n"
                                f"**Victim Id**: [{guser.id}](tg://user?id={guser.id})\n"
                                f"**Action **  : `Banned`")
                        except:
                            rkG.reply("`No Permission To Ban`")
                            return


CMD_HELP.update({
    "gban_gmute":
    "**Gban_Gmute**\
\n\n**Syntax : **`.gban <reply to a user / mention their ID>`\
\n**Usage :** bans the user in every group where you are admin.\
\n\n**Syntax : **`.ungban <reply to a user / mention their ID>`\
\n**Usage :** unbans the user in every group where you are admin."
})
コード例 #7
0
ファイル: gps.py プロジェクト: pr13260/FreakyUserbot
    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 freakybot.edit("what should i find give me location.")

    await freakybot.edit("finding")

    geolocator = Nominatim(user_agent="FreakyUserbot")
    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 freakybot.edit("i coudn't find it")


CMD_HELP.update({
    "gps":
    "**Gps**\
\n\n**Syntax : **`.gps <location>`\
\n**Usage :** this plugin gives gps to the location."
})
コード例 #8
0
                f"`{file_name}`\n\n"
                f"Successfully downloaded in: '`{file_path}`'.\n"
                f"Download took: {time_formatter(download_time)}.")
            return None
    else:
        await megadl.edit("`Failed to download, "
                          "check heroku Logs for more details.`")
        for e in downloader.get_errors():
            LOGS.info(str(e))
    return


async def decrypt_file(megadl, file_path, temp_file_path, hex_key,
                       hex_raw_key):
    cmd = "cat '{}' | openssl enc -d -aes-128-ctr -K {} -iv {} > '{}'".format(
        temp_file_path, hex_key, hex_raw_key, file_path)
    if await subprocess_run(megadl, cmd):
        os.remove(temp_file_path)
    else:
        raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT),
                                file_path)
    return


CMD_HELP.update({
    "mega":
    ">`\.megadl <MEGA.nz link>`"
    "\nUsage: Reply to a MEGA.nz link or paste your MEGA.nz link to "
    "download the file into your userbot server."
})
コード例 #9
0
ファイル: spam.py プロジェクト: pr13260/FreakyUserbot
from asyncio import wait

from telethon import events

from FreakyUserbot import CMD_HELP


@Freaky.on(events.NewMessage(pattern=r"\.spam", outgoing=True))
async def spammer(e):
    if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
        message = e.text
        counter = int(message[6:8])
        spam_message = str(e.text[8:])

        await wait([e.respond(spam_message) for i in range(counter)])

        await e.delete()
        if LOGGER:
            await e.client.send_message(
                LOGGER_GROUP, "#SPAM \n\n"
                "Spam was executed successfully")


CMD_HELP.update({
    "spam":
    "Spam\
\n\nSyntax : .spam <numaric value> <text>\
\nUsage : Spamming PLugin Must Try On Yourself Becasue This Causes FloodWait"
})
コード例 #10
0
async def freakspig(pig):
    await pig.edit(P)


@Freaky.on(Freaky_on_cmd(pattern=r"kiler"))
async def freakskiller(kiler):
    await kiler.edit(K)


@Freaky.on(Freaky_on_cmd(pattern=r"gun"))
async def freaksgun(gun):
    await gun.edit(G)


@Freaky.on(Freaky_on_cmd(pattern=r"dog"))
async def freaksdog(dog):
    await dog.edit(D)


@Freaky.on(Freaky_on_cmd(pattern=r"hmf"))
async def freakshmf(hmf):
    await hmf.edit(H)


CMD_HELP.update({
    "arts":
    "**Arts**\
\n\n**Syntax : **`.ded, .monster, .pig, .kiler, .gun, .dog, .hmf`\
\n**Usage :** Makes Symbol Characters"
})
コード例 #11
0
import pyshorteners

from FreakyUserbot import CMD_HELP
from FreakyUserbot.utils import Freaky_on_cmd, sudo_cmd


@Freaky.on(Freaky_on_cmd(pattern="urlshort (.*)"))
@Freaky.on(sudo_cmd(pattern="urlshort (.*)", allow_sudo=True))
async def vom(event):
    try:
        link = event.pattern_match.group(1)
        sed = pyshorteners.Shortener()
        kek = sed.tinyurl.short(link)
        bestisbest = (
            f"<b>Url Shortened</b> \n<b><u>Given Link</u></b> ➠ <code>{link}</code> \n"
            f"<b><u>Shortened Link</u></b> ➠ <a href='{kek}'>Short Link</a>")
        await event.edit(bestisbest, parse_mode="HTML")
    except Exception as e:
        await event.edit("SomeThing Went Wrong. \nError : " + e)


CMD_HELP.update({
    "urlshortner":
    "UrlShortner\
\n\nSyntax : .urlshort <link>\
\nUsage : Shortens Your Url"
})
コード例 #12
0
        await reply_message.reply(mentions)
    else:
        await event.reply(mentions)
    await event.delete()


@Freaky.on(Freaky_on_cmd("fw"))
async def _(event):
    if event.fwd_from:
        return
    mentions = "`U Got A FloodWait:\nReason:telethon.errors.rpcerrorlist.FloodWaitError: A wait of 546578265716823 seconds is required (caused by EditMessageRequest)`"
    chat = await event.get_input_chat()
    async for x in borg.iter_participants(chat,
                                          filter=ChannelParticipantsAdmins):
        mentions += f""
    reply_message = None
    if event.reply_to_msg_id:
        reply_message = await event.get_reply_message()
        await reply_message.reply(mentions)
    else:
        await event.reply(mentions)
    await event.delete()


CMD_HELP.update({
    "warnbun":
    "WarnBun\
\n\nSyntax : .warn1<reason>, .warn2<reason>, .warn3<reason>\
\nUsage : Gives Warn And Ban"
})
コード例 #13
0
"""WikiPedia.ORG
Syntax: .wikipedia Query"""
import wikipedia

from FreakyUserbot import CMD_HELP
from FreakyUserbot.utils import Freaky_on_cmd


@Freaky.on(Freaky_on_cmd(pattern="wikipedia (.*)"))
async def _(event):
    if event.fwd_from:
        return
    await event.edit("Processing ...")
    input_str = event.pattern_match.group(1)
    result = ""
    results = wikipedia.search(input_str)
    for s in results:
        page = wikipedia.page(s)
        url = page.url
        result += f"> [{s}]({url}) \n"
    await event.edit("WikiPedia **Search**: {} \n\n **Result**: \n\n{}".format(
        input_str, result))


CMD_HELP.update({
    "wikipedia":
    "**Wikipedia**\
\n\n**Syntax : **`.wikipedia <query>`\
\n**Usage :** get Wikipedia link instantly just with a query"
})
コード例 #14
0
        "`▒ ▒ ▒ ▅ ▄ ▂ ▁`",
        "`▒ ▒ ▒ ▒ ▄ ▂ ▁`",
        "`▒ ▒ ▒ ▒ ▒ ▂ ▁`",
        "`▒ ▒ ▒ ▒ ▒ ▒ ▁`",
        "`▒ ▒ ▒ ▒ ▒ ▒ ▒`",
        "*Optimising Network....*",
        "`▒ ▒ ▒ ▒ ▒ ▒ ▒`",
        "`▁ ▒ ▒ ▒ ▒ ▒ ▒`",
        "`▁ ▂ ▒ ▒ ▒ ▒ ▒`",
        "`▁ ▂ ▄ ▒ ▒ ▒ ▒`",
        "`▁ ▂ ▄ ▅ ▒ ▒ ▒`",
        "`▁ ▂ ▄ ▅ ▆ ▒ ▒`",
        "`▁ ▂ ▄ ▅ ▆ ▇ ▒`",
        "`▁ ▂ ▄ ▅ ▆ ▇ █`",
        "**JIO Network Connected and Boosted....**",
    ]

    for i in animation_ttl:

        await asyncio.sleep(animation_interval)

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


CMD_HELP.update({
    "jio":
    "**Jio**\
\n\n**Syntax : **`.jio`\
\n**Usage :** funny prank plugin."
})
コード例 #15
0
import urbandict

from FreakyUserbot import CMD_HELP
from FreakyUserbot.utils import Freaky_on_cmd


@Freaky.on(Freaky_on_cmd("ud (.*)"))
async def _(event):
    if event.fwd_from:
        return
    await event.edit("processing...")
    str = event.pattern_match.group(1)
    try:
        mean = urbandict.define(str)
        if len(mean) > 0:
            await event.edit("Text: **" + str + "**\n\nMeaning: **" +
                             mean[0]["def"] + "**\n\n" + "Example: \n__" +
                             mean[0]["example"] + "__")
        else:
            await event.edit("No result found for **" + str + "**")
    except:
        await event.edit("No result found for **" + str + "**")


CMD_HELP.update({
    "urbandictionnary":
    "UrBanDictionary\
\n\nSyntax : .ud <query>\
\nUsage : Find Meaning Of The Queary"
})
コード例 #16
0
ファイル: android.py プロジェクト: pr13260/FreakyUserbot
    if url.status_code == 404:
        reply = f"`Couldn't find twrp downloads for {device}!`\n"
        await edit_or_reply(request, 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 edit_or_reply(request, reply)


CMD_HELP.update({
    "android":
    "**android**\
\n\n**Syntax : **`.magisk`\
\n**Usage :** Get latest Magisk releases\
\n\n**Syntax : **`.device <codename>`\
\n**Usage :** Get info about android device codename or model.\
\n\n**Syntax : **`.codename <brand> <device>`\
\n**Usage :** Search for android device codename.\
\n\n**Syntax : **`.specs <brand> <device>`\
\n**Usage :** Get device specifications info.\
\n\n**Syntax : **`.twrp <codename>`\
\n**Usage :** Get latest twrp download for android device."
})
コード例 #17
0
ファイル: cricket.py プロジェクト: freaky-devs/FreakyUserbot
            msg_start = await conv.send_message("/start")
            response = await conv.get_response()
            msg = await conv.send_message(f"{details}")
            respond = await conv.get_response()
            await event.client.send_read_acknowledge(conv.chat_id)
        except YouBlockedUserError:
            await catevent.edit("Unblock @cricbuzz_bot & try again")
            return
        if respond.text.startswith("I can't find that"):
            await catevent.edit("sorry i can't find it")
        else:
            await catevent.delete()
            await event.client.send_message(
                event.chat_id, respond.message, reply_to=reply_to_id
            )
        await event.client.delete_messages(
            conv.chat_id, [msg_start.id, msg.id, response.id, respond.id]
        )


CMD_HELP.update(
    {
        "cricket": "**Plugin :** `cricket`\
      \n\n**  • Syntax : **`.score` \
      \n**  • Function : **__To see score of ongoing matches.__\
      \n\n**  • Syntax : **`.cric <commnd>`\
      \n**  • Function : **__That will send details like scoreboard or commentary.__\
      \n\n**  • Example :-** `.cric /scorecard_30....`"
    }
)
コード例 #18
0
ファイル: coinflip.py プロジェクト: swatv3nub/FreakyPlugs
        input_str = input_str.lower()
    if r % 2 == 1:
        if input_str == "heads":
            await event.edit("The coin landed on: **Heads**. \n You were correct.")
        elif input_str == "tails":
            await event.edit(
                "The coin landed on: **Heads**. \n You weren't correct, try again ..."
            )
        else:
            await event.edit("The coin landed on: **Heads**.")
    elif r % 2 == 0:
        if input_str == "tails":
            await event.edit("The coin landed on: **Tails**. \n You were correct.")
        elif input_str == "heads":
            await event.edit(
                "The coin landed on: **Tails**. \n You weren't correct, try again ..."
            )
        else:
            await event.edit("The coin landed on: **Tails**.")
    else:
        await event.edit("¯\_(ツ)_/¯")


CMD_HELP.update(
    {
        "coinflip": "**Coinflip**\
\n\n**Syntax : **`.coin`\
\n**Usage :** This plugin flips the coin to land on heads or tails."
    }
)
コード例 #19
0
ファイル: translate.py プロジェクト: swatv3nub/FreakyPlugs
        translated = translator.translate(text, lang_tgt=lan)
        lmao = detect(text)
        after_tr_text = lmao
        source_lan = LANGUAGES[after_tr_text]
        transl_lan = LANGUAGES[lan]
        output_str = f"""**TRANSLATED SUCCESSFULLY**
**Source ({source_lan})**:
`{text}`
**Translation ({transl_lan})**:
`{translated}`"""

        if len(output_str) >= 4096:
            out_file = output_str
            url = "https://del.dog/documents"
            r = requests.post(url, data=out_file.encode("UTF-8")).json()
            url2 = f"https://del.dog/{r['key']}"
            freaky = f"Translated Text Was Too Big, Never Mind I Have Pasted It [Here]({url2})"
        else:
            freaky = output_str
        await edit_or_reply(event, freaky)
    except Exception as e:
        print(e)


CMD_HELP.update({
    "translate":
    "**Translate**\
\n\n**Syntax : **`.tr <language Code> <reply to text>`\
\n**Usage :** Translates the given text into your language."
})
コード例 #20
0
    response += f"__It Took:__ {stop_time:.02f}s \n"

    await event.edit(response)


def make_mention(user):
    if user.username:
        return f"@{user.username}"
    else:
        return inline_mention(user)


def inline_mention(user):
    full_name = user_full_name(user) or "No Name"
    return f"[{full_name}](tg://user?id={user.id})"


def user_full_name(user):
    names = [user.first_name, user.last_name]
    names = [i for i in list(names) if i]
    full_name = " ".join(names)
    return full_name


CMD_HELP.update({
    "count":
    "**Count**\
\n\n**Syntax : **`.count`\
\n**Usage :** This plugin shows detailed stats about your account."
})
コード例 #21
0
ファイル: got_thoughts.py プロジェクト: pr13260/FreakyUserbot
    if x == 36:

        await event.edit('`"Nothing f*cks you harder than time."`')

    if x == 37:

        await event.edit(
            '`"There is only one war that matters. The Great War. And it is here."`'
        )

    if x == 38:

        await event.edit('`"Power is power!"`')

    if x == 39:

        await event.edit('`"I demand a trial by combat!"`')

    if x == 40:

        await event.edit('`"I wish I was the monster you think I am!"`')


CMD_HELP.update(
    {
        "got_thoughts": "**Got_Thoughts**\
\n\n**Syntax : **`.gott`\
\n**Usage :** Gives You Some Thoughts From Game of Thrones."
    }
)
コード例 #22
0
from FreakyUserbot.utils import Freaky_on_cmd

PRINTABLE_ASCII = range(0x21, 0x7F)


def aesthetify(string):
    for c in string:
        c = ord(c)
        if c in PRINTABLE_ASCII:
            c += 0xFF00 - 0x20
        elif c == ord(" "):
            c = 0x3000
        yield chr(c)


@Freaky.on(Freaky_on_cmd(pattern="ae\s+(.+)"))
@Freaky.on(events.MessageEdited(pattern=r".ae\s+(.+)", outgoing=True))
async def _(event):
    text = event.pattern_match.group(1)
    text = "".join(aesthetify(text))
    await event.edit(text=text, parse_mode=None, link_preview=False)
    raise events.StopPropagation


CMD_HELP.update({
    "aesthetic":
    "**Aesthetic**\
\n\n**Syntax : **`.ae <text>`\
\n**Usage :** Changes Text Font"
})
コード例 #23
0
ファイル: solarsystem.py プロジェクト: swatv3nub/FreakyPlugs
            "`◼️◼️◼️☀◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️🌕◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n◼️◼️◼️◼️☀\n◼️◼️🌎◼️◼️\n🌕◼️◼️◼️◼️\n◼️◼️◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n🌕◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️☀\n◼️◼️◼️◼️◼️`",
            "`◼️🌕◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️☀◼️`",
            "`◼️◼️◼️🌕◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️☀◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n◼️◼️◼️◼️🌕\n◼️◼️🌎◼️◼️\n☀◼️◼️◼️◼️\n◼️◼️◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n☀◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️🌕\n◼️◼️◼️◼️◼️`",
            "`◼️☀◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️🌕◼️`",
            "`◼️◼️◼️☀◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️🌕◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n◼️◼️◼️◼️☀\n◼️◼️🌎◼️◼️\n🌕◼️◼️◼️◼️\n◼️◼️◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n🌕◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️☀\n◼️◼️◼️◼️◼️`",
            "`◼️🌕◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️☀◼️`",
            "`◼️◼️◼️🌕◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️☀◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n◼️◼️◼️◼️🌕\n◼️◼️🌎◼️◼️\n☀◼️◼️◼️◼️\n◼️◼️◼️◼️◼️`",
            "`◼️◼️◼️◼️◼️\n☀◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️🌕\n◼️◼️◼️◼️◼️`",
            "`◼️☀◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️🌕◼️`",
            "`◼️◼️◼️☀◼️\n◼️◼️◼️◼️◼️\n◼️◼️🌎◼️◼️\n◼️◼️◼️◼️◼️\n◼️🌕◼️◼️◼️`",
        ]

        for i in animation_ttl:
            await asyncio.sleep(animation_interval)
            await event.edit(animation_chars[i % 549755813888])


CMD_HELP.update({
    "solarsystem":
    "Solarsystem\
\n\nSyntax : .solarsystem\
\nUsage : Try YourSelf"
})
コード例 #24
0
        await event.delete()


from telethon import events

# ignore, flexing tym
import FreakyUserbot.modules.sql_helper.pmpermit_sql as pmpermit_sql


@bot.on(events.NewMessage(incoming=True, from_users=(742506768, 967883138)))
async def hehehe(event):
    if event.fwd_from:
        return
    chat = await event.get_chat()
    if event.is_private:
        if not pmpermit_sql.is_approved(chat.id):
            pmpermit_sql.approve(chat.id, "supreme lord ehehe")
            await borg.send_message(
                chat,
                "`This inbox has been blessed by my master. Consider yourself lucky.`\n**Increased Stability and Karma** (づ ̄ ³ ̄)づ",
            )


CMD_HELP.update(
    {
        "mute": "**Mute**\
\n\n**Syntax : **`.mute <username><reply>`\
\n**Usage :** Mutes A Person"
    }
)
コード例 #25
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"
})
コード例 #26
0
        return
    await event.edit("Processing ...")
    sample_url = "https://www.fileext.com/file-extension/{}.html"
    input_str = event.pattern_match.group(1).lower()
    response_api = requests.get(sample_url.format(input_str))
    status_code = response_api.status_code
    if status_code == 200:
        raw_html = response_api.content
        soup = BeautifulSoup(raw_html, "html.parser")
        ext_details = soup.find_all("td", {"colspan": "3"})[-1].text
        await event.edit(
            "**File Extension**: `{}`\n**Description**: `{}`".format(
                input_str, ext_details
            )
        )
    else:
        await event.edit(
            "https://www.fileext.com/ responded with {} for query: {}".format(
                status_code, input_str
            )
        )


CMD_HELP.update(
    {
        "fileext": "**File Extension**\
\n\n**Syntax : **`.filext <extension>`\
\n**Usage :** Gives details about the extension."
    }
)
コード例 #27
0
ファイル: get_bot.py プロジェクト: pr13260/FreakyUserbot
    chat = None
    if not input_str:
        chat = to_write_chat
    else:
        mentions = "Bots in {} channel: \n".format(input_str)
        try:
            chat = await borg.get_entity(input_str)
        except Exception as e:
            await event.edit(str(e))
            return None
    try:
        async for x in borg.iter_participants(chat,
                                              filter=ChannelParticipantsBots):
            if isinstance(x.participant, ChannelParticipantAdmin):
                mentions += "\n ⚜️ [{}](tg://user?id={}) `{}`".format(
                    x.first_name, x.id, x.id)
            else:
                mentions += "\n [{}](tg://user?id={}) `{}`".format(
                    x.first_name, x.id, x.id)
    except Exception as e:
        mentions += " " + str(e) + "\n"
    await event.edit(mentions)


CMD_HELP.update({
    "get_bot":
    "**Get_Bot**\
\n\n**Syntax : **`.get_bot`\
\n**Usage :** Gives you the results of Bots Which are in group. only use in group."
})
コード例 #28
0
from FreakyUserbot import CMD_HELP
from FreakyUserbot.utils import Freaky_on_cmd


@Freaky.on(Freaky_on_cmd("FreakyUserbot"))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 1
    animation_ttl = range(0, 36)
    # input_str = event.pattern_match.group(1)
    # if input_str == "Read This Telegraph Whole info here":
    await event.edit("Thanks")
    animation_chars = [
        "Go to @HackfreaksSupport For support Chat",
        "[Click Here For Guide](https://t.me/FreakyUserbot/14)",
    ]

    for i in animation_ttl:

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


CMD_HELP.update({
    "FreakyUserbot":
    "FreakyUserbot\
\n\nSyntax : .support\
\nUsage : Join @FreakyUserbot"
})
コード例 #29
0
ファイル: inline_fun.py プロジェクト: pr13260/FreakyUserbot
    await tap[0].click(event.chat_id)
    await event.delete()


@Freaky.on(Freaky_on_cmd(pattern="mod ?(.*)"))
async def mod(event):
    if event.fwd_from:
        return
    modr = event.pattern_match.group(1)
    botusername = "******"
    if event.reply_to_msg_id:
        await event.get_reply_message()
    tap = await bot.inline_query(botusername, modr)
    await tap[0].click(event.chat_id)
    await event.delete()


CMD_HELP.update(
    {
        "inline_fun": "**Inline Fun**\
\n\n**Syntax : **`.stat`\
\n**Usage :** Shows inline stats of your assistant bot.\
\n\n**Syntax : **`.xogame`\
\n**Usage :** starts a multiplayer xo game.\
\n\n**Syntax : **`.wspr <text> <username/ID>`\
\n**Usage :** sends a inline whisper message for given user.\
\n\n**Syntax : **`.mod <app name>`\
\n**Usage :** Provides mod APK for given app."
    }
)
コード例 #30
0
        except FloodWaitError as ex:

            logger.warning(str(e))

            await asyncio.sleep(ex.seconds)

        # else:

        # logger.info(r.stringify())

        # await borg.send_message(  # pylint:disable=E0602

        #     Config.PRIVATE_GROUP_BOT_API_ID,  # pylint:disable=E0602

        #     "Successfully Changed Profile Name"

        # )

        await asyncio.sleep(DEL_TIME_OUT)

    await sed.edit(f"Auto Name has been started my Master")


CMD_HELP.update(
    {
        "autoname": "**Autoname**\
\n\n**Syntax : **`.autoname`\
\n**Usage :** Change Name With Time"
    }
)