From 9e0d95ecdc1c2f0d2fcefcaa482f6057b72bcafe Mon Sep 17 00:00:00 2001 From: Zoom-Developer Date: Tue, 5 Nov 2024 21:56:30 +0300 Subject: [PATCH] another fix parse_mode --- bot/src/infrastructure/telegram/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/src/infrastructure/telegram/bot.py b/bot/src/infrastructure/telegram/bot.py index 4f8b8a4..8c0e565 100644 --- a/bot/src/infrastructure/telegram/bot.py +++ b/bot/src/infrastructure/telegram/bot.py @@ -1,10 +1,10 @@ from aiogram import Bot from aiogram.types import InputMediaPhoto, URLInputFile -from pydantic import BaseModel +from aiogram.client.bot import DefaultBotProperties from config import TG_TOKEN -bot = Bot(TG_TOKEN, parse_mode = "html") +bot = Bot(TG_TOKEN, default = DefaultBotProperties(parse_mode='html')) async def send_media(chat_id: int, text: str, files: list[str], reply_to: int = None, parse_mode: str = "html") -> None: await bot.send_media_group(