From 739bf443528cea9d186298caf0372d00494a08af Mon Sep 17 00:00:00 2001 From: DerrtSML <93052047+DerrtSML@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:40:52 +0300 Subject: [PATCH] Update bot.py --- bot.py | 5 +++++ 1 file changed, 5 insertions(+) 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. Проверьте переменные окружения и доступность сервера."