cevheri commited on
Commit
7237f1f
·
verified ·
1 Parent(s): d363e07

Update bot_telegram.py

Browse files
Files changed (1) hide show
  1. bot_telegram.py +5 -5
bot_telegram.py CHANGED
@@ -14,8 +14,8 @@ logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(
14
  BOT_TOKEN = os.getenv("BOT_TOKEN")
15
  BASE_URL = os.getenv("BASE_URL")
16
  HF_TOKEN = os.getenv("HF_TOKEN")
17
- # API_USERNAME = os.getenv("API_USERNAME")
18
- # API_PASSWORD = os.getenv("API_PASSWORD")
19
 
20
  # Set the secret password for authentication
21
  SECRET_PASSWORD = "secure123" # Change this to your desired password
@@ -53,16 +53,16 @@ class TelegramBot:
53
  # """Authenticate with the API and retrieve an access token."""
54
  # payload = {"username": self.username, "password": self.password}
55
  # headers = {"Content-Type": "application/json", "accept": "application/json"}
56
- #
57
  # try:
58
  # response = requests.post(self.login_url, headers=headers, json=payload)
59
- #
60
  # if response.status_code == 200:
61
  # self.auth_token = response.json().get("access_token")
62
  # logging.info("Successfully authenticated with API")
63
  # else:
64
  # logging.error(f"Authentication failed: {response.status_code} - {response.text}")
65
- #
66
  # except Exception as e:
67
  # logging.error(f"Authentication Error: {e}")
68
 
 
14
  BOT_TOKEN = os.getenv("BOT_TOKEN")
15
  BASE_URL = os.getenv("BASE_URL")
16
  HF_TOKEN = os.getenv("HF_TOKEN")
17
+ API_USERNAME = os.getenv("API_USERNAME")
18
+ API_PASSWORD = os.getenv("API_PASSWORD")
19
 
20
  # Set the secret password for authentication
21
  SECRET_PASSWORD = "secure123" # Change this to your desired password
 
53
  # """Authenticate with the API and retrieve an access token."""
54
  # payload = {"username": self.username, "password": self.password}
55
  # headers = {"Content-Type": "application/json", "accept": "application/json"}
56
+ #
57
  # try:
58
  # response = requests.post(self.login_url, headers=headers, json=payload)
59
+ #
60
  # if response.status_code == 200:
61
  # self.auth_token = response.json().get("access_token")
62
  # logging.info("Successfully authenticated with API")
63
  # else:
64
  # logging.error(f"Authentication failed: {response.status_code} - {response.text}")
65
+ #
66
  # except Exception as e:
67
  # logging.error(f"Authentication Error: {e}")
68