diff --git a/bot.py b/bot.py index 59878ad..a9d80a0 100644 --- a/bot.py +++ b/bot.py @@ -72,6 +72,11 @@ def init_qbittorrent_client(): # --- Обработчики команд --- async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: + # ДОБАВЬТЕ ЭТУ ПРОВЕРКУ + if update.message is None: + logger.warning("Received an update without a message object in start handler.") + return + if not init_qbittorrent_client(): await update.message.reply_text( "Не удалось подключиться к qBittorrent. Проверьте переменные окружения и доступность сервера."