Esempio n. 1
0
        if True: #lazy indentation workaround xD
            if input_str:
              response = await silently_send_message(bot_conv, quote)
            elif reply:
              response = bot_conv.wait_event(events.NewMessage(incoming=True,from_users=1031952739))
              await borg.forward_messages(bot, quote)
              response = await response
              response = response.message
            if response.text.startswith("Command"):
                await event.edit(f"Invalid message type.")
                return
            await event.reply(response)
            await event.delete()


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({
    "quotly": "\
**Requested Module --> quotly**\
\n\n**Detailed usage of fuction(s):**\
\n\n```.qbot <text_to_quote> [or as a reply to a message to quote]```\
\nUsage: Quotes the target message.\nUses @QuotLyBot.\
"
})
Esempio n. 2
0
                               "*.jpg")
    os.rename("*.jpg", "boobs.jpg")
    await e.client.send_file(e.chat_id, "boobs.jpg")
    os.remove("boobs.jpg")
    await e.delete()


@borg.on(admin_cmd(pattern="butts(?: |$)(.*)"))
async def butts(e):
    await e.edit("`Finding some beautiful butts...`")
    await sleep(1)
    await e.edit("`Sending some beautiful butts...`")
    nsfw = requests.get("http://api.obutts.ru/noise/1").json()[0]["preview"]
    urllib.request.urlretrieve("http://media.obutts.ru/{}".format(nsfw),
                               "*.jpg")
    os.rename("*.jpg", "butts.jpg")
    await e.client.send_file(e.chat_id, "butts.jpg")
    os.remove("butts.jpg")
    await e.delete()


SYNTAX.update({
    "nsfw":
    ">`.amimu` or `aninsfw`"
    "\nUsage: Go find Yourself.\n"
    ">`.boobs`"
    "\nUsage: Get boobs image.\n"
    ">`.butts`"
    "\nUsage: Get butts image."
})
Esempio n. 3
0

@borg.on(admin_cmd(pattern='iff(?: |$)(.*)'))
async def pressf(f):
    """Pays respects"""
    args = f.text.split()
    arg = (f.text.split(' ', 1))[1] if len(args) > 1 else None
    if len(args) == 1:
        r = random.randint(0, 3)
        logger.info(r)
        if r == 0:
            await f.edit("┏━━━┓\n┃┏━━┛\n┃┗━━┓\n┃┏━━┛\n┃┃\n┗┛")
        elif r == 1:
            await f.edit("╭━━━╮\n┃╭━━╯\n┃╰━━╮\n┃╭━━╯\n┃┃\n╰╯")
        else:
            arg = "F"
    if arg is not None:
        out = ""
        F_LENGTHS = [5, 1, 1, 4, 1, 1, 1]
        for line in F_LENGTHS:
            c = max(round(line / len(arg)), 1)
            out += (arg * c) + "\n"
        await f.edit("`" + out + "`")


SYNTAX.update({
    "lyrics":
    "**Usage:** `provide artist and song name to find lyrics`\n\n"
    "For multiple-word artist name use * (Exmpl: .`lyrics Валентин*Стрыкало Все решено`)"
})
Esempio n. 4
0
        await message.delete()
        return

    await message.edit(f"```Getting {cmd} fact```")
    link = "https://some-random-api.ml/facts/{animal}"
    if cmd.lower() in animals:
        fact_link = link.format(animal=cmd.lower())
        try:
            data = await AioHttp().get_json(fact_link)
            fact_text = data["fact"]
        except Exception:
            await message.edit("```The fact API could not be reached```")
            await asyncio.sleep(3)
            await message.delete()
        else:
            await message.edit(f"__{cmd}__\n\n`{fact_text}`")
    else:
        await message.edit("`Unsupported animal...`")
        await asyncio.sleep(3)
        await message.delete()


