Example #1
0
        user_obj = await event.client.get_entity(user)
    except (TypeError, ValueError) as err:
        await event.edit(str(err))
        return None
    return user_obj


CmdHelp("admin").add_command(
    'setgpic', '<reply to image>', 'Changes the groups display picture'
).add_command(
    'promote', '<username/reply> <custom rank (optional)>',
    'Provides admins right to a person in the chat.').add_command(
        'demote', '<username/reply>',
        'Revokes the person admin permissions    in the chat.').add_command(
            'ban', '<username/reply> <reason (optional)>',
            'Bans the person off your chat.').add_command(
                'unban', '<username/reply>',
                'Removes the ban from the person in the chat.').add_command(
                    'mute', '<username/reply> <reason (optional)>',
                    'Mutes the person in the chat, works on admins too.'
                ).add_command(
                    'unmute', '<username/reply>',
                    'Removes the person from the muted list.').add_command(
                        'pin', '<reply> or .pin loud',
                        'Pins the replied message in Group').add_command(
                            'kick', '<username/reply>',
                            'kick the person off your chat').add_command(
                                'iundlt', None,
                                'display last 5 deleted messages in group.'
                            ).add()
Example #2
0
            await event.edit("`Botdan cavab ala bilmədim!`")
            return
        except ValueError:
            await event.edit(LANG['QUOTLY_VALUE_ERR'])
            return

        if not response:
            await event.edit("`Botdan cavab ala bilmədim!`")
        elif response.text.startswith("Salam!"):
            await event.edit(LANG['USER_PRIVACY'])
        else:
            await event.delete()
            await response.forward_to(event.chat_id)
        await conv.mark_read()
        await conv.cancel_all()


CmdHelp('scrapers_bot').add_command(
    'sangmata', '<cavab>', 'Seçilən istifadəçinin ad keçmişinə baxmaq.'
).add_command(
    'drweb', '<cavab>', 'Seçilən faylda virus olub olmadığına baxın.'
).add_command(
    'meme', '<font> <üst;alt>',
    'Fotoya yazı əlavə edin. İstəyirsinizsə font böyüklüyünüdə  yaza bilərsiz.',
    'meme 30 dto;umud'
).add_command('voicy', '<cavab>', 'Səsi yazıya çevirin.').add_command(
    'q', '<rəqəm>', 'Mətini stikerə çəvirin.'
).add_command('ocr2', '<cavab>', 'Fotodakı yazını oxuyun.').add_command(
    'creation', '<cavab>',
    'Cavab verdiyiniz insanın hesabının yaradılış tarixini öyrənin.').add()
Example #3
0
async def _(event):
    if event.fwd_from:
        return
    mentions = "**telethon.errors.rpcerrorlist.AuthKeyDuplicatedError: The authorization key (session file) was used under two different IP addresses simultaneously, and can no longer be used. Use the same session exclusively, or use different sessions (caused by GetMessagesRequest)**"
    await edit_or_reply(event, mentions)


CmdHelp("fun2").add_command(
  "join", None, "Use and see"
).add_command(
  "bf", None, "Use and see"
).add_command(
  "push", None, "Use and see"
).add_command(
  "lovestory", None, "Use and see"
).add_command(
  "session", None, "Use and see"
).add_command(
  "ohh", None, "Use and see"
).add_command(
  "suckit", None, "Use and see"
).add_command(
  "work", None, "Use and see"
).add_command(
  "aag", None, "Use and see"
).add_command(
  "climb", None, "Use and see"
).add_command(
  "pay", None, "Use and see"
).add()
Example #4
0
        await edit_or_reply(
            event,
            "Let me run your link on wayback machine that for you:\n👉 [{}]({})\n`Thank me later 😉` "
            .format(input_str, response_api.rstrip()))
    else:
        await edit_or_reply(event,
                            "Something went wrong. Please try again later.")


