forked from MiyukiKun/Auto_Encodes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
49 lines (38 loc) · 1.21 KB
/
config.py
File metadata and controls
49 lines (38 loc) · 1.21 KB
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
48
49
import os
import heroku3
from telethon import TelegramClient
api_id = os.environ.get('API_ID')
api_hash = os.environ.get('API_HASH')
bot_token = os.environ.get('BOT_TOKEN')
bot_username = os.environ.get('BOT_USERNAME')
heroku_key = os.environ.get('HEROKU_API_KEY')
BASE = os.environ.get('BASE')
if not BASE:
from sample_config import BASE as b
BASE = b
FFMPEG = os.environ.get('FFMPEG')
if not FFMPEG:
from sample_config import FFMPEG as f
FFMPEG = int(f)
DESTINATION = os.environ.get('DESTINATION')
if not DESTINATION:
from sample_config import DESTINATION as d
DESTINATION = int(d)
FFMPEGID = os.environ.get('FFMPEGID')
if not FFMPEGID:
from sample_config import FFMPEGID as f
FFMPEGID = f
FFMPEGID = FFMPEGID.split()
for i in range(len(FFMPEGID)):
FFMPEGID[i] = int(FFMPEGID[i])
FFMPEGCMD = os.environ.get('FFMPEGCMD')
if not FFMPEGCMD:
from sample_config import FFMPEGCMD as c
FFMPEGCMD = int(c)
BASE = int(BASE)
FFMPEG = int(FFMPEG)
FFMPEGCMD = int(FFMPEGCMD)
DESTINATION = int(DESTINATION)
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
herokuapp = heroku3.from_key(heroku_key)
app = herokuapp.apps()[0]