SYNTAX.update(
    {
        "animals": ">`.animal` <dog|cat|panda|redpanda|koala|bird|fox>"
        "\nUsage: Send you a animal picture.\n"
        ">`.afact <animal name>`"
        "\nUsage: A fact about that animal."
    }
)
Esempio n. 5
0
@borg.on(events.NewMessage(pattern="^.musi(?: |$)(.*)"))
async def xmusical(musical):

    args = musical.pattern_match.group(1)
    if not args:
        get = await musical.get_reply_message()
        args = get.text
    if not args:
        await musical.edit("`What I am Supposed to musicify for U Dumb`")
        return
    string = ''.join(args).lower()
    for normiecharacter in string:
        if normiecharacter in normiefont:
            musicalstyle = musicalfont[normiefont.index(normiecharacter)]
            string = string.replace(normiecharacter, musicalstyle)
    await musical.edit(string)


SYNTAX.update({
    "weebify":
    "Usage: Good Fonts\
\n\n`.weeb` Weebify a text\
\n\n`.cur` make text cursive.\
\n\n`.curb` make text cursive bold.\
\n\n`.medi` make text medival.\
\n\n`.medib` make text medival bold.\
\n\n`.ds` make text doublestruck.\
\n\n`.bold` make text bold.\
\n\n`.musi` make text musical."
})
Esempio n. 6
0
    del members


def split_message(text, length=4096, offset=200):
    return [
        text[text.find("\n", i - offset, i +
                       1) if text.find("\n", i - offset, i +
                                       1) != -1 else i:text.
             find("\n", i + length - offset, i +
                  length) if text.find("\n", i + length - offset, i +
                                       length) != -1 else i + length]
        for i in range(0, len(text), length)
    ]


def get_who_string(who):
    who_string = html.escape(get_display_name(who))
    if isinstance(who, (User, Channel)) and who.username:
        who_string += f" <i>(@{who.username})</i>"
    who_string += f", <a href='tg://user?id={who.id}'>#{who.id}</a>"
    return who_string


SYNTAX.update({
    "whois":
    ">`.whois <username> or reply to someone's message with .whois`"
    "\nUsage: Gets info of an user."
    ">`.members`"
    "\nUsage: Show list of members in a group"
})
Esempio n. 7
0
            return
        if event.message.entities:
            probable_user_mention_entity = event.message.entities[0]

            if isinstance(probable_user_mention_entity, MessageEntityMentionName):
                user_id = probable_user_mention_entity.user_id
                user_obj = await event.client.get_entity(user_id)
                return user_obj
        try:
            user_obj = await event.client.get_entity(user)
        except (TypeError, ValueError):
            await event.edit("Could not fetch info of that user.")
            return None
    return user_obj, extra


SYNTAX.update(
    {
        "gadmin": ".gban <username/reply/userid> <reason (optional)>\
\n**Usage : **Bans the person in all groups where you are admin .\
\n\n.ungban <username/reply/userid>\
\n**Usage : **Reply someone's message with .ungban to remove them from the gbanned list.\
\n\n.listgban\
\n**Usage : **Shows you the gbanned list and reason for their gban.\
\n\n.gmute <username/reply> <reason (optional)>\
\n**Usage : **Mutes the person in all groups you have in common with them.\
\n\n.ungmute <username/reply>\
\n**Usage : **Reply someone's message with .ungmute to remove them from the gmuted list."
    }
)
Esempio n. 8
0
    recovery += f"<code>{s['changelog']}</code>\n\n"
    msg = info
    msg += recovery
    notes_ = s.get('notes')
    if notes_:
        notes = t.post(title='READ Notes', author="", text=notes_)
        msg += f"🗒️ <a href={notes['url']}>NOTES</a>\n"
    msg += f"⬇️ <a href={s['url']}>DOWNLOAD</a>"
    await borg.send_file(message.chat_id,
                         file=photo,
                         caption=msg,
                         parse_mode='HTML')


SYNTAX.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 :** `.ofox <codename>`\
\n**Usage :** Get latest Orange Fox recovery for your device.\
\n\n**Syntax : **`.twrp <codename>`\
\n**Usage :** Get latest twrp download for android device."
})
Esempio n. 9
0
@borg.on(admin_cmd(pattern="upcoming ?(.*)"))
async def upcoming(message):
    rep = "<b>Upcoming anime</b>\n"
    later = jikan.season_later()
    anime = later.get("anime")
    for new in anime:
        name = new.get("title")
        url = new.get("url")
        rep += f"• <a href='{url}'>{name}</a>\n"
        if len(rep) > 1000:
            break
        await message.edit(rep, parse_mode="html")


def replace_text(text):
    return text.replace('"', "").replace("\\r",
                                         "").replace("\\n",
                                                     "").replace("\\", "")


SYNTAX.update({
    "animelist":
    "Usage: Anime Information\
\n\n`.anime <anime>` Returns with Anime information.\
\n\n`.character <name>` Returns with Character information.\
\n\n`.manga <manga name>` Returns with the Manga information.\
\n\n`.user <MAL username>` Returns with MAL information.\
\n\n`.sh <kaizoku or kayo> <anime name>` Returns with the Anime Downlaod link.\
\n\n`.upcoming` Returns with Upcoming Anime information."
})
Esempio n. 10
0
        reply_message,
        downloaded_file_name,
    )
    im = Image.open(rotate).convert("RGB")
    IMG = im.rotate(value, expand=1)
    IMG.save(Converted, quality=95)
    await event.client.send_file(
        event.chat_id, Converted, reply_to=event.reply_to_msg_id
    )
    await event.delete()
    os.remove(rotate)
    os.remove(Converted)


SYNTAX.update(
    {
        "transform": ">`.ghost`"
        "\nUsage: Enchance your image to become a ghost!."
        "\n\n>`.flip`"
        "\nUsage: To flip your image"
        "\n\n>`.mirror`"
        "\nUsage: To mirror your image"
        "\n\n>`.bw`"
        "\nUsage: To Change your colorized image to b/w image!"
        "\n\n>`.poster`"
        "\nUsage: To posterize your image!"
        "\n\n>`.rotate <value>`"
        "\nUsage: To rotate your image\n* The value is range 1-360 if not it'll give default value which is 90"
    }
)
Esempio n. 11
0
        else:
            return await megadl.edit(
                f"`{file_name}`\n\n"
                f"Successfully downloaded in: `{file_path}`.\n"
                f"Download took: {time_formatter(download_time)}.")
    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


SYNTAX.update({
    "mega":
    ".mega <MEGA.nz link>"
    "\nUsage: Reply to a MEGA.nz link or paste your MEGA.nz link to "
    "download the file into your userbot server."
})
Esempio n. 12
0
                    "`A poll option used invalid data (the data may be too long).`",
                )
            except ForbiddenError:
                await edit_or_reply(catpoll,
                                    "`This chat has forbidden the polls`")
            except Exception as e:
                await edit_or_reply(catpoll, str(e))
        else:
            await edit_or_reply(
                catpoll,
                "Make sure that you used Correct syntax `.poll question ; option1 ; option2`",
            )


def Build_Poll(options):
    return [
        PollAnswer(option, bytes(i))
        for i, option in enumerate(options, start=1)
    ]


SYNTAX.update({
    "poll":
    "**Plugin :**`poll`\
        \n\n**Syntax :** `.poll`\
        \n**Usage : **If you doesnt give any input it sends a default poll. if you like customize it then use this syntax :\
        \n `.poll question ; option 1; option2 ;`\
        \n ';' this seperates the each option and question \
        "
})
Esempio n. 13
0
        try:
            user_obj = await event.client.get_entity(user)
        except (TypeError, ValueError):
            await event.edit("Could not fetch info of that user.")
            return None
    return user_obj, extra


async def get_user_from_id(user, event):
    if isinstance(user, str):
        user = int(user)
    try:
        user_obj = await event.client.get_entity(user)
    except (TypeError, ValueError) as err:
        await event.edit(str(err))
        return None
    return user_obj


SYNTAX.update(
    {
        "tadmin": "**Plugin :** `tadmin`\
      \n\n**Syntax : **`.tmute <reply/username/userid> <time> <reason>`\
      \n**Usage : **Temporary mutes the user for given time.\
      \n\n**Syntax : **`.tban <reply/username/userid> <time> <reason>`\
      \n**Usage : **Temporary bans the user for given time.\
      \n\n**Time units : ** (2m = 2 minutes) ,(3h = 3hours)  ,(4d = 4 days) ,(5w = 5 weeks)\
      This times are example u can use anything with thoose untis "
    }
)
Esempio n. 14
0
        msg += f"**icon :** `{mode}`\n"
        msg += f"**Size :** `{humanbytes(size)}`\n"
        msg += f"**Last Modified Time:** `{time2}`\n"
        msg += f"**Last Accessed Time:** `{time3}`"

    if len(msg) > Config.MAX_MESSAGE_SIZE_LIMIT:
        with io.BytesIO(str.encode(msg)) as out_file:
            out_file.name = "ls.txt"
            await borg.send_file(event.chat_id,
                                 out_file,
                                 force_document=True,
                                 allow_cache=False,
                                 caption=path)
            await event.delete()
    else:
        await event.edit(msg)


