12 lines
377 B
Python
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)
|