-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathinfo.py
More file actions
29 lines (24 loc) · 881 Bytes
/
Copy pathinfo.py
File metadata and controls
29 lines (24 loc) · 881 Bytes
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
from os import environ, getenv
import re
import os
id_pattern = re.compile(r"^.\d+$")
def is_enabled(value, default):
if value.lower() in ["true", "yes", "1", "enable", "y"]:
return True
elif value.lower() in ["false", "no", "0", "disable", "n"]:
return False
else:
return default
ADMIN = int(getenv("ADMIN", ""))
SILICON_PIC = os.environ.get("SILICON_PIC", "https://telegra.ph/file/21a8e96b45cd6ac4d3da6.jpg")
API_ID = int(getenv("API_ID", ""))
API_HASH = str(getenv("API_HASH", ""))
BOT_TOKEN = str(getenv("BOT_TOKEN", ""))
FORCE_SUB = os.environ.get("FORCE_SUB", "")
MONGO_DB = str(getenv("MONGO_DB", "mongodb+srv://replacewithyourmongodb:replacewithyourmongodb@cluster0.zi78j51.mongodb.net/?retryWrites=true&w=majority",))
DEF_CAP = str(
getenv(
"DEF_CAP",
"<b>File Name:- `{file_name}`\n\n{file_size}</b>",
)
)