M
M
Mekriz2022-04-02 14:38:39
In contact with
Mekriz, 2022-04-02 14:38:39

VK API BOT: how to get the id of a post in a non-main community conversation?

I'm trying to make a bot, but I'm running into a problem: everywhere except the main conversation and the community's PM, the message id is 0. Everyone writes that this is how it should be because the bot's messages are not stored (and without receiving the message id, you can't delete / forward messages, etc.), but I'm sure I know that there are bots that can do this, and that is, they somehow get this very id in someone else's conversation (naturally with the admin panel).
I didn’t find anything on the Internet, everyone just says that messages are not saved and that’s all, but messages are saved only in community message dialogs (users and the main conversation).
The task is to get id messages at any cost, which means somehow adding chat to community messages.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DeFaNJI, 2022-04-10
@DeFaNJI

6251f3cb116c4040968226.png
In VK, as far as I remember, conversationMessageId is returned in conversations, try replacing peer_id with peer_ids and passing ID as a string

vk.api.messages.send({
    peer_ids: 'айди беседы',
    message: 'Проверяем',
}).then(console.log)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question