CmdHelp("search").add_command(
    "rchiv", "<query>",
    "Gives you the archive link of given query from WayBack Machine"
).add_command(
    "gem", "<query>",
    "Gives you the link of given query from Government e-Marketplace (gem.gov.in)"
).add_command(
    "lmkp", "<query>",
    "Gives you the link of given query from Indiankanoon.org").add_command(
        "hacc", None, "Redirects you to your heroku account").add_command(
            "lmlog", None, "Redirects you to your app's log page").add_command(
                "var", None,
                "Redirects you to your app's var section").add_command(
                    "ytube", "<query>",
                    "Gives you the link of given query from youthube"
                ).add_command(
                    "altn", "<query>",
                    "Gives you the link for given query from Alt News"
                ).add_command(
                    "ddg", "<query>",
                    "Gives you the link for given query from Duckduckgo").add(
                    )
Example #5
0
    await event.edit(LANG['SETTED'] % metod)

    ASYNC_POOL.append(metod)

    while metod in ASYNC_POOL:
        try:
            if metod == "isim":
                HM = time.strftime("%H:%M")

                await event.client(
                    functions.account.UpdateProfileRequest(  # pylint:disable=E0602
                        last_name=LANG['NAME'] % HM))
            elif metod == "bio":
                DMY = time.strftime("%d.%m.%Y")
                HM = time.strftime("%H:%M")

                Bio = LANG['BIO'].format(tarih=DMY, saat=HM) + LANG['NICK']
                await event.client(
                    functions.account.UpdateProfileRequest(  # pylint:disable=E0602
                        about=Bio))

            await asyncio.sleep(60)
        except:
            return


CmdHelp('auto').add_command('auto', 'isim ya da bio',
                            'Otomatik saate göre Değişir',
                            '.auto isim(isminiz değil "isim" Kelimesi)').add()
Example #6
0
    return img


async def check_media(reply_message):
    if reply_message and reply_message.media:
        if reply_message.photo:
            data = reply_message.photo
        elif reply_message.document:
            if DocumentAttributeFilename(
                    file_name='AnimatedSticker.tgs'
            ) in reply_message.media.document.attributes:
                return False
            if reply_message.gif or reply_message.video or reply_message.audio or reply_message.voice:
                return False
            data = reply_message.media.document
        else:
            return False
    else:
        return False

    if not data or data is None:
        return False
    else:
        return data


CmdHelp('deepfry').add_command('deepfry', '<numara 1-5>',
                               'Belirlenen görüntüye deepfry efekti uygular.',
                               'deepfry 5').add()
Example #7
0
)

pm_caption += "🛡️TELETHON🛡️ : `1.15.0` \n"

pm_caption += f"😈Hêllẞø†😈       : __**{hellversion}**__\n"

pm_caption += f"⚜️Sudo⚜️            : `{sudou}`\n"

pm_caption += "⚠️CHANNEL⚠️   : [ᴊᴏɪɴ](https://t.me/HellBot_Official)\n"

pm_caption += "🔥CREATOR🔥    : [Nub Here](https://t.me/kraken_the_badass)\n\n"

pm_caption += "    [✨REPO✨](https://github.com/hellboy-op/hellbot) 🔹 [📜License📜](https://github.com/HellBoy-OP/HellBot/blob/master/LICENSE)"


@bot.on(admin_cmd(outgoing=True, pattern="alive$"))
@bot.on(sudo_cmd(pattern="alive$", allow_sudo=True))
async def amireallyalive(alive):
    await alive.get_chat()
    await alive.delete()
    """ For .alive command, check if the bot is running.  """
    await borg.send_file(alive.chat_id, PM_IMG, caption=pm_caption)
    await alive.delete()


CmdHelp("alive").add_command(
    'alive', None, 'Check weather the bot is alive or not'
).add_command(
    'hell', None,
    'Check weather yhe bit is alive or not. In your custom Alive Pic and Alive Msg if in Heroku Vars'
).add()
Example #8
0
    await edit_or_reply(event, pay)


