Exemplo n.º 1
0
async def waifu(animu):
    # """Creates random anime sticker!"""

    text = animu.pattern_match.group(1)
    if not text:
        if animu.is_reply:
            text = (await animu.get_reply_message()).message
        else:
            await edit_or_reply(
                animu, "`You haven't written any article, Waifu is going away.`"
            )
            return
    animus = [1, 3, 7, 9, 13, 22, 34, 35, 36, 37, 43, 44, 45, 52, 53, 55]
    sticcers = await bot.inline_query(
        "stickerizerbot", f"#{random.choice(animus)}{(deEmojify(text))}"
    )
    await sticcers[0].click(
        animu.chat_id,
        reply_to=animu.reply_to_msg_id,
        silent=True if animu.is_reply else False,
        hide_via=True,
    )
    await animu.delete()

    CMD_HELP.update({"waifu": ".waifu : Anime that makes your writing fun."})
Exemplo n.º 2
0
import asyncio
from telethon import events


@borg.on(admin_cmd(pattern="test ?(.*)"))
async def _(event):
    if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@",
                                                             "!"):

        await event.edit("`Testing ULTRA X....`")
        await asyncio.sleep(2)
        await event.edit("`Testing ULTRA X..`")
        await asyncio.sleep(2)
        await event.edit("__Testing Successful__")
        await asyncio.sleep(2)
        await event.edit("`Making Output` \n\nPlease wait")
        await asyncio.sleep(2)
        await event.edit("__Output Successful__")
        await asyncio.sleep(3.5)
        await event.edit(
            "Your[ULTRA X](https:/t.me/hackerget0) is working Fine...\n       Join @teamishere For Any Help......"
        )


CMD_HELP.update({
    "test":
    "**Plugin : **`test`\
    \n\n**Syntax : **`.test`\
    \n**Function : **this is only plugin for watching"
})
Exemplo n.º 3
0
                        DocumentAttributeVideo(
                            duration=0,
                            w=1,
                            h=1,
                            round_message=True,
                            supports_streaming=True,
                        )
                    ],
                    progress_callback=lambda d, t: asyncio.get_event_loop(
                    ).create_task(
                        progress(d, t, uas_event, c_time, "Uploading...",
                                 file_name)))
            elif spam_big_messages:
                await uas_event.edit("TBD: Not (yet) Implemented")
                return
            os.remove(thumb)
            await uas_event.edit("Uploaded successfully !!")
        except FileNotFoundError as err:
            await uas_event.edit(str(err))
    else:
        await uas_event.edit("404: File Not Found")


CMD_HELP.update({
    "download":
    ".dl <link|filename> or reply to media\
\nUsage: Downloads file to the server.\
\n\n.upload <path in server>\
\nUsage: Uploads a locally stored file to the chat."
})
Exemplo n.º 4
0
            # continue sending required_file_name
        else:
            os.remove(required_file_name)
            required_file_name = required_file_name + ".opus"
        end = datetime.now()
        ms = (end - start).seconds
        await borg.send_file(
            event.chat_id,
            required_file_name,
            # caption="Processed {} ({}) in {} seconds!".format(text[0:97], lan, ms),
            reply_to=event.message.reply_to_msg_id,
            allow_cache=False,
            voice_note=True)
        os.remove(required_file_name)
        await event.edit("Processed {} ({}) in {} seconds!".format(
            text[0:97], lan, ms))
        await asyncio.sleep(5)
        await event.delete()
    except Exception as e:
        await event.edit(str(e))


CMD_HELP.update({
    "voice":
    " Google Text to Speech\
\nAvailable Commands:\
\n.voice LanguageCode as reply to a message\
\n\n.voice LangaugeCode | text to speak\
"
})
Exemplo n.º 5
0
                                         NOT_FOUND_STRING,
                                         parse_mode="html",
                                         time=5)
            await event.edit(SENDING_STRING, parse_mode="html")
            await baka[0].click(0)
            music = await conv.get_response()
            await event.client.send_read_acknowledge(conv.chat_id)
        except YouBlockedUserError:
            await event.edit(BOT_BLOCKED_STRING, parse_mode="html")
            return
        await event.client.send_file(
            event.chat_id,
            music,
            caption=f"<b>==> <code>{song}</code></b>",
            parse_mode="html",
        )
        await event.delete()
        await delete_messages(event, chat, purgeflag)


CMD_HELP.update({
    "utube":
    "__**PLUGIN NAME :** All YouTube__\
    \n\n📌** CMD ★** `.uta (song name)`\
    \n**USAGE   ★  **Send sudio song via Lybot\
    \n\n📌** CMD ★** `.utv (song name)`\
    \n**USAGE   ★  **Send video song via vidbot \
    \n\n📌** CMD ★** `.ut (utube video link)`\
    \n**USAGE   ★  **not fixed yet, we'll try to fix later 😅😅"
})
Exemplo n.º 6
0
                LOGGER_GROUP, "#MEDIASPAM \n\n"
                "MediaSpam was executed successfully boss")


