Answer the question
In order to leave comments, you need to log in
How to catch a photo from a dialog and send it via VK API?
I need the bot to send it back when it receives a photo in PM. First I catch attachments, it comes in the form
{'attach1_type': 'photo', 'attach1': '224789790_457250860'}
<type><owner_id>_<media_id>
:ids = '"'+event.attachments[attach1_type]+event.attachments[attach1]+'"'
vk.method("messages.send", {"user_id": event.user_id, "message": event.message, "attachment": ids, "random_id": 0})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question