K
K
kalamandi2020-12-28 11:16:04
In contact with
kalamandi, 2020-12-28 11:16:04

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

1 answer(s)
P
Puma Thailand, 2020-12-28
@opium

I don't quite understand, why should he answer?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question