Esempio 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."})
Esempio n. 2
0
        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 event.reply(
                    "```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)


CMD_HELP.update({
    "pastebin":
    ".paste <text/reply>\
\nUsage: Create a paste or a shortened url using dogbin (https://del.dog/)\
\n\n.getpaste\
\nUsage: Gets the content of a paste or shortened url from dogbin (https://del.dog/)\
\n\n.neko <reply>\
\nUsage: Create a paste or a shortened url using nekobin (https://nekobin.com)\
\n\n.iffuci <text/reply>\
\nUsage: Create a paste or a shortened url using iffuci (https://www.iffuci.tk)\
\n\n.paster <text/reply>\
\nUsage: Create a instant view or a paste it in telegraph file\
  "
})
Esempio n. 3
0
        return
    while True:
        DMY = time.strftime("%d.%m.%Y")
        HM = time.strftime("%H:%M:%S")
        bio = f"๐Ÿ“… {DMY} | {DEFAULTUSERBIO} | โŒš๏ธ {HM}"
        logger.info(bio)
        try:
            await borg(
                functions.account.UpdateProfileRequest(  # pylint:disable=E0602
                    about=bio))
        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 Bio"
        # )
        await asyncio.sleep(DEL_TIME_OUT)


CMD_HELP.update({
    "auto_profile":
    "**Auto_Profile**\
\n\n**Syntax : **`.autobio`\
\n**Usage :** Change your bio with time\
\n\n**Syntax : **`.autoname`\
\n**Usage :** Change your Name With Time"
})
Esempio n. 4
0
                                \n\n**URL : **`{url}`\
                                \n**File Name :** `{file_name}`\
                                \n{progress_str}\
                                \n`{humanbytes(downloaded)} of {humanbytes(total_length)}`\
                                \n**ETA : **`{estimated_total_time}``"

                if round(diff %
                         10.00) == 0 and current_message != display_message:
                    await mone.edit(current_message)
                    display_message = current_message
            except Exception as e:
                logger.info(str(e))
        end = datetime.now()
        ms = (end - start).seconds
        if downloader.isSuccessful():
            await mone.edit(
                f"**  โ€ข  Downloaded in {ms} seconds.**\n**  โ€ข  Downloaded to :- ** `{downloaded_file_name}`"
            )
        else:
            await mone.edit("Incorrect URL\n {}".format(input_str))
    else:
        await mone.edit("Reply to a message to download to my local server.")


CMD_HELP.update({
    "download":
    "**Plugin : **`.download`\
        \n\n  โ€ข  **Syntax : **`.download <link|filename> or reply to media`\
        \n  โ€ข  **Function : **__Downloads the file to the server.__"
})
Esempio n. 5
0
    stdout = redirected_output.getvalue()
    stderr = redirected_error.getvalue()
    sys.stdout = old_stdout
    sys.stderr = old_stderr
    evaluation = ""
    if exc:
        evaluation = exc
    elif stderr:
        evaluation = stderr
    elif stdout:
        evaluation = stdout
    else:
        evaluation = "Sorry I can't find result for the given equation"
    final_output = "**EQUATION**: `{}` \n\n **SOLUTION**: \n`{}` \n".format(
        cmd, evaluation)
    await event.edit(final_output)


async def aexec(code, event):
    exec(f"async def __aexec(event): " + "".join(f"\n {l}"
                                                 for l in code.split("\n")))
    return await locals()["__aexec"](event)


CMD_HELP.update({
    "calc":
    "**Plugin : **`calc`\
        \n\n**Syntax : **`.calc expression` \
        \n**Function : **solves the given maths equation by BODMAS rule. "
})
Esempio 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"
})
Esempio n. 7
0
omk = "https://telegra.ph/file/79f0a1b254b4511181afa.jpg"
k = bot.me.first_name


@xbot.on(events.InlineQuery())
async def inline(event):
    if event.query.user_id != bot.me.id or event.query.user_id == bot.me.id and event.text == '' or event.query.user_id == ID and event.text == '':
        Buttonss = [[
            Button.url("Rแด‡แด˜แดsษชแด›แดส€ส", "https://github.com/ULTRA-OP/ULTRA-X"),
            Button.url(
                "Dแด‡แด˜สŸแดส",
                "https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2FULTRA-OP%2FHEROKU&template=https%3A%2F%2Fgithub.com%2FULTRA-OP%2FHEROKU"
            )
        ]]
        f**k = f"**UสŸแด›ส€แด€X - Usแด‡ส€ส™แดแด›**\n**โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–**\n**Oแดกษดแด‡ส€: [{MASTER}](tg://user?id={madboi})**\n**Cสœแด€ษดษดแด‡สŸ: @UltraX_Support**\n**Sแดœแด˜แด˜แดส€แด›: @UltraXChat**\n**โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–**"
        op = event.builder
        omg = op.article(title='UสŸแด›ส€แด€X Usแด‡ส€ส™แดแด›',
                         text=f**k,
                         thumb=InputWebDocument(omk, 0, "image/jpeg", []),
                         url="t.me/UltraXOT",
                         description="ยฉ Tแด‡แด€แดUสŸแด›ส€แด€X | Usแด‡ส€ส™แดแด› | UสŸแด›ส€แด€X",
                         buttons=Buttonss)
        await event.answer([omg],
                           switch_pm=f'๐Ÿ‘ค Assษชsแด›แด€ษดแด› แดา“ : {k}',
                           switch_pm_param='start')
    else:
        pass


CMD_HELP.update({"bsdk": "**Abuse Plug Do** `.bsdk`"})
Esempio 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"})
Esempio n. 9
0
                    await borg.send_message(event.chat_id, audio.text)
                await event.delete()
            except YouBlockedUserError:
                await ok.edit(
                    "**Error**\n `Unblock` @MissRose_Bot `and try again!")


@borg.on(admin_cmd(pattern="fedinfo ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    ok = await event.edit("`Extracting information...`")
    sysarg = event.pattern_match.group(1)
    async with borg.conversation(bot) as conv:
        try:
            await conv.send_message("/start")
            await conv.get_response()
            await conv.send_message("/fedinfo " + sysarg)
            audio = await conv.get_response()
            await ok.edit(audio.text + "\n\nFedInfo Excracted by LEGENDBOT")
        except YouBlockedUserError:
            await ok.edit("**Error**\n `Unblock` @MissRose_Bot `and try again!"
                          )


CMD_HELP.update({
    "fedstuff":
    ".fstat <username/userid/reply to user>\nUse - To check the persons fedban stat in @MissRose_Bot.\
        \n\n.fedinfo <fedid>\nUse - To see info about the fed."
})
Esempio n. 10
0
    chat_id = c[0]
    try:
        chat_id = int(chat_id)

    except BaseException:

        pass

    msg = ""
    masg = await dc.get_reply_message()  # ghantaรฐลธหœโ€™รฐลธหœโ€™
    if dc.reply_to_msg_id:
        await borg.send_message(chat_id, masg)
        await dc.edit(
            f"รขล“โ€ฆ **{MASTER}:** Your message was successfully delivered รขล“โ€ฆ")
    for i in c[1:]:
        msg += i + " "
    if msg == "":  # hoho
        return
    try:
        await borg.send_message(chat_id, msg)
        await dc.edit(
            f"รขล“โ€ฆ **{MASTER}:** Your message was successfully delivered รขล“โ€ฆ")
    except BaseException:  # hmmmmmmmmmรฐลธยคโ€รฐลธยคโ€
        await dc.edit(".dm (username) (text)")


CMD_HELP.update({
    "dm":
    ".dm (username) (text)\n or\n .dm (username)(reply to msg)\n it'll forward the replyed msg"
})
Esempio n. 11
0
@borg.on(ChatAction)
async def handler(rkG):
    if rkG.user_joined or rkG.user_added:
        try:
            from ULTRA.modules.sql_helper.gmute_sql import is_gmuted
            guser = await rkG.get_user()
            gmuted = is_gmuted(guser.id)
        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": "gban any user using username or tag dont use id "})
Esempio n. 12
0
        log.write(app.get_log())
    await dyno.edit("Got the logs wait a sec")
    await dyno.client.send_file(
        dyno.chat_id,
        "logs.txt",
        reply_to=dyno.id,
        caption="LEGEND BOT logs of 100+ lines",
    )

    await asyncio.sleep(5)
    await dyno.delete()
    return os.remove('logs.txt')


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)


CMD_HELP.update({
    "heroku":
    "Info for Module to Manage Heroku:**\n\n`.usage`\nUsage:__Check your heroku dyno hours status.__\n\n`.set var <NEW VAR> <VALUE>`\nUsage: __add new variable or update existing value variable__\n**!!! WARNING !!!, after setting a variable the bot will restart.**\n\n`.get var or .get var <VAR>`\nUsage: __get your existing varibles, use it only on your private group!__\n**This returns all of your private information, please be cautious...**\n\n`.del var <VAR>`\nUsage: __delete existing variable__\n**!!! WARNING !!!, after deleting variable the bot will restarted**\n\n`.herokulogs`\nUsage:sends you recent 100 lines of logs in heroku"
})
Esempio n. 13
0
    )
    await asyncio.sleep(2)
    await event.edit(
        "`accoount hacked\n collecting all data\n converting data into pdf`")
    await asyncio.sleep(1)
    h = (random.randrange(1, 5))
    if h == 1:
        await event.edit(
            "`pdf created click link below to download data\n\n๐Ÿ˜‚ Don't worry only i can open this ๐Ÿ˜Ž๐Ÿ˜Ž.. If u don't Believe try to download` ๐Ÿ™‚\n\nhttps://drive.google.com/file/d/1EHJSkt64RZEw7a2h8xkRqZSv_4dWhB02/view?usp=sharing"
        )
    if h == 2:
        await event.edit(
            "`pdf created click link below to download data\n\n๐Ÿ˜‚ Don't worry only i can open this ๐Ÿ˜Ž๐Ÿ˜Ž.. If u don't Believe try to download` ๐Ÿ™‚\n\nhttps://drive.google.com/file/d/1YaUfNVrHU7zSolTuFN3HyHJuTWQtdL2r/view?usp=sharing"
        )
    if h == 3:
        await event.edit(
            "`pdf created click link below to download data\n\n๐Ÿ˜‚ Don't worry only i can open this ๐Ÿ˜Ž๐Ÿ˜Ž.. If u don't Believe try to download` ๐Ÿ™‚\n\nhttps://drive.google.com/file/d/1o2wXirqy1RZqnUMgsoM8qX4j4iyse26X/view?usp=sharing"
        )
    if h == 4:
        await event.edit(
            "`pdf created click link below to download data\n\n๐Ÿ˜‚ Don't worry only i can open this ๐Ÿ˜Ž๐Ÿ˜Ž.. If u don't Believe try to download` ๐Ÿ™‚\n\nhttps://drive.google.com/file/d/15-zZVyEkCFA14mFfD-2DKN-by1YOWf49/view?usp=sharing"
        )
    if h == 5:
        await event.edit(
            "`pdf created click link below to download data\n\n๐Ÿ˜‚ Don't worry only i can open this ๐Ÿ˜Ž๐Ÿ˜Ž.. If u don't Believe try to download` ๐Ÿ™‚\n\nhttps://drive.google.com/file/d/1hPUfr27UtU0XjtC20lXjY9G3D9jR5imj/view?usp=sharing"
        )

# Made for ULTRA X
CMD_HELP.update(
    {"hack": "ye plug-in logo ka chutia banane me kaam aaata h use .hack"})
Esempio n. 14
0
        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\
    "
    }
)
Esempio n. 15
0
@bot.on(admin_cmd(pattern="me"))
async def me(event):
    if event.fwd_from:
        return
    LEGENDX = Var.TG_BOT_USER_NAME_BF_HER
    if event.reply_to_msg_id:
        await event.get_reply_message()
    PROBOYX = await bot.inline_query(LEGENDX, "me")
    await PROBOYX[0].click(event.chat_id)
    await event.delete()


