-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
32 lines (27 loc) · 875 Bytes
/
config.py
File metadata and controls
32 lines (27 loc) · 875 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
30
31
32
#Copyright 2022-present, Author: 5MysterySD
import os
import logging
from logging.handlers import RotatingFileHandler
# Logging >>>
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s [%(filename)s:%(lineno)d]",
datefmt="%d-%b-%y %I:%M:%S %p",
handlers=[
RotatingFileHandler(
"log.txt", maxBytes=50000000, backupCount=10
),
logging.StreamHandler(),
],
)
logging.getLogger("pyrogram").setLevel(logging.ERROR)
LOGGER = logging.getLogger(__name__)
# Initial >>>
USERS_API = {}
# Invoke Data >>>
class Config:
API_ID = int(os.environ.get("API_ID", ""))
API_HASH = os.environ.get("API_HASH", "")
BOT_TOKEN = os.environ.get("BOT_TOKEN", "")
DIRECTORY = os.environ.get("DIRECTORY", "downloads/")
OWNER_ID = int(os.environ.get("OWNER_ID", 1445283714))