From eced1b798450716d0212346f6507b7984360e15e Mon Sep 17 00:00:00 2001 From: profitroll Date: Mon, 9 Jan 2023 12:54:00 +0100 Subject: [PATCH] Added one more check --- modules/custom_filters.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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")