1

I'm trying to send an image from my drive to telegram using the method sendPhoto but I can't. Which is the trick ?

I'm using Python 3.6.7 My code is as follows:

import sys
import telepot
import aiohttp
import asyncio
import os
import time 

bot = telepot.Bot('55615????:AA????)
bot.getMe()
id=32????
bot.sendPhoto(chatId, str(open("th-623777.jpg", os.O_RDONLY)) )
MadMad666
  • 955
  • 3
  • 11
  • 19
  • see some code at https://stackoverflow.com/questions/35314526/telegram-bot-telepot-api-is-it-possible-to-send-an-image-directly-from-url-wi but couldn't make it work. Also checked the apy on https://telepot.readthedocs.io/en/latest/reference.html – MadMad666 Dec 19 '18 at 22:49
  • What error are you getting? – fabio.sang Mar 28 '19 at 18:07

0 Answers0