From 0e95a313d4d5afa350e608c1781c0698e89a3467 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:19:42 +0000 Subject: [PATCH] feat: Updated modules/admintool.py --- modules/admintool.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/admintool.py b/modules/admintool.py index c631d6d..c9855e3 100644 --- a/modules/admintool.py +++ b/modules/admintool.py @@ -127,7 +127,7 @@ 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(): + if "report_spam" in cause.lower().split(): await client.send(functions.channels.ReportSpam( channel=channel, participant=user_id @@ -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,