mirror of
https://github.com/qiyanaitsme/QIYANASAutoPumpLOLZ.git
synced 2026-08-29 01:07:44 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0aa9e1f697 |
+2
-5
@@ -42,11 +42,8 @@ class Config:
|
|||||||
admin_user_id: int
|
admin_user_id: int
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def load(cls, env_path: str = ".env") -> Self:
|
def load(cls) -> Self:
|
||||||
if not os.path.exists(env_path):
|
load_dotenv()
|
||||||
raise FileNotFoundError(f".env file not found: {env_path}")
|
|
||||||
|
|
||||||
load_dotenv(env_path)
|
|
||||||
|
|
||||||
bot_token = os.getenv("BOT_API_TOKEN", "")
|
bot_token = os.getenv("BOT_API_TOKEN", "")
|
||||||
api_token = os.getenv("API_AUTH_TOKEN", "")
|
api_token = os.getenv("API_AUTH_TOKEN", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user