python-telegram icon indicating copy to clipboard operation
python-telegram copied to clipboard

How to download photo from messagePhoto?

Open wahyuief opened this issue 2 years ago • 1 comments

I want to save photo from content type messagePhoto but it's not work

      for message in response.update['messages']:
            if message['content']['@type'] == 'messagePhoto':
                stats_data[message['id']] = message['content']['text']['text']
                photo_id = message['content']['photo']['sizes'][0]['photo']['id']
                    
                photo_data = telegram.call_method(
                    method_name = 'downloadFile',
                    params = {'file_id': photo_id}
                )
                photo_data.wait()
                    
            from_message_id = message['id']

wahyuief avatar Oct 31 '23 10:10 wahyuief

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 28 '24 22:04 stale[bot]