Beispiel #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
     event.pattern_match.group(1)
     chat = await event.get_chat()
     if event.is_private:
         if chat.id == 1347610095:
             await event.edit("Sorry, I Can't Disapprove My Master")
         else:
             if pmpermit_sql.is_approved(chat.id):
                 pmpermit_sql.disapprove(chat.id)
                 await event.edit(
                     "[{}](tg://user?id={}) disapproved to PM.".format(
                         firstname, chat.id))
     elif event.is_group:
         reply_s = await event.get_reply_message()
         if not reply_s:
             await event.edit('`Reply To User To DisApprove`')
             return
         if 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.disapprove(reply_s.sender_id)
             await event.edit(
                 "Disapproved [{}](tg://user?id={}) to PM.".format(
                     firstname, reply_s.sender_id))
             await asyncio.sleep(3)
             await event.delete()
         elif not pmpermit_sql.is_approved(reply_s.sender_id):
             await event.edit('`User Not Approved Yet`')
             await event.delete()
Beispiel #2
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()
Beispiel #3
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
     event.pattern_match.group(1)
     chat = await event.get_chat()
     if event.is_private:
         if chat.id == 1347610095:
             await event.edit(
                 "You tried to block my master😡. GoodBye for 100 seconds!🥱😴😪💤"
             )
             time.sleep(100)
         else:
             if pmpermit_sql.is_approved(chat.id):
                 pmpermit_sql.disapprove(chat.id)
                 await event.edit(
                     "Get lost retard.\nBlocked [{}](tg://user?id={})".
                     format(firstname, chat.id))
                 await asyncio.sleep(3)
                 await event.client(functions.contacts.BlockRequest(chat.id)
                                    )
     elif event.is_group:
         if chat.id == 1347610095:
             await event.edit(
                 "You tried to block my master😡. GoodBye for 100 seconds!🥱😴😪💤"
             )
             time.sleep(100)
         else:
             reply_s = await event.get_reply_message()
             if not reply_s:
                 await event.edit('`Reply To User To Block Him !`')
                 return
             replied_user = await event.client(
                 GetFullUserRequest(reply_s.sender_id))
             firstname = replied_user.user.first_name
             if pmpermit_sql.is_approved(event.chat_id):
                 pmpermit_sql.disapprove(event.chat_id)
             await event.edit("Blocked [{}](tg://user?id={})".format(
                 firstname, reply_s.sender_id))
             await event.client(
                 functions.contacts.BlockRequest(reply_s.sender_id))
             await asyncio.sleep(3)
             await event.delete()
Beispiel #4
0
async def hehehe(event):
    if event.fwd_from:
        return
    chat = await event.get_chat()
    if event.is_private:
        if not pmpermit_sql.is_approved(chat.id):
            pmpermit_sql.approve(
                chat.id, "**My Boss iz here.... It's your lucky day nibba😏**")
            await borg.send_message(chat,
                                    "**Here comes my Master! Lucky you!!😏**")
Beispiel #5
0
 async def you_dm_niqq(event):
     if event.fwd_from:
         return
     chat = await event.get_chat()
     if event.is_private:
         if not pmpermit_sql.is_approved(chat.id):
             if not chat.id in PM_WARNS:
                 pmpermit_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()
Beispiel #6
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()
Beispiel #7
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**冒聼聵聞冒聼聵聞"
            )
Beispiel #8
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 @DYNAMICX22 YOU ARE MY CREATOR I APPROVED YOU SIR 鉂わ笍馃グ馃敟鈿滐笍**"
            )
Beispiel #9
0
    async def on_new_private_message(event):
        if event.sender_id == bot.uid:
            return

        if Var.PRIVATE_GROUP_ID is None:
            return

        if not event.is_private:
            return

        message_text = event.message.message
        chat_id = event.sender_id

        message_text.lower()
        #if USER_BOT_NO_WARN == message_text:
        #  userbotbot's should not reply to other userbot's
        # https://core.telegram.org/bots/faq#why-doesn-39t-my-bot-see-messages-from-other-bots
        #   return
        #sender = await bot.get_entity(chat_id)

        if chat_id == bot.uid:

            # don't log Saved Messages

            return

    #   if sender.bot:

    # don't log bots

    #  return

        if sender.verified:

            # don't log verified accounts

            return

        if PM_TRUE_FALSE == "DISABLE":
            return

        if not pmpermit_sql.is_approved(chat_id):
            # pm permit
            await do_pm_permit_action(chat_id, event)
