MCPcopy Create free account
hub / github.com/TechifyBots/File-Stream-Bot / Var

Class Var

biisal/vars.py:16–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14load_dotenv()
15
16class Var(object):
17 MULTI_CLIENT = False
18 API_ID = int(getenv('API_ID', ''))
19 API_HASH = str(getenv('API_HASH', ''))
20 BOT_TOKEN = str(getenv('BOT_TOKEN' , ''))
21 PICS = (environ.get('PICS', 'https://envs.sh/jUp.jpg')).split()
22 name = str(getenv('name', 'linkstreamrobot'))
23 SLEEP_THRESHOLD = int(getenv('SLEEP_THRESHOLD', '60'))
24 WORKERS = int(getenv('WORKERS', '4'))
25 BIN_CHANNEL = int(getenv('BIN_CHANNEL', ''))
26 NEW_USER_LOG = int(getenv('NEW_USER_LOG', ''))
27 PORT = int(getenv('PORT', '8080'))
28 BIND_ADRESS = str(getenv('WEB_SERVER_BIND_ADDRESS', '0.0.0.0'))
29 PING_INTERVAL = int(environ.get("PING_INTERVAL", "1200")) # 20 minutes
30 OWNER_ID = [int(x) for x in os.environ.get("OWNER_ID", "").split()]
31 NO_PORT = bool(getenv('NO_PORT', False))
32 APP_NAME = None
33 OWNER_USERNAME = str(getenv('OWNER_USERNAME', 'TechifyRahul'))
34 if 'DYNO' in environ:
35 ON_HEROKU = True
36 APP_NAME = str(getenv('APP_NAME')) #dont need to fill anything here
37
38 else:
39 ON_HEROKU = False
40 FQDN = str(getenv('FQDN', 'BIND_ADRESS:PORT')) if not ON_HEROKU or getenv('FQDN', '') else APP_NAME+'.herokuapp.com'
41 HAS_SSL=bool(getenv('HAS_SSL',True))
42 if HAS_SSL:
43 URL = "https://{}/".format(FQDN)
44 else:
45 URL = "http://{}/".format(FQDN)
46 DATABASE_URL = str(getenv('DATABASE_URL', ''))
47 UPDATES_CHANNEL = str(getenv('UPDATES_CHANNEL', 'TechifyBots'))
48 BANNED_CHANNELS = list(set(int(x) for x in str(getenv("BANNED_CHANNELS", "")).split()))
49 BAN_CHNL = list(set(int(x) for x in str(getenv("BAN_CHNL", "")).split()))
50 BAN_ALERT = str(getenv('BAN_ALERT' , '<b>ʏᴏᴜʀ ᴀʀᴇ ʙᴀɴɴᴇᴅ ᴛᴏ ᴜsᴇ ᴛʜɪs ʙᴏᴛ.ᴄᴏɴᴛᴀᴄᴛ @CallOwnerBot ᴛᴏ ʀᴇsᴏʟᴠᴇ ᴛʜᴇ ɪssᴜᴇ!!</b>'))
51 SHORTLINK = is_enabled('SHORTLINK', False)
52 SHORTLINK_URL = getenv('SHORTLINK_URL', '')
53 SHORTLINK_API = getenv('SHORTLINK_API', '')

Callers

nothing calls this directly

Calls 1

is_enabledFunction · 0.85

Tested by

no test coverage detected