Skip to content

Commit

Permalink
feat: Updated modules/admintool.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Oct 30, 2023
1 parent 838491a commit 0e95a31
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/admintool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0e95a31

Please sign in to comment.