from aiogram.dispatcher.filters import BoundFilter from aiogram import types from load import config class ChatFilter(BoundFilter): key = 'is_chat' def __init__(self, is_chat): self.is_chat = is_chat async def check(self, message: types.Message): if message.chat.id == int(config["Bot"]["chat_id"]): return True return False