forked from AbirHasan2005/VideoCompress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
44 lines (42 loc) · 1.9 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
41
42
43
44
# (c) @AbirHasan2005
from bot.get_cfg import get_config
class Config(object):
# You can keep this default
SESSION_NAME = get_config("SESSION_NAME", "AHCompressorBot")
# Put MongoDB URL
DATABASE_URL = get_config("DATABASE_URL", "")
# get a token from @BotFather
TG_BOT_TOKEN = get_config("TG_BOT_TOKEN", "")
# The Telegram API things
APP_ID = int(get_config("APP_ID", 12345))
API_HASH = get_config("API_HASH", "")
LOG_CHANNEL = get_config("LOG_CHANNEL")
UPDATES_CHANNEL = get_config("UPDATES_CHANNEL", None) # Without `@` LOL
# Get these values from my.telegram.org
# array to store the channel ID who are authorized to use the bot
AUTH_USERS = set(
int(x) for x in get_config(
"AUTH_USERS",
should_prompt=True
).split()
)
# the download location, where the HTTP Server runs
DOWNLOAD_LOCATION = get_config("DOWNLOAD_LOCATION", "/app/downloads")
# Telegram maximum file upload size
BOT_USERNAME = get_config("BOT_USERNAME", "")
MAX_FILE_SIZE = 2097152000
TG_MAX_FILE_SIZE = 2097152000
FREE_USER_MAX_FILE_SIZE = 2097152000
# default thumbnail to be used in the videos
DEF_THUMB_NAIL_VID_S = get_config("DEF_THUMB_NAIL_VID_S", "https://placehold.it/90x90")
# proxy for accessing youtube-dl in GeoRestricted Areas
# Get your own proxy from https://github.com/rg3/youtube-dl/issues/1091#issuecomment-230163061
HTTP_PROXY = get_config("HTTP_PROXY", None)
# maximum message length in Telegram
MAX_MESSAGE_LENGTH = 4096
# add config vars for the display progress
FINISHED_PROGRESS_STR = get_config("FINISHED_PROGRESS_STR", "▓")
UN_FINISHED_PROGRESS_STR = get_config("UN_FINISHED_PROGRESS_STR", "░")
LOG_FILE_ZZGEVC = get_config("LOG_FILE_ZZGEVC", "Log.txt")
# because, https://t.me/c/1494623325/5603
SHOULD_USE_BUTTONS = get_config("SHOULD_USE_BUTTONS", False)