DEV Community

Discussion on: 🚀 Building a Telegram Bot with AWS API Gateway and AWS Lambda

Collapse
 
babakabdzadeh profile image
Babak abdolahzadeh

Hi, how can I add sendPhoto method to this code?
I tried to extend your code but it didn't worked
"""
def sendign_photo(chat_id, file_id):
url = URL + "sendPhoto?chat_id={}&photo={}".format(chat_id,file_id)
request.get(url)
"""

int the lambda handler I added this:
"""
file_id = message['message']['photo']['file_id']
sending_photo (chat_id, file_file)
"""