A
A
ahmedes2022-04-09 20:18:47
In contact with
ahmedes, 2022-04-09 20:18:47

How to find the message_id of a bot message in VK using vk-io?

I need to take the message_id of the message that the bot sent to the conversation, so that I can later use it to edit the same message, but how can I implement this with the vk-io library?

I tried like this:

const message = await vk.api.messages.send({
                peer_id: 2000000003,
                random_id: getRandomId(),
    keyboard: builder2.inline(),
                message: `Текст...`
            })

console.log(message)


But as a result, I see 0 in the console. I googled this question and some wrote that it was impossible to get the id of the message in the conversation, but for some reason the "Kai" bot, which is a fairly popular assistant, can edit his messages in the conversation.

6251bfc55e505928291212.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question