clash-telegram-bot/filters/main.py

15 lines
365 B
Python
Raw Permalink Normal View History

2022-03-18 22:25:50 +03:00
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