i want to write a telegram bot that save photos . this is my code , but its not working. and i don\'t know what is my problem?
def image_handler(bot, update
update.message.photo is an array of photos sizes (PhotoSize objects).
update.message.photo
Use file = bot.getFile(update.message.photo[-1].file_id). This will get the image with biggest size available.
file = bot.getFile(update.message.photo[-1].file_id)