AstraOS commited on
Commit
58381cb
·
verified ·
1 Parent(s): 9b75929

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -189,13 +189,12 @@ logging.basicConfig(
189
  # Bot Initialization and Owner Configuration
190
  # ------------------------------------------------------------------------------
191
 
192
- # TOKEN = os.environ["BOT_TOKEN"]
193
  TOKEN = os.environ.get("BOT_TOKEN")
194
  if not TOKEN:
195
  raise RuntimeError("BOT_TOKEN environment variable is not set")
196
- PROXY_BASE = os.getenv("PROXY_BASE")
197
- # bot = telebot.TeleBot(TOKEN, api_base_url=PROXY_BASE)
198
- apihelper.API_URL = "https://small-cod-19.simpleslug.deno.net/telegram-api/bot{0}/{1}"
199
  bot = telebot.TeleBot(TOKEN)
200
 
201
  OWNER_ID = int(os.getenv("CHAT_IDS")) # Replace with your Telegram user ID (owner-only commands).
 
189
  # Bot Initialization and Owner Configuration
190
  # ------------------------------------------------------------------------------
191
 
 
192
  TOKEN = os.environ.get("BOT_TOKEN")
193
  if not TOKEN:
194
  raise RuntimeError("BOT_TOKEN environment variable is not set")
195
+ PROXY_BASE = os.getenv("PROXY_BASE", "https://api.telegram.org")
196
+ if PROXY_BASE != "https://api.telegram.org":
197
+ apihelper.API_URL = f"{PROXY_BASE}/bot{{0}}/{{1}}"
198
  bot = telebot.TeleBot(TOKEN)
199
 
200
  OWNER_ID = int(os.getenv("CHAT_IDS")) # Replace with your Telegram user ID (owner-only commands).