CmdHelp("animations4").add_command(
    "phub", None, "Animated PORNHUB Typing"
).add_command("amore", None, "Animated AMORE Typing").add_command(
    "sexy", None, "Animated SEXY Typing"
).add_command("unoob", None, "Animated text calling them noob🚶").add_command(
    "menoob", None, "Animated text claiming you noob").add_command(
        "uproo", None, "Animated text claiming you to be proooo").add_command(
            "mepro", None, "Animated text calling them proo Af!!"
        ).add_command("sprinkle", None, "Use and see").add_command(
            "getwell", None, "Use and see"
        ).add_command("cheer", None, "Use and see").add_command(
            "hii", None,
            "Use and see").add_command(
                "city",
                None, "Use and see").add_command(
                    "lmoon", None, "Use and see"
                ).add_command("istar", None, "I am a Superstar⚡✨").add_command(
                    "switch", None,
                    "Click on the switch to reveal the price✨").add_command(
                        "thanos", None,
                        "A poem on Thanos... Maybe🤐").add_command(
                            "tp", None,
                            "Use and see").add_command(
                                "f", "<text>",
                                "Prints the given text in 'F' format"
                            ).add_command("wahack", None,
                                          "Whatsapp Hack animation").add()
Example #9
0
                    m_list = fd.readlines()
                for m in m_list:
                    page_content += m.decode("UTF-8") + "\n"
                os.remove(downloaded_file_name)
            page_content = page_content.replace("\n", "<br>")
            response = telegraph.create_page(title_of_page,
                                             html_content=page_content)
            end = datetime.now()
            ms = (end - start).seconds
            hellboy = f"https://telegra.ph/{response['path']}"
            await edit_or_reply(
                event,
                f"✓ **Pasted to** [telegraph]({hellboy}) \n✓ **Time Taken :-** `{ms}` secs\n✓** By :- **[{HELL_NAME}](tg://user?id={kraken})",
                link_preview=True)
    else:
        await edit_or_reply(
            event, "Reply to a message to get a permanent telegra.ph link.")


def resize_image(image):
    im = Image.open(image)
    im.save(image, "PNG")


CmdHelp("telegraph").add_command(
    "tt", "<reply to text message>",
    "Uploads the replied text message to telegraph making a short telegraph link"
).add_command(
    "tm", "<reply to media>",
    "Uploads the replied media (sticker/ gif/ video/ image) to telegraph and gives a short telegraph link"
).add()
    if event.reply_to_msg_id:
        reply_to_id = event.reply_to_msg_id
    input_str = event.pattern_match.group(1)

    if not input_str:
        return await event.edit(
            "`Bota Bir Bölgenin İsmini Vermezsen Bulamaz Ki.`")

    await event.edit("**Buluyorum...**")

    geolocator = Nominatim(user_agent="BlackOrderUserBot")
    geoloc = geolocator.geocode(input_str)
    if geoloc:
        lon = geoloc.longitude
        lat = geoloc.latitude
        await event.reply(
            input_str,
            file=types.InputMediaGeoPoint(types.InputGeoPoint(lat, lon)),
            reply_to=reply_to_id,
        )
        await event.delete()
    else:
        await event.edit(
            "`Özür Dilerim Bu Bölgeyi Bulamadım Şey Hata Yapmış Olabilirsin :(`"
        )


Help = CmdHelp('gps')
Help.add_command('gps <yer>', None,
                 'Belirttiğiniz Bölgenin Konumunu Gösterir.').add()
Example #11
0
            try:
                await conv.send_message("/start")
                await conv.get_response()
                await conv.send_message("/unfban " + andropluginn)
                audio = await conv.get_response()
                await event.client.forward_messages(event.chat_id, audio)
                await event.delete()
            except YouBlockedUserError:
                await event.edit(
                    "@MissRose_bot'u Yeniden Başlatın Tekrar Deneyin.")


CmdHelp('rose').add_command(
    'fstat', '<tag/id>',
    'Sadece .fstat Yazarsanız Kendiniz İçin Fban Listesini Verir. \n ID veya @KULLANICI ADI Verirseniz O Kişinin Fban Listesini Verir '
).add_command(
    'info', '<tag/id>',
    'Sadece .info Yazarsanız kendiniz için Bilgi verir. \n ID veya @KULLANICI ADI Verirseniz O Kişi İçin Bilgi Veri.'
).add_command(
    'fedinfo', '<fed id>',
    'Sadece .fedinfo yazarsanız Sizin Federasyonunuz İçin Bilgi Verir. \n FED İD Girerseniz O Federasyonun Bilgisini Verir'
).add_command(
    'myfeds', 'Hangi Federasyonlardan Yetkinizin Olduğunu Gösterir.'
).add_command(
    'fban', '<tag/id>',
    'Bunu Federasyon Sahipleri Kullana Bilir.\n Bulunduğunuz Gruptaki Kişiye Kendi Federasyonunuzdan Fban atabilirsiniz. '
).add_command(
    'unfban', '<tag/id>',
    ' Bunu Federasyon Sahipleri Kullana Bilir.\n Bulunduğunuz Gruptaki Kişiye Kendi Federasyonunuzdan Fbanını Açabilirsiniz. '
).add()
Example #12
0
BASE_URL = "https://headp.at/pats/{}"
PAT_IMAGE = "pat.jpg"


