Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to download photo from messagePhoto? #422

Open
wahyuief opened this issue Oct 31, 2023 · 1 comment
Open

How to download photo from messagePhoto? #422

wahyuief opened this issue Oct 31, 2023 · 1 comment
Labels

Comments

@wahyuief
Copy link

wahyuief commented Oct 31, 2023

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']
Copy link

stale bot commented Apr 28, 2024

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 stale bot added the stale label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant