Load .env file at startup via python-dotenv

Running directly with `python -m gaming_deals_bot` didn't pick up
variables from .env — only the Docker path (--env-file) did. Now
dotenv is loaded before config parsing so both workflows work.

https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX
This commit is contained in:
Claude
2026-02-28 02:04:37 +00:00
parent 016d2c1973
commit 3138fe314f
2 changed files with 3 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import signal
import sys
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from dotenv import load_dotenv
from .bot import DealsBot
from .config import Config
@@ -21,6 +22,7 @@ def setup_logging():
async def main():
load_dotenv()
setup_logging()
logger = logging.getLogger("gaming_deals_bot")