clash-telegram-bot/filters/main.py
2022-03-18 21:25:50 +02:00

15 lines
365 B
Python

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