Fix indentation
This commit is contained in:
parent
25b6fa65d0
commit
81aa5914aa
22
ubot.py
22
ubot.py
@ -80,7 +80,7 @@ async def edit(event):
|
|||||||
i = 1
|
i = 1
|
||||||
async for msgs in client.iter_messages(event.chat_id, from_user='me'):
|
async for msgs in client.iter_messages(event.chat_id, from_user='me'):
|
||||||
if (i > count + 1):
|
if (i > count + 1):
|
||||||
break
|
break
|
||||||
i = i + 1
|
i = i + 1
|
||||||
await msgs.delete()
|
await msgs.delete()
|
||||||
|
|
||||||
@ -88,18 +88,18 @@ async def edit(event):
|
|||||||
await client.send_message('me', rpl)
|
await client.send_message('me', rpl)
|
||||||
|
|
||||||
if msg.startswith('.sh'):
|
if msg.startswith('.sh'):
|
||||||
if event.is_channel and not event.is_group:
|
if event.is_channel and not event.is_group:
|
||||||
await event.edit('Sorry, this is not allowed!')
|
await event.edit('Sorry, this is not allowed!')
|
||||||
return
|
return
|
||||||
|
|
||||||
cmd = msg.split(' ', 1)[1]
|
cmd = msg.split(' ', 1)[1]
|
||||||
host = os.uname()[1]
|
host = os.uname()[1]
|
||||||
user = os.environ['USER']
|
user = os.environ['USER']
|
||||||
out = os.popen(cmd).read()
|
out = os.popen(cmd).read()
|
||||||
|
|
||||||
rpl = f'`{user}@{host}$ {cmd}`\n'
|
rpl = f'`{user}@{host}$ {cmd}`\n'
|
||||||
rpl += f'`{out}`\n'
|
rpl += f'`{out}`\n'
|
||||||
await event.edit(rpl)
|
await event.edit(rpl)
|
||||||
|
|
||||||
if msg.startswith('.sys'):
|
if msg.startswith('.sys'):
|
||||||
mem = os.popen('free -m').readlines()[1].split()[2]
|
mem = os.popen('free -m').readlines()[1].split()[2]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user