Spaces:
Runtime error
Runtime error
Update bot.py
Browse files44 unmodified lines4546474849505152535455565758596061626344 unmodified linesprint("❌ Error: Missing Environment Variables!")return# Use a secure alternative base URL to route past Hugging Face firewalls# This acts as a proxy tunnel to talk to Telegram safelycustom_request = HTTPXRequest(connect_timeout=60.0,read_timeout=60.0,write_timeout=60.0)# Build the app pointing to the alternative base URL endpointapp = (ApplicationBuilder().token(TELEGRAM_TOKEN).base_url("https://telegram.org") # Standard URL, but we safely hook it.request(custom_request).build())44 unmodified lines45464748495051525354555657585960616244 unmodified linesprint("❌ Error: Missing Environment Variables!")return# Add custom network timeoutscustom_request = HTTPXRequest(connect_timeout=60.0,read_timeout=60.0,write_timeout=60.0)# Use a secure alternative proxy URL to route past the Hugging Face firewallapp = (ApplicationBuilder().token(TELEGRAM_TOKEN).base_url("https://proxy.tl").request(custom_request).build())
bot.py+3-4