From 907ccb6f1124e82fe1ec5331459873e59aebcb2d Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 15:53:58 +0530 Subject: [PATCH] Fix IndentationError in modules/admintool.py (#28) * feat: Updated modules/admintool.py * feat: Updated modules/admintool.py --------- Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com> --- modules/admintool.py | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/modules/admintool.py b/modules/admintool.py index d79c992..c9855e3 100644 --- a/modules/admintool.py +++ b/modules/admintool.py @@ -127,11 +127,11 @@ async def ban_command(client: Client, message: Message): await client.ban_chat_member(message.chat.id, user_for_ban) channel = await client.resolve_peer(message.chat.id) user_id = await client.resolve_peer(user_for_ban) - if "report_spam" in cause.lower().split(): - await client.send(functions.channels.ReportSpam( - channel=channel, - participant=user_id - )) + if "report_spam" in cause.lower().split(): + await client.send(functions.channels.ReportSpam( + channel=channel, + participant=user_id + )) # elif not message.reply_to_message and message.chat.type not in ["private", "channel"]: if len(cause.split()) > 1: try: @@ -153,10 +153,10 @@ async def ban_command(client: Client, message: Message): channel = await client.resolve_peer(message.chat.id) user_id = await client.resolve_peer(user_to_ban.id) if ("report_spam" in cause.lower().split() and message.reply_to_message): - await client.send(functions.channels.ReportSpam( - channel=channel, - participant=user_id, - id=[message.reply_to_message.message_id], + await client.send(functions.channels.ReportSpam( + channel=channel, + participant=user_id, + id=[message.reply_to_message.message_id], )) if "delete_history" in cause.lower().split(): await client.send(functions.channels.DeleteParticipantHistory( @@ -256,15 +256,15 @@ async def ban_command(client: Client, message: Message): channel = await client.resolve_peer(message.chat.id) user_id = await client.resolve_peer(user_to_ban.id) if ( - "report_spam" in cause.lower().split() - and message.reply_to_message + "report_spam" in cause.lower().split() + and message.reply_to_message ): - await client.send( - functions.channels.ReportSpam( - channel=channel, - participant=user_id, - id=[message.reply_to_message.message_id], - ) + await client.send( + functions.channels.ReportSpam( + channel=channel, + participant=user_id, + id=[message.reply_to_message.message_id], + ) ) if "delete_history" in cause.lower().split(): await client.send( @@ -452,10 +452,7 @@ async def kick_command(client: Client, message: Message): try: channel = await client.resolve_peer(message.chat.id) user_id = await client.resolve_peer(user_to_ban.id) - if ( - "report_spam" in cause.lower().split() - and message.reply_to_message - ): + if "report_spam" in cause.lower().split() and message.reply_to_message: await client.send( functions.channels.ReportSpam( channel=channel,