Files
FileStreamBot/WebStreamer/vars.py
Wrench 1ad5f78de2 🚀 Added Heroku Support
- Added Heroku Support
- Added a Readme since the repo page was looking so bad.
- Removed unused variables
2021-04-17 19:26:26 +05:30

24 lines
835 B
Python

# This file is a part of TG-FileStreamBot
# Coding : Jyothis Jayanth [@EverythingSuckz]
from os import getenv, environ
from dotenv import load_dotenv
load_dotenv()
class Var(object):
API_ID = int(getenv('API_ID'))
API_HASH = str(getenv('API_HASH'))
BOT_TOKEN = str(getenv('BOT_TOKEN'))
SLEEP_THRESHOLD = int(getenv('SLEEP_THRESHOLD', '60'))
WORKERS = int(getenv('WORKERS', '3'))
BIN_CHANNEL = int(getenv('BIN_CHANNEL', None))
PORT = int(getenv('PORT', 8080))
BIND_ADRESS = str(getenv('WEB_SERVER_BIND_ADDRESS', '0.0.0.0'))
OWNER_ID = int(getenv('OWNER_ID', None)) #TODO
if 'DYNO' in environ:
ON_HEROKU = True
APP_NAME = str(getenv('APP_NAME'))
else:
ON_HEROKU = False
FQDN = str(getenv('FQDN', BIND_ADRESS)) if not ON_HEROKU else APP_NAME+'.herokuapp.com'