From 81aa5914aa1c0d56a463ca24f739c90371605ac9 Mon Sep 17 00:00:00 2001 From: Michael De Roover Date: Mon, 22 Mar 2021 11:04:47 +0100 Subject: [PATCH] Fix indentation --- ubot.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ubot.py b/ubot.py index b879994..1984224 100644 --- a/ubot.py +++ b/ubot.py @@ -80,7 +80,7 @@ async def edit(event): i = 1 async for msgs in client.iter_messages(event.chat_id, from_user='me'): if (i > count + 1): - break + break i = i + 1 await msgs.delete() @@ -88,18 +88,18 @@ async def edit(event): await client.send_message('me', rpl) if msg.startswith('.sh'): - if event.is_channel and not event.is_group: - await event.edit('Sorry, this is not allowed!') - return + if event.is_channel and not event.is_group: + await event.edit('Sorry, this is not allowed!') + return - cmd = msg.split(' ', 1)[1] - host = os.uname()[1] - user = os.environ['USER'] - out = os.popen(cmd).read() + cmd = msg.split(' ', 1)[1] + host = os.uname()[1] + user = os.environ['USER'] + out = os.popen(cmd).read() - rpl = f'`{user}@{host}$ {cmd}`\n' - rpl += f'`{out}`\n' - await event.edit(rpl) + rpl = f'`{user}@{host}$ {cmd}`\n' + rpl += f'`{out}`\n' + await event.edit(rpl) if msg.startswith('.sys'): mem = os.popen('free -m').readlines()[1].split()[2]