@register(outgoing=True, pattern="^.delayspam (.*)")
async def spammer(e):
    spamDelay = float(e.pattern_match.group(1).split(' ', 2)[0])
    counter = int(e.pattern_match.group(1).split(' ', 2)[1])
    spam_message = str(e.pattern_match.group(1).split(' ', 2)[2])
    await e.delete()
    for i in range(1, counter):
        await e.respond(spam_message)
        await asyncio.sleep(spamDelay)
    if LOGGER:
        await e.client.send_message(
            LOGGER_GROUP, "#DelaySPAM\n"
            "DelaySpam was executed successfully")


CMD_HELP.update({
    "spam":
    ".spam <no of msgs> <your msg>"
    "\nUsage: spams the current chat, the current limit for this is from 1 to 99.\n\n"
    ".bigspam <no of msgs> <your msg>"
    "\nUsage: Spams the current chat, the current limit is above 100.\n\n"
    ".mspam <no of spam> (with reply to media)"
    "\nUsage: Spams the current chat with number you did put in <no of spam>.\n\n"
    ".delayspam <delay time> <count> <msg>"
    "\nUsage: Spams the current chat with with the input msgs with a delay time that has been given as its input.\n\n"
})
Exemplo n.º 7
0
    text = deEmojify(text)
    borgfile = await kannagen(text)
    await borg.client.send_file(borg.chat_id, borgfile, reply_to=reply_to_id)
    await borg.delete()


CMD_HELP.update({
    "tweet":
    "Tweet\
\n\n`.tweet` (text)\
     \nUsage : Tweet with modi\
\n\n`.modi` (text)\
     \nUsage : Tweet with modi\
\n\n`.trump` (text)\
     \nUsage : Tweet with trump\
\n\n`.mia` (text)\
     \nUsage : Tweet with mia\
\n\n`.pappu` (text)\
     \nUsage : Tweet with Rahul Gandhi\
\n\n`.gandhi` (text)\
     \nUsage : Tweet with Baapu🥺\n(No offence. Fun purpose only)\
\n\n`.sunny` (text)\
     \nUsage : Tweet with sunny leone\
\n\n`.johhny` (text)\
     \nUsage : Tweet with johhny sins\
\n\n`.cmm` (text)\
     \nUsage : Get a banner\
\n\n`.kanna` (text)\
     \nUsage : Kanna write for you"
})
Exemplo n.º 8
0
              audio = await conv.get_response()
              await borg.send_message(event.chat_id, audio.text)
              await event.delete()
          except YouBlockedUserError:
              await event.edit("Error: unblock @inhumanDexBot and retry!")
  elif "@" in sysarg:
      async with borg.conversation(bot) as conv:
          try:
              await conv.send_message("/start")
              await conv.get_response()
              await conv.send_message("/type " + sysarg)
              audio = await conv.get_response()
              await borg.send_message(event.chat_id, audio.text)
              await event.delete()
          except YouBlockedUserError:
              await event.edit("Error: unblock @MadBoy_Rotomgram2_Bot and try again!")
  elif "" in sysarg:
      async with borg.conversation(bot) as conv:
          try:
              await conv.send_message("/start")
              await conv.get_response()
              await conv.send_message("/type " + sysarg)
              audio = await conv.get_response()
              await borg.send_message(event.chat_id, audio.text)
              await event.delete()
          except YouBlockedUserError:
              await event.edit("Error: unblock @MadBoy_Rotomgram2_Bot `and try again!")

CMD_HELP.update({
   "weak":"this plugin is info of pokemon weakness type .weak fire or .weak any types"})
Exemplo n.º 9
0
        KeyValueItem('bot_inline_placeholder',
                     Code(user.bot_inline_placeholder)),
        KeyValueItem('bot_nochats', Code(user.bot_nochats)))

    misc = SubSection(
        Bold('misc'), 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"
})
Exemplo n.º 10
0
    except BaseException:
        pass


async def get_font_file(client, channel_id, search_kw=""):
    # first get the font messages
    font_file_message_s = await client.get_messages(
        entity=channel_id,
        filter=InputMessagesFilterDocument,
        # this might cause FLOOD WAIT,
        # if used too many times
        limit=None,
        search=search_kw,
    )
    # get a random font from the list of fonts
    # https://docs.python.org/3/library/random.html#random.choice
    font_file_message = random.choice(font_file_message_s)
    # download and return the file path
    return await client.download_media(font_file_message)


CMD_HELP.update({
    "stickerfun":
    "**Plugin : **`stickerfun`\
        \n\n**Syntax : **`.waifu` <your txt>\
        \n**Usage : **Anime that makes your writing fun.\
        \n\n**Syntax : **`.stcr` <your txt>\
        \n**Usage : **your text as sticker\
    "
})