Hermes Agent commited on
Commit
b3aede6
·
1 Parent(s): c2efc5e

Strip quotes from API_ID, API_HASH, and BOT_TOKEN

Browse files
Files changed (1) hide show
  1. Thunder/vars.py +4 -3
Thunder/vars.py CHANGED
@@ -25,9 +25,10 @@ def str_to_int_set(val: str) -> Set[int]:
25
 
26
 
27
  class Var:
28
- API_ID: int = int(os.getenv("API_ID", "0"))
29
- API_HASH: str = os.getenv("API_HASH", "").strip()
30
- BOT_TOKEN: str = os.getenv("BOT_TOKEN", "").strip()
 
31
 
32
  # Diagnostics to help debug API_ID_INVALID
33
  logger.info("--- API CONFIGURATION DIAGNOSTICS ---")
 
25
 
26
 
27
  class Var:
28
+ raw_api_id = os.getenv("API_ID", "0").strip(" '\"")
29
+ API_ID: int = int(raw_api_id) if raw_api_id.isdigit() else 0
30
+ API_HASH: str = os.getenv("API_HASH", "").strip(" '\"")
31
+ BOT_TOKEN: str = os.getenv("BOT_TOKEN", "").strip(" '\"")
32
 
33
  # Diagnostics to help debug API_ID_INVALID
34
  logger.info("--- API CONFIGURATION DIAGNOSTICS ---")