Fixed attribute error
This commit is contained in:
@@ -4,11 +4,12 @@ usage in context of Holo Users."""
|
||||
from app import isAnAdmin
|
||||
from modules.database import col_applications
|
||||
from pyrogram import filters
|
||||
from pyrogram.types import Message
|
||||
|
||||
async def admin_func(_, __, msg):
|
||||
return await isAnAdmin(msg)
|
||||
async def admin_func(_, __, msg: Message):
|
||||
return await isAnAdmin(msg.from_user.id)
|
||||
|
||||
async def allowed_func(_, __, msg):
|
||||
async def allowed_func(_, __, msg: Message):
|
||||
return True if (col_applications.find_one({"user": msg.from_user.id}) is not None) else False
|
||||
|
||||
admin = filters.create(admin_func)
|
||||
|
Reference in New Issue
Block a user