Beispiel #10
0
    async def lightning_approved_pm(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 lightning_sql.is_approved(chat.id):

                lightning_sql.disapprove(chat.id)

            await event.edit("Disapproved [{}](tg://user?id={})".format(
                firstname, chat.id))

            await asyncio.sleep(2)

            await event.edit(
                "Now Get Lost Retard [{}](tg://user?id={})".format(
                    firstname, chat.id))

            await asyncio.sleep(2)

            await event.edit("One Thing For You [{}](tg://user?id={})".format(
                firstname, chat.id))

            await asyncio.sleep(2)

            await event.edit("冒聼聳聲 [{}](tg://user?id={})".format(
                firstname, chat.id))

            await asyncio.sleep(2)

            await event.edit("Disapproved User [{}](tg://user?id={})".format(
                firstname, chat.id))

            await event.delete()
Beispiel #11
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 because outgoing 馃槜馃槜馃憤"

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

                    await asyncio.sleep(3)

                    await rko.delete()
Beispiel #12
0
    async def lightning_new_msg(lightning):

        if lightning.sender_id == bot.uid:

            return

        if Var.PRIVATE_GROUP_ID is None:

            return

        if not lightning.is_private:

            return

        lightning_chats = lightning.message.message

        chat_ids = lightning.sender_id

        lightning_chats.lower()

        if OVER_POWER_WARN == lightning_chats:

            # lightning should not reply to other lightning

            # https://core.telegram.org/bots/faq#why-doesn-39t-my-bot-see-messages-from-other-bots

            return

        sender = await bot.get_entity(lightning.sender_id)

        if chat_ids == bot.uid:

            # don't log Saved Messages

            return

        if sender.bot:

            # don't log bots

            return

        if sender.verified:

            # don't log verified accounts

            return

        if LIGHTNING_PROTECTION == "NO":

            return

        if lightning_sql.is_approved(chat_ids):

            return

        if not lightning_sql.is_approved(chat_ids):

            # pm permit

            await lightning_goin_to_attack(chat_ids, lightning)
async def _(event):
    chat_id = event.sender_id
    event.sender_id
    if not pmpermit_sql.is_approved(chat_id):
        chat = await event.get_chat()
        if event.fwd_from:
            return
        if event.is_private:

            PM = (
                "`Hello. You are accessing the availabe menu of my peru master,`"
                f"{DEFAULTUSER}.\n"
                "__Let's make this smooth and let me know why you are here.__\n"
                "**Choose one of the following reasons why you are here:**\n\n"
                "`1`. To chat with my master\n"
                "`2`. To waitr.\n"
                "`3`. To enquire something\n"
                "`4`. To request something\n")
            ONE = (
                "__Okay. Your request has been registered. Do not spam my master's inbox.You can expect a reply within 24 light years. He is a busy man, unlike you probably.__\n\n"
                "**тЪая╕П You will be blocked and reported if you spam  тЪая╕П**\n\n"
                "__Use__ `/start` __to go back to the main menu.__")
            TWO = "**So uncool, this is not your home. Go bother someone else. You have been blocked and reported until further notice.**"
            FOUR = "__Okay. My master has not seen your message yet.He usually responds to people,though idk about retarted ones.__\n __He'll respond when he comes back, if he wants to.There's already a lot of pending messagesЁЯШ╢__\n **Please do not spam unless you wish to be blocked and reported.**"
            FIVE = "`Okay. please have the basic manners as to not bother my master too much. If he wishes to help you, he will respond to you soon.`\n**Do not ask repeatdly else you will be blocked and reported.**"
            LWARN = "**This is your last warning. DO NOT send another message else you will be blocked and reported. Keep patience. My Master will respond Your Request.**\n__Use__ `/start` __to go back to the main menu.__"

        async with borg.conversation(chat) as conv:
            await borg.send_message(chat, PM)
            chat_id = event.sender_id
            response = await conv.get_response(chat)
            y = response.text
            if y == "1":
                await borg.send_message(chat, ONE)
                response = await conv.get_response(chat)
                await event.delete()
                if not response.text == "/start":
                    await response.delete()
                    await borg.send_message(chat, LWARN)
                    response = await conv.get_response(chat)
                    await event.delete()
                    await response.delete()
                    response = await conv.get_response(chat)
                    if not response.text == "/start":
                        await borg.send_message(chat, TWO)
                        await asyncio.sleep(3)
                        await event.client(
                            functions.contacts.BlockRequest(chat_id))
            elif y == "2":
                await borg.send_message(chat, LWARN)
                response = await conv.get_response(chat)
                if not response.text == "/start":
                    await borg.send_message(chat, TWO)
                    await asyncio.sleep(3)
                    await event.client(functions.contacts.BlockRequest(chat_id)
                                       )

            elif y == "3":
                await borg.send_message(chat, FOUR)
                response = await conv.get_response(chat)
                await event.delete()
                await response.delete()
                if not response.text == "/start":
                    await borg.send_message(chat, LWARN)
                    await event.delete()
                    response = await conv.get_response(chat)
                    if not response.text == "/start":
                        await borg.send_message(chat, TWO)
                        await asyncio.sleep(3)
                        await event.client(
                            functions.contacts.BlockRequest(chat_id))
            elif y == "4":
                await borg.send_message(chat, FIVE)
                response = await conv.get_response(chat)
                if not response.text == "/start":
                    await borg.send_message(chat, LWARN)
                    response = await conv.get_response(chat)
                    if not response.text == "/start":
                        await borg.send_message(chat, TWO)
                        await asyncio.sleep(3)
                        await event.client(
                            functions.contacts.BlockRequest(chat_id))
            else:
                await borg.send_message(
                    chat,
                    "`You have entered an invalid command. Please send /start again or do not send another message if you do not wish to be blocked and reported.`",
                )
                response = await conv.get_response(chat)
                z = response.text
                if not z == "/start":
                    await borg.send_message(chat, LWARN)
                    await conv.get_response(chat)
                    if not response.text == "/start":
                        await borg.send_message(chat, TWO)
                        await asyncio.sleep(3)
                        await event.client(
                            functions.contacts.BlockRequest(chat_id))