from aiogram.dispatcher.filters import BoundFilter
from aiogram import types
class MyFilter(BoundFilter):
key = 'is_admin'
def __init__(self, is_admin):
self.isin = is_admin
async def check(self, message: types.Message):
member = await bot.get_chat_member(message.chat.id, message.from_user.id)
return member.is_chat_admin()