forked from Lolz/Auto-Pump
Remove env_path dependency
This commit is contained in:
+2
-5
@@ -42,11 +42,8 @@ class Config:
|
||||
admin_user_id: int
|
||||
|
||||
@classmethod
|
||||
def load(cls, env_path: str = ".env") -> Self:
|
||||
if not os.path.exists(env_path):
|
||||
raise FileNotFoundError(f".env file not found: {env_path}")
|
||||
|
||||
load_dotenv(env_path)
|
||||
def load(cls) -> Self:
|
||||
load_dotenv()
|
||||
|
||||
bot_token = os.getenv("BOT_API_TOKEN", "")
|
||||
api_token = os.getenv("API_AUTH_TOKEN", "")
|
||||
|
||||
Reference in New Issue
Block a user