Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
@@ -115,7 +115,8 @@ async def send_image_to_telegram(image_path, caption):
|
|
115 |
|
116 |
# Generate the direct file link
|
117 |
file_info = await bot.get_file(image_url)
|
118 |
-
direct_link = f"https://api.telegram.org/file/bot{TELEGRAM_BOT_TOKEN}/{file_info.file_path}"
|
|
|
119 |
|
120 |
return direct_link
|
121 |
except Exception as e:
|
|
|
115 |
|
116 |
# Generate the direct file link
|
117 |
file_info = await bot.get_file(image_url)
|
118 |
+
direct_link = f"https://api.telegram.org/file/bot{TELEGRAM_BOT_TOKEN}/{file_info.file_path.lstrip('/')}"
|
119 |
+
|
120 |
|
121 |
return direct_link
|
122 |
except Exception as e:
|