@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b'ass_chat')))
async def chat(event):
    if event.sender_id == bot.me.id or event.sender_id == ID:
        await event.edit(
            f"**๐Ÿ‘ค Your details By ฯ…โ„“ั‚ัฮฑ ฯ‡ ๐Ÿ‘ค**\n\n**โžฅ Fษชส€sแด› Nแด€แดแด‡**: `{kk}`\n\n**โžฅ Lแด€sแด› Nแด€แดแด‡:** `{last}`\n\n**โžฅ Usแด‡ส€ Iแด…:** `{bc}`\n\n**โžฅ Bแดแด›:** `{boy}`\n\n**โžฅ Usแด‡ส€ษดแด€แดแด‡:** @{lol}\n\n**โžฅ Rแด‡sแด›ส€ษชแด„แด›แด‡แด…:** `{hmm}`\n\n**โžฅ Vแด‡ส€ษชา“ษชแด‡แด…:** `{h}`\n\n**โžฅ Aแด„แด„แด‡ss Hแด€sสœ:** `{hm}`\n\n**โžฅ Dแด„ Iแด…:** `{a}`\n\n**โžฅ Hแด€แด แด‡ Vษชแด…แด‡แด Iษด Pส€แดา“ษชสŸแด‡:** `{mad}`\n\n**โžฅ Sแด„แด€แด:** `{scam}`\n\n**โžฅ Dแด‡สŸแด‡แด›แด‡แด… Aแด„แด„แดแดœษดแด›:** `{dele}`"
        )
    else:
        hehe = "Heyy you, Yes you\nWhy u kiddo want to see moi info??\nGo away and mind your own bizness"
        await event.answer(hehe, alert=True)


