Пример #1
0
async def _(event):
    if event.fwd_from:
        return
    silent = True
    input_str = event.pattern_match.group(1)
    if input_str:
        silent = False
    if event.message.reply_to_msg_id is not None:
        message_id = event.message.reply_to_msg_id
        try:
            await borg(
                functions.messages.UpdatePinnedMessageRequest(
                    event.chat_id, message_id, silent
                )
            )
        except Exception as e:
            await event.edit(str(e))
        else:
            await event.delete()
    else:
        await event.edit("Reply to a message to pin the message in this Channel.")

        CMD_HELP.update(
            {
                "pin_massage": "Pin_Massage**\
\n\n**Syntax : .cpin <reply>\
\nUsage : Pins The Replyed Massage In The Group Or Channel"
            }
        )
Пример #2
0
async def _(event):
    args = event.pattern_match.group(1).lower()
    if args:
        if args in CMD_HELP:
            await event.edit(f"Here is some help for the {CMD_HELP[args]}")
        else:
            await event.edit(
                f"Help string for {args} not found! Type ```.help``` to see valid module names."
            )
    else:
        string = ""
        for i in CMD_HELP.values():
            string += f"`{str(i[0])}`, "
        string = string[:-2]
        await event.edit(
            "Please specify which module you want help for!\n\n" f"{string}"
        )
Пример #3
0
        animation_chars = [
            "F",
            "U",
            "C",
            "K",
            "Y",
            "O",
            "U",
            "B",
            "C",
            "FK",
            "UU",
            "FCUK",
            "UOY",
            "C",
            "F",
            "Y",
            "F",
            "Ok Saar 😇",
        ]

        for i in animation_ttl:

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


CMD_HELP.update({"ok": "Ok**\
\n\n**Syntax : .ok\
\nUsage : Try YourSelf"})
Пример #4
0
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 = [
        "Click here to Go to Telegram Tutorial",
        "[Click Here For Guide](https://telegram.dog/)",
    ]

    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"
    }
)
Пример #5
0
"""use command .ducduckgo"""

from uniborg.util import Freaky_on_cmd

from FreakyUserbot import CMD_HELP


@Freaky.on(Freaky_on_cmd("ducduckgo (.*)"))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    sample_url = "https://duckduckgo.com/?q={}".format(input_str.replace(" ", "+"))
    if sample_url:
        link = sample_url.rstrip()
        await event.edit(
            "Let me 🦆 DuckDuckGo that for you:\n🔎 [{}]({})".format(input_str, link)
        )
    else:
        await event.edit("something is wrong. please try again later.")


CMD_HELP.update(
    {
        "duckduckgo": "**Duckduckgo**\
\n\n**Syntax : **`.ducduckgo <query>`\
\n**Usage :** get duckduckgo search query link"
    }
)