Major Features Added: • Admin Management System: Complete admin command suite with user moderation, system control, and bot maintenance tools • Enhanced Player Commands: Added batting/pitching statistics with concurrent API calls and improved embed design • League Standings: Full standings system with division grouping, playoff picture, and wild card visualization • Game Schedules: Comprehensive schedule system with team filtering, series organization, and proper home/away indicators New Admin Commands (12 total): • /admin-status, /admin-help, /admin-reload, /admin-sync, /admin-clear • /admin-announce, /admin-maintenance • /admin-timeout, /admin-untimeout, /admin-kick, /admin-ban, /admin-unban, /admin-userinfo Enhanced Player Display: • Team logo positioned beside player name using embed author • Smart thumbnail priority: fancycard → headshot → team logo fallback • Concurrent batting/pitching stats fetching for performance • Rich statistics display with team colors and comprehensive metrics New Models & Services: • BattingStats, PitchingStats, TeamStandings, Division, Game models • StatsService, StandingsService, ScheduleService for data management • CustomCommand system with CRUD operations and cleanup tasks Bot Architecture Improvements: • Admin commands integrated into bot.py with proper loading • Permission checks and safety guards for moderation commands • Enhanced error handling and comprehensive audit logging • All 227 tests passing with new functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
21 lines
885 B
Python
21 lines
885 B
Python
from typing import Optional
|
|
from pydantic import Field
|
|
|
|
from models.base import SBABaseModel
|
|
|
|
|
|
class SBAPlayer(SBABaseModel):
|
|
"""SBA Player model representing external player identifiers."""
|
|
|
|
# Override base model to make id required for database entities
|
|
id: int = Field(..., description="SBAPlayer ID from database")
|
|
|
|
first_name: str = Field(..., description="Player first name")
|
|
last_name: str = Field(..., description="Player last name")
|
|
key_fangraphs: Optional[int] = Field(None, description="FanGraphs player ID")
|
|
key_bbref: Optional[str] = Field(None, description="Baseball Reference player ID")
|
|
key_retro: Optional[str] = Field(None, description="Retrosheet player ID")
|
|
key_mlbam: Optional[int] = Field(None, description="MLB Advanced Media player ID")
|
|
|
|
def __str__(self):
|
|
return f"{self.first_name} {self.last_name}" |