Add .sys command
This commit is contained in:
9
ubot.py
9
ubot.py
@@ -100,6 +100,15 @@ async def edit(event):
|
|||||||
rpl = '`' + user + '@' + host + ' $ ' + cmd + '`\n'
|
rpl = '`' + user + '@' + host + ' $ ' + cmd + '`\n'
|
||||||
rpl += '`' + out + '`\n'
|
rpl += '`' + out + '`\n'
|
||||||
await event.edit(rpl)
|
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:
|
if '.sauce' in msg:
|
||||||
rpl = 'Sauce: [ghnou/ubot](https://git.ghnou.su/ghnou/ubot)'
|
rpl = 'Sauce: [ghnou/ubot](https://git.ghnou.su/ghnou/ubot)'
|
||||||
|
Reference in New Issue
Block a user