mirror of
https://github.com/catspace-dev/unicheckbot.git
synced 2024-11-22 05:46:33 +03:00
Добавил поддержку .env
This commit is contained in:
parent
68960dd75e
commit
12da4c2aab
10
apps/tgbot/config.py
Normal file
10
apps/tgbot/config.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
|
||||
if os.path.exists(dotenv_path):
|
||||
load_dotenv(dotenv_path)
|
||||
|
||||
# Loading token from .env
|
||||
TELEGRAM_BOT_TOKEN = os.getenv("TELEGRAM_BOT_TOKEN")
|
Loading…
Reference in New Issue
Block a user