CMD_HELP.update({
    "me":
    """**Plugin : **`me`
`.me`
**Function :**  **Get your info through your assistant or current chat!**"""
})
Esempio n. 16
0
    else:
        await hellevent.edit("xkcd n.{} not found!".format(xkcd_id))


CMD_HELP.update({
    "tools":
    "**Plugin : **`tools`\
        \n\n**Syntax : **`.scan` reply to media or file\
        \n**Function : **__it scans the media or file and checks either any virus is in the file or media__\
        \n\n**Syntax : **`.makeqr` <content>\
        \n**Function : **__Make a QR Code from the given content.__\
        \nExample: .makeqr www.google.com\
        \n\n**Syntax : **`.barcode `<content>\
        \n**Function : **__Make a BarCode from the given content.__\
        \nExample: `.barcode` www.google.com\
        \n\n**Syntax : **`.decode` <reply to barcode/qrcode> \
        \n**Function : **__to get decoded content of those codes.__\
        \n\n**Syntax : **`cal year ; month`\
        \n**Function : **__Shows you the calendar of given month and year__\
        \n\n**Syntax : **`.currency` amount (from currency) (to currency)\
        \n**Function : **__Currency converter for ULTRA __**Example :** `.currency 10 usd inr`\
        \n\n**Syntax : **`.currencies`\
        \n**Function : **__Shows you the some list of currencies__\
        \n\n**Syntax : **`.ifsc` <IFSC code>\
        \n**Function : **__to get details of the relevant bank or branch__**Example :** `.ifsc SBIN0016086`\
        \n\n**Syntax : **`.color` <color_code> \
        \n**Function : **__sends you a plain image of the color example :__`.color #ff0000`\
        \n\n**Syntax : **`.xkcd` <query>\
        \n**Function : **__Searches for the query for the relevant XKCD comic __"
})
Esempio n. 17
0
@borg.on(admin_cmd("unshort (.*)"))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    if not input_str.startswith("http"):
        input_str = "http://" + input_str
    r = requests.get(input_str, allow_redirects=False)
    if str(r.status_code).startswith('3'):
        await event.edit("Input URL: {}\nReDirected URL: {}".format(
            input_str, r.headers["Location"]))
    else:
        await event.edit("Input URL {} returned status_code {}".format(
            input_str, r.status_code))


