Petbot/modules/achievements.py
megaproxy 5ac3e36f0c Add unified navigation bar to all webserver pages
- Implemented comprehensive navigation system with hover dropdowns
- Added navigation to all webserver pages for consistent user experience
- Enhanced page templates with unified styling and active page highlighting
- Improved accessibility and discoverability of all bot features through web interface

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:59:16 +01:00

30 lines
No EOL
1.3 KiB
Python

#!/usr/bin/env python3
"""Achievements commands module for PetBot"""
from .base_module import BaseModule
class Achievements(BaseModule):
"""Handles achievements display and tracking"""
def get_commands(self):
return ["achievements"]
async def handle_command(self, channel, nickname, command, args):
if command == "achievements":
await self.cmd_achievements(channel, nickname)
async def cmd_achievements(self, channel, nickname):
"""Show player achievements"""
player = await self.require_player(channel, nickname)
if not player:
return
# Redirect to web interface for better achievements display
self.send_message(channel, f"🏆 {nickname}: View your complete achievements at: http://petz.rdx4.com/player/{nickname}#achievements")
# Show quick summary in channel
achievements = await self.database.get_player_achievements(player["id"])
if achievements:
self.send_message(channel, f"📊 Quick summary: {len(achievements)} achievements earned! Check the web interface for details.")
else:
self.send_message(channel, f"💡 No achievements yet! Keep exploring and catching pets to unlock new areas!")