Skip to content

Commit

Permalink
Logging path to env file.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Jan 23, 2024
1 parent b8d4a9a commit 21c3617
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
from bot_templates import Buttons, Messages
from logger import Logger

logger = Logger(__name__)
working_directory = os.getcwd()
logger.info(f"Working directory: {working_directory}")
env_path = os.path.join(working_directory, "bot.env")
logger.info(f"Environment file: {env_path}")
if not os.path.exists(env_path):
raise FileNotFoundError(f"Environment file not found: {env_path}")
load_dotenv(env_path)
token = os.getenv("BOT_TOKEN")

Expand Down

0 comments on commit 21c3617

Please sign in to comment.