-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env
More file actions
58 lines (43 loc) · 1.55 KB
/
example.env
File metadata and controls
58 lines (43 loc) · 1.55 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Telegram Account Configuration
# Get your API credentials from https://my.telegram.org/apps
TELEGRAM_API_ID=your_api_id_here
TELEGRAM_API_HASH=your_api_hash_here
# Your phone number (include country code, e.g., +1234567890)
TELEGRAM_PHONE=+1234567890
# 2FA password (required if you have 2FA enabled, leave empty if not)
TELEGRAM_PASSWORD=your_2fa_password_here
# Webhook Configuration
# URL where messages will be forwarded as JSON
WEBHOOK_URL=https://your-webhook-url.com/webhook
# Webhook timeout in seconds
WEBHOOK_TIMEOUT=30
# Number of retry attempts for failed webhooks
WEBHOOK_RETRY_ATTEMPTS=3
# Database Configuration
# Choose between 'sqlite' or 'redis'
DATABASE_TYPE=sqlite
# SQLite database file path (only used if DATABASE_TYPE=sqlite)
SQLITE_DB_PATH=telegram_client.db
# Redis Configuration (only used if DATABASE_TYPE=redis)
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=
# Logging Configuration
# Log level: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO
# Log file path
LOG_FILE=telegram_client.log
# Recovery Configuration
# How often to check for recovery scenarios (seconds)
RECOVERY_CHECK_INTERVAL=60
# Maximum number of pending messages to store
MAX_QUEUE_SIZE=1000
# Message Processing Configuration
# Number of messages to process in each batch
MESSAGE_BATCH_SIZE=10
# How often to process pending messages (seconds)
MESSAGE_PROCESSING_INTERVAL=5
# Chat Filtering Configuration
# The client will only forward messages from chats listed in allowed_chats.txt
# You can manage this list using: ./manage_chats.py list/add/remove/test