SYNTAX.update({
    "filemanager":
    "List Files plugin for userbot \
     \ncmd: `.ls`\
     \nUSAGE : will return files from current working directory\
     \n\t.ls path\
     \nUSAGE : will return output according to path  \
     \n\n .ls file path\
     \nUSAGE : will return file details\
     \n\nSimple Module for people who dont wanna use shell executor for listing files.\
"
})
Esempio n. 15
0
    if reply_message.sender.bot:
        await event.edit("Reply to actual users message.")
        return
    downloaded_file_name = await borg.download_media(
        reply_message, Var.TEMP_DOWNLOAD_DIRECTORY)
    end = datetime.now()
    ms = (end - start).seconds
    await event.edit("Downloaded to `{}` in **{}** seconds.".format(
        downloaded_file_name, ms))
    async with borg.conversation(chat) as conv:
        try:
            await conv.send_message("/start")
            await conv.get_response()
            await conv.send_file(downloaded_file_name)
            ascii = await conv.get_response()
            await borg.send_file(
                event.chat_id,
                ascii,
                caption="💠**Here's the requested ascii image!**💠")
            await event.delete()
        except YouBlockedUserError:
            await event.edit("**Error:** `unblock` @asciiart_bot `and retry!`")
            await event.delete()


SYNTAX.update({
    "mashup":
    "`.mashup` <text> :\
      \n**USAGE:** Send you the related video message of given text . "
})
Esempio n. 16
0
    contentType = response_api.headers["content-type"]
    end = datetime.now()
    ms = (end - start).seconds
    hmm = f"**url : **{input_str} \n**Time :** `{ms} seconds`"
    if "image" in contentType:
        with io.BytesIO(response_api.content) as screenshot_image:
            screenshot_image.name = "screencapture.png"
            try:
                await event.client.send_file(
                    event.chat_id,
                    screenshot_image,
                    caption=hmm,
                    force_document=False,
                    reply_to=event.message.reply_to_msg_id,
                )
                await catevent.delete()
            except Exception as e:
                await catevent.edit(str(e))
    else:
        await catevent.edit(f"`{response_api.text}`")


SYNTAX.update({
    "screenshot":
    "**Plugin : **`screenshot`\
        \n\n**Syntax : **`.ss <url>`\
        \n**Function : **__Takes a screenshot of a website and sends the screenshot.__\
        \n\n**Syntax : **`.cap <url>`\
        \n**Function : **__Takes a screenshot of a website and sends the screenshot need to set config var for this.__"
})
Esempio n. 17
0
        arg = args
        emoji = "😺"
    if not char_is_emoji(emoji):
        arg = args
        emoji = "😺"
    result = ""
    for a in arg:
        a = a.lower()
        if a in emojify.kakashitext:
            char = emojify.itachiemoji[emojify.kakashitext.index(a)].format(
                cj=emoji)
            result += char
        else:
            result += a
    await edit_or_reply(event, result)


def char_is_emoji(character):
    return character in emoji.UNICODE_EMOJI


SYNTAX.update({
    "emojify":
    "**Plugin :** `emojify`\
      \n\n**Syntax :** `.emoji` <text>\
      \n****Usage : **Converts your text to big emoji text, with default emoji. \
      \n\n**Syntax :** `.cmoji` <emoji> <text>\
      \n****Usage : **Converts your text to big emoji text, with your custom emoji.\
      "
})
Esempio n. 18
0
    c_append = False
    for c in str(content):
        if c == '"':
            c_append = True
        if c == ";":
            c_append = False
        if c_append:
            file_name = file_name + c
    file_name = file_name.replace('"', "")
    print("File Name: " + str(file_name))
    return file_name


@borg.on(admin_cmd(pattern=f"gdl (.*)", outgoing=True))
async def g_download(event):
    if event.fwd_from:
        return
    drive_link = event.text[4:]
    file_id = await get_id(drive_link)
    await event.edit("`Downloading Requested File from G-Drive...`")
    file_name = await download_file_from_google_drive(file_id)
    await event.edit("File Downloaded.\nName: `" + str(file_name) + "`")


SYNTAX.update(
    {
        "gdrive_download": ".gdl <gdrive File-Link>\
    \nUsage:G-Drive File Downloader Plugin For Userbot."
    }
)
Esempio n. 19
0
            try:
                await conv.send_message("/start")
                response = await conv.get_response()
                await conv.send_message("/lcc")
                audio = await conv.get_response()
                await borg.send_message(event.chat_id, audio.text)
                await event.delete()
                await event.client.send_read_acknowledge(conv.chat_id)
            except YouBlockedUserError:
                await event.edit(
                    "**Error:** `unblock` @indianaibot `and retry!`")
    else:
        await brog.send_message(
            event.chat_id, "**INVALID** -- FOR HELP COMMAND IS **.jav --h**")
        await event.delete()
        await event.client.send_read_acknowledge(event.chat_id)


SYNTAX.update({
    "javifi":
    "Usage: Various Bot Commands\
\n\n`.jav h` For Hello\
\n\n`.jav --h` For Help\
\n\n`.jav npic` For a Random Nude Pic\
\n\n`.jav ss` \
\n\n`.jav rs` \
\n\n`.jav ib` \
\n\n`.jav acc` \
\n\n`.jav ccn`"
})
Esempio n. 20
0
    for item in items:
        if isinstance(item, class_or_tuple):
            return item
    return None


def zipdir(path, ziph):
    # ziph is zipfile handle
    for root, dirs, files in os.walk(path):
        for file in files:
            ziph.write(os.path.join(root, file))
            os.remove(os.path.join(root, file))


SYNTAX.update({
    "stickers":
    "**Plugins : **`stickers`\
    \n\n**Syntax : **`.kang`\
\n**Usage : **Reply .kang to a sticker or an image to kang it to your userbot pack.\
\n\n**Syntax : **`.kang [emoji('s)]`\
\n**Usage : **Works just like .kang but uses the emoji('s) you picked.\
\n\n**Syntax : **`.kang [number]`\
\n**Usage : **Kang's the sticker/image to the specified pack but uses 🤔 as emoji.\
\n\n**Syntax : **`.kang [emoji('s)] [number]`\
\n**Usage : **Kang's the sticker/image to the specified pack and uses the emoji('s) you picked.\
\n\n**Syntax : **`.pakinfo`\
\n**Usage : **Gets info about the sticker pack.\
\n\n**Syntax : ** `.loda`\
\n*Usage : ** Downloadand upload whole pack in zip file"
})
Esempio n. 21
0
    async with event.client.conversation(chat) as conv:
        try:
            await conv.send_message("/start")
            await conv.get_response()
            await conv.get_response()
            await conv.send_message(d_link)
            details = await conv.get_response()
            song = await conv.get_response()
            """ - don't spam notif - """
            await event.client.send_read_acknowledge(conv.chat_id)
        except YouBlockedUserError:
            await event.edit("**Error:** `unblock` @DeezLoadBot `and retry!`")
            return
        await event.client.send_file(event.chat_id, song, caption=details.text)
        # await evwnt.client.delete_messages(conv.chat_id,
        # [msg_start.id, response.id, r.id, msg.id, details.id, song.id])
        await event.delete()


SYNTAX.update({
    "music":
    "`.song` <search title>\
            \nUsage: For searching songs.\
            \n\n`.spd`<Artist - Song Title>\
            \nUsage:For searching songs from Spotify.\
            \n\n`.netease` <Artist - Song Title>\
            \nUsage:Download music with @WooMaiBot\
            \n\n`.dzd` <Spotify/Deezer Link>\
            \nUsage:Download music from Spotify or Deezer."
})
Esempio n. 22
0
    catthumb = Path(f"{catname}.jpg")
    if not os.path.exists(catthumb):
        catthumb = Path(f"{catname}.webp")
    elif not os.path.exists(catthumb):
        catthumb = None
    await borg.send_file(
        event.chat_id,
        vsong_file,
        force_document=False,
        caption=query,
        thumb=catthumb,
        supports_streaming=True,
        reply_to=reply_to_id,
    )
    await catevent.delete()
    for files in (catthumb, vsong_file):
        if files and os.path.exists(files):
            os.remove(files)


SYNTAX.update({
    "getsongs":
    "**Plugin : **`getsongs`\
        \n\n**Syntax : **`.song query` or `.song reply to song name`\
        \n**Usage : **searches the song you entered in query and sends it quality of it is 128k\
        \n\n**Syntax : **`.song32 query` or `.song32 reply to song name`\
        \n**Usage : **searches the song you entered in query and sends it quality of it is 320k\
        \n\n**Syntax : **`.vsong query` or `.vsong reply to song name`\
        \n**Usage : **Searches the video song you entered in query and sends it"
})
Esempio n. 23
0
    else:
        await hash_q.reply(ans)


@borg.on(admin_cmd(pattern="base (en|de) ?(.*)"))
async def endecrypt(query):
    """ For .base64 command, find the base64 encoding of the given string. """
    input_str = query.pattern_match.group(2)
    if not input_str:
        get = await query.get_reply_message()
        input_str = get.text
    else:
        await query.edit("Uffff.. Sar Gib me something")
        return
    if query.pattern_match.group(1) == "en":
        lething = str(pybase64.b64encode(bytes(input_str, "utf-8")))[2:]
        await query.reply("Encoded: `" + lething[:-1] + "`")
    else:
        lething = str(
            pybase64.b64decode(bytes(input_str, "utf-8"), validate=True))[2:]
        await query.reply("Decoded: `" + lething[:-1] + "`")


SYNTAX.update({
    "hash":
    "`.base <en or de>`\
    \n`Usage: Find the base64 encoding of the given string.`\
    \n\n`.hash`\
    \n`Usage: Find the md5, sha1, sha256, sha512 of the string when written into a txt file.`"
})
Esempio n. 24
0
    url = get(f'https://dl.twrp.me/{device}/')
    if url.status_code == 404:
        reply = f"`Couldn't find twrp downloads for {device}!`\n"
        await request.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 request.edit(reply)


SYNTAX.update({
    "android":
    ".magisk\
\nGet 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."
})
Esempio n. 25
0
    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 sleep(spamDelay)
    if BOTLOG:
        await e.client.send_message(
            BOTLOG, "#DelaySPAM\n"
            "DelaySpam was executed successfully")


SYNTAX.update({
    "Spam/Fun":
    "**Your spam is your death wish.**"
    """
.cspam <text>\
\nUsage: Spam the text letter by letter.\
\n\n.ispam <count> <text>\
\nUsage: Floods text in the chat !!\
\n\n.wspam <text>\
\nUsage: Spam the text word by word.\
\n\n.picspam <count> <link to image/gif>\
\nUsage: As if text spam was not enough !!\
\n\n.delayspam <delay> <count> <text>\
\nUsage: .bigspam but with custom delay.\
\n\n\nNOTE : Spam at your own risk !!
    """
})
Esempio n. 26
0
    await hazmat.delete()
    return os.remove(downloaded_file_name)


@borg.on(admin_cmd(pattern="senpai(?: |$)(.*)"))
async def _(animu):
    text = animu.pattern_match.group(1)
    if not text:
        if animu.is_reply:
            text = (await animu.get_reply_message()).message
        else:
            await animu.answer("`No text given, hence the Senpai will beat u in the Toilet` 🌚")
            return
    sticcers = await animu.client.inline_query(
        "stickerizerbot", f"#{random.choice(senpais)}{(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()

SYNTAX.update({
    "waifu":
    "`.waifu` text\
\nUsage: for custom stickers.\
\n\n`.hz` or `.hz [flip, x2, rotate (degree), background (number), black]`\
\nUsage: Reply to a image / sticker to suit up!.\
\n\n`.senpai` <text> or <reply to a message>\
\nUsage: Go find yourself"
})
Esempio n. 27
0
        )
        pepe = await borg.send_file(cat.chat_id, Glitched, reply_to=catid)
        await borg(
            functions.messages.SaveGifRequest(
                id=types.InputDocument(
                    id=pepe.media.document.id,
                    access_hash=pepe.media.document.access_hash,
                    file_reference=pepe.media.document.file_reference,
                ),
                unsave=True,
            )
        )
        os.remove(Glitched)
        await cat.delete()
    for files in (catsticker, glitch_file):
        if files and os.path.exists(files):
            os.remove(files)


