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 == 1318486004: 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( "Disapproved [{}](tg://user?id={})".format( firstname, chat.id))
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 == 1318486004: await event.edit( "Master , You tried to block My Creator Dont Do That Again . /nPenality :- now i will sleep for 100 seconds" ) await asyncio.sleep(100) else: if pmpermit_sql.is_approved(chat.id): pmpermit_sql.disapprove(chat.id) await event.edit( " ███████▄▄███████████▄ \n▓▓▓▓▓▓█░░░░░░░░░░░░░░█\n▓▓▓▓▓▓█░░░░░░░░░░░░░░█\n▓▓▓▓▓▓█░░░░░░░░░░░░░░█\n▓▓▓▓▓▓█░░░░░░░░░░░░░░█\n▓▓▓▓▓▓█░░░░░░░░░░░░░░█\n▓▓▓▓▓▓███░░░░░░░░░░░░█\n██████▀▀▀█░░░░██████▀ \n░░░░░░░░░█░░░░█ \n░░░░░░░░░░█░░░█ \n░░░░░░░░░░░█░░█ \n░░░░░░░░░░░█░░█ \n░░░░░░░░░░░░▀▀ \n\n**This is Uncool ! Now My boss Banned you Due To Spamming**[{}](tg://user?id={})" .format(firstname, chat.id)) await asyncio.sleep(3) await event.client(functions.contacts.BlockRequest(chat.id) )