feat(config): add dotenv loading, update README

This commit is contained in:
2026-07-20 08:35:58 +05:00
parent 50dbfc566a
commit cea7da5d2b
2 changed files with 9 additions and 24 deletions
+5
View File
@@ -1,4 +1,7 @@
import os
from dotenv import load_dotenv
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
@@ -36,6 +39,8 @@ def _env_bool(name: str, default: bool) -> bool:
return raw.strip().lower() in {"1", "true", "yes", "on"}
load_dotenv()
BOT_TOKEN = os.getenv("BOT_TOKEN", "")
LOG_BOT_TOKEN = os.getenv("LOG_BOT_TOKEN", "") or None
ADMIN_ID = _env_int("ADMIN_ID", 0)