Skip to content

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

Open

Description

@abhi3700

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?

Activity

  1. MarcoBuster commented on May 20, 2021

    @MarcoBuster
    Member

    What are you trying to do?

  2. abhi3700 commented on May 20, 2021

    @abhi3700
    Author

    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 🙏

  3. abhi3700 commented on May 21, 2021

    @abhi3700
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions