Implement case-insensitive command processing across all bot modules

Added normalize_input() function to BaseModule for consistent lowercase conversion of user input. Updated all command modules to use normalization for commands, arguments, pet names, location names, gym names, and item names. Players can now use any capitalization for commands and arguments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
megaproxy 2025-07-14 21:57:51 +01:00
parent 39ba55832d
commit 8e9ff2960f
8 changed files with 93 additions and 16 deletions

View file

@ -88,7 +88,7 @@ class PetManagement(BaseModule):
if not player:
return
pet_name = " ".join(args)
pet_name = " ".join(self.normalize_input(args))
result = await self.database.activate_pet(player["id"], pet_name)
if result["success"]:
@ -112,7 +112,7 @@ class PetManagement(BaseModule):
if not player:
return
pet_name = " ".join(args)
pet_name = " ".join(self.normalize_input(args))
result = await self.database.deactivate_pet(player["id"], pet_name)
if result["success"]:
@ -174,7 +174,7 @@ class PetManagement(BaseModule):
return
# Split args into pet identifier and new nickname
pet_identifier = args[0]
pet_identifier = self.normalize_input(args[0])
new_nickname = " ".join(args[1:])
result = await self.database.set_pet_nickname(player["id"], pet_identifier, new_nickname)