From 7993e1d1c961123adf02bfe9bda1a8e4150e5eeb Mon Sep 17 00:00:00 2001 From: abdullaev388 Date: Mon, 21 Feb 2022 20:08:03 +0500 Subject: [PATCH] corrected setup middleware in async i18n middleware example --- .../middleware/i18n_middleware_example/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py b/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py index cf06c07..1faeaad 100644 --- a/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py +++ b/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py @@ -209,6 +209,6 @@ async def missed_message(message: types.Message): if __name__ == '__main__': - bot.middlewares.append(i18n) + bot.setup_middleware(i18n) bot.add_custom_filter(TextMatchFilter()) asyncio.run(bot.infinity_polling())