diff --git a/modules/custom_filters.py b/modules/custom_filters.py index 808965f..4fa39fe 100644 --- a/modules/custom_filters.py +++ b/modules/custom_filters.py @@ -15,7 +15,11 @@ async def member_func(_, __, msg: Message): return True if (msg.from_user.id in jsonLoad(path.join(configGet("cache", "locations"), "group_members"))) else False async def allowed_func(_, __, msg: Message): - return True if (col_applications.find_one({"user": msg.from_user.id}) is not None) else False + output = False + output = True if (col_applications.find_one({"user": msg.from_user.id}) is not None) else False + if path.exists(path.join(configGet("cache", "locations"), "group_members")) and (msg.from_user.id not in jsonLoad(path.join(configGet("cache", "locations"), "group_members"))): + output = False + return output async def enabled_general_func(_, __, msg: Message): return configGet("enabled", "features", "general")