forked from k4rd0x1/vcpb-zeet-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
33 lines (26 loc) · 852 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
Replacement for vcpb/config/__init__.py
"""
import ast
from os import environ
from pyrogram import filters
API_ID = environ.get("API_ID")
API_HASH = environ.get("API_HASH")
TOKEN = environ.get("TOKEN")
SUDO_USERS = environ.get("SUDO_USERS")
GROUP = environ.get("GROUP")
MONGO_DB_URI = environ.get("MONGO_DB_URI")
USERS_MUST_JOIN = environ.get("USERS_MUST_JOIN", "False")
LANG = environ.get("LANG", "en")
DUR_LIMIT = environ.get("DUR_LIMIT", 10)
API_ID = int(API_ID)
SUDO_USERS = list(map(int, SUDO_USERS.split()))
if type(GROUP) == str:
GROUP = int(GROUP)
DUR_LIMIT = int(DUR_LIMIT)
USERS_MUST_JOIN = ast.literal_eval(USERS_MUST_JOIN)
LOG_GROUP = GROUP if MONGO_DB_URI != "" else None
SUDO_FILTER = filters.user(SUDO_USERS)
async def custom_filter(_, __, ___):
return bool(LOG_GROUP)
LOG_GROUP_FILTER = filters.create(custom_filter)