discord_peak_bot/app/config.py
2024-08-03 20:18:28 +09:00

11 lines
258 B
Python

import json
import os
class Config:
@staticmethod
def load_config():
env = os.getenv('ENV', 'dev')
config_file = f"config/config.{env}.json"
with open(config_file, "r", encoding="utf-8") as f:
return json.load(f)