1
1
1programmer2018-11-22 18:04:29
In contact with
1programmer, 2018-11-22 18:04:29

Why are messages not coming from the vk conversation to the bot?

Hi all.
I'm trying to get messages from a VK conversation to a bot. If I write to the bot from my account, then everything is OK, if I write messages to the conversation, then the bot does not see the messages. All rights to correspondence are given to him.
The code by which I listen to messages,

group.longpoll.start();
        group.longpoll.on('message', (message) => {
            console.log(message);
            if(!message.isOutbox)
            {
                group.api.messages.getDialogs().then(() => {
                    console.log(typeof message.sender);
                }).catch(console.error);
            }
        });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Arkh, 2018-11-22
@AlekseyArh

The bot receives only messages addressed to him, otherwise he will respond to everything in a row.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question