forked from yashoswalyo/MERGE-BOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
47 lines (42 loc) · 1.39 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
47
import os
from collections import defaultdict
import logging
from logging.handlers import RotatingFileHandler
import time
import sys
from config import Config
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']
SUBTITLE_EXTENSIONS = ['srt','ass']
w = open('Merge-Bot.txt','w')
w.truncate(0)
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(levelname)s - %(message)s [%(filename)s:%(lineno)d]",
datefmt="%d-%b-%y %H:%M:%S",
handlers=[
RotatingFileHandler("Merge-Bot.txt", maxBytes=50000000, backupCount=10),
logging.StreamHandler(sys.stdout), #to get sys messages
],
)
logging.getLogger("pyrogram").setLevel(logging.ERROR)
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("PIL").setLevel(logging.WARNING)
LOGGER = logging.getLogger(__name__)
BROADCAST_MSG = '''
**Total: {}
Done: {}**
'''
bMaker = MakeButtons()