Answer the question
In order to leave comments, you need to log in
VK bot not working. What to do?
Node JS version - 13.14.0 (Since it's no longer possible on Windows 7)
npm version - 6.14.4
At first everything worked, the bot answered messages, after it started doubling them, that is, first one word, then if I write 2 words to him in 2 lines etc. After the restart, the bot stopped responding. There are no errors in the console, in the code, it seems, too. Why is he not responding and doubling messages?
const VkBot = require('node-vk-bot-api');
let token = "ТОКЕН"; //Специально замазан
const bot = new VkBot(token);
bot.on((ctx) => {
let message = ctx.message.body;
if (message != '') {
ctx.message('Добро пожаловать!');
}
});
bot.startPolling();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question