Add .sys command
This commit is contained in:
9
ubot.py
9
ubot.py
@@ -101,6 +101,15 @@ async def edit(event):
|
||||
rpl += '`' + out + '`\n'
|
||||
await event.edit(rpl)
|
||||
|
||||
if '.sys' in msg:
|
||||
mem = os.popen('free -m').readlines()[1].split()[2]
|
||||
disk = os.popen('df -h /').readlines()[1].split()[2]
|
||||
|
||||
rpl = '**System usage stats:**\n'
|
||||
rpl += '**Memory:** ' + mem + 'M\n'
|
||||
rpl += '**Disk:** ' + disk + '\n'
|
||||
await event.edit(rpl)
|
||||
|
||||
if '.sauce' in msg:
|
||||
rpl = 'Sauce: [ghnou/ubot](https://git.ghnou.su/ghnou/ubot)'
|
||||
await event.edit(rpl)
|
||||
|
Reference in New Issue
Block a user