P
P
Paoooo2020-05-05 06:01:40
JavaScript
Paoooo, 2020-05-05 06:01:40

How to use the VK API method for another?

const response = await vk.api.messages.getHistory({

There is such a code, it has a response
date: 1588643854,
      from_id: 595798735,
      id: 11453,
      out: 1,
      peer_id: 2000000011,
      text: '',
      conversation_message_id: 1,
      action: [Object],
      fwd_messages: [],
      important: false,
      random_id: 0,
      attachments: [],
      is_hidden: false

It is necessary to pass this element to the method vk.api.messages.delete
messages_ids: select a parameter from getHistory.items[0].id
, how to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2020-05-05
@loonny

create an array for the ID, run getHistory.items through the fic, adding IDs to the array.

P
Paooo, 2020-05-05
@Paooo

better type give me the code, i will be grateful

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question