-
Notifications
You must be signed in to change notification settings - Fork 3
/
Config.py
29 lines (26 loc) · 1.03 KB
/
Config.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
import os
ENVIRONMENT = os.environ.get('ENVIRONMENT', False)
if ENVIRONMENT:
try:
API_ID = int(os.environ.get('API_ID', 0))
except ValueError:
raise Exception("Your API_ID is not a valid integer.")
API_HASH = os.environ.get('API_HASH', None)
BOT_TOKEN = os.environ.get('BOT_TOKEN', None)
DATABASE_URL = os.environ.get('DATABASE_URL', None)
DATABASE_URL = DATABASE_URL.replace("postgres", "postgresql") # Sqlalchemy dropped support for "postgres" name.
# https://stackoverflow.com/questions/62688256/sqlalchemy-exc-nosuchmoduleerror-cant-load-plugin-sqlalchemy-dialectspostgre
MUST_JOIN = os.environ.get('MUST_JOIN', None)
if MUST_JOIN.startswith("@"):
MUST_JOIN = MUST_JOIN.replace("@", "")
else:
# Fill the Values
API_ID = 0
API_HASH = ""
BOT_TOKEN = ""
DATABASE_URL = ""
DATABASE_URL = DATABASE_URL.replace("postgres", "postgresql")
MUST_JOIN = "SL-Alpha-X-Team"
if MUST_JOIN.startswith("@"):
MUST_JOIN = MUST_JOIN[1:]
DEVS = [1694157238, 1584940211]