tweaks, added help stings
This commit is contained in:
parent
84e18617d8
commit
a14b1f1fb6
1 changed files with 5 additions and 2 deletions
|
@ -52,9 +52,10 @@ def mem(inp):
|
||||||
return 'error: operating system not currently supported'
|
return 'error: operating system not currently supported'
|
||||||
|
|
||||||
|
|
||||||
@hook.command("up", autohelp=False)
|
@hook.command("uptime", autohelp=False)
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def uptime(inp):
|
def up(inp):
|
||||||
|
".up -- Shows the bot's uptime."
|
||||||
proc = psutil.Process(os.getpid())
|
proc = psutil.Process(os.getpid())
|
||||||
up_time = proc.create_time
|
up_time = proc.create_time
|
||||||
up_time = time.time() - up_time
|
up_time = time.time() - up_time
|
||||||
|
@ -62,6 +63,8 @@ def uptime(inp):
|
||||||
up_time = time.strftime("Uptime: \x02%M:%S\x02", up_time)
|
up_time = time.strftime("Uptime: \x02%M:%S\x02", up_time)
|
||||||
return up_time
|
return up_time
|
||||||
|
|
||||||
|
@hook.command("proc", autohelp=False)
|
||||||
@hook.command(autohelp=False)
|
@hook.command(autohelp=False)
|
||||||
def pid(inp):
|
def pid(inp):
|
||||||
|
".pid -- Prints the bot's PID."
|
||||||
return 'PID: \x02%s\x02' % os.getpid()
|
return 'PID: \x02%s\x02' % os.getpid()
|
||||||
|
|
Reference in a new issue