We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
This is suggested by chatgpt. message.document is not a list when multiple files are uploaded.
@bot.message_handler(func=lambda _: True, content_types=["document"]) def handle_document(message: Message): if message.caption and bot_name in message.caption: username = message.from_user.username if isinstance(message.document, list): // this returns false for document in message.document: print(document.mime_type) file_id = document.file_id file_url = bot.get_file_url(file_id=file_id) print(file_url) else: print(message.document.mime_type) file_id = message.document.file_id file_url = bot.get_file_url(file_id=file_id) print(file_url)
It only handles the last photo uploaded.
The text was updated successfully, but these errors were encountered:
same as #2391 also do not use chatgpt
Sorry, something went wrong.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
4.22.1
linux (running bot), macos (running telegram)
3.12
This is suggested by chatgpt. message.document is not a list when multiple files are uploaded.
It only handles the last photo uploaded.
The text was updated successfully, but these errors were encountered: