M
M
mosikus2020-08-31 21:56:48
In contact with
mosikus, 2020-08-31 21:56:48

Why is node-vk-bot-api not working in conversation?

Hello. I am just starting my acquaintance with VK bots. Found *this lib*

const VkBot = require('node-vk-bot-api');

const bot = new VkBot('TOKEN');

bot.command('/start', (ctx) => {
  ctx.reply('Hello!');
});

bot.startPolling();

and I run
node bot.js
In the community's PM, it seems to be responding, but in a conversation it is silent, what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan145, 2021-09-09
@Ruslan145

I know I'm answering an old question, but still.
It didn't work for me either until I enabled "Event Types".
Community settings → Settings → Working with API → Long Poll API.
There are 2 sections: Settings and Event Types.
in the "Types of events" in the "Messages" section, turn on the necessary checkboxes.
6139337bc6a0e311945981.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question