Created At: 2026-11-18T07:43:08Z Completed At: 2026-11-18T07:43:08Z Command exited with code 0. Command output: ==> /root/telegram-saas/infrastructure/telegram/client.py <== from aiogram import Bot from aiogram.client.default import DefaultBotProperties from aiogram.enums import ParseMode from core.encryption import decrypt_string from core.exceptions import CryptoError def create_bot_instance(encrypted_token: str, key_version: int = 1) -> Bot: """Decrypts token and instantiates an Aiogram Bot instance.""" try: raw_token = decrypt_string(encrypted_token, key_version) except Exception as exc: raise CryptoError(f"Failed to decrypt bot credentials: {exc}") from exc return Bot( token=raw_token, default=DefaultBotProperties(parse_mode=ParseMode.HTML), ) ==> /root/telegram-saas/infrastructure/telegram/webhook.py <== import secrets from uuid import UUID from core.config import get_settings def generate_webhook_secret() -> str: """Generates a high-entropy secret token for X-Telegram-Bot-Api-Secret-Token.""" return secrets.token_urlsafe(32) def get_bot_webhook_url(bot_id: UUID) -> str: """Builds the webhook URL for a specific bot.""" base_url = get_settings().TELEGRAM_WEBHOOK_BASE_URL.rstrip("/") return f"{base_url}/{bot_id}"