Revert "Add a timer to change the topic in #firemc every minute"

This reverts commit 617be6f79f.
This commit is contained in:
9pfs 2024-05-01 00:59:24 +00:00
parent 9c5a305a02
commit 135918a6e5
Signed by: 9pfs
SSH key fingerprint: SHA256:TOcGxMQCfy4VvRM8AzgXErKXdkAtaTcpGXgYMpyoJoY
3 changed files with 4 additions and 11 deletions

2
bot.py
View file

@ -270,7 +270,7 @@ class bot(bare.bot):
tdict = {}
for thread in self.threads:
tdict[thread] = timers.data[thread]
if tdict[thread]["passInstance"]:
if thread in ["radio"]:
tdict[thread]["args"] = [self]
tMgr = Thread(target=timers.threadManager, args=(tdict,))
tMgr.daemon = True

View file

@ -6,7 +6,7 @@ from typing import Optional, Any
import bare, pylast
load_dotenv()
__version__ = "v3.0.7"
__version__ = "v3.0.6"
npbase: str = (
"\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|\-^]{1,$MAX} (is listening|last listened) to: \x02.+ - .*\x02( \([0-9]+ plays\)( \[.*\])?)?" # pyright: ignore [reportInvalidStringEscapeSequence]
)

View file

@ -112,18 +112,11 @@ def radio(instance: bare.bot) -> NoReturn:
instance.log("Thread while loop broken", "FATAL")
exit(1)
def mcDown(instance: bare.bot) -> None:
instance.sendraw("TOPIC #firemc :FireMC Relay channel (offline)")
data: dict[str, dict[str, Any]] = {
"radio": {"noWrap": True, "func": radio, "passInstance": True},
"mc-down": {
"noWrap": False,
"func": mcDown,
"passInstance": True,
"interval": 60,
"ignoreErrors": True,
},
"radio": {"noWrap": True, "func": radio, "args": []},
"mc-down": {"noWrap": False, "func": mcDown, "args": [], "interval": 60, "ignoreErrors": True}
}