mirror of
https://github.com/DerrtSML/qbittorent_bot.git
synced 2025-10-25 20:10:08 +03:00
Update bot.py
This commit is contained in:
parent
2f24befc93
commit
739bf44352
5
bot.py
5
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. Проверьте переменные окружения и доступность сервера."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user