8 lines
281 B
Python
8 lines
281 B
Python
from aiogram.enums import ChatType
|
|
from aiogram.filters import BaseFilter
|
|
from aiogram.types import Chat, TelegramObject
|
|
|
|
|
|
class IsPrivate(BaseFilter):
|
|
async def __call__(self, event: TelegramObject, event_chat: Chat) -> bool:
|
|
return event_chat.type == ChatType.PRIVATE |