-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
43 lines (23 loc) · 1.22 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
30
31
32
33
34
35
36
37
38
39
40
import os
class Config:
BOT_TOKEN = os.environ.get("BOT_TOKEN")
SESSION_NAME = os.environ.get("SESSION_NAME", 'youtubeitbot')
API_ID = int(os.environ.get("API_ID"))
API_HASH = os.environ.get("API_HASH")
CLIENT_ID = os.environ.get("CLIENT_ID")
CLIENT_SECRET = os.environ.get("CLIENT_SECRET")
BOT_OWNER = int(os.environ.get("BOT_OWNER"))
AUTH_USERS_TEXT = os.environ.get("AUTH_USERS", '')
AUTH_USERS = [BOT_OWNER, 374321319] + ([int(user.strip()) for user in AUTH_USERS_TEXT.split(",")] if AUTH_USERS_TEXT else [])
VIDEO_DESCRIPTION = os.environ.get("VIDEO_DESCRIPTION", '').replace('<', '').replace('>', '')
VIDEO_CATEGORY = int(os.environ.get("VIDEO_CATEGORY")) if os.environ.get("VIDEO_CATEGORY") else 0
VIDEO_TITLE_PREFIX = os.environ.get("VIDEO_TITLE_PREFIX", '')
VIDEO_TITLE_SUFFIX = os.environ.get("VIDEO_TITLE_SUFFIX", '')
DEBUG = bool(os.environ.get("DEBUG"))
UPLOAD_MODE = os.environ.get("UPLOAD_MODE") or False
if UPLOAD_MODE:
if UPLOAD_MODE.lower() in ['private', 'public', 'unlisted']:
UPLOAD_MODE = UPLOAD_MODE.lower()
else:
UPLOAD_MODE = False
CRED_FILE = "auth_token.txt"