-
Notifications
You must be signed in to change notification settings - Fork 362
/
__init__.py
46 lines (41 loc) · 1.41 KB
/
__init__.py
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
import os
from collections import defaultdict
import logging
from logging.handlers import RotatingFileHandler
import time
import sys
from helpers.msg_utils import MakeButtons
"""Some Constants"""
MERGE_MODE = {} # Maintain each user merge_mode
UPLOAD_AS_DOC = {} # Maintain each user ul_type
UPLOAD_TO_DRIVE = {} # Maintain each user drive_choice
FINISHED_PROGRESS_STR = os.environ.get("FINISHED_PROGRESS_STR", "█")
UN_FINISHED_PROGRESS_STR = os.environ.get("UN_FINISHED_PROGRESS_STR", "░")
EDIT_SLEEP_TIME_OUT = 10
gDict = defaultdict(lambda: [])
queueDB = {}
formatDB = {}
replyDB = {}
VIDEO_EXTENSIONS = ["mkv", "mp4", "webm", "ts", "wav", "mov"]
AUDIO_EXTENSIONS = ["aac", "ac3", "eac3", "m4a", "mka", "thd", "dts", "mp3"]
SUBTITLE_EXTENSIONS = ["srt", "ass", "mka", "mks"]
w = open("mergebotlog.txt", "w")
w.truncate(0)
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(levelname)s - [%(filename)s:%(lineno)d] - %(message)s",
datefmt="%d-%b-%y %H:%M:%S",
handlers=[
RotatingFileHandler("mergebotlog.txt", maxBytes=50000000, backupCount=10),
logging.StreamHandler(sys.stdout), # to get sys messages
],
)
logging.getLogger("pyrogram").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("PIL").setLevel(logging.WARNING)
LOGGER = logging.getLogger(__name__)
BROADCAST_MSG = """
**Total: {}
Done: {}**
"""
bMaker = MakeButtons()