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
|
||||
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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user