From e7d54ae3176a0f144770e5f0829480d0508913fc Mon Sep 17 00:00:00 2001 From: Zakhar Izmaylov Date: Mon, 20 Jan 2025 22:38:52 +0300 Subject: [PATCH] Refactor private message filter in bot.py - Renamed IsPrivate to IsPrivateFilter for clarity and consistency. - Updated message and callback query filters to use the new IsPrivateFilter class. --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index dc5423ce..99596357 100644 --- a/bot.py +++ b/bot.py @@ -10,7 +10,7 @@ from aiogram.types import BufferedInputFile, ErrorEvent from aiogram.utils.markdown import hbold from config import ADMIN_ID, API_TOKEN -from filters.private import IsPrivate +from filters.private import IsPrivateFilter from logger import logger from middlewares import register_middleware @@ -20,8 +20,8 @@ dp = Dispatcher(bot=bot, storage=storage) register_middleware(dp) -dp.message.filter(IsPrivate()) -dp.callback_query.filter(IsPrivate()) +dp.message.filter(IsPrivateFilter()) +dp.callback_query.filter(IsPrivateFilter()) @dp.errors(ExceptionTypeFilter(Exception))