-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
var.py
50 lines (46 loc) · 2.42 KB
/
var.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import os
class Var(object):
APP_ID = int(os.environ.get("APP_ID", 6))
# 6 is a placeholder
API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e")
eviral_STRING = os.environ.get("eviral_STRING", None)
DB_URI = os.environ.get("DATABASE_URL", None)
TMP_DOWNLOAD_DIRECTORY = os.environ.get("TMP_DOWNLOAD_DIRECTORY", None)
LOGGER = True
GITHUB_ACCESS_TOKEN = os.environ.get("GITHUB_ACCESS_TOKEN", None)
GIT_REPO_NAME = os.environ.get("GIT_REPO_NAME", None)
# Here for later purposes
SUDO_USERS = set(int(x) for x in os.environ.get("SUDO_USERS", "2082798662").split())
WHITELIST_USERS = set(int(x) for x in os.environ.get("WHITELIST_USERS", "").split())
BLACKLIST_USERS = set(int(x) for x in os.environ.get("BLACKLIST_USERS", "").split())
DEVLOPERS = set(int(x) for x in os.environ.get("DEVLOPERS", "").split())
OWNER_ID = set(int(x) for x in os.environ.get("OWNER_ID", "").split())
SUPPORT_USERS = set(int(x) for x in os.environ.get("SUPPORT_USERS", "").split())
PLUGIN_CHANNEL = int(os.environ.get("PLUGIN_CHANNEL", "-79269473936"))
LYDIA_API_KEY = os.environ.get("LYDIA_API_KEY", None)
HEROKU_API_KEY = os.environ.get("HEROKU_API_KEY", None)
HEROKU_APP_NAME = os.environ.get("HEROKU_APP_NAME", None)
BOT_TOKEN = os.environ.get("BOT_TOKEN", None)
BOT_USERNAME = os.environ.get("BOT_USERNAME", None)
TEMPLATE_PIC = os.environ.get("TEMPLATE_PIC", None)
DOWNLOAD_PFP_URL_CLOCK = os.environ.get("DOWNLOAD_PFP_URL_CLOCK", None)
PM_PERMIT_GROUP_ID = os.environ.get("PM_PERMIT_GROUP_ID", None)
G_DRIVE_CLIENT_ID = os.environ.get("G_DRIVE_CLIENT_ID", None)
G_DRIVE_CLIENT_SECRET = os.environ.get("G_DRIVE_CLIENT_SECRET", None)
GDRIVE_FOLDER_ID = os.environ.get("GDRIVE_FOLDER_ID", "root")
AUTH_TOKEN_DATA = os.environ.get("AUTH_TOKEN_DATA", None)
if AUTH_TOKEN_DATA != None:
os.makedirs(TMP_DOWNLOAD_DIRECTORY)
t_file = open(TMP_DOWNLOAD_DIRECTORY + "auth_token.txt", "w")
t_file.write(AUTH_TOKEN_DATA)
t_file.close()
PRIVATE_GROUP_ID = os.environ.get("PRIVATE_GROUP_ID", None)
if PRIVATE_GROUP_ID != None:
try:
PRIVATE_GROUP_ID = int(PRIVATE_GROUP_ID)
except ValueError:
raise ValueError(
"Invalid Private Group ID. Make sure your ID is starts with -100 and make sure that it is only numbers."
)
class Development(Var):
LOGGER = True