Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 198 |
-
apihelper.API_URL = "
|
| 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).
|