This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Telegram/modules/custom_filters.py
2022-12-27 18:46:17 +01:00

12 lines
377 B
Python

from app import isAnAdmin
from modules.database import col_applications
from pyrogram import filters
async def admin_func(_, __, msg):
return await isAnAdmin(msg)
async def allowed_func(_, __, msg):
return True if (col_applications.find_one({"user": msg.from_user.id}) is not None) else False
admin = filters.create(admin_func)
allowed = filters.create(allowed_func)