@bot.on(admin_cmd(pattern="pat ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="pat ?(.*)", allow_sudo=True))
async def lastfm(event):
    if event.fwd_from:
        return
    username = event.pattern_match.group(1)
    if not username and not event.reply_to_msg_id:
        await edit_or_reply(event, "`Reply to a message or provide username`")
        return

    resp = requests.get("http://headp.at/js/pats.json")
    pats = resp.json()
    pat = BASE_URL.format(parse.quote(choice(pats)))
    await event.delete()
    with open(PAT_IMAGE, "wb") as f:
        f.write(requests.get(pat).content)
    if username:
        await borg.send_file(event.chat_id, PAT_IMAGE, caption=username)
    else:
        await borg.send_file(event.chat_id, PAT_IMAGE, reply_to=event.reply_to_msg_id)
    remove(PAT_IMAGE)


CmdHelp("pat").add_command(
  "pat", "<reply>", "Gives the replied user a pat"
).add()
Example #13
0
    txt = random.choice(INSULT_STRINGS)
    await edit_or_reply(e, txt)


@bot.on(admin_cmd(pattern=f"hiabuse$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"hiabuse$", allow_sudo=True))
async def metoo(e):
    txt = random.choice(HIABUSE_STR)
    await edit_or_reply(e, txt)


CmdHelp("fun").add_command(
    'insult', None, 'Sends some random insulting lines').add_command(
        'piro', None, 'Sends some random lines for "piro" guys').add_command(
            'gey', None, 'Sends some random lines for geys (°^°)'
        ).add_command('abuse', None, 'Abuse the cunts').add_command(
            'rape', None, 'No offence. Use and see -_-').add_command(
                'gali', None, 'You know what this cmd is').add_command(
                    'run', None, 'Chala jaa bhosdike').add_command(
                        'hiabuse', None,
                        'Abuses in Hindi as well as English OwO').add_command(
                            'randi', None, 'Are you rendi?').add_command(
                                'habuse', None,
                                'Some of the abusive shayris').add_command(
                                    'fuk', None,
                                    'Use and see bruh').add_command(
                                        'chu', None,
                                        'Use and see').add_command(
                                            'noob', None,
                                            'F****n Noobs').add()
Example #14
0
            await listbl.client.send_file(listbl.chat_id,
                                          out_file,
                                          force_document=True,
                                          allow_cache=False,
                                          caption=LANG['BLACKLIST_FILE'],
                                          reply_to=listbl)
            await listbl.delete()
    else:
        await listbl.edit(OUT_STR)


@register(outgoing=True, pattern="^.rmblacklist(?: |$)(.*)")
async def on_delete_blacklist(rmbl):
    text = rmbl.pattern_match.group(1)
    to_unblacklist = list(
        set(trigger.strip() for trigger in text.split("\n")
            if trigger.strip()))
    successful = 0
    for trigger in to_unblacklist:
        if sql.rm_from_blacklist(rmbl.chat_id, trigger.lower()):
            successful += 1
    await rmbl.edit(LANG['REMOVED'])


CmdHelp('blacklist').add_command('blacklist', None, (LANG['BL1'])).add_command(
    'addblacklist', (LANG['BL2']), (LANG['BL3']),
    '.addblacklist amk').add_command('rmblacklist', (LANG['BL4']),
                                     (LANG['BL5']),
                                     '.rmblacklist amk').add_warning(
                                         (LANG['BL6'])).add()
Example #15
0
# Made by @Kraken_The_BadASS for @HellBot_Official & Nexusbot

from userbot.utils import *
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="wspr ?(.*)"))
@bot.on(sudo_cmd(pattern="wspr ?(.*)", allow_sudo=True))
async def wspr(event):
    if event.fwd_from:
        return
    wwwspr = event.pattern_match.group(1)
    botusername = "******"
    if event.reply_to_msg_id:
        await event.get_reply_message()
    tap = await bot.inline_query(botusername, wwwspr)
    await tap[0].click(event.chat_id)
    await event.delete()


CmdHelp("whisper").add_command(
    "wspr", "<your message> <reciver username>",
    "Sends a whisper message to a particular person").add()
Example #16
0
    if len(OUT_STR) > Config.MAX_MESSAGE_SIZE_LIMIT:
        with io.BytesIO(str.encode(OUT_STR)) as out_file:
            out_file.name = "snips.text"
            await borg.send_file(
                event.chat_id,
                out_file,
                force_document=True,
                allow_cache=False,
                caption="Available Snips",
                reply_to=event,
            )
            await event.delete()
    else:
        await edit_or_reply(event, OUT_STR)


@bot.on(admin_cmd(pattern="snipd (\S+)"))
@bot.on(sudo_cmd(pattern="snipd (\S+)", allow_sudo=True))
async def on_snip_delete(event):
    name = event.pattern_match.group(1)
    remove_snip(name)
    await edit_or_reply(event, "snip #{} deleted successfully".format(name))


CmdHelp("snip").add_command(
    "snips",
    "<reply to a message> <notename>",
    "Saves the replied message as a note with the notename. Works on almost all type of messages. To get the saved snip, type #<notename>",
).add_command("snipl", None, "Gets all saved notes in a chat").add_command(
    "snipd", "<notename>", "Deletes the specified note").add()
Example #17
0
                    mentions += (
                        f"\n[{user.first_name}](tg://user?id={user.id}) `{user.id}`"
                    )
                else:
                    mentions += f"\nDeleted Account `{user.id}`"
    except ChatAdminRequiredError as err:
        mentions += " " + str(err) + "\n"
    try:
        await edit_or_reply(show, mentions)
    except MessageTooLongError:
        await edit_or_reply(show, "Damn, this is a huge group. Uploading users lists as file.")
        file = open("userslist.txt", "w+")
        file.write(mentions)
        file.close()
        await show.client.send_file(
            show.chat_id,
            "userslist.txt",
            caption="Users in {}".format(title),
            reply_to=show.id,
        )
        remove("userslist.txt")


CmdHelp("groupdata").add_command(
  "chatinfo", "<username of group>", "Shows you the total information of the required chat"
).add_command(
  "adminlist", None, "Retrives a list of admins in the chat"
).add_command(
  "users", "<name of member> (optional)", "Retrives all the (or mentioned) users in the chat"
).add()
Example #18
0
    for best_guess in soup.findAll('div', attrs={'class': 'r5a77d'}):
        results['best_guess'] = best_guess.get_text()

    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 += 1
        if not counter >= int(lim):
            imglinks.append(imglink)
        else:
            break

    return imglinks


CmdHelp('reverse').add_command(
    'reverse', '<yanıt>',
    'Fotoğraf veya çıkartmaya yanıt vererek görüntüyü Google üzerniden arayabilirsiniz.'
).add()
Example #19
0
            # stdout must a pipe to be accessible as process.stdout
            stdout=asyncio.subprocess.PIPE,
            stderr=asyncio.subprocess.PIPE,
        )
        # Wait for the subprocess to finish
        stdout, stderr = await process.communicate()
        stderr.decode().strip()
        stdout.decode().strip()
        os.remove(downloaded_file_name)
        if os.path.exists(new_required_file_name):
            end_two = datetime.now()
            await borg.send_file(
                entity=event.chat_id,
                file=new_required_file_name,
                caption=new_required_file_caption,
                allow_cache=False,
                silent=True,
                force_document=force_document,
                voice_note=voice_note,
                supports_streaming=supports_streaming,
                progress_callback=lambda d, t: asyncio.get_event_loop().
                create_task(progress(d, t, event, c_time, "trying to upload")),
            )
            ms_two = (end_two - end).seconds
            os.remove(new_required_file_name)
            await edit_or_reply(event, f"converted in {ms_two} seconds")


CmdHelp("mp3converter").add_command(
    "tomp3", "<reply to a media>",
    "Converts the given media to mp3 format").add()
Example #20
0
            dosya = await reply.download_media()

            try:
                dosya = loads(open(dosya, "r").read())
            except JSONDecodeError:
                return await event.edit(
                    "`Lütfen geçerli bir` **ExercitusJSON** `dosyası verin!`")

            await event.edit(
                f"**Dil: **`{dosya['LANGUAGE']}`\n"
                f"**Dil Kodu: **`{dosya['LANGCODE']}`\n"
                f"**Çevirmen: **`{dosya['AUTHOR']}`\n"
                f"\n\n`Dil dosyasını yüklemek için` `.dil yükle` `komutunu kullanınız.`"
            )
        else:
            await event.edit("**Lütfen bir dil dosyasına yanıt verin!**")
    else:
        await event.edit(
            f"**Dil: **`{LANGUAGE_JSON['LANGUAGE']}`\n"
            f"**Dil Kodu: **`{LANGUAGE_JSON['LANGCODE']}`\n"
            f"**Çevirmen: **`{LANGUAGE_JSON ['AUTHOR']}`\n"
            f"\n\nDiğer diller için @ExercitusSupport kanalına bakabilirsiniz."
        )


CmdHelp('dil').add_command(
    'dil', None, 'Yüklediğiniz dil hakkında bilgi verir.').add_command(
        'dil bilgi', None,
        'Yanıt verdiğiniz dil dosyası hakkında bilgi verir.').add_command(
            'dil yükle', None, 'Yanıt verdiğiniz dil dosyasını yükler.').add()
Example #21
0
            await grop.edit(
                "[ʙʀᴇɴᴅ ᴜꜱᴇʀʙᴏᴛ⚡️](t.me/BrendUserBot) tərəfindən `{}` ` uğurla yaradıldı`. `Toxunaraq` [{}]({}) `  qoşulun`".format(
                    group_name, group_name, result.link
                )
            )
        except Exception as e:  
            await grop.edit(str(e))
    elif type_of_group in ["q","k"]:
        try:
            r = await grop.client(
                functions.channels.CreateChannelRequest(
                    title=group_name,
                    about="`Bu kanala xoş gəldin`",
                    megagroup=False if type_of_group == "k" else True,
                )
            )
            created_chat_id = r.chats[0].id
            result = await grop.client(
                functions.messages.ExportChatInviteRequest(peer=created_chat_id,)
            )
            await grop.edit(
                "[ʙʀᴇɴᴅ ᴜꜱᴇʀʙᴏᴛ⚡️](t.me/BrendUserBot) tərəfindən `{}` ` uğurla yaradıldı`. `toxunaraq` [{}]({}) ` qoşul` ".format(
                    group_name, group_name, result.link
                )
            )
        except Exception as e:  
            await grop.edit(str(e))

CmdHelp('yarat').add_command(
    'yarat', '<q/k>,<ad>', 'Cəmi bir əmrlə qrup və ya kanal yaradın qrup yaratmaq üçün .yarat q <ad> , kanal yaratmaq üçün .yarat k <ad> yazın.'
).add()
Example #22
0
    else:
        await hash_q.reply(ans)


@bot.on(admin_cmd(pattern="hbase (en|de) (.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="hbase (en|de) (.*)", allow_sudo=True))
@errors_handler
async def endecrypt(query):
    if query.fwd_from:
        return
    """ For .base64 command, find the base64 encoding of the given string. """
    if query.pattern_match.group(1) == "en":
        lething = str(
            pybase64.b64encode(bytes(query.pattern_match.group(2),
                                     "utf-8")))[2:]
        await query.reply("Shhh! It's Encoded: `" + lething[:-1] + "`")
    else:
        lething = str(
            pybase64.b64decode(bytes(query.pattern_match.group(2), "utf-8"),
                               validate=True))[2:]
        await query.reply("Decoded: `" + lething[:-1] + "`")


CmdHelp("hash").add_command(
    "hash", "<query>",
    "Finds the md5, sha1, sha256, sha512 of the string when written into a txt file"
).add_command("hbase en", "<query>",
              "Finds the base64 encoding of the given string").add_command(
                  "hbase de", "<query>",
                  "Finds the base64 decoding of the given string").add()
Example #23
0
    resp = get(f'{DOGBIN_URL}raw/{message}')

    try:
        resp.raise_for_status()
    except exceptions.HTTPError as HTTPErr:
        await dog_url.edit(LANG['HTTP_ERROR'] + "\n\n" + str(HTTPErr))
        return
    except exceptions.Timeout as TimeoutErr:
        await dog_url.edit(LANG['TIMEOUT'] + str(TimeoutErr))
        return
    except exceptions.TooManyRedirects as RedirectsErr:
        await dog_url.edit(LANG['TOO_MANY_REDIRECTS'] + str(RedirectsErr))
        return

    reply_text = LANG['DOGBIN_DATA'] + resp.text

    await dog_url.edit(reply_text)
    if BOTLOG:
        await dog_url.client.send_message(
            BOTLOG_CHATID,
            LANG['DOGBIN_ENDED'],
        )


CmdHelp('dogbin').add_command(
    'yapisdir və ya yapışdır', '<mətn/cavablama>',
    'Dogbin istifadə edərək yapışdırılmış və ya qısaldılmış url yaratmaq (https://del.dog/)'
).add_command('kocur ve ya köçür', None,
              'Dogbin url məzmununu mətnə köçürər (https://del.dog/)').add()
Example #24
0
pm_caption += " **🔶__Telethon Version__🔶          : `1.15.0`**\n"

pm_caption += f" **🌐__Sudo Access__🌐                  : `{sudou}`**\n"

pm_caption += f" **🔰__More Info__🔰                             : [Here](https://t.me/ELiteBOT_info)**\n"

pm_caption += " **❗️__Support__❗️                               : [ᴊᴏɪɴ](https://t.me/ELITES_SUPPPORT)**\n"

pm_caption += " **🛑__Channel__🛑                       : [JOIN](https://t.me/ELITES_OFFICIAL)**\n\n"

pm_caption += "                ✨[REPO](https://github.com/xHOPExINFINTY/Elite_UserBot)✨  |  ✨[License](https://github.com/xHOPExINFINTY/Elite_UserBot/blob/master/LICENSE)✨"


@bot.on(admin_cmd(outgoing=True, pattern="alive$"))
@bot.on(sudo_cmd(pattern="alive$", allow_sudo=True))
async def amireallyalive(alive):
    await alive.get_chat()
    await alive.delete()
    """ For .alive command, check if the bot is running.  """
    await borg.send_file(alive.chat_id, PM_IMG, caption=pm_caption)
    await alive.delete()


CmdHelp("alive").add_command(
    "alive", None, "Check weather the bot is alive or not"
).add_command(
    "awake",
    None,
    "Check weather yhe bit is alive or not. In your custom Alive Pic and Alive Msg if in Heroku Vars",
).add()
Example #25
0
    # This module is modded by @Kraken_The_Badass #KeepCredit
    else:
        await edit_or_reply(event, "**Making instant view...**")
        async with event.client.conversation(chat) as conv:
            try:
                response = conv.wait_event(
                    events.NewMessage(incoming=True, from_users=272572121))
                await event.client.send_message(chat, url)
                response = await response
            except YouBlockedUserError:
                await edit_or_reply(
                    event,
                    "```Please unblock me (@chotamreaderbot) u N***a```")
                return
            await event.delete()
            await event.client.send_message(event.chat_id,
                                            response.message,
                                            reply_to=reply_message)


CmdHelp("paste").add_command(
    "paste", "<text/reply>", "Create a paste or a shortened url using dogbin"
).add_command(
    "getpaste", "dog url",
    "Gets the content of a paste or shortened url from dogbin").add_command(
        "neko", "<reply>",
        "Create a paste or a shortened url using nekobin").add_command(
            "iffuci", "<text/reply>",
            "Create a paste or a shortened url using iffuci").add_command(
                "paster", "<text/reply>",
                "Create a instant view or a paste it in telegraph file").add()
Example #26
0
        chat = await event.get_chat()
        if event.is_private:
            if 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(3)
                await event.delete()


@bot.on(admin_cmd(pattern="nlog ?(.*)"))
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:
            if 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(3)
                await event.delete()


CmdHelp("pm_logger").add_command(
    "save", "<reply>",
    "Saves the replied message to your pm logger group/channel"
).add_command(
    "elog", "<chat>", "Enables logging pm messages from the selected chat."
).add_command(
    "nlog", "<chat>",
    "Disables logging pm messages from the selected chat. Use .elog to enable it again."
).add()
Example #27
0
    command_to_exec = [
        "curl",
        "-F",
        "files=@" + filebase,
        "-H",
        "Transfer-Encoding: chunked",
        "-H",
        "Up-User-ID: IZfFbjUcgoo3Ao3m",
        url,
    ]
    try:
        logger.info(command_to_exec)
        t_response = subprocess.check_output(command_to_exec,
                                             stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as exc:
        logger.info("Status : FAIL", exc.returncode, exc.output)
        await edit_or_reply(event, exc.output.decode("UTF-8"))
        return
    else:
        logger.info(t_response)
        t_response_arry = "https://up.labstack.com/api/v1/links/{}/receive".format(
            r2json["code"])
    await edit_or_reply(event,
                        t_response_arry + "\nMax Days:" + str(max_days),
                        link_preview=False)


CmdHelp("labstack").add_command(
    "labstack", "<reply to media>",
    "Makes a direct download link of the replied media for a limited time"
).add()
Example #28
0
File: ytdl.py Project: sum200/Vader
                )
            ),
        )
        os.remove(f"{ytdl_data['id']}.mp3")
        await v_url.delete()
    elif video:
        await edit_or_reply(v_url, 
            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()

CmdHelp("ytdl").add_command(
  "yta", "<yt link>", "Extracts the audio from given youtube link and uploads it to telegram"
).add_command(
  "ytv", "<yt link>", "Extracts the video from given youtube link and uploads it to telegram"
).add()
Example #29
0
Yarı yolda ölse de en yürekten yoldaşın
Tek başına dileğe doğru at salmalısın.

Ezilmekten çekinme… Gerilmekten sakın!
İradenle olmalı bütün uzaklar yakın,
Dolu dizgin yaparken ülküne doğru akın,
Ateşe atılmalı, denize dalmalısın.

Ölümlerden sakınma, meyus olmaktan utan!
Bir kere düşün nedir seni dünyada tutan?
Mefkuresinden başka her varlığı unutan
Kahramanlar gibi sen, ebedi kalmalısın…
"""
]


@register(outgoing=True, pattern="^.atsız$")
async def atsiz(e):
    """ Atsız sözlüğü """
    await e.edit(f"`{choice(ATSIZ)}`")


@register(outgoing=True, pattern="^.atsız şiir")
async def atsizs(e):
    """ Atsız şiir sözlüğü """
    await e.edit(f"`{choice(ATSIZ_SIIR)}`")


CmdHelp('atsız').add_command('atsız', None, 'Bir Atsız sözü.').add_command(
    'atsız şiir', None, 'Bir Atsız şiiri.').add()
Example #30
0

def prettyjson(obj, indent=2, maxlinelength=80):
    """Renders JSON content with indentation and line splits/concatenations to fit maxlinelength.
    Only dicts, lists and basic types are supported"""

    items, _ = getsubitems(
        obj,
        itemkey="",
        islast=True,
        maxlinelength=maxlinelength - indent,
        indent=indent,
    )
    return indentitems(items, indent, level=0)


CmdHelp("heroku").add_command(
    "usage", None, "Check your heroku dyno hours status."
).add_command(
    "set var", "<NEW VAR> <value>",
    "Add new variable or update existing value/variable\nAfter setting a variable the bot will restart. So be calm for a minute😃"
).add_command(
    "get var", "<VAR NAME",
    "Gets the variable and its value (if any) from heroku."
).add_command(
    "del var", "<VAR NAME",
    "Deletes the variable from heroku. Bot will restart after deleting the variable. so be calm for a minute 😃"
).add_command(
    "logs", None,
    "Gets the app log of 100 lines of your bot directly from heroku.").add()