Init commit

This commit is contained in:
2022-06-04 22:02:51 +03:00
commit 64c6aeb002
59 changed files with 1399 additions and 0 deletions

6
filters/__init__.py Normal file
View File

@@ -0,0 +1,6 @@
from load import dp
from .admin import IsAdmin
dp.filters_factory.bind(IsAdmin)

14
filters/admin.py Normal file
View File

@@ -0,0 +1,14 @@
from aiogram.types import Message
from aiogram.dispatcher.filters import BoundFilter
from utils.database.base import get_admins
class IsAdmin(BoundFilter):
key = 'is_admin'
def __init__(self, is_admin):
self.is_admin = is_admin
async def check(self, message: Message):
return message.from_user.id in get_admins()