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 0184e7b commit 838491a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions modules/admintool.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ async def ban_command(client: Client, message: Message):
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
))
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:
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 838491a

Please sign in to comment.