Answer the question
In order to leave comments, you need to log in
How to get message id?
To perform many actions, as written in the VK documentation, a message identifier is required, but the question is where to get it from.
Who knows, he can at least tell you how to get the id of the last message sent by the community itself (to use the messages.edit method).
cmd.hear(/^(?:редактировать)\s(.*)\s(.*)$/i, async (message, bot) => { //---
// /s - пробел,
// (.*)[1] - id сообщения,
// (.*)[2] - текст для редакции сообщения,
// например: "редактировать 5894346 пока"
vk.api.messages.edit({
peer_id: 20000000003,
message: `пока`,
message_id: ??????????
keep_forward_messages: 1,
group_id: 184895474,
dont_parse_links: 1
});
});
message_id
and use it in the future. Thank you.
Answer the question
In order to leave comments, you need to log in
If the bot is on the VK-IO library, then PS
If the bot is in a group, then as far as I know they cannot receive message ids
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question