deepak191z commited on
Commit
6dcca82
·
verified ·
1 Parent(s): 93a94de

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
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: