Answer the question
In order to leave comments, you need to log in
How to send 2 attachments in one message using a bot?
I wrote a small video search function in VK, I'm trying to send 2 attachments in one message using the 'messages.send' method, only one video is attached, what should I do?
Ps I read the documentation, it doesn't say there, or I'm blind
if textt[0] == '.video':
fov = event.text
poisk = fov.replace('.video ', '')
video = vk.video.search(q=poisk, count=10)
titl1 = video['items'][0]['title']
titl2 = video['items'][1]['title']
vid_id1 = video['items'][0]['ads']['params']['video_id']
vid_id2 = video['items'][1]['ads']['params']['video_id']
vid1 = str("video" + str(vid_id1))
vid2 = str("video" + str(vid_id2))
videos = vid1,vid2
id3 = event.peer_id
send_attachment(id3, ' Результаты поиска:\n1. Название: ' + titl1 + '\n2. Название: ' + titl2, videos)
Answer the question
In order to leave comments, you need to log in
https://vk.com/dev/messages.send
1. <type><owner_id>_<media_id>
2.
media attachments to the private message, separated by commas.you have a tuple
The easiest way is to use telephony services, such as Zadarma. Set up scenarios as you need, numbers, call forwarding, voice menu, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question