-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathmuxbot.py
35 lines (25 loc) · 795 Bytes
/
muxbot.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
import logging
logging.basicConfig(level = logging.DEBUG,
format="%(asctime)s - %(name)s - %(message)s - %(levelname)s")
logger = logging.getLogger(__name__)
import os
if os.path.exists('testconfig.py'):
from testconfig import Config
else:
from config import Config
from helper_func.dbhelper import Database as Db
db = Db().setup()
import pyrogram
logging.getLogger('pyrogram').setLevel(logging.WARNING)
if __name__ == '__main__':
if not os.path.isdir(Config.DOWNLOAD_DIR):
os.mkdir(Config.DOWNLOAD_DIR)
plugins = dict(root='plugins')
app = pyrogram.Client(
'Subtitle Muxer',
bot_token = Config.BOT_TOKEN,
api_id = Config.APP_ID,
api_hash = Config.API_HASH,
plugins = plugins
)
app.run()