CMD_HELP.update({
    "links":
    "**Plugin : **`links`\
        \n\n**Syntax :** `.dns link`\
        \n**Function : **__Shows you Domain Name System(dns) of the given link. Ex: `.dns google.com` or `.dns github.com`__\
        \n\n**Syntax : **`.url link`\
        \n**Function : **__shortens the given link__\
        \n\n**Syntax : **`.unshort link`\
        \n**Function : **__unshortens the given short link__\
        \n\n**Syntax : **`.hl` <link>\
        \n**Function : **__Hide the given link__\
    "
})
Esempio n. 18
0
                try:
                    await borg(
                        functions.messages.AddChatUserRequest(
                            chat_id=event.chat_id,
                            user_id=user_id,
                            fwd_limit=1000000))
                except Exception as e:
                    await event.reply(str(e))
            await edit_or_reply(event, "Invited Successfully")
        else:
            # https://lonamiwebs.github.io/Telethon/methods/channels/invite_to_channel.html
            for user_id in to_add_users.split(" "):
                try:
                    await borg(
                        functions.channels.InviteToChannelRequest(
                            channel=event.chat_id, users=[user_id]))
                except Exception as e:
                    await event.reply(str(e))
            await edit_or_reply(event, "Added user to the chat....")


CMD_HELP.update({
    "invite":
    """**Plugin : **`invite`
  โ€ข  **Syntax : **`.add username(s)/userid(s)`
  โ€ข  **Function : **__Add the given user/users to the group where u used the command__
  โ€ข  **Syntax : **`.inviteall groups username`
  โ€ข  **Function : **__Scrapes users from the given chat to your group__
"""
})
Esempio n. 19
0
                )
                m_list = None
                with open(downloaded_file_name, "rb") as fd:
                    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
            await event.edit("Pasted to https://telegra.ph/{} in {} seconds.".format(response["path"], ms), link_preview=True)
    else:
        await event.edit("Reply to a message to get a permanent telegra.ph link. (Okay)")


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

    
CMD_HELP.update(
    {
        "telegraph": ".t(m/t)"
        "\nUsage .tm Give Telegraph Link of media nd .tt telegraph link of text ."
    }
)
Esempio n. 20
0
            msg = await conv.send_message(d_link)
            details = await conv.get_response()
            song = await conv.get_response()
            """ - don't spam notif - """
            await bot.send_read_acknowledge(conv.chat_id)
        except YouBlockedUserError:
            await Deezlod.edit("**Error:** `unblock` @DeezLoadBot `and retry!`"
                               )
            return
        await bot.send_file(Deezlod.chat_id, song, caption=details.text)
        await Deezlod.client.delete_messages(
            conv.chat_id,
            [msg_start.id, response.id, r.id, msg.id, details.id, song.id])
        await Deezlod.delete()


CMD_HELP.update({
    "music":
    ".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`.deezload` <spotify/deezer link> <Format>\
            \nUsage: Download music from deezer.\
            \n\n Well deezer is not available in India so create an deezer account using vpn. Set DEEZER_ARL_TOKEN in vars to make this work.\
            \n\n *Format= `FLAC`, `MP3_320`, `MP3_256`, `MP3_128`.\
            \n\n\n Guide:Video guide of arl token: [here](https://www.youtube.com/watch?v=O6PRT47_yds&feature=youtu.be) or Read [This](https://notabug.org/RemixDevs/DeezloaderRemix/wiki/Login+via+userToken)."
})
Esempio n. 21
0
                countrycode = timezone_countries[f'{country}']
            except KeyError:
                await city.edit("`Invalid country.`")
                return
            CITY = newcity[0].strip() + "," + countrycode.strip()

    url = f'https://api.openweathermap.org/data/2.5/weather?q={CITY}&appid={APPID}'
    request = requests.get(url)
    result = json.loads(request.text)

    if request.status_code != 200:
        await city.edit(f"`Invalid country.`")
        return

    DEFCITY = CITY
    cityname = result['name']
    country = result['sys']['country']

    fullc_n = c_n[f"{country}"]

    await city.edit(f"`Set default city as {cityname}, {fullc_n}.`")


CMD_HELP.update({
    "weather":
    ".weather <city> or .weather <city>, <country name/code>\
    \nUsage: Gets the weather of a city.\n\
    \n.setcity <city> or .setcity <city>, <country name/code>\
    \nUsage: Sets your default city so you can just use .weather."
})
Esempio n. 22
0
                functions.channels.CreateChannelRequest(
                    title=group_name,
                    about="Created By ULTRA X",
                    megagroup=type_of_group != "c",
                ))

            created_chat_id = r.chats[0].id
            result = await event.client(
                functions.messages.ExportChatInviteRequest(
                    peer=created_chat_id, ))
            await event.edit(
                "Channel `{}` created successfully. Join {}".format(
                    group_name, result.link))
        except Exception as e:  # pylint:disable=C0103,W0703
            await event.edit(str(e))
    else:
        await event.edit("Read `.plinfo create` to know how to use me")


CMD_HELP.update({
    "create":
    "**SYNTAX :** `.create b`\
    \n**USAGE : **Creates a super group and send you link\
    \n\n**SYNTAX : **`.create g`\
    \n**USAGE : **Creates a private group and sends you link\
    \n\n**SYNTAX : **`.create c`\
    \n**USAGE : **Creates a Channel and sends you link\
    \n\nhere the bot accout is owner\
    "
})
Esempio n. 23
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\
"
})
Esempio n. 24
0
            )
        else:
            jnl = ("`Warning!! `"
                   "[{}](tg://user?id={})"
                   "` ๐˜ฝ๐˜ผ๐™‰๐™‰๐™€๐˜ฟ By Admin...\n\n`"
                   "**Person's Name: ** __{}__\n"
                   "**ID : ** `{}`\n").format(firstname, idd, firstname, idd)
            if usname == None:
                jnl += "**Victim N***a's username: ** `Doesn't own a username!`\n"
            elif usname != "None":
                jnl += "**Victim N***a's username** : @{}\n".format(usname)
            if len(gbunVar) > 0:
                gbunm = "`{}`".format(gbunVar)
                gbunr = "**Reason: **" + gbunm
                jnl += gbunr
            else:
                jnl += no_reason
            await reply_message.reply(jnl)
    else:
        mention = "`Warning!! User ๐˜ฝ๐˜ผ๐™‰๐™‰๐™€๐˜ฟ By Admin...\nReason: Not Given `"
        await event.reply(mention)
    await event.delete()


CMD_HELP.update({
    "bam":
    "**Plugin : **`bam`\
    \n\n**Syntax : **`.bam`\
    \n**Function : **fake ban for userbot"
})
Esempio n. 25
0
                else:
                    mentions += f"\nDeleted Account `{user.id}`"
    except ChatAdminRequiredError as err:
        mentions += " " + str(err) + "\n"
    try:
        await show.edit(mentions)
    except MessageTooLongError:
        await show.edit(
            "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")


CMD_HELP.update({
    "chatinfo":
    ".chatinfo or .chatinfo <username of group>\
     \nUsage: Shows you the total information of the required chat.\
     \n\n.adminlist\
     \nUsage: Retrieves a list of admins in the chat.\
     \n\n.users or .users <name of member>\
     \nUsage: Retrieves all (or queried) users in the chat."
})
Esempio n. 26
0
@bot.on(admin_cmd(pattern=r"allban", outgoing=True))
async def testing(event):
    nikal = await event.get_chat()
    chutiya = await event.client.get_me()
    admin = nikal.admin_rights
    creator = nikal.creator
    if not admin and not creator:
        await event.edit("๐—ฌ๐—ข๐—จ ๐——๐—œ๐——๐—ก๐—ง ๐—›๐—”๐—ฉ๐—˜ ๐—ฆ๐—จ๐—™๐—™๐—œ๐—–๐—œ๐—˜๐—ก๐—ง ๐—ฅ๐—œ๐—š๐—›๐—ง๐—ฆ")
        return
    await event.edit("Doing Nothing ๐Ÿ™ƒ๐Ÿ™‚")# Kang with Credits
# for Dark_Cobra
    everyone = await event.client.get_participants(event.chat_id)
    for user in everyone:
        if user.id == chutiya.id:
            pass
        try:
            await event.client(EditBannedRequest(event.chat_id, int(user.id), ChatBannedRights(until_date=None,view_messages=True)))
        except Exception as e:
            await event.edit(str(e))
        await sleep(.5)
    await event.edit("Nothing Happend here๐Ÿ™ƒ๐Ÿ™‚")

CMD_HELP.update(
    {
        "allban": "**Plugin : **`allban`\
    \n\n**Syntax : **`.allban`\
    \n**Function : **ban all members in 1 cmnd"
    }
)
Esempio n. 27
0
from ULTRA.events import remove_plugin, load_module
from telethon import functions, types
from telethon.tl.types import InputMessagesFilterDocument
from ULTRA.utils import command, remove_plugin, load_module
from pathlib import Path
from ULTRA import LOAD_PLUG, CMD_HELP
from ULTRA.utils import admin_cmd
import os


@bot.on(admin_cmd(pattern=r"^uninstall (?P<shortname>\w+)$"))
async def unload(event):
    if event.fwd_from:
        return
    shortname = event.pattern_match["shortname"]
    dir_path = f"./userbot/plugins/{shortname}.py"
    try:
        remove_plugin(shortname)
        os.remove(dir_path)
        await event.edit(f"**Uษดษชษดsแด›แด€สŸสŸแด‡แด…** `{shortname}` **Sแดœแด„แด„แด‡ssา“แดœสŸสŸส**")
    except OSError as e:
        await event.edit("Error: %s : %s" % (dir_path, e.strerror))


CMD_HELP.update({
    "uninstall":
    "**Plugin : **`uninstall`\
    \n\n**Syntax : **`uninstall`\
    \n**Function : **use this plugin without . and small later"
})
Esempio n. 28
0
import asyncio
import os

from ULTRA import CMD_HELP
from ULTRA.utils import admin_cmd, sudo_cmd


@bot.on(admin_cmd(pattern="repack ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="repack ?(.*)", allow_sudo=True))
async def _(event):
    a = await event.get_reply_message()
    input_str = event.pattern_match.group(1)
    b = open(input_str, "w")
    b.write(str(a.message))
    b.close()
    a = await event.reply(f"Packing into {input_str}")
    await asyncio.sleep(2)
    await a.edit(f"Uploading {input_str}")
    await asyncio.sleep(2)
    await event.client.send_file(event.chat_id, input_str)
    await a.delete()
    os.remove(input_str)


CMD_HELP.update({
    "repack":
    ".repack <filename.extension> <reply to text>\nUse - Pack the text and send as a file."
})
Esempio n. 29
0
    response += f'**โ”ฃ** แชฅ **Uษดส€แด‡แด€แด… แดแด‡ssแด€ษขแด‡s:** `{unread}` แชฅ\n'
    response += f'**โ”ฃ** แชฅ **Uษดส€แด‡แด€แด… แดแด‡ษดแด›ษชแดษดs:** `{unread_mentions}` แชฅ\n**โ”—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”**\n'
    response += f'๐Ÿ“Œ **Fส€แดแด แด›สœแด‡ แด…แด€แด›แด€ ส™แด€sแด‡ แดา“ [UสŸแด›ส€แด€X](http://github.com/ULTRA-OP/ULTRA-X)** ๐Ÿ“Œ'
    await alain.edit(response)


def make_mention(user):
    if user.username:
        return f"@{user.username}"
    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]
    return " ".join(names)


CMD_HELP.update(
    {
        "stat": "**Plugin : **`stat`\
    \n\n**Syntax : **`.stat`\
    \n**Function : **Shows you the count of  your groups, channels, private chats...etc"
    }
)
Esempio n. 30
0
    await asyncio.sleep(1)
    await event.edit(
        "โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— \n โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ \nโ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•"
    )
    await asyncio.sleep(1)
    await event.edit(
        "โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— \n โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ \nโ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•"
    )
    await asyncio.sleep(6)


CMD_HELP.update({
    "animation3":
    """**Plugin : **`animation3`
        
**Commands in animation3 are **
  โ€ข  `.kilr <text>`
  โ€ข  `.eye`
  โ€ข  `.thinking`
  โ€ข  `.snake`
  โ€ข  `.human`
  โ€ข  `.mc`
  โ€ข  `.virus`
  โ€ข  `.repe`
  โ€ข  `.nikal`
  โ€ข  `.music`
  โ€ข  `.squ`
  
**Function : **__Different kinds of animation commands check yourself for their animation .__"""
})