yash184 commited on
Commit
a195f4f
·
verified ·
1 Parent(s): 57c2b4d

Create config.py

Browse files
Files changed (1) hide show
  1. config.py +24 -0
config.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from dotenv import load_dotenv
3
+
4
+ load_dotenv()
5
+
6
+ class Settings:
7
+ # Telegram API Credentials (Load these from a .env file for security)
8
+ API_ID: int = int(os.getenv("API_ID", 1234567))
9
+ API_HASH: str = os.getenv("API_HASH", "YOUR_API_HASH")
10
+
11
+ # Session Management
12
+ SESSION_NAME: str = "telethon_session"
13
+ SESSION_FILE: str = f".{SESSION_NAME}.session"
14
+
15
+ # Directory Setup
16
+ DOWNLOAD_DIR: str = "downloads"
17
+ METADATA_CSV: str = os.path.join(DOWNLOAD_DIR, "metadata.csv")
18
+ METADATA_JSON: str = os.path.join(DOWNLOAD_DIR, "metadata.json")
19
+ THUMBNAILS_DIR: str = os.path.join(DOWNLOAD_DIR, "thumbnails")
20
+
21
+ # FloodWait Settings (seconds)
22
+ DEFAULT_FLOOD_WAIT: int = 30
23
+
24
+ settings = Settings()