From 6b9bf95b0bfb2037ccda74149679c058e28b28a7 Mon Sep 17 00:00:00 2001 From: Ske Date: Sat, 14 Jul 2018 20:02:10 +0200 Subject: [PATCH] Make command matching case-insensitive --- bot/pluralkit/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/pluralkit/bot.py b/bot/pluralkit/bot.py index ef6f23d5..1fbc9245 100644 --- a/bot/pluralkit/bot.py +++ b/bot/pluralkit/bot.py @@ -42,10 +42,10 @@ async def on_message(message): command_items = utils.command_map.items() command_items = sorted(command_items, key=lambda x: len(x[0]), reverse=True) - + prefix = "pk;" for command, (func, _, _, _) in command_items: - if message.content.startswith(prefix + command): + if message.content.lower().startswith(prefix + command): args_str = message.content[len(prefix + command):].strip() args = args_str.split(" ")