проверка на дубликаты и ряд багов

This commit is contained in:
vrubelroman 2025-11-23 01:46:12 +03:00
parent ab03728d00
commit 595c9419f4
3 changed files with 71 additions and 9 deletions

View file

@ -18,6 +18,9 @@ class StatsFormatter:
"""Format statistics response according to the template"""
if not data or data.get('data') is None:
message = data.get('message', t('no_data', lang)) if data else t('no_data', lang)
# Filter out old "No active player" messages - this functionality is deprecated
if 'No active player' in message or 'Нет активного игрока' in message or 'active player' in message.lower() or 'активного игрока' in message.lower():
return t('no_data', lang)
return f"📭 {message}"
# Extract data from API response