Formatting

This commit is contained in:
Firepup Sixfifty 2023-12-04 22:50:03 -06:00
parent 42631780ff
commit c4c0a4317d
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

View file

@ -67,9 +67,14 @@ def mfind(message: str, find: list, usePrefix: bool = True) -> bool:
else:
return any(message[: len(match)] == match for match in find)
def sub(message: str, bot: bare.bot, chan: Optional[str] = "", name: Optional[str] = "") -> str:
def sub(
message: str, bot: bare.bot, chan: Optional[str] = "", name: Optional[str] = ""
) -> str:
result = message.replace("$BOTNICK", bot.nick).replace("$NICK", bot.nick)
result = result.replace("$NICKLEN", str(bot.nicklen)).replace("$MAX", str(bot.nicklen))
result = result.replace("$NICKLEN", str(bot.nicklen)).replace(
"$MAX", str(bot.nicklen)
)
if chan:
result = result.replace("$CHANNEL", chan).replace("$CHAN", chan)
if name: