-
-
Notifications
You must be signed in to change notification settings - Fork 131
/
config.py
26 lines (24 loc) · 1.04 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
# Copyright (c) 2022 - 2024 EDM115
import os
class Config:
APP_ID = int(os.environ.get("APP_ID"))
API_HASH = os.environ.get("API_HASH")
BOT_TOKEN = os.environ.get("BOT_TOKEN")
LOGS_CHANNEL = (
int(os.environ.get("LOGS_CHANNEL"))
if os.environ.get("LOGS_CHANNEL").strip("-").isdigit()
else os.environ.get("LOGS_CHANNEL")
)
MONGODB_URL = os.environ.get("MONGODB_URL")
MONGODB_DBNAME = os.environ.get("MONGODB_DBNAME", "Unzipper_Bot")
BOT_OWNER = int(os.environ.get("BOT_OWNER"))
DOWNLOAD_LOCATION = f"{os.path.dirname(__file__)}/Downloaded"
THUMB_LOCATION = f"{os.path.dirname(__file__)}/Thumbnails"
TG_MAX_SIZE = 2097152000
MAX_MESSAGE_LENGTH = 4096
# Default chunk size (0.005 MB → 1024*6) Increase if you need faster downloads
CHUNK_SIZE = 1024 * 1024 * 10 # 10 MB
BOT_THUMB = f"{os.path.dirname(__file__)}/bot_thumb.jpg"
MAX_CONCURRENT_TASKS = 75
MAX_TASK_DURATION_EXTRACT = 120 * 60 # 2 hours (in seconds)
MAX_TASK_DURATION_MERGE = 240 * 60 # 4 hours (in seconds)