async def auto_approve_for_out_going(event): if event.fwd_from: return if not event.is_private: return chat_ids = event.chat_id sender = await event.client( GetFullUserRequest(await event.get_input_chat())) first_name = sender.user.first_name if chat_ids == bot.uid: return if sender.user.bot: return if sender.user.verified: return if PM_ON_OFF == "DISABLE": return if not pmpermit_sql.is_approved(event.chat_id): if not event.chat_id in PM_WARNS: pmpermit_sql.approve(event.chat_id, "outgoing") bruh = "AutoApproved [{}](tg://user?id={}) Due To Out Going Message !".format( first_name, event.chat_id) rko = await borg.send_message(event.chat_id, bruh) await asyncio.sleep(3) await rko.delete()
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**")
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** (づ ̄ ³ ̄)づ", )
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 pmpermit_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] pmpermit_sql.approve(chats.id, "Approved Another Nibba") await event.edit("Approved to pm [{}](tg://user?id={})".format( firstname, chats.id)) await asyncio.sleep(3) await event.delete()
async def approve(event): if event.fwd_from: return if event.is_private: replied_user = await event.client( GetFullUserRequest(await event.get_input_chat())) firstname = replied_user.user.first_name if not pmpermit_sql.is_approved(event.chat_id): if event.chat_id in PM_WARNS: del PM_WARNS[event.chat_id] if event.chat_id in PREV_REPLY_MESSAGE: await PREV_REPLY_MESSAGE[event.chat_id].delete() del PREV_REPLY_MESSAGE[event.chat_id] pmpermit_sql.approve(event.chat_id, "`Mengizinkan Penerobos Protect`") await event.edit( "[{}](tg://user?id={}) di izinkan untuk pm".format( firstname, event.chat_id)) await asyncio.sleep(3) await event.delete() elif pmpermit_sql.is_approved(event.chat_id): sed = await event.edit('`Pengguna sudah Ada di dalam Datebase`' ) await asyncio.sleep(3) await sed.delete() elif event.is_group: reply_s = await event.get_reply_message() if not reply_s: await event.edit('`Balas ke Pengguna Untuk Mengizinkan`') 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 Another Nibba") await event.edit( "[{}](tg://user?id={}) di izinkan untuk 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('`Pengguna Sudah di izinkan`') await event.delete()
async def auto_approve_for_out_going(event): if event.fwd_from: return if not event.is_private: return chat_ids = event.chat_id sender = await event.client(GetFullUserRequest(await event.get_input_chat())) first_name = sender.user.first_name if chat_ids == bot.uid: return if sender.user.bot: return if sender.user.verified: return if PM_ON_OFF == "DISABLE": return if not pmpermit_sql.is_approved(event.chat_id): if not event.chat_id in PM_WARNS: pmpermit_sql.approve(event.chat_id, "outgoing")
async def approve(event): if event.fwd_from: return replied_user = await borg(GetFullUserRequest(event.chat_id)) firstname = replied_user.user.first_name if event.is_private: if not pmpermit_sql.is_approved(event.chat_id): if event.chat_id in PM_WARNS: del PM_WARNS[event.chat_id] if event.chat_id in PREV_REPLY_MESSAGE: await PREV_REPLY_MESSAGE[event.chat_id].delete() del PREV_REPLY_MESSAGE[event.chat_id] pmpermit_sql.approve(event.chat_id, "Approved Another Nibba") await event.edit("Approved to pm [{}](tg://user?id={})".format( firstname, event.chat_id)) await asyncio.sleep(3) await event.delete() elif pmpermit_sql.is_approved(event.chat_id): sed = await event.edit('`This User Already Approved.`') await asyncio.sleep(3) await sed.delete()
async def approve(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 if not pmpermit_sql.is_approved(event.chat_id): if event.chat_id in PM_WARNS: del PM_WARNS[event.chat_id] if event.chat_id in PREV_REPLY_MESSAGE: await PREV_REPLY_MESSAGE[event.chat_id].delete() del PREV_REPLY_MESSAGE[event.chat_id] pmpermit_sql.approve(event.chat_id, "Approved Another Nibba") await event.edit("Approved to pm [{}](tg://user?id={})".format( firstname, event.chat_id)) await asyncio.sleep(3) await event.delete() elif pmpermit_sql.is_approved(event.chat_id): sed = await event.edit('`This User Already Approved.`') await asyncio.sleep(3) await sed.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 Another Nibba") await event.edit("Approved to pm [{}](tg://user?id={})".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()