[O] Handle null case for token
This commit is contained in:
+6
-1
@@ -1,5 +1,10 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
token = os.getenv('TG_TOKEN', None)
|
||||
if token is None:
|
||||
print('Please configure your token in environment variable TG_TOKEN first.')
|
||||
sys.exit(0)
|
||||
|
||||
token = os.environ['TG_TOKEN']
|
||||
font = os.getenv('FONT', None)
|
||||
dbPath = 'database.json'
|
||||
|
||||
Reference in New Issue
Block a user