randydev commited on
Commit
50ea98f
1 Parent(s): 55df29b

Create config.py

Browse files
Files changed (1) hide show
  1. config.py +13 -0
config.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from os import getenv
3
+ from dotenv import load_dotenv
4
+
5
+ load_dotenv()
6
+ ENVIRONMENT = os.environ.get('ENVIRONMENT', True)
7
+ if ENVIRONMENT:
8
+ try:
9
+ API_ID = os.environ["API_ID"]
10
+ except ValueError:
11
+ raise Exception("Your API_ID is not a valid integer.")
12
+ API_HASH = os.environ["API_HASH"]
13
+ BOT_TOKEN = os.environ["BOT_TOKEN"]