From 339d0d82bf7507ed0c7ffa7d74dd644f78a9ee3f Mon Sep 17 00:00:00 2001 From: xditya <58950863+xditya@users.noreply.github.com> Date: Fri, 26 Feb 2021 22:33:08 +0530 Subject: [PATCH] formatting --- plugins/_inline.py | 12 ++---------- plugins/admintools.py | 6 ++++-- plugins/fedutils.py | 6 +++++- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/plugins/_inline.py b/plugins/_inline.py index f1782e3d44..8607c0d15e 100644 --- a/plugins/_inline.py +++ b/plugins/_inline.py @@ -463,11 +463,7 @@ def paginate_help(page_number, loaded_plugins, prefix): else: pairs = pairs[ modulo_page * number_of_rows : number_of_rows * (modulo_page + 1) - ] + [ - ( - Button.inline("-Bᴀᴄᴋ-", data="open"), - ) - ] + ] + [(Button.inline("-Bᴀᴄᴋ-", data="open"),)] return pairs @@ -514,9 +510,5 @@ def paginate_addon(page_number, loaded_plugins, prefix): else: pairs = pairs[ modulo_page * number_of_rows : number_of_rows * (modulo_page + 1) - ] + [ - ( - Button.inline("-Bᴀᴄᴋ-", data="open"), - ) - ] + ] + [(Button.inline("-Bᴀᴄᴋ-", data="open"),)] return pairs diff --git a/plugins/admintools.py b/plugins/admintools.py index 94aa609ff7..cddc252c41 100644 --- a/plugins/admintools.py +++ b/plugins/admintools.py @@ -303,7 +303,7 @@ async def pin(msg): except BaseException: pass - + @ultroid_cmd( pattern="unpin($| (.*))", ) @@ -404,7 +404,9 @@ async def _(e): async for x in e.client.iter_messages(e.chat_id, from_user=input): await e.client.delete_messages(e.chat_id, x) nos += 1 - await xx.edit(f"**Purged **`{nos}`** msgs of **[{input}](tg://user?id={input})") + await xx.edit( + f"**Purged **`{nos}`** msgs of **[{input}](tg://user?id={input})" + ) except ValueError: return await eod(xx, str(er), time=5) else: diff --git a/plugins/fedutils.py b/plugins/fedutils.py index a0bb7a79d9..9c8e9d219c 100644 --- a/plugins/fedutils.py +++ b/plugins/fedutils.py @@ -30,6 +30,7 @@ bot = "@MissRose_bot" + @ultroid_cmd(pattern="superfban ?(.*)") async def _(event): msg = await eor(event, "Starting a Mass-FedBan...") @@ -331,6 +332,7 @@ async def _(event): f"SuperUnFBan Completed.\nTotal Feds - {len(fedlist)}.\nExcluded - {exCount}.\n Affected {len(fedList) - exCount} feds.\n#TB" ) + @ultroid_cmd(pattern="fstat ?(.*)") async def _(event): ok = await event.edit("`Checking...`") @@ -363,7 +365,7 @@ async def _(event): event.chat_id, audio, caption=f"List of feds {user} has been banned in.\n\nCollected using Ultroid.", - link_preview=False + link_preview=False, ) else: await ultroid.send_message(event.chat_id, audio.text) @@ -372,6 +374,7 @@ async def _(event): except YouBlockedUserError: await ok.edit("**Error**\n `Unblock` @MissRose_Bot `and try again!") + @ultroid_cmd(pattern="fedinfo ?(.*)") async def _(event): ok = await event.edit("`Extracting information...`") @@ -387,4 +390,5 @@ async def _(event): except YouBlockedUserError: await ok.edit("**Error**\n `Unblock` @MissRose_Bot `and try again!") + HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=Var.HNDLR)}"})