This commit is contained in:
Firepup Sixfifty 2024-04-30 19:09:50 -05:00
parent 2339db32d3
commit 02f565e522
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

View file

@ -17,7 +17,7 @@ def is_dead(thr: Thread) -> bool:
def threadWrapper(data: dict) -> NoReturn: def threadWrapper(data: dict) -> NoReturn:
if not data["noWrap"]: if not data["noWrap"]:
while 1: while 1:
if ignoreErrors: if data["ignoreErrors"]:
try: try:
data["func"](*data["args"]) data["func"](*data["args"])
except Exception: except Exception:
@ -118,5 +118,5 @@ def mcDown(instance: bare.bot) -> None:
data: dict[str, dict[str, Any]] = { data: dict[str, dict[str, Any]] = {
"radio": {"noWrap": True, "func": radio, "args": []}, "radio": {"noWrap": True, "func": radio, "args": []},
"mc-down": {"noWrap": False, "func": mcDown, "args": [], "interval": 60} "mc-down": {"noWrap": False, "func": mcDown, "args": [], "interval": 60, "ignoreErrors": True}
} }