Formatting
This commit is contained in:
parent
958928f4c9
commit
a5e62baae9
3 changed files with 8 additions and 3 deletions
5
bot.py
5
bot.py
|
@ -194,7 +194,10 @@ class bot(bare.bot):
|
|||
elif code == 475:
|
||||
self.log(f"Joining {chan} failed (+k without/with bad key)")
|
||||
if origin != "null":
|
||||
self.msg(f"{chan} is +k, and either you didn't give me a key, or you gave me the wrong one.", origin)
|
||||
self.msg(
|
||||
f"{chan} is +k, and either you didn't give me a key, or you gave me the wrong one.",
|
||||
origin,
|
||||
)
|
||||
break
|
||||
elif code == 480:
|
||||
self.log(f"Joining {chan} failed (+S)", "WARN")
|
||||
|
|
|
@ -189,7 +189,7 @@ def sudo(bot: bare.bot, chan: str, name: str, message: str) -> None:
|
|||
elif "bot" in name.lower():
|
||||
bot.log("lol, no.")
|
||||
else:
|
||||
bot.msg('sudo: a password is required', chan)
|
||||
bot.msg("sudo: a password is required", chan)
|
||||
|
||||
|
||||
def nowplaying(bot: bare.bot, chan: str, name: str, message: str) -> None:
|
||||
|
|
|
@ -148,12 +148,14 @@ def radio(instance: bare.bot) -> NoReturn:
|
|||
instance.log("Thread while loop broken", "FATAL")
|
||||
exit(1)
|
||||
|
||||
|
||||
def ping(instance: bare.bot) -> NoReturn:
|
||||
while 1:
|
||||
instance.sendraw("PING :keepalive")
|
||||
sleep(30)
|
||||
|
||||
|
||||
data: dict[str, dict[str, Any]] = {
|
||||
"radio": {"noWrap": True, "func": radio, "passInstance": True},
|
||||
"pingMon": {"noWrap": True, "func": ping, "passInstance": True}
|
||||
"pingMon": {"noWrap": True, "func": ping, "passInstance": True},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue