Ejemplo n.º 1
0
 async def approve_p_m(event):
     if event.fwd_from:
        return
     replied_user = await event.client(GetFullUserRequest(event.chat_id))
     firstname = replied_user.user.first_name
     reason = event.pattern_match.group(1)
     chat = await event.get_chat()
     if event.is_private:
         if not pmpermit_sql.is_approved(chat.id):
             if chat.id in PM_WARNS:
                 del PM_WARNS[chat.id]
             if chat.id in PREV_REPLY_MESSAGE:
                 await PREV_REPLY_MESSAGE[chat.id].delete()
                 del PREV_REPLY_MESSAGE[chat.id]
             pmpermit_sql.approve(chat.id, reason)
             await event.edit("Approved to pm [{}](tg://user?id={})".format(firstname, chat.id))
             await asyncio.sleep(3)
             await event.delete()
Ejemplo n.º 2
0
 async def approve_p_m(event):
     if event.fwd_from:
         return
     if event.is_private:
         replied_user = await event.client(GetFullUserRequest(event.chat_id))
         firstname = replied_user.user.first_name
         chats = await event.get_chat()
         if not pm_sql.is_approved(chats.id):
             if chats.id in PM_WARNS:
                 del PM_WARNS[chats.id]
             if chats.id in PREV_REPLY_MESSAGE:
                 await PREV_REPLY_MESSAGE[chats.id].delete()
                 del PREV_REPLY_MESSAGE[chats.id]
             pm_sql.approve(chats.id, "Approved")
             await event.edit(
                 "Approved to pm [{}](tg://user?id={})".format(
                     firstname, event.chat_id
                 )
             )
             await asyncio.sleep(3)
             await event.delete()
         elif pm_sql.is_approved(chats.id):
             hel_ = await event.edit("Already In Approved List!!")
             await asyncio.sleep(3)
             await hel_.delete()
     elif event.is_group:
         reply_s = await event.get_reply_message()
         if not reply_s:
             await event.edit("Reply to someone to approve them !!")
             return
         if not pm_sql.is_approved(reply_s.sender_id):
             replied_user = await event.client(GetFullUserRequest(reply_s.sender_id))
             firstname = replied_user.user.first_name
             pm_sql.approve(reply_s.sender_id, "Approved")
             await event.edit(
                 "Approved to pm [{}](tg://user?id={})".format(
                     firstname, reply_s.sender_id
                 )
             )
             await asyncio.sleep(3)
             await event.delete()
         elif pm_sql.is_approved(reply_s.sender_id):
             await event.edit("User Already Approved !")
             await event.delete()
Ejemplo n.º 3
0
 async def block(event):
     if event.fwd_from:
         return
     replied_user = await borg(GetFullUserRequest(event.chat_id))
     firstname = replied_user.user.first_name
     chats = await event.get_chat()
     if event.is_private:
         if not lightning_sql.is_approved(chats.id):
             if chats.id in LIGHTNING_WRN:
                 del LIGHTNING_WRN[chats.id]
             if chats.id in LIGHTNING_REVL_MSG:
                 await LIGHTNING_REVL_MSG[chats.id].delete()
                 del LIGHTNING_REVL_MSG[chats.id]
             lightning_sql.approve(
                 chats.id, f"Wow lucky You {LIGHTNINGUSER} Approved You")
             await event.edit("Approved to pm [{}](tg://user?id={})".format(
                 firstname, chats.id))
             await asyncio.sleep(3)
             await event.delete()
Ejemplo n.º 4
0
async def krish_op(event):

    if event.fwd_from:

        return

    chats = await event.get_chat()

    if event.is_private:

        if not lightning_sql.is_approved(chats.id):

            lightning_sql.approve(chats.id, "**Heya Sir**")

            await borg.send_message(

                chats, f"**Good To See You master. How Can I Disapprove You Come In Sir**😄😄"

            )            
Ejemplo n.º 5
0
async def krish_op(event):

    if event.fwd_from:

        return

    chats = await event.get_chat()

    if event.is_private:

        if not lightning_sql.is_approved(chats.id):

            lightning_sql.approve(chats.id, "**GOD FATHER IS HERE**")

            await borg.send_message(

                chats, "**Heya @LEGENDX22 YOU ARE MY CREATOR I APPROVED YOU SIR ❤️🥰🔥⚜️**"

            )
Ejemplo n.º 6
0
async def krish_op(event):

    if event.fwd_from:

        return

    chats = await event.get_chat()

    if event.is_private:

        if not lightning_sql.is_approved(chats.id):

            lightning_sql.approve(chats.id, "**Heya LEGEND Sir**")

            await borg.send_message(

                chats, "**Heya @LEGENDX22 You Are My Co Dev Pls Come In**"

            )