SYNTAX.update(
    {
        "glitch": "**SYNTAX : **`.glitch` reply to media file\
    \n**USAGE :** glitches the given mediafile(gif , stickers , image, videos) to a gif and glitch range is from 1 to 8.\
    If nothing is mentioned then by default it is 2\
    \n\n**SYNTAX : **`.glitchs` reply to media file\
    \n**USAGE :** glitches the given mediafile(gif , stickers , image, videos) to a sticker and glitch range is from 1 to 8.\
    If nothing is mentioned then by default it is 2\
    "
    }
)
Esempio n. 28
0
        if event.is_private and chat.id in NO_PM_LOG_USERS:
            NO_PM_LOG_USERS.remove(chat.id)
            await event.edit("`Will Log Messages from this Chat`")
            await asyncio.sleep(2)
            await event.delete()


@borg.on(admin_cmd(pattern="nolog(?: |$)(.*)"))
async def set_no_log_p_m(event):
    if Config.PM_LOGGR_BOT_API_ID is not None:
        event.pattern_match.group(1)
        chat = await event.get_chat()
        if event.is_private and chat.id not in NO_PM_LOG_USERS:
            NO_PM_LOG_USERS.append(chat.id)
            await event.edit("`Won't Log Messages from this chat`")
            await asyncio.sleep(2)
            await event.delete()


SYNTAX.update({
    "log_pms":
    "`.save` :\
      \nUSAGE: saves taged message in private group .\
      \n\n `.kickme`:\
      \nUSAGE: kicks you from the chat where you used this\
      \n\n`.log`:\
      \nUSAGE:By default will log all private chat messages if you use .nolog and want to log again then you need to use this\
      \n\n`.nolog`:\
      \nUSAGE:to stops logging from a private chat "
})
Esempio n. 29
0
        last_seen_status = await borg(
            functions.account.GetPrivacyRequest(
                types.InputPrivacyKeyStatusTimestamp()
            )
        )
        if isinstance(last_seen_status.rules, types.PrivacyValueAllowAll):
            afk_time = datetime.datetime.now()
        USER_AFK = f"yes: {reason}"
        if reason:
            await borg.send_message(event.chat_id, f"**I shall be Going afk!** __because ~ {reason}__")
        else:
            await borg.send_message(event.chat_id, f"**I am Going afk!**")
        await asyncio.sleep(2)
        await event.delete()
        try:
            await borg.send_message(
                Config.PRIVATE_GROUP_BOT_API_ID,
                f"#AFKTRUE \nYou Went AFK, and Reason is {reason}"
            )
        except Exception as e:
            logger.warn(str(e))

SYNTAX.update({
    "afk":
    ".afk [Optional Reason]\
\n**Usage : **Sets you as afk.\nReplies to anyone who tags/PM's \
you telling them that you are AFK(reason).\n\nSwitches off AFK when you type back anything, anywhere.\
\nafk means away from keyboard/keypad.\
"
})
Esempio n. 30
0
            a = await event.client.get_messages(chat)
            ac = a[0]
            await event.client.send_file(
                event.chat_id,
                ac,
                caption=
                f"**{input_str}\nUploaded by [PepeBot](t.me/LazyAF_Pepe)**",
            )
            await chut.delete()
        else:
            return await chut.edit("**Failed to get your song...**")


SYNTAX.update({
    "song":
    "`.song` <search title>\
            \nUsage: For searching songs.\
            \n\n`.spd`<Artist - Song Title>\
            \nUsage:For searching songs from Spotify.\
            \n\n`.netease` <Artist - Song Title>\
            \nUsage:Download music with @WooMaiBot\
            \n\n`.dzd` <Spotify/Deezer Link>\
            \nUsage:Download music from Spotify or Deezer.\
            \n\n`.gaana` <Query>\
            \nUsage:I dont know.\
            \n\n`.spotbot` <query>\
            \nUsage: Idk\
            \n\n`.ad`\
            \nUsage:Idk"
})