Example #1
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 Is Best🔥**")
            await borg.send_message(
                chat, "**User Detected As Developer. So Approved**")
Example #2
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, "supreme lord ehehe")
            await borg.send_message(
                chat,
                "`This inbox has been blessed by my master. Consider yourself lucky.`\n**Increased Stability and Karma** (づ ̄ ³ ̄)づ",
            )
Example #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
     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 to pm [{}](tg://user?id={})".format(
                 firstname, chat.id))
             await asyncio.sleep(3)
             await event.delete()