botogram icon indicating copy to clipboard operation
botogram copied to clipboard

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

Open abhi3700 opened this issue 4 years ago • 3 comments

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?

abhi3700 avatar May 17 '21 15:05 abhi3700

What are you trying to do?

MarcoBuster avatar May 20 '21 11:05 MarcoBuster

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 avatar May 20 '21 18:05 abhi3700

@abhi3700 @MarcoBuster https://github.com/python-botogram/botogram/issues/168#issuecomment-845371146

abhi3700 avatar May 21 '21 11:05 abhi3700