Answer the question
In order to leave comments, you need to log in
Why is the bot not responding to mentions in a conversation?
When I write in a conversation with a bot, he answers ordinary messages, but there are no mentions.
const { VK, Keyboard } = require('vk-io');
const { HearManager } = require('@vk-io/hear');
const fs = require('fs');
const date = new Date();
const builder = Keyboard.builder();
const vk = new VK({
token: 'токен'
});
const bot = new HearManager();
vk.updates.on('message_new', bot.middleware, console.log(bot.message)
)
bot.hear(/^(?:[club(ID группы)|@группа] тест|тест|@группа тест)$/i, msg => {
msg.send(`Я РАБОТАЮ`)
})
vk.updates.start().catch(console.error)
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