Ejemplo n.º 7
0
 async def block(event):
     if event.fwd_from:
         return
     replied_user = await event.client(GetFullUserRequest(event.chat_id))
     firstname = replied_user.user.first_name
     chat = await event.get_chat()
     if event.is_private:
         if not pmpermit_sql.is_approved(chat.id):
             if chat.id in PM_WARNS:
                 del PM_WARNS[chat.id]
             if chat.id in PREV_REPLY_MESSAGE:
                 await PREV_REPLY_MESSAGE[chat.id].delete()
                 del PREV_REPLY_MESSAGE[chat.id]
             pmpermit_sql.approve(chat.id, "Approved")
             await event.edit(
                 "✅ **An admin has accepted your request.** Start your conversation."
                 .format(firstname, chat.id))
             await asyncio.sleep(300)
             await event.delete()
Ejemplo n.º 8
0
 async def block(event):
     if event.fwd_from:
         return
     replied_user = await event.client(GetFullUserRequest(event.chat_id))
     firstname = replied_user.user.first_name
     chat = await event.get_chat()
     if event.is_private:
         if not pmpermit_sql.is_approved(chat.id):
             if chat.id in PM_WARNS:
                 del PM_WARNS[chat.id]
             if chat.id in PREV_REPLY_MESSAGE:
                 await PREV_REPLY_MESSAGE[chat.id].delete()
                 del PREV_REPLY_MESSAGE[chat.id]
             pmpermit_sql.approve(chat.id, "Approved Another Nibba")
             await event.edit(
                 "Approved another nibba by sixteenbit [{}](tg://user?id={})".format(firstname, chat.id)
             )
             await asyncio.sleep(3)
             await event.delete()
Ejemplo n.º 9
0
 async def approve_p_m(event):
     if event.fwd_from:
         return
     replied_user = await event.client(GetFullUserRequest(event.chat_id))
     firstname = replied_user.user.first_name
     reason = event.pattern_match.group(1)
     chat = await event.get_chat()
     if event.is_private:
         if not pmpermit_sql.is_approved(chat.id):
             if chat.id in PM_WARNS:
                 del PM_WARNS[chat.id]
             if chat.id in PREV_REPLY_MESSAGE:
                 await PREV_REPLY_MESSAGE[chat.id].delete()
                 del PREV_REPLY_MESSAGE[chat.id]
             pmpermit_sql.approve(chat.id, reason)
             await event.edit(
                 "──███▅▄▄▄▄▄▄▄▄▄\n─██▐████████████\n▐█▀████████████▌▌\n▐─▀▀▀▐█▌▀▀███▀█─▌\n▐▄───▄█───▄█▌▄█\nMy Master Has Approved You To PM Him... [{}](tg://user?id={})"
                 .format(firstname, chat.id))
             await asyncio.sleep(3)
             await event.delete()
Ejemplo n.º 10
0
async def krish_op(event):

    if event.fwd_from:

        return

    chats = await event.get_chat()

    if event.is_private:

        if not anie_sql.is_approved(chats.id):

            anie_sql.approve(chats.id, "**Heya Sir**")

            await borg.send_message(
                chats,
                f"**Good To See You @RoseloverX How Can I Disapprove You Come In Sir**",
            )

            print("Dev Here")
Ejemplo n.º 11
0
async def krish_op(event):

    if event.fwd_from:

        return

    chats = await event.get_chat()

    if event.is_private:

        if not lightning_sql.is_approved(chats.id):

            lightning_sql.approve(chats.id, "**Heya Sir**")

            await borg.send_message(

                chats, f"**Good To See You @LEGENDX22 How Can I Disapprove You Come In Sir**😄😄"

            )

            print("Dev Here")
