import os from dotenv import load_dotenv def load_config(): load_dotenv() config = type("Config", (), {})() config.TELEGRAM_TOKEN = os.getenv("TELEGRAM_TOKEN") config.REDIS_HOST = os.getenv("REDIS_HOST") config.REDIS_PORT = int(os.getenv("REDIS_PORT", "6379")) config.BOT_STORAGE_PATH = os.getenv("BOT_STORAGE_PATH", "./storage") return config