Parse messages and nick to lowercase before parsing

This commit is contained in:
Firepup Sixfifty 2023-11-07 20:11:24 -06:00
parent b8cae4e134
commit 1f7b6d9863
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

4
bot.py
View file

@ -264,9 +264,9 @@ class bot:
for cmd in cmds.data: for cmd in cmds.data:
triggers = [cmd] triggers = [cmd]
triggers.extend(cmds.data[cmd]["aliases"]) triggers.extend(cmds.data[cmd]["aliases"])
triggers = list(call.replace("$BOTNICK", self.nick) for call in triggers) triggers = list(call.replace("$BOTNICK", self.nick.lower()) for call in triggers)
if mfind( if mfind(
message, message.lower(),
triggers, triggers,
cmds.data[cmd]["prefix"], cmds.data[cmd]["prefix"],
): ):