diff --git a/README.md b/README.md index 375f7bf..2e3dd33 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ from contextlib import suppress from logging import basicConfig, INFO from typing import Any -from aiogram import Router, Dispatcher, F, Bot +from aiogram import Router, Dispatcher, Bot +from aiogram.client.default import DefaultBotProperties from aiogram.enums import ParseMode from aiogram.filters import CommandStart from aiogram.types import Message @@ -51,7 +52,7 @@ async def cmd_help(message: Message) -> Any: async def main() -> None: basicConfig(level=INFO) - bot = Bot("42:ABC", parse_mode=ParseMode.HTML) + bot = Bot("42:ABC", default=DefaultBotProperties(parse_mode=ParseMode.HTML)) i18n_middleware = I18nMiddleware( core=FluentRuntimeCore( path="locales/{locale}/LC_MESSAGES" diff --git a/examples/language_inline_markup.py b/examples/language_inline_markup.py index da674c5..e068fde 100644 --- a/examples/language_inline_markup.py +++ b/examples/language_inline_markup.py @@ -3,6 +3,7 @@ from os import environ from aiogram import Router, Dispatcher, Bot, F +from aiogram.client.default import DefaultBotProperties from aiogram.enums import ParseMode from aiogram.filters import Command, CommandStart from aiogram.types import CallbackQuery, Message @@ -50,7 +51,10 @@ async def cmd_lang(message: Message, i18n: I18nContext): async def main(): logging.basicConfig(level=logging.INFO) dp = Dispatcher() - bot = Bot(token=environ["BOT_TOKEN"], parse_mode=ParseMode.HTML) + bot = Bot( + token=environ["BOT_TOKEN"], + default=DefaultBotProperties(parse_mode=ParseMode.HTML), + ) mw = I18nMiddleware( core=FluentRuntimeCore( path="locales/{locale}/LC_MESSAGES", diff --git a/examples/mre.py b/examples/mre.py index 85666e2..44278e9 100644 --- a/examples/mre.py +++ b/examples/mre.py @@ -4,6 +4,7 @@ from typing import Any from aiogram import Bot, Dispatcher, Router +from aiogram.client.default import DefaultBotProperties from aiogram.enums import ParseMode from aiogram.filters import CommandStart from aiogram.types import Message @@ -37,7 +38,7 @@ async def cmd_help(message: Message) -> Any: async def main() -> None: basicConfig(level=INFO) - bot = Bot("42:ABC", parse_mode=ParseMode.HTML) + bot = Bot("42:ABC", default=DefaultBotProperties(parse_mode=ParseMode.HTML)) i18n_middleware = I18nMiddleware(core=FluentRuntimeCore(path="locales/{locale}/LC_MESSAGES")) dp = Dispatcher() diff --git a/examples/sqlalchemy_manager.py b/examples/sqlalchemy_manager.py index d9affa8..d81c2fe 100644 --- a/examples/sqlalchemy_manager.py +++ b/examples/sqlalchemy_manager.py @@ -4,6 +4,7 @@ from typing import Callable, Dict, Any, Awaitable from aiogram import BaseMiddleware, Dispatcher, Bot +from aiogram.client.default import DefaultBotProperties from aiogram.enums import ParseMode from aiogram.types import TelegramObject, User from sqlalchemy import BigInteger, String @@ -104,7 +105,10 @@ async def __call__( async def main(): logging.basicConfig(level=logging.INFO) dp = Dispatcher() - bot = Bot(token=environ["BOT_TOKEN"], parse_mode=ParseMode.HTML) + bot = Bot( + token=environ["BOT_TOKEN"], + default=DefaultBotProperties(parse_mode=ParseMode.HTML), + ) mw = I18nMiddleware( core=FluentRuntimeCore(