K
K
kikibyk2020-01-05 03:42:51
In contact with
kikibyk, 2020-01-05 03:42:51

When receiving data about a message, it is not possible to pull out the data?

I apologize in advance for the title.
So. When requesting message.attachments, it gives me this data:
5e1130be88d3b016587723.png
I need to get WallAttachment or id, ownerId.
I can't get something

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladlen Hellsite, 2020-01-05
@kikibyk

const [wall] = message.getAttachments('wall');

wall.id // => number
wall.ownerId // => number

P
Pigeon1235, 2020-01-05
@Pigeon1235

message.attachment.ownerId e.g.
I assume you are using the vk-io library and therefore you can look at the documentation

documentation
5e11836e89399406400625.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question