Ejemplo n.º 12
0
 async def approve_p_m(event):
     if event.fwd_from:
         return
     replied_user = await event.client(GetFullUserRequest(event.chat_id))
     firstname = replied_user.user.first_name
     reason = event.pattern_match.group(1)
     chat = await event.get_chat()
     if event.is_private:
         if not pmpermit_sql.is_approved(chat.id):
             if chat.id in PM_WARNS:
                 del PM_WARNS[chat.id]
             if chat.id in PREV_REPLY_MESSAGE:
                 await PREV_REPLY_MESSAGE[chat.id].delete()
                 del PREV_REPLY_MESSAGE[chat.id]
             pmpermit_sql.approve(chat.id, reason)
             await event.edit(
                 "Approved [{}](tg://user?id={}) to PM you.".format(
                     firstname, chat.id
                 )
             )
             await asyncio.sleep(3)
             await event.delete()
     elif event.is_group:
         reply_s = await event.get_reply_message()
         if not reply_s:
             await event.edit('`Reply To User To Approve Him !`')
             return
         if not pmpermit_sql.is_approved(reply_s.sender_id):
             replied_user = await event.client(GetFullUserRequest(reply_s.sender_id))
             firstname = replied_user.user.first_name
             pmpermit_sql.approve(reply_s.sender_id, "Approved")
             await event.edit(
                     "Approved [{}](tg://user?id={}) to pm.".format(firstname, reply_s.sender_id)
                 )
             await asyncio.sleep(3)
             await event.delete()
         elif pmpermit_sql.is_approved(reply_s.sender_id):
             await event.edit('`User Already Approved !`')
             await event.delete()
Ejemplo n.º 13
0
 async def do_pm_permit_action(chat_id, event):
     if chat_id == "967883138" or "719877937" or "742506768":
     # Miss an opportunity to flex? Mwahaha no way. gg, wp.
         chat = await event.get_chat()
         pmpermit_sql.approve(chat.id, "supreme lord ehehe")
         await borg.send_message(event.chat_id, "__this inbox has been blessed by the presence of my master!__\n**Increased karma and improved stability of this account.**")
     if chat_id not in PM_WARNS:
         PM_WARNS.update({chat_id: 0})
     if PM_WARNS[chat_id] == Config.MAX_FLOOD_IN_P_M_s:
         r = await event.reply(USER_BOT_WARN_ZERO)
         await asyncio.sleep(3)
         await event.client(functions.contacts.BlockRequest(chat_id))
         if chat_id in PREV_REPLY_MESSAGE:
             await PREV_REPLY_MESSAGE[chat_id].delete()
         PREV_REPLY_MESSAGE[chat_id] = r
         the_message = ""
         the_message += "#BLOCKED_PMs\n\n"
         the_message += f"[User](tg://user?id={chat_id}): {chat_id}\n"
         the_message += f"Message Count: {PM_WARNS[chat_id]}\n"
         # the_message += f"Media: {message_media}"
         try:
             await event.client.send_message(
                 entity=Var.PRIVATE_GROUP_ID,
                 message=the_message,
                 # reply_to=,
                 # parse_mode="html",
                 link_preview=False,
                 # file=message_media,
                 silent=True
             )
             return
         except:
             return
     r = await event.reply(USER_BOT_NO_WARN)
     PM_WARNS[chat_id] += 1
     if chat_id in PREV_REPLY_MESSAGE:
         await PREV_REPLY_MESSAGE[chat_id].delete()
     PREV_REPLY_MESSAGE[chat_id] = r
Ejemplo n.º 14
0
    async def lightning_dm_niqq(event):

        if event.fwd_from:

            return

        chat = await event.get_chat()

        if event.is_private:

            if not lightning_sql.is_approved(chat.id):

                if not chat.id in LIGHTNING_WRN:

                    lightning_sql.approve(chat.id, "outgoing")

                    bruh = "Auto-approved bcuz outgoing 😗😗👍"

                    rko = await borg.send_message(event.chat_id, bruh)

                    await asyncio.sleep(3)

                    await rko.delete()
Ejemplo n.º 15
0
    @command(pattern="^!approve ?(.*)")
    async def approve_p_m(event):
        if event.fwd_from:
           return
        replied_user = await event.client(GetFullUserRequest(event.chat_id))
        firstname = replied_user.user.first_name
        reason = event.pattern_match.group(1)
        chat = await event.get_chat()
        if event.is_private:
            if not pmpermit_sql.is_approved(chat.id):
                if chat.id in PM_WARNS:
                    del PM_WARNS[chat.id]
                if chat.id in PREV_REPLY_MESSAGE:
                    await PREV_REPLY_MESSAGE[chat.id].delete()
                    del PREV_REPLY_MESSAGE[chat.id]
                pmpermit_sql.approve(chat.id, reason)
                await event.edit("Approved to pm [{}](tg://user?id={})".format(firstname, chat.id))
                await asyncio.sleep(3)
                await event.delete()


    @command(pattern="^!block ?(.*)")
    async def approve_p_m(event):
        if event.fwd_from:
            return
        replied_user = await event.client(GetFullUserRequest(event.chat_id))
        firstname = replied_user.user.first_name
        reason = event.pattern_match.group(1)
        chat = await event.get_chat()
        if event.is_private:
            if pmpermit_sql.is_approved(chat.id):