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

@ -822,6 +822,32 @@ class PetBotRequestHandler(BaseHTTPRequestHandler):
border: 1px solid var(--border-color);
}}
.hidden-spawn {{
display: none;
}}
.more-button {{
background: var(--gradient-primary) !important;
color: white !important;
cursor: pointer;
transition: transform 0.2s ease;
}}
.more-button:hover {{
transform: scale(1.05);
}}
.less-button {{
background: #ff6b6b !important;
color: white !important;
cursor: pointer;
transition: transform 0.2s ease;
}}
.less-button:hover {{
transform: scale(1.05);
}}
.info-section {{
background: var(--bg-secondary);
border-radius: 15px;
@ -862,6 +888,46 @@ class PetBotRequestHandler(BaseHTTPRequestHandler):
💡 Use <code>!wild &lt;location&gt;</code> in #petz to see what pets spawn in a specific area
</p>
</div>
<script>
function toggleSpawns(locationId) {{
const hiddenSpawns = document.querySelectorAll(`#hidden-${{locationId}}`);
const moreButton = document.querySelector(`[onclick="toggleSpawns(${{locationId}})"]`);
if (!moreButton) return;
const isHidden = hiddenSpawns[0] && hiddenSpawns[0].style.display === 'none' || hiddenSpawns[0] && hiddenSpawns[0].classList.contains('hidden-spawn');
if (isHidden) {{
// Show hidden spawns
hiddenSpawns.forEach(spawn => {{
spawn.classList.remove('hidden-spawn');
spawn.style.display = 'inline-block';
}});
moreButton.textContent = 'Show less';
moreButton.className = 'spawn-badge less-button';
moreButton.setAttribute('onclick', `hideSpawns(${{locationId}})`);
}}
}}
function hideSpawns(locationId) {{
const hiddenSpawns = document.querySelectorAll(`#hidden-${{locationId}}`);
const lessButton = document.querySelector(`[onclick="hideSpawns(${{locationId}})"]`);
if (!lessButton) return;
// Hide spawns again
hiddenSpawns.forEach(spawn => {{
spawn.classList.add('hidden-spawn');
spawn.style.display = 'none';
}});
const hiddenCount = hiddenSpawns.length;
lessButton.textContent = `+${{hiddenCount}} more`;
lessButton.className = 'spawn-badge more-button';
lessButton.setAttribute('onclick', `toggleSpawns(${{locationId}})`);
}}
</script>
</body>
</html>"""