This commit is contained in:
Firepup Sixfifty 2023-11-05 18:50:13 -06:00
commit d175c19f35
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

View file

@ -9,6 +9,7 @@ from dotenv import load_dotenv
from pythonlangutil.overload import Overload, signature from pythonlangutil.overload import Overload, signature
from datetime import datetime as dt from datetime import datetime as dt
from logs import log from logs import log
from subprocess import run, PIPE
load_dotenv() load_dotenv()
@ -360,6 +361,12 @@ def main():
f"{name}: pong", f"{name}: pong",
chan, chan,
) )
elif mfind(message, ["uptime"]):
uptime = run(["uptime","-p"], stdout=PIPE).stdout.decode().strip()
sendmsg(
f"Uptime: {uptime}",
chan,
)
elif mfind(message, ["amIAdmin"]): elif mfind(message, ["amIAdmin"]):
sendmsg( sendmsg(
f"{name.lower()} in {adminnames} == {name.lower() in adminnames}", f"{name.lower()} in {adminnames} == {name.lower() in adminnames}",