# ============================================================= # Rename this file to config.env before using # ============================================================= #################### ## REQUIRED SETTINGS #################### # Telegram API credentials (from https://my.telegram.org/apps) API_ID=0 # Example: 1234567 API_HASH="" # Example: "abc123def456" # Bot token (from @BotFather) BOT_TOKEN="" # Example: "123456789:ABCdef..." # Storage channel ID (create a channel and add bot as admin) BIN_CHANNEL=0 # Example: -1001234567890 # Owner information (get ID from @userinfobot) OWNER_ID=0 # Your Telegram user ID. Example: 123456789 # Database connection string DATABASE_URL="" # Example: "mongodb+srv://user:pass@host/db" # Deployment configuration FQDN="" # Your domain name HAS_SSL="True" # Set to "True" if using HTTPS PORT=8080 # Web server port NO_PORT="True" # Hide port in URLs ("True" or "False") #################### ## OPTIONAL SETTINGS #################### MAX_BATCH_FILES=50 # Set bot commands on startup (True/False) SET_COMMANDS="True" # Force users to join a specific channel before using the bot FORCE_CHANNEL_ID="" # Example: -1001234567890 (Leave empty if not needed) # Allow processing of channel messages (True/False) CHANNEL="False" # Banned channels (files from these channels will be rejected) BANNED_CHANNELS="" # Example: "-1001234567890 -100987654321" (Space-separated IDs, leave empty if none) # Multiple bot tokens (can add up to MULTI_TOKEN49) # Example: MULTI_TOKEN49="123456789:ABCdef..." MULTI_TOKEN1="" #################### ## TOKEN SYSTEM SETTINGS #################### # Enable token-based access (True/False) TOKEN_ENABLED="False" # Default token validity in hours TOKEN_TTL_HOURS="24" #################### ## URL SHORTENER SETTINGS #################### # Enable URL shortening for tokens (True/False) SHORTEN_ENABLED="False" # Enable URL shortening for media links (True/False) SHORTEN_MEDIA_LINKS="False" # URL Shortener URL_SHORTENER_API_KEY="" # Example: "abc123def456" URL_SHORTENER_SITE="" # Example: "example.com" #################### ## GLOBAL RATE LIMITING SETTINGS #################### # Enable global rate limiting (True/False) GLOBAL_RATE_LIMIT="False" # Maximum number of requests allowed across all users per minute MAX_GLOBAL_REQUESTS_PER_MINUTE=4 #################### ## RATE LIMITING SETTINGS #################### # Enable rate limiting (True/False) RATE_LIMIT_ENABLED="False" MAX_FILES_PER_PERIOD=2 # Time window in minutes for rate limiting RATE_LIMIT_PERIOD_MINUTES=1 # Maximum number of requests that can be queued. MAX_QUEUE_SIZE=100 #################### ## UPDATE SETTINGS #################### # Git repository for updates UPSTREAM_REPO="https://github.com/fyaz05/FileToLink" # Branch to update from UPSTREAM_BRANCH="main" # Default branch for updates #################### ## ADVANCED SETTINGS (modify with caution) #################### # Application name NAME="ThunderF2L" # Bot application name # Performance settings SLEEP_THRESHOLD=600 # Sleep time in seconds WORKERS=8 # Number of worker processes # Web server configuration BIND_ADDRESS="0.0.0.0" # Listen on all network interfaces PING_INTERVAL=840 # Ping interval in seconds