Files
TG_autoposter/docs/test_callbacks.py
Andrew K. Choi 48f8c6f0eb UserBot Integration Complete: Fixed container startup, integrated UserBot menu to main bot
MAJOR FIXES:
 Fixed UserBot container startup by making TELEGRAM_BOT_TOKEN optional
 Broke circular import chain between app modules
 Made Config.validate() conditional for UserBot-only mode
 Removed unused celery import from userbot_service.py

INTEGRATION:
 UserBot menu now accessible from main bot /start command
 Added 🤖 UserBot button to main keyboard
 Integrated userbot_manager.py handlers:
   - userbot_menu: Main UserBot interface
   - userbot_settings: Configuration
   - userbot_collect_groups: Gather all user groups
   - userbot_collect_members: Parse group members
 UserBot handlers properly registered in ConversationHandler

CONTAINERS:
 tg_autoposter_bot: Running and handling /start commands
 tg_autoposter_userbot: Running as standalone microservice
 All dependent services (Redis, PostgreSQL, Celery workers) operational

STATUS: Bot is fully operational and ready for testing
2025-12-21 12:09:11 +09:00

23 lines
925 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
"""Быстрый тест формата callback_data"""
from app.utils.keyboards import CallbackType
# Проверим значения Enum
print("✅ Проверка формата callback_data:")
print(f" CallbackType.MANAGE_MESSAGES = '{CallbackType.MANAGE_MESSAGES}'")
print(f" CallbackType.MANAGE_MESSAGES.value = '{CallbackType.MANAGE_MESSAGES.value}'")
print(f" str(CallbackType.MANAGE_MESSAGES) = '{str(CallbackType.MANAGE_MESSAGES)}'")
print()
# Правильный формат
print("✅ Правильные pattern'ы для handler'ов:")
print(f" Pattern: ^{CallbackType.MANAGE_MESSAGES.value}$")
print(f" Callback_data будет: '{CallbackType.MANAGE_MESSAGES.value}'")
print()
# Проверим все enum значения
print("Все callback типы:")
for callback_type in CallbackType:
print(f" {callback_type.name:20} = '{callback_type.value}'")