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 does bot read a message with (text + photo) #168

Open
abhi3700 opened this issue May 17, 2021 · 3 comments
Open

how does bot read a message with (text + photo) #168

abhi3700 opened this issue May 17, 2021 · 3 comments

Comments

@abhi3700
Copy link

i am using this:

@bot.message_contains("kycdocf")
def save_kyc_docfrontimg(chat, message):
  photo = message.document

  message.reply('{file_id} \nsaved.'.format(file_id=str(photo.file_id)), reply_to = message.id)

I am i am not able to get the file_id
How to do this?..Anyone pls?

@MarcoBuster
Copy link
Member

What are you trying to do?

@abhi3700
Copy link
Author

abhi3700 commented May 20, 2021

What are you trying to do?

I want the bot to read the photo sent to the Bot & then download to my given destination file location:

SharedScreenshot

Here, the Bot is not responding..

Latest, I tried with this code snippet:

@bot.message_matches("kycdocf")
def save_kyc_docfrontimg(chat, message):
	message.reply(f"{message.caption}")
	message.reply(f"{message.photo.file_id}")

Please help me in this regard 🙏

@abhi3700
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants