Commit Graph

7 Commits

Author SHA1 Message Date
Lottery Bot Admin
21f348471e Add Premium Emoji Support for Premium Bot Accounts
All checks were successful
continuous-integration/drone/push Build is passing
- Create src/core/premium_emoji.py module for premium emoji handling
- Create src/core/telegram_config.py for global parse_mode configuration
- Update bot_controller.py to use HTML parse_mode for better emoji support
- Add PREMIUM_EMOJI_SUPPORT.md documentation with usage examples
- HTML parse_mode now default for all messages to support premium emojis
- Aiogram 3.16.0+ supports premium emojis natively when using correct parse_mode

Benefits:
- Premium bot accounts can now display special premium emojis
- Better emoji rendering across all message types
- Centralized configuration for parse modes
- Backwards compatible with regular emoji
2026-03-07 00:26:20 +00:00
782f702327 Fix registration button handling and add debug logging
Some checks failed
continuous-integration/drone/pr Build is failing
- Improve btn_registration handler to directly set state instead of creating fake callback
- Add /register command handler for registration
- Add text-based registration triggers ('регистрация', 'регистр', 'register')
- Add debug logging to handle_start to track registration status
- Ensure registration button is shown correctly for unregistered users
2026-03-07 08:55:35 +09:00
0fdad07d82 refactor
Some checks failed
continuous-integration/drone/pr Build is failing
2026-02-17 00:22:42 +09:00
ec8a23887d fix: исправлена обработка редактирования розыгрышей
All checks were successful
continuous-integration/drone/push Build is passing
- Добавлен обработчик handle_edit_field для admin_edit_field_{id}_{field} callbacks
- Исправлен toggle_lottery_active - теперь передаёт state вместо None
- Правильный парсинг lottery_id из позиции 3, а не с конца строки
- Обработка 'message is not modified' в bot_controller
- Модифицированы обработчики сообщений для поддержки редактирования
- Добавлен метод update_lottery в LotteryService
- Исправлены ошибки ValueError и AttributeError в меню редактирования
2025-11-22 19:34:30 +09:00
43d46ea6f8 refactor: clean up unused code and duplicate handlers
- Removed duplicate admin callback handlers from main.py (moved to admin_panel.py)
- Removed unused methods from BotController (handle_admin_panel, handle_lottery_management, handle_conduct_lottery_admin, handle_conduct_lottery)
- Removed unused keyboard methods from ui.py (get_lottery_management_keyboard, get_lottery_keyboard, get_conduct_lottery_keyboard)
- Simplified IBotController interface to only essential methods
- Simplified IKeyboardBuilder interface to only used methods
- Fixed cmd_admin handler to directly show admin panel
- Bot now uses centralized admin handlers from admin_panel.py
2025-11-17 08:00:39 +09:00
0fdf01d1c7 feat: update admin panel keyboard structure and registration button logic
- Updated admin panel keyboard to match admin_panel.py handlers
- Changed registration button logic: show only for unregistered non-admins
- Added missing methods to IBotController interface
- Updated get_main_keyboard to accept is_registered parameter
- Simplified admin panel structure with proper callback routing
- Removed test callback button from production UI
- Created ADMIN_PANEL_STRUCTURE.md and ADMIN_PANEL_TESTING.md documentation
2025-11-17 07:50:08 +09:00
4a741715f5 feat: Полный рефакторинг с модульной архитектурой
Some checks reported errors
continuous-integration/drone/push Build encountered an error
- Исправлены критические ошибки callback обработки
- Реализована модульная архитектура с применением SOLID принципов
- Добавлена система dependency injection
- Создана новая структура: interfaces, repositories, components, controllers
- Исправлены проблемы с базой данных (добавлены отсутствующие столбцы)
- Заменены заглушки на полную функциональность управления розыгрышами
- Добавлены отчеты о проделанной работе и документация

Архитектура готова для production и легко масштабируется
2025-11-17 05:34:08 +09:00