Update sweebot.py

This commit is contained in:
Nova Cat 2025-03-11 21:43:47 -07:00
parent d216fe3311
commit e9f6f63466

View file

@ -677,7 +677,7 @@ while True:
if cntr == None:
cntr = dock.containers.run('alpine:edge', "/bin/ash", detach=True, tty=True)
print("Executing...")
_, stream = cntr.exec_run(cmd=["ash", "-c", " ".join(command[1:])], tty=True)
_, stream = cntr.exec_run(cmd=["timeout", "10", "ash", "-c", " ".join(command[1:])], tty=True)
multiline(replace_color_codes(stream.decode()), channel)
except Exception as ex:
irc.send_irc(channel, nick + ":[ERR] Traceback:")