-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathconfig.py
More file actions
40 lines (30 loc) · 1.21 KB
/
Copy pathconfig.py
File metadata and controls
40 lines (30 loc) · 1.21 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
import os, time, re
id_pattern = re.compile(r'^.\d+$')
class Config(object):
# pyro client config
API_ID = os.environ.get("API_ID", "") # ⚠️ Required
API_HASH = os.environ.get("API_HASH", "") # ⚠️ Required
BOT_TOKEN = os.environ.get("BOT_TOKEN", "") # ⚠️ Required
FORCE_SUB = os.environ.get('FORCE_SUB', '') # ⚠️ Required
AUTH_CHANNEL = int(FORCE_SUB) if FORCE_SUB and id_pattern.search(
FORCE_SUB) else None
# database config
DB_URL = os.environ.get("DB_URL", "") # ⚠️ Required
DB_NAME = os.environ.get("DB_NAME","SnowEncoderBot")
# Other Configs
ADMIN = int(os.environ.get("ADMIN", "0")) # ⚠️ Required
LOG_CHANNEL = int(os.environ.get('LOG_CHANNEL', '0')) # ⚠️ Required
BOT_UPTIME = BOT_UPTIME = time.time()
START_PIC = os.environ.get("START_PIC", "https://telegra.ph//file/80a97e703fc3fdbcaefc5.jpg")
# wes response configuration
WEBHOOK = bool(os.environ.get("WEBHOOK", True))
PORT = int(os.environ.get("PORT", "8080"))
caption = """
**File Name**: {0}
**Original File Size:** {1}
**Encoded File Size:** {2}
**Compression Percentage:** {3}
__Downloaded in {4}__
__Encoded in {5}__
__Uploaded in {6}__
"""