A
A
alexxl22021-02-04 22:27:55
In contact with
alexxl2, 2021-02-04 22:27:55

How to learn all the conversations that the bot is in?

I ran into a problem that when receiving conversations using messages.getConvesations, I get only the chats that the bot created, but I need the id of all the conversations where the bot is located, is it possible to get the id of all the conversations where the bot is located?

const { items } = await vk.collect.messages.getConversations({
group_id: id,
})
const peerIdc = items
.filter(item => (
item.conversation.peer.type === 'chat'
))
.map( item => (
item.